stack-release: unique activation ids within one second; --plan refusals in console_for_target; tester port length check (P19 391, row 176 N1/N2) #1678

Closed
opened 2026-10-20 02:30:20 +00:00 by jarvis · 5 comments
Contributor

Row A of docs/plans/2026-10-20_stack-release-after-window.md (blob f58efddac, commit 236af5271), anchor "Brief: activation ids and plan-mode refusals (row A)".

  1. new_activation() (stack-release.sh:662) names the activation by the second, so an activate and a pm-on on one copy in the same second collide at mkdir "$RS" and refuse capture-failed. Row 176 gate run 1 hit it in T34. Vikunja P19 391.
  2. Under --plan, console_for_target (:636, :637) exits at the first refusal instead of using check_refuse (Dewey, row 176 review N1).
  3. webui-service.sh tester_port_ok (:123) strips zeros before the length check, so render accepts 007333 and serve refuses it (N2).

Owner Darkwing, reviewer Dewey, gate owner Sage.

Row A of docs/plans/2026-10-20_stack-release-after-window.md (blob f58efddac, commit 236af5271), anchor "Brief: activation ids and plan-mode refusals (row A)". 1. new_activation() (stack-release.sh:662) names the activation by the second, so an activate and a pm-on on one copy in the same second collide at mkdir "$RS" and refuse capture-failed. Row 176 gate run 1 hit it in T34. Vikunja P19 391. 2. Under --plan, console_for_target (:636, :637) exits at the first refusal instead of using check_refuse (Dewey, row 176 review N1). 3. webui-service.sh tester_port_ok (:123) strips zeros before the length check, so render accepts 007333 and serve refuses it (N2). Owner Darkwing, reviewer Dewey, gate owner Sage.
Member

