@smartkomm/plexus-cli 0.1.315 → 0.1.317
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
399c00b3b15a7349f45da0d2e9f3af6cfa71a27d12fa65012ae9ba613229d8fc
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -235,6 +235,7 @@ whole is the operator's (ask them; do not try).
|
|
|
235
235
|
| [platform/clear-test-residue.md](references/platform/clear-test-residue.md) | Plattform | Find and delete what deleted test applications left in a real tenant, after review. |
|
|
236
236
|
| [platform/rename-tenant.md](references/platform/rename-tenant.md) | Plattform | Change a tenant's slug and display name in place, then its accounts' addresses. |
|
|
237
237
|
| [platform/inventory.md](references/platform/inventory.md) | Plattform | Count test data per real tenant and stored files (referenced, orphaned) — counts and ids only. |
|
|
238
|
+
| [platform/integrity-scan.md](references/platform/integrity-scan.md) | Plattform | List the ids of one school (or the tenant-less rows) that point at a missing row — ids only, confirmed by a second read. |
|
|
238
239
|
| [platform/sweep-storage-orphans.md](references/platform/sweep-storage-orphans.md) | Plattform | List the stored files no record names, then delete exactly the reviewed ones. |
|
|
239
240
|
| [resolver/manage-contract-package.md](references/resolver/manage-contract-package.md) | Mandant + Plattform | Create, review and seal a contract package from one file by key. |
|
|
240
241
|
| [resolver/manage-contract-resolver.md](references/resolver/manage-contract-resolver.md) | Mandant | Create, test, seal, assign and revise a contract resolver. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# plexus-cli command reference
|
|
2
2
|
|
|
3
3
|
Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
|
|
4
|
-
|
|
4
|
+
306 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
|
|
5
5
|
`--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
|
|
6
6
|
|
|
7
7
|
- [Admission (offline)](#admission-offline) (1)
|
|
@@ -18,6 +18,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
|
|
|
18
18
|
- [Identity (own account)](#identity-own-account) (5)
|
|
19
19
|
- [Imports (platform operator)](#imports-platform-operator) (3)
|
|
20
20
|
- [Imports (school token)](#imports-school-token) (2)
|
|
21
|
+
- [Integrity (platform operator)](#integrity-platform-operator) (1)
|
|
21
22
|
- [Introspection (offline)](#introspection-offline) (2)
|
|
22
23
|
- [Introspection (own account)](#introspection-own-account) (1)
|
|
23
24
|
- [Jobs (platform operator)](#jobs-platform-operator) (4)
|
|
@@ -1145,6 +1146,21 @@ Trigger a manual import for the active tenant — destructive, plan unless --con
|
|
|
1145
1146
|
| `--engage-password-stdin` | Read the Engage password from stdin. |
|
|
1146
1147
|
| `--engage-password-file <value>` | Read the Engage password from this file. |
|
|
1147
1148
|
|
|
1149
|
+
## Integrity (platform operator)
|
|
1150
|
+
|
|
1151
|
+
### `integrity scan`
|
|
1152
|
+
|
|
1153
|
+
Read-only: dangling references of one tenant (or of the platform rows) — ids only, confirmed by a second read.
|
|
1154
|
+
|
|
1155
|
+
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
1156
|
+
- **Effect:** read — changes nothing on the deployment
|
|
1157
|
+
|
|
1158
|
+
| Option | Description |
|
|
1159
|
+
|---|---|
|
|
1160
|
+
| `--platform` | Scan the rows without a tenant (users, tenants, tenant-less child tables) instead of one tenant. |
|
|
1161
|
+
| `--table <value>` | Scan only this table (repeatable). |
|
|
1162
|
+
| `--confirm-after <value>` | Milliseconds a candidate waits before its second read (default 60000). |
|
|
1163
|
+
|
|
1148
1164
|
## Introspection (offline)
|
|
1149
1165
|
|
|
1150
1166
|
### `describe <fn>`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Scan a tenant for dangling references
|
|
2
|
+
|
|
3
|
+
**When to use:** you suspect, or must rule out, that rows of a school point at
|
|
4
|
+
rows that no longer exist — after a reset, an import, a bulk delete, or when a
|
|
5
|
+
page shows "(unbenannt)" or fails to load a linked record. Read-only; it prints
|
|
6
|
+
table, column path, row id, target table and target id — never row content —
|
|
7
|
+
so the result can be pasted into an issue.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
- A platform token with `_platform.config.read` (or `.manage`).
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
```bash
|
|
14
|
+
# 1. One school, all tables (the local test tenant: 183 tables, ~4 000 rows, ~2 min;
|
|
15
|
+
# a candidate waits 60 s for its second read):
|
|
16
|
+
plexus-cli --env <env> --tenant <slug> integrity scan
|
|
17
|
+
|
|
18
|
+
# 2. The rows without a tenant (users, tenants, platform admins, tenant-less child rows):
|
|
19
|
+
plexus-cli --env <env> integrity scan --platform
|
|
20
|
+
|
|
21
|
+
# 3. Narrow down, as JSON for a script or an issue:
|
|
22
|
+
plexus-cli --env <env> --tenant <slug> integrity scan --table work_items --table applications --json > <scratch>/scan.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The table output lists each finding (`kind` = the column's relation kind,
|
|
26
|
+
`belongsTo`, `holds`, `restrict`, `owns`, or `frozen` for an id frozen in a
|
|
27
|
+
contract revision), then one `count` row per (table, column), one `table` row
|
|
28
|
+
per table read (rows, pages, time), then a `summary` row: findings (and how many
|
|
29
|
+
are listed, at most 1000), tables, rows and pages read, runtime, unconfirmed
|
|
30
|
+
candidates, excluded and unreachable tables. Progress per table goes to stderr. The exit
|
|
31
|
+
code is 0 with or without findings — read the count.
|
|
32
|
+
|
|
33
|
+
## What it does not see
|
|
34
|
+
- Ids inside a free-form (`v.any`) field — the graph knows no column there.
|
|
35
|
+
- Tables excluded on purpose (`party_search_index_entries`, derived, has its own
|
|
36
|
+
drift check) — listed under `excluded`.
|
|
37
|
+
- A row deleted while its cascade is still running: the second read, 60 s later,
|
|
38
|
+
drops it (`unconfirmed`). Raise `--confirm-after` if a large delete is under way.
|
|
39
|
+
|
|
40
|
+
## Handling a finding
|
|
41
|
+
A finding is a bug in the write path that left it, not a data task: file an
|
|
42
|
+
issue with the scan output (ids only) and find the deleting path before
|
|
43
|
+
repairing rows. `excluded` and `unreachable` in the JSON output name every table
|
|
44
|
+
the scan leaves out.
|
|
45
|
+
|
|
46
|
+
## Idempotency / gotchas
|
|
47
|
+
- Writes nothing on the deployment; re-run freely.
|
|
48
|
+
- `--tenant` and `--platform` are exclusive; a `--table` the unit does not scan is refused.
|
|
49
|
+
- The report lists at most 1000 findings; the counts stay complete.
|
|
50
|
+
|
|
51
|
+
## Related
|
|
52
|
+
- [Clear test residue](./clear-test-residue.md) — what deleted test applications left behind.
|
|
53
|
+
- [Inventory test data and storage](./inventory.md).
|