@smartkomm/plexus-cli 0.1.122 → 0.1.123

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
- abda584f86d6e57da0bd747f218da589d6e4cad4542c537727d58f2a7941afca
1
+ f6aafb013c32aeb0c313088112b391a760c5ee7b2af78ac486631f98247a3e52
@@ -3205,6 +3205,7 @@ Delete the residue of deleted test applications that BOTH a fresh plan and --lis
3205
3205
  | `--list <value>` (required) | The plan file `platform test-residue plan --out` wrote, reviewed. |
3206
3206
  | `--protect <value>` (required) | JSON file with the application ids that must never be touched (the demo applications a school keeps); required, non-empty — a planned row naming one aborts the run. |
3207
3207
  | `--confirm` | Delete (without it, only the comparison is printed). |
3208
+ | `--include-no-application` | Also take contracts, generation runs and signing requests that name no application. Such a row may be a real contract's: review the plan's `noApplication`. A list and its apply must agree on this flag. |
3208
3209
 
3209
3210
  ### `platform test-residue plan`
3210
3211
 
@@ -3218,6 +3219,7 @@ Read-only: the residue of deleted test applications in one tenant — ids and co
3218
3219
  | `--protect <value>` (required) | JSON file with the application ids that must never be touched (the demo applications a school keeps); required, non-empty — a planned row naming one aborts the run. |
3219
3220
  | `--out <value>` | Write the plan as JSON here (refused when it exists, unless --force) — the list `apply` takes. |
3220
3221
  | `--force` | Overwrite an existing --out file. |
3222
+ | `--include-no-application` | Also take contracts, generation runs and signing requests that name no application. Such a row may be a real contract's: review the plan's `noApplication`. A list and its apply must agree on this flag. |
3221
3223
 
3222
3224
  ### `platform workers list`
3223
3225
 
@@ -24,6 +24,31 @@ never deleted.
24
24
  **Abort:** plan and apply stop before any write when a planned row names an id
25
25
  from `--protect` (the demo applications a school keeps) or a live application.
26
26
 
27
+ ## Rows that name no application (`--include-no-application`)
28
+
29
+ By default a contract, generation run or signing request that names no
30
+ application stays and is listed as unclear (`names no application`), because it
31
+ may be real: staff can make a contract without an application, and the contract
32
+ page opens signing requests for any contract. A row can also have lost its link
33
+ when its application was cleared in a bulk operation; then the default finds
34
+ neither it nor its persons and files.
35
+
36
+ With `--include-no-application`, these rows become L1 roots, with their closure,
37
+ L2 persons and L4 files. The plan names them under `noApplication`
38
+ (`table`, `id`, `createdAt`, `namesWorkflowNode`). **Review every one of them:**
39
+ `namesWorkflowNode: true` means a process produced the row and its link is gone;
40
+ `false` means a person made it, and it may be a real contract.
41
+
42
+ They stay, listed as unclear with the reason, whatever the review says:
43
+ - a contract one of whose runs (itself or through its package run) or signing
44
+ requests names a live application, a contract that shares a signing request with
45
+ such a contract, and the runs and signing requests of each;
46
+ - a contract without any generation run (made by hand) and what shares a signing
47
+ request with it.
48
+
49
+ In this mode those limits hold for rows whose application was deleted too. An id
50
+ from `--protect` in the deletion set aborts the run here as well.
51
+
27
52
  ## Prerequisites
28
53
  - A platform token with `_platform.config.manage` (`_platform.config.read` is enough for `plan`).
29
54
  - `protect.json`: a JSON array of the application ids that must stay, non-empty.
@@ -43,6 +68,15 @@ plexus-cli --env <env> --tenant <slug> platform test-residue apply --list plan.j
43
68
  plexus-cli --env <env> --tenant <slug> platform test-residue apply --list plan.json --protect protect.json --confirm --allow-prod
44
69
  ```
45
70
 
71
+ With rows that name no application, the plan and every apply carry the flag. A
72
+ list and a call that disagree are refused, the dry run included:
73
+ ```bash
74
+ plexus-cli --env <env> --tenant <slug> platform test-residue plan --protect protect.json --include-no-application --out plan.json
75
+ # review noApplication; remove every id that is not approved from l1.*
76
+ plexus-cli --env <env> --tenant <slug> platform test-residue apply --list plan.json --protect protect.json --include-no-application
77
+ plexus-cli --env <env> --tenant <slug> platform test-residue apply --list plan.json --protect protect.json --include-no-application --confirm --allow-prod
78
+ ```
79
+
46
80
  ## Verify
47
81
  ```bash
48
82
  plexus-cli --env <env> --tenant <slug> platform test-residue plan --protect protect.json
@@ -58,6 +92,11 @@ plexus-cli --env <env> --tenant <slug> platform test-residue plan --protect prot
58
92
  closure (snapshots, signatures, …). Its files are not released by this verb:
59
93
  each deleted row's holder trigger schedules the release, so a file
60
94
  goes once its last holder is gone — removing it from `files` keeps nothing.
95
+ - With `--include-no-application`, removing a root keeps what is tied to it: a
96
+ listed root whose closure shares a row with the removed one stays and is
97
+ reported under `refused` (remove a contract, its runs and signing requests
98
+ stay; remove a run, its contract stays). A party of a kept contract is
99
+ reported under `skippedPersons` (`foreignContract`) even if still listed.
61
100
  - A person is asked again right before its delete; one that is excluded by then
62
101
  is reported under `skippedPersons`.
63
102
  - A file another row still names (a retained setup export's pin included) is