Review request for queue row 180, round 1: stack-release activation ids unique within one second (P19 391); --plan refusals in console_for_target through check_refuse, new code tester-port-invalid (row 176 N1); webui-service tester_port_ok length before zero strip (N2) (#1678)

  • Owner: darkwing
  • Reviewers: dewey
  • Gate: Dewey approves the candidate manifest; cli and webui suites and every scripts/test-*.sh green on Sage's gate, a killed mutant per item (sage)
  • Brief: docs/plans/2026-10-20_stack-release-after-window.md § Brief: activation ids and plan-mode refusals (row A) @aafa471ae7eb
  • Candidate: manifest 26ea8e88d23a92be4b13de0accd2671533b34178fad4df08aca684e83b90c12d

The manifest:

3468a2d2eeeb0175dc37499e89e609144ff3a07bb275fea64b82bbdbd64e4de5  docs/TOOLS.md
1d33bf199b099d6346d6e44b5c13d0ca66b402bc74acbb36da908035cb439db7  packages/cli/tests/stack-release.test.mjs
1fca5facd9be5014803cef88a4f79d51c7b67920bdf001a1909daa2a1339fa03  packages/webui/tests/service.test.mjs
f225cfdf5d2ba3f828b45c8af3c0da7f7f9d8722daa6890c374e4253f3ee37a7  scripts/stack-release.sh
0636852303b73aa9ad4761679bb7c7bda4eca3e4ff56d5f67d2cb1d1adc75b80  scripts/webui-service.sh

Check a tree against it with scripts/mosaic queue review verify-commit 180 REF.

Post your verdict as a comment here, then record it:

scripts/mosaic queue review record 180 --verdict approve|changes --comment COMMENT_ID --candidate 26ea8e88d23a92be4b13de0accd2671533b34178fad4df08aca684e83b90c12d --op OP --by SEAT
<!-- mosaic-queue-op: darkwing-180-inreview-1 --> <!-- mosaic-queue-round: row=180 round=1 candidate=26ea8e88d23a92be4b13de0accd2671533b34178fad4df08aca684e83b90c12d --> Review request for queue row 180, round 1: stack-release activation ids unique within one second (P19 391); --plan refusals in console_for_target through check_refuse, new code tester-port-invalid (row 176 N1); webui-service tester_port_ok length before zero strip (N2) (#1678) - Owner: darkwing - Reviewers: dewey - Gate: Dewey approves the candidate manifest; cli and webui suites and every scripts/test-*.sh green on Sage's gate, a killed mutant per item (sage) - Brief: `docs/plans/2026-10-20_stack-release-after-window.md` § Brief: activation ids and plan-mode refusals (row A) @aafa471ae7eb - Candidate: manifest `26ea8e88d23a92be4b13de0accd2671533b34178fad4df08aca684e83b90c12d` The manifest: ```text 3468a2d2eeeb0175dc37499e89e609144ff3a07bb275fea64b82bbdbd64e4de5 docs/TOOLS.md 1d33bf199b099d6346d6e44b5c13d0ca66b402bc74acbb36da908035cb439db7 packages/cli/tests/stack-release.test.mjs 1fca5facd9be5014803cef88a4f79d51c7b67920bdf001a1909daa2a1339fa03 packages/webui/tests/service.test.mjs f225cfdf5d2ba3f828b45c8af3c0da7f7f9d8722daa6890c374e4253f3ee37a7 scripts/stack-release.sh 0636852303b73aa9ad4761679bb7c7bda4eca3e4ff56d5f67d2cb1d1adc75b80 scripts/webui-service.sh ``` Check a tree against it with `scripts/mosaic queue review verify-commit 180 REF`. Post your verdict as a comment here, then record it: ``` scripts/mosaic queue review record 180 --verdict approve|changes --comment COMMENT_ID --candidate 26ea8e88d23a92be4b13de0accd2671533b34178fad4df08aca684e83b90c12d --op OP --by SEAT ```
Member

Row 180 round 1 review (Dewey): changes. Two small tests are missing. The code is right as it stands.

Candidate: manifest digest 26ea8e88d23a92be4b13de0accd2671533b34178fad4df08aca684e83b90c12d, base c7f3beb17, build.patch sha256 16eb57d6…, patch-id 30a272d49b79aec5da00a956f66933e6ba1f7f13, five files, +147/-10. I applied the patch to a worktree at c7f3beb17 and the manifest checks out. The brief blob aafa471ae matches c7f3beb17.

What I checked

  • Item 1: next_activation() (stack-release.sh:674) reads the second once and tries "", then -1 to -9, against stack-rollback/, backups/stack/ and the post-attempt store. If all ten are taken it clears ACT and POST before it refuses capture-failed. new_activation and do_adopt (:703) both call it after lock. --restore (:78) takes both id forms. I repeated your check (b) grep and got the same three files plus BUILD-LOG.
  • Item 2: under --plan, console_for_target (:637-647) sends both lines through check_refuse. Outside --plan it still calls usage and then refuse. The sage-1155 reason-line deviation is recorded.
  • Item 3: webui-service.sh checks ${#TESTER_PORT} -le 5 before it strips zeros.
  • Your nine mutants (m1, m1b-m1e, m2, m2b, m3) cover the tests the brief names.

My run (slot sage-1166, 03:01:49Z-03:12:26Z)

Run Result
stack-release.test.mjs 107/107
service.test.mjs 28/28
X1: post-loop port check at :85 removed survived, 107/107
X2: adopt back on ACT="$(date -u +%Y%m%dT%H%M%SZ)-${TO:0:12}" survived, 107/107

The file was restored and its sha256 checked after each probe.

C1 (X2): adopt's helper call has no test

Brief item 1: "Adopt's id (:680) uses the same helper." With adopt back on its own date line, every test still passes. The lock doesn't stop a collision. do_adopt refuses only when a pointer exists, and a stack-rollback/<second>-<prefix> set stays after the pointer is gone, for example when the pointer is removed by hand. Fix: one subtest on T43's pinned date. Make a stack-rollback/<id> for the copy adopt will take, run adopt, and assert that the pointer's activation and the log line are <id>-1.

C2 (X1): the post-loop check at :85 has no test, and removing it is observable

console_for_target repeats the port check, but in activate it runs after pointer_for_business (:862) and the pm-pending refusal (:864). With :85 removed, activate ID BUSINESS --tester-port 80 with no pointer exits 3 no-pointer instead of exit 4 usage. On base the check sat inline in parse_opts, so that case was usage. The brief says that without --plan behaviour doesn't change, and :85 is the line that keeps it that way. T44's non-plan cases all run against a pointer, so they reach console_for_target and give usage either way. Fix: one case with no pointer and no --plan. Assert exit 4, stderr equal to --help's and no log line.

Note (no change needed)

N1. Under --plan, a hard refusal that comes before console_for_target ends the plan without listing tester-port-invalid: no pointer, or check_target's missing-copy or already-active refusal. That matches the other prechecks and the brief doesn't ask for more. I'm writing it down only so nobody expects --plan to list every refusal.

Round 2 needs only the two tests and their mutants (X1 and X2 above). I don't need anything else re-run.

Row 180 round 1 review (Dewey): **changes**. Two small tests are missing. The code is right as it stands. Candidate: manifest digest 26ea8e88d23a92be4b13de0accd2671533b34178fad4df08aca684e83b90c12d, base c7f3beb17, build.patch sha256 16eb57d6…, patch-id 30a272d49b79aec5da00a956f66933e6ba1f7f13, five files, +147/-10. I applied the patch to a worktree at c7f3beb17 and the manifest checks out. The brief blob aafa471ae matches c7f3beb17. ## What I checked - Item 1: `next_activation()` (stack-release.sh:674) reads the second once and tries `""`, then `-1` to `-9`, against `stack-rollback/`, `backups/stack/` and the post-attempt store. If all ten are taken it clears ACT and POST before it refuses `capture-failed`. `new_activation` and `do_adopt` (:703) both call it after `lock`. `--restore` (:78) takes both id forms. I repeated your check (b) grep and got the same three files plus BUILD-LOG. - Item 2: under `--plan`, `console_for_target` (:637-647) sends both lines through `check_refuse`. Outside `--plan` it still calls `usage` and then `refuse`. The sage-1155 reason-line deviation is recorded. - Item 3: webui-service.sh checks `${#TESTER_PORT} -le 5` before it strips zeros. - Your nine mutants (m1, m1b-m1e, m2, m2b, m3) cover the tests the brief names. ## My run (slot sage-1166, 03:01:49Z-03:12:26Z) | Run | Result | |---|---| | stack-release.test.mjs | 107/107 | | service.test.mjs | 28/28 | | X1: post-loop port check at :85 removed | survived, 107/107 | | X2: adopt back on `ACT="$(date -u +%Y%m%dT%H%M%SZ)-${TO:0:12}"` | survived, 107/107 | The file was restored and its sha256 checked after each probe. ## C1 (X2): adopt's helper call has no test Brief item 1: "Adopt's id (:680) uses the same helper." With adopt back on its own date line, every test still passes. The lock doesn't stop a collision. `do_adopt` refuses only when a pointer exists, and a `stack-rollback/<second>-<prefix>` set stays after the pointer is gone, for example when the pointer is removed by hand. Fix: one subtest on T43's pinned `date`. Make a `stack-rollback/<id>` for the copy adopt will take, run adopt, and assert that the pointer's activation and the log line are `<id>-1`. ## C2 (X1): the post-loop check at :85 has no test, and removing it is observable `console_for_target` repeats the port check, but in `activate` it runs after `pointer_for_business` (:862) and the `pm-pending` refusal (:864). With :85 removed, `activate ID BUSINESS --tester-port 80` with no pointer exits 3 `no-pointer` instead of exit 4 usage. On base the check sat inline in parse_opts, so that case was usage. The brief says that without `--plan` behaviour doesn't change, and :85 is the line that keeps it that way. T44's non-plan cases all run against a pointer, so they reach `console_for_target` and give usage either way. Fix: one case with no pointer and no `--plan`. Assert exit 4, stderr equal to `--help`'s and no log line. ## Note (no change needed) N1. Under `--plan`, a hard refusal that comes before `console_for_target` ends the plan without listing `tester-port-invalid`: no pointer, or `check_target`'s missing-copy or already-active refusal. That matches the other prechecks and the brief doesn't ask for more. I'm writing it down only so nobody expects `--plan` to list every refusal. Round 2 needs only the two tests and their mutants (X1 and X2 above). I don't need anything else re-run.
Member

Review request for queue row 180, round 2: stack-release activation ids unique within one second (P19 391); --plan refusals in console_for_target through check_refuse, new code tester-port-invalid (row 176 N1); webui-service tester_port_ok length before zero strip (N2) (#1678)

  • Owner: darkwing
  • Reviewers: dewey
  • Gate: Dewey approves the candidate manifest; cli and webui suites and every scripts/test-*.sh green on Sage's gate, a killed mutant per item (sage)
  • Brief: docs/plans/2026-10-20_stack-release-after-window.md § Brief: activation ids and plan-mode refusals (row A) @aafa471ae7eb
  • Candidate: manifest c743480eb1e92ee1e1c4365d715543466f58c712a73c8cc39d6147600c1b2c06

The manifest:

3468a2d2eeeb0175dc37499e89e609144ff3a07bb275fea64b82bbdbd64e4de5  docs/TOOLS.md
09c6cdd7568cd6769d9a39c7f5655df1850b1de7e01712fac0bad84ff2b692d5  packages/cli/tests/stack-release.test.mjs
1fca5facd9be5014803cef88a4f79d51c7b67920bdf001a1909daa2a1339fa03  packages/webui/tests/service.test.mjs
f225cfdf5d2ba3f828b45c8af3c0da7f7f9d8722daa6890c374e4253f3ee37a7  scripts/stack-release.sh
0636852303b73aa9ad4761679bb7c7bda4eca3e4ff56d5f67d2cb1d1adc75b80  scripts/webui-service.sh

Check a tree against it with scripts/mosaic queue review verify-commit 180 REF.

Post your verdict as a comment here, then record it:

scripts/mosaic queue review record 180 --verdict approve|changes --comment COMMENT_ID --candidate c743480eb1e92ee1e1c4365d715543466f58c712a73c8cc39d6147600c1b2c06 --op OP --by SEAT
<!-- mosaic-queue-op: darkwing-180-inreview-2 --> <!-- mosaic-queue-round: row=180 round=2 candidate=c743480eb1e92ee1e1c4365d715543466f58c712a73c8cc39d6147600c1b2c06 --> Review request for queue row 180, round 2: stack-release activation ids unique within one second (P19 391); --plan refusals in console_for_target through check_refuse, new code tester-port-invalid (row 176 N1); webui-service tester_port_ok length before zero strip (N2) (#1678) - Owner: darkwing - Reviewers: dewey - Gate: Dewey approves the candidate manifest; cli and webui suites and every scripts/test-*.sh green on Sage's gate, a killed mutant per item (sage) - Brief: `docs/plans/2026-10-20_stack-release-after-window.md` § Brief: activation ids and plan-mode refusals (row A) @aafa471ae7eb - Candidate: manifest `c743480eb1e92ee1e1c4365d715543466f58c712a73c8cc39d6147600c1b2c06` The manifest: ```text 3468a2d2eeeb0175dc37499e89e609144ff3a07bb275fea64b82bbdbd64e4de5 docs/TOOLS.md 09c6cdd7568cd6769d9a39c7f5655df1850b1de7e01712fac0bad84ff2b692d5 packages/cli/tests/stack-release.test.mjs 1fca5facd9be5014803cef88a4f79d51c7b67920bdf001a1909daa2a1339fa03 packages/webui/tests/service.test.mjs f225cfdf5d2ba3f828b45c8af3c0da7f7f9d8722daa6890c374e4253f3ee37a7 scripts/stack-release.sh 0636852303b73aa9ad4761679bb7c7bda4eca3e4ff56d5f67d2cb1d1adc75b80 scripts/webui-service.sh ``` Check a tree against it with `scripts/mosaic queue review verify-commit 180 REF`. Post your verdict as a comment here, then record it: ``` scripts/mosaic queue review record 180 --verdict approve|changes --comment COMMENT_ID --candidate c743480eb1e92ee1e1c4365d715543466f58c712a73c8cc39d6147600c1b2c06 --op OP --by SEAT ```
Member

Row 180 round 2 review (Dewey): approve.

Candidate: manifest digest c743480eb1e92ee1e1c4365d715543466f58c712a73c8cc39d6147600c1b2c06, patch-id 31b1d502444e, base 7f519242e. The patch applies to a worktree at 7f519242e and the manifest checks out. No commit since c7f3beb17 touches the five paths. Compared with round 1, only packages/cli/tests/stack-release.test.mjs changed (sha256 1d33bf19… to 09c6cdd7…). The other four digests are the same.

C1 and C2

  • C1, "adopt takes the next free id too" (T43, :1137): pins date, makes stack-rollback/<id> with no pointer, then checks that adopt exits 0 and that the pointer's activation and the one log line are both <id>-1. That covers brief item 1's "Adopt's id uses the same helper".
  • C2, "without --plan a bad port is usage before any pointer read" (T44): activate C1 acme --tester-port 80 with no pointer exits 4, stdout is empty, stderr equals --help's, and there is no log line, start or stop. That covers the :85 check, which keeps the non-plan output what it was before.

My run (slot sage-1174, 03:31:47Z-03:42:20Z)

Run Result
stack-release.test.mjs 109/109
service.test.mjs 28/28
X1: post-loop port check at :85 removed killed by C2, 3 !== 4
X2: adopt back on its own date line killed by C1, 20261020T034215Z-abfacb521a84 where …-1 was expected

After each probe the file was restored and its sha256 checked. The manifest checks out after the run.

N1 stays a note, as recorded in BUILD.md. Sage's gate is next.

Row 180 round 2 review (Dewey): **approve**. Candidate: manifest digest c743480eb1e92ee1e1c4365d715543466f58c712a73c8cc39d6147600c1b2c06, patch-id 31b1d502444e, base 7f519242e. The patch applies to a worktree at 7f519242e and the manifest checks out. No commit since c7f3beb17 touches the five paths. Compared with round 1, only `packages/cli/tests/stack-release.test.mjs` changed (sha256 1d33bf19… to 09c6cdd7…). The other four digests are the same. ## C1 and C2 - C1, "adopt takes the next free id too" (T43, :1137): pins `date`, makes `stack-rollback/<id>` with no pointer, then checks that adopt exits 0 and that the pointer's activation and the one log line are both `<id>-1`. That covers brief item 1's "Adopt's id uses the same helper". - C2, "without --plan a bad port is usage before any pointer read" (T44): `activate C1 acme --tester-port 80` with no pointer exits 4, stdout is empty, stderr equals `--help`'s, and there is no log line, start or stop. That covers the :85 check, which keeps the non-plan output what it was before. ## My run (slot sage-1174, 03:31:47Z-03:42:20Z) | Run | Result | |---|---| | stack-release.test.mjs | 109/109 | | service.test.mjs | 28/28 | | X1: post-loop port check at :85 removed | killed by C2, 3 !== 4 | | X2: adopt back on its own `date` line | killed by C1, `20261020T034215Z-abfacb521a84` where `…-1` was expected | After each probe the file was restored and its sha256 checked. The manifest checks out after the run. N1 stays a note, as recorded in BUILD.md. Sage's gate is next.
Author
Contributor

Landed on refactor as 1905e385c (author Darkwing) on 828d14a0c, pushed c7421cabd..a757f8fe6. The landing patch-id 31b1d502444e equals the candidate Dewey approved in comment 29361 (manifest c743480e).

Sage gate from a git worktree of 828d14a0c plus the candidate: GATE_PASSED, 25 steps all rc=0, node tests 2482 pass 0 fail, script suites 422 pass 0 fail (queue suite 156 more), network removed, 0 containers. Queue row 180: note rev 2127, done rev 2128 (a757f8fe6).

Not live: the stack runs copy 89af38a83a, and this reaches it only through a later copy and re-pin. Row 181 (#1679) and row 178 (#1676) build on this landing.

Landed on refactor as 1905e385c (author Darkwing) on 828d14a0c, pushed c7421cabd..a757f8fe6. The landing patch-id 31b1d502444e equals the candidate Dewey approved in comment 29361 (manifest c743480e). Sage gate from a git worktree of 828d14a0c plus the candidate: GATE_PASSED, 25 steps all rc=0, node tests 2482 pass 0 fail, script suites 422 pass 0 fail (queue suite 156 more), network removed, 0 containers. Queue row 180: note rev 2127, done rev 2128 (a757f8fe6). Not live: the stack runs copy 89af38a83afa, and this reaches it only through a later copy and re-pin. Row 181 (#1679) and row 178 (#1676) build on this landing.
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1678