Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
469f441e5d | ||
|
|
24b8dabb4e | ||
|
|
ebcda9cc13 | ||
|
|
edd1bdfe6d | ||
|
|
ca0094f343 | ||
|
|
c47c56dace | ||
|
|
fd3ed7403f | ||
|
|
e5a9ba1636 | ||
|
|
e3e20f9662 | ||
|
|
bfd55f6d9d | ||
|
|
c044386382 | ||
|
|
a774a02fa0 | ||
|
|
3ba8133066 | ||
|
|
35feaf6de4 | ||
|
|
eafcbd3e7d | ||
|
|
cdb4f633dd | ||
|
|
498c8dc255 | ||
|
|
f00e38e2f0 | ||
|
|
154e08b511 | ||
|
|
9a7251403a |
@@ -5220,73 +5220,4 @@ Before: managed project/thread verbs had no Console conversation area. After: fi
|
||||
|
||||
2026-10-21T22:30:20Z | Huey | T1 sessions design r3, scrooge-0007 R1, Vikunja 463 | Before: r2 e19e30df2 nested new session checkouts under the retained legacy instance workspace, allowing project-name collision or historical parent inspection to reach live siblings. After: exact path is dataRoot/session-workspaces/business/instance/session, outside the legacy root; canonicalized ancestor/descendant overlap refuses; T2 nesting mutant covers historical mount/inspection and a legacy project named sessions. All other r2 content retained as approved, revision label updated. Verification: old nested path absent, manual R1-only delta, whitespace and installed queue guard checked; no code/builds/suites/live changes/provider calls/credential reads.
|
||||
|
||||
2026-10-20 18:51:10 UTC | Row 191 #1689 design phase | Before: per-business launch revoke and per-binding Discord STOP leave task containers, active sessions and background work without one switch. Proposed per-data-root durable halt with human-only resume, generation-fenced starts, bounded concurrent termination, write-once stop receipts and existing event mirror; no schema migration. DESIGN.md inventories starter/continuation paths and container control-mount restriction. Sent to Dewey with Sage copied; implementation waits independent design approval. No tests, commits or live actions.
|
||||
|
||||
2026-10-20 18:57:51 UTC | Row 191 design revision | Dewey r1 changes: interim Console --send absence, reserved processing events and missing-state semantics required correction. DESIGN-r2.md now names CLI interim path, unavailable UI controls, trusted initialization and fail-closed missing leaf, container delete/replace mount tests, reservations and id-bound reconciliation. Small notes addressed including diagnostic seats and aliases. Recommended smaller Docker scope to Sage; design and scope approval pending, no code or test runs.
|
||||
|
||||
2026-10-20T19:50:56Z | Rocko | row 191 #1689 implementation stage: from independent brakes to shared root state, generation-fenced launcher and tracked stops, Discord/task guards and control HTTP/UI. Evidence is agents/rocko/work/queue-191/logs/ and PROGRESS.md. Fixture single files only so far; heavy verification and candidate not complete. Scope additions sage-1367 (one read-only CODE file) and sage-1392 (processing-only client socket timeout); no schema, proof baseline, live file/unit, commit or push change.
|
||||
|
||||
2026-10-20 22:58:45 UTC | Rocko | row 191 #1689 rebase inspection candidate | Rebuilt uncommitted kill-switch tree from da230ca48 onto landed row 190 base 00d4cc1f6 under new branch rocko/row191-r2-00d4. Hand merges retained instance flags and SSO/sign-out changes; fixture tests exposed and fixed SSO signer compatibility and two unknown-runtime cleanup defects. Final touched singles 249/249 across 26 files; 15 overlapping Client reader files 102/102. Manifest a4f780c2 has 78 paths; packet 185 files verified with scan clear. Mutants and owner gate remain pending; no review-ready or activation claim, no commit/push/live action.
|
||||
|
||||
2026-10-21 23:39:21 UTC | Rocko | row 191 #1689 inspection snapshot | Sage-2242 authorized a local inspection commit for Honker's row 194 S6. Created d52b4db1c on new rocko/row191-inspection-20261021, parent 00d4cc1f6, preserving the reviewed-design build and candidate a4f780c2 (78 paths). Static manifest/index/source scan and diff check verified; no tests run, no push credential or push attempt. Existing single-file evidence is historical, 249/249 and overlapping Client readers 102/102; suites/mutants/gate remain pending. Current code has verified runtime signalling and instance halt, but no dedicated per-run stop API yet; Honker and Sage notified of that seam directly. Snapshot is not review-ready or approved for live use.
|
||||
|
||||
2026-10-22 00:04:05 UTC | Rocko | row 191 #1689 per-run stop inspection | Implemented agreed Honker-0079/0081 stopRun contract with verified per-signal identity, fixed 5s+2s, durable first-owner join and immutable result plus later-exit observations. Focused CLEAR sage-2250: final 9 files 62/62, no skipped, after correcting host guard placement and peer-discovery fixture timeout isolation; initial failures and failed teardown logs retained, only own failed group stopped. Slot returned with cwd sweep clear. Sage published f7bf7dfec; sage-2265 clean rebase creates 7aa18b0f6 on dcd8d4dda under new branch, explicit Rocko identity, all 79 manifest product blobs identical so 62/62 evidence carried. Direct S6 handoff sent to Honker and Sage. Wider suites, mutants, review and activation remain pending.
|
||||
|
||||
2026-10-22T00:18:12Z | Sage (Opus 5.5) | row 254 landing (#1759), library.sync human timeout | Before: the human transport gave library.sync the 5-second default, so a sync longer than that reported outcome-unknown, and six library-* codes reached the Console as 502. After: 331597709 lands Megavolt's candidate (7 paths, tree d49e4626f, manifest digest be63cfbe recomputed and matched). human-cli.mjs waits 130 s for library.sync, past the server's 120 s hold, and 5 s for other verbs. webui bus.mjs maps library-sync-busy, library-diverged and library-accept-stale to 409, library-accept-invalid to 400, and library-credential-missing and library-fetch-failed to 503. channel-proof re-pinned. Merged-tree gate on the landing commit: library 77/0, bus 628/0, webui 305/0 (1 skip), cli 749/0 (23:44:33-23:55:11Z). eb9672c91 adds the README request-timeout sentence (Dewey N1) and a DEFERRED entry for the four library codes still at 502 (Dewey N2, binds the Console library routes row). Overlap sweep before push: 268 rebased to r2 ecd9b35eb (README only, approval carried webby-0096), 194 rebased to b7. Done rev 3072, #1759 closed.
|
||||
|
||||
2026-10-22 00:24:34 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 full gate on c78f48946 | stopped on second integration failure per sage-2275; singles 269/269, processing-control 61/61, bus 646/646; CLI interrupted with 26 observed failures; no further edits; cwd sweep empty and slot returned to Sage.
|
||||
|
||||
2026-10-22 00:48:20 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 eb3abba12 full gate | stopped at Discord 190/192; 32 singles 304/304, processing-control 61/61, bus 646/646, cli 761/761; two uninitialized Discord fixtures reported to Sage; no later run; cwd sweep empty, slot clear.
|
||||
|
||||
2026-10-22 00:58:27 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2294 fixture fix | e6800380d on eb3abba12, two test files/four additions, assertions preserved; 338-entry static all-package sweep recorded; no tests; sent Sage for publication and Honker for dependent gate.
|
||||
|
||||
2026-10-22 01:30:04 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 e6800380d resume | binding15/15, recover5/5, Discord192/192; stopped WebUI314 passed/4 failed/1 esbuild skip; processing polling violates sign-out/manual redirect and bar changes layout; no fixes/retries, cwd sweep empty, slot returned.
|
||||
|
||||
2026-10-22 01:38:08 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2317 Console integration fix | 8e1f55c1d on e6800380d; shared sign-out/manual redirect/interval and desktop frame fixes, assertions retained, six browser cases, 73 mutant sites preflight; syntax only, no tests; sent Sage/Honker.
|
||||
|
||||
2026-10-22 02:06:38 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 rebase sage-2329 | eafcbd3e7 on ddfb29af7, new branch, dispatcher retains processing and access; CLI/readme auto-merges checked; 87-path fd0f2740 manifest and 73-site preflight; Sage2333 published, awaiting CLEAR; no tests.
|
||||
|
||||
2026-10-22 02:20:51 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 eafcbd3e7 full gate | stopped singles313/6: six new browser cases count app freshness timer as processing timer; diagnosis sent Sage, no fix/retry; no suites/shells/mutants; cwd sweep empty, slot clear.
|
||||
|
||||
2026-10-22 02:23:13 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2345 timer fixture | 4db8b5778 on eafcbd3e7, one line attributes timer to processing.js; all assertions retained, no product change or tests; sent Sage and Honker; awaiting publication/CLEAR.
|
||||
|
||||
2026-10-22 02:25:29 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2349 record commit | 0f8235277 on 4db8b5778 adds packet BUILD.md cause record; product manifest remains ffb46fbd/87 paths; no amend, product change or tests; Sage/Honker notified.
|
||||
|
||||
2026-10-22 02:48:36 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 0f8235277 full gate second red | singles330/330, processing61/61, bus646/646, cli783/783, discord192/192; WebUI323/1/1 host esbuild skip; shell geometry1062vs1000; stopped/no retry, no later suites/shells/mutants; cwd sweep empty, slot returned, Sage escalates Mos.
|
||||
|
||||
2026-10-22 02:57:36 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 mos-1248 desktop layout restart | FF 5cd32f4c1 on 0f8235277: desktop grid allocates processing bar, existing shell assertions kept, visibility/no-scroll assertions added; 74 static mutant sites; candidate 2f93ef19; sent Webby/Sage for static review; no runs, awaiting review and CLEAR.
|
||||
|
||||
2026-10-22 03:11:09 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 static nav layout, mos-1249/1250 | FF da4334806 on 5cd32f4c1; controls first in nav, non-sticky per sage-2386/webby-0108; candidate-only placement assertion changed, landed shell assertions preserved; 77 mutants statically preflighted; manifest 245dceb1; Webby/Sage handoff sent, no runs, awaiting static look/publish/debug CLEAR.
|
||||
|
||||
2026-10-22 03:15:11 UTC | Rocko (d99326cc) | row 191 sage-2394 debug | da4334806 shell5/5 and processing-browser9/9, awk14/0/0; geometry heights reported with read-only distinction; cwd sweep[] and slot returned; full window awaits separate CLEAR.
|
||||
|
||||
2026-10-22 02:01:30 UTC | Sage (Claude Opus 5.5, 1ef1e4f8) | row 202 #1700 FED R5 landing | ddfb29af7 on 9c9732983: 6 manifest paths from a74cd9f87 (digests match CANDIDATE.sha256, patch-id 9d89077b equal); Duckworth APPROVE r5 rev 3026; C1 gate by Quackerjack on merge 3b86180b9: cli 771/771 skip 0 (run 2, run 1 red on gate TMPDIR length), 10 test-*.sh rc 0, M1-M13 killed; done rev 3108; landing note refused for length before the done move, so the record is the commit body and #1700 c30265; 191 and 194 rebased onto it (one scripts/mosaic case line)
|
||||
|
||||
2026-10-22 03:35:55 UTC | Sage (Claude Opus 5.5, 1ef1e4f8) | row 273 #1778 activate --send/--no-sso landing | 0bbf0f6d1 landed on 378a76b85, a rebase of cac7d0f67 (0042f713d) with all 6 range-diff pairs = and equal patch-ids; 4-path manifest e1031023 unchanged; Filbert APPROVE rev 3111 (c30308) carried merge-scoped under mos-1160, carry comment c30319 names 0bbf0f6d1. Gate on 0bbf0f6d1 by Darkwing: stack-release.test.mjs 218/218 skip 0, stack-release-external.test.mjs 25/25 skip 0, test-release.sh rc 0 (selftest 14/0, no skips), T58 controls c0 11/11 pass and c1 11/11 fail, M1-M7 killed. Rerun because row 202 changed scripts/mosaic, which stack-release.test.mjs copies. Red 1 was 978143bf4 (T53 test 6 usage pin). This doc commit adds the TOOLS.md usage line and F39 rules (Filbert N1).
|
||||
|
||||
2026-10-22 04:02:12 UTC | Rocko (d99326cc) | row191 full window0fa7bf421 | touched35files336pass, packages2403pass/1esbuildskip, shells425selftests+156queue node pass; SR01–07killed, SR08timeout,69unrun; stopped/no retry;88blobs restored,cwd sweep[],owned network removed,slot returned Sage; await Mos ruling.
|
||||
|
||||
2026-10-22 04:14:56 UTC | Rocko (d99326cc) | row191 control/resume sage-2427 | control12/12;SR08separate timeoutkill;49resumed assertionkills thenKS43survived;total56assertionkills+1timeout,1survivor,19unrun;88blobs restored,cwd sweep[],slot returned,Sage/Mos informed;no retry/edit.
|
||||
|
||||
2026-10-22 04:21:30 UTC | Rocko (d99326cc) | row191 KS43+19 retarget run | KS43assertionkill thenKS44invalid mutation syntax;57assertionkills+1timeout,1invalid,18unrun;stopped,no edit/retry;88hashes restored,cwd sweep[],slot returned,Sage/Mos notified.
|
||||
|
||||
2026-10-22 04:30:06 UTC | Rocko (d99326cc) | row191 KS44+18 resume | 10assertionkills thenKS54timeout-without-control despite dependency assertion;total67assertionkills+1timeoutkill,1unqualifiedtimeout,8unrun;88hashes restored,cwd sweep[],slot returned,Sage/Mos notified,no retry/edit.
|
||||
|
||||
2026-10-22 04:41:46 UTC | Rocko (Codex gpt-6.1-sol,d99326cc) | row191 #1689 builder complete/in-review | published0fa7bf421,manifest0bcbf337;35singles336pass,9packages2403pass/1knownskip,10shells425selftests+156queue nodepass;75assertionkills+2controlledtimeoutkills=77;88hashrestore,cwd sweep[],slotreturned;in-review rev3114,expected no-token failure3115(exit1);Sage/Dewey handoff,no live action.
|
||||
|
||||
2026-10-22 05:03:18 UTC | Rocko (Codex gpt-6.1-sol,d99326cc) | Vikunja502 processing test/runner hardening | brief+isolatedrocko-v502;expected wordingred→green,Node27/27,Python4/4,5/5assertionkills(includingSR08andKS54nohang),0skips/timeouts;sweep[],candidate5hashrestored,slotreturned05:01:29Z;candidate968d6ee3,runnerc5bdc764;packetready,no commit/push/liveaction.
|
||||
|
||||
2026-10-22 05:07:34 UTC | Rocko (d99326cc) | Vikunja502 committed/review handoff sage-2482 | newbranchrocko/vikunja502-ce6a-20261022,source8e3c6a79b+packet9bf4683c6 on ce6a96ad6;5paths no base drift,range-diff=,patch-id37135ebe unchanged;manifest968d6ee3,packet93889519 verifies39/39;focused runs carry;Sage publish/Dewey review handoff sent,no push/liveaction.
|
||||
|
||||
2026-10-22 05:10:00 UTC | Sage (1ef1e4f8) | serial landing 205 then 268 | 205: 3 commits, 4 paths, digest 858463b1, every scripts/test-*.sh green on ce6a96ad6, Duckworth N1-N4 carried (N1/N3 to 205b or R3, N2 to the 193b2 brief, N4 #1782 before any user thread goes live). 268 r4: c27207f6e on 205, 9 paths, digest caa0fa4e, patch-id 2942acc8 equal to r3. Overlap checks clean before both pushes. No live action; LIVE stays 86f95bb27.
|
||||
|
||||
2026-10-22 05:58:59 UTC | Rocko | row 279 #1784: before, deadline overshoot skipped final observation and returned unknown; after, one-line for (;;) retains final mapping and unchanged unreachable fallback. Regression red as specified; whole stop-run 13/13 and processing-control 62/62; M1 assertion kill, no skips, restored and swept. Source 1016b8584, packet cad927137; manifest 312ed511d8f1cff826ee2fd547de8368923130c7bfe06236d8e29d8655b80aaa. Pending Sage publication and Dewey review; no live action.
|
||||
|
||||
2026-10-22 06:15:54 UTC | Sage (1ef1e4f8) | row 279 #1784 landed (mos-1269) | Before: stopRun returned unknown for a live run when a sleep overshot the deadline. After: LANDED ceadad993 as a carry of cad927137 onto 343b6dd76 (range-diff 1:= 2:=, patch-ids 6d8ae7f4/e484c297 equal, Dewey carry c30410). Sage gate on cad927137: business 209/0/0, cli 794/0/0, discord processing + processing-stop 9/0/0. Correction: the first discord run wrote to a wrong out path and ran nothing; the rerun is the result. Overlap sweep clean (13, 257). Note rev 3144, done rev 3145. No live action; LIVE stays 86f95bb27.
|
||||
|
||||
2026-10-22 06:37:43 UTC | Sage (1ef1e4f8) | row 194 b16 third red (mos-1269/mos-1270) | Gate on ceadad993 + 9cdc47d04: business 228/0, cli 826/0 (T9a passes), control-board 124/0, bus 705/1 at grant-executor.test.mjs G13 (timed out 10044 ms); conversation, webui and scripts/test-*.sh never ran. runb8 green 436/0/0, 17/17 mutants. Correction to sage-2524 (mos-1270): the stuck wait is the first until at :733, the holding file after decision.resolve, so the executor never started the install and hosts.revoke at :734 never ran; it is not a revoke-path hang. Ruling: a diagnosis run, 30 base + 30 candidate alternating under cli load, no gate retry.
|
||||
|
||||
2026-10-22 07:51:04 UTC | Rocko | row 280 #1785: before, any TCP connect could accept a port our sshd failed to bind; after, attempt-local exact log proof plus liveness and connect, non-ephemeral picker, bounded scratch remote sleep cleanup. Both occupied regressions red on old acceptance; CRLF build failure captured and fixed under sage-2535. Committed source b765f5cb8, packet d6c924764, manifest27806c0579c76d0999d2e6be4180c3867570df0268af9d7e0d7b971af799e6f5. Repeats07:29:03Z–07:48:38Z grant1230/1230,host780/780,CLI1588/1588; final M1/M2 four assertion kills,0skips/timeouts,sweepclear. Sage publishes/gates; Duckworth reviews.
|
||||
2026-10-22 08:00:02 UTC | Sage (1ef1e4f8) | row 280 #1785 landed | before: the bus tests' scratch sshd helper returned a port on a connect alone, and 194 b16's gate hung at G13 (base hung too, honker-0127). After: b0fd28b6f on refactor, a ff from da5d3651d (b765f5cb8 + Rocko slim packet; full evidence d6c924764 on rocko/row280-da5d-20261022). Duckworth approve rev 3153 (manifest 27806c05). Sage gate bus 656/0/0, ge 41/0/0, hr 26/0/0 (c30431). Rocko repeat 2010/2010 under cli 1588/1588, no timeout; M1/M2 killed 4/4. Two build-time slips recorded in Rocko's packet: a runner root path (no test ran) and the CRLF sshd log line. Overlap 13/257 clean. Note rev 3154, done 3155, #1785 closed c30432, P19 511 comment 623. 194 b17 rebases on b0fd28b6f (sage-2542).
|
||||
|
||||
2026-10-22 08:38:11 UTC | Sage (1ef1e4f8) | row 194 #1692 landed | before: 194 b16 9cdc47d04 went red three times (stopRun deadline, then the bus test sshd port race), fixed by rows 279 and 280. After: fd6dd327c on refactor, a ff on e122aad8e. b18 is b17 3f451772d rebased after my doc and queue push blocked a ff (16 =, series patch-id 64303253f8e6, packages equal b17). Webby approve rev 3160 on manifest 29f131ab. Honker gate on fd6dd327c: runb8 503/0/0, mutants 17/17; 18 packages 3668/0, ten scripts rc=0, Docker up, env skips named. The secret scan hit three fake_*_token fixtures in bus tests (false positive). Note 3161, done 3162; #1692 closed c30435; P19 414 comment 625. LIVE still 86f95bb27.
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
# Row 273 (#1778): activate --send and --no-sso
|
||||
|
||||
Darkwing, 2026-10-22. Brief: `docs/plans/2026-10-22_activate-send-nosso.md` (blob in f0d0b31e9), approved by
|
||||
Mos in mos-1246 (F39). Base: origin/refactor 0042f713d. Reviewer: Filbert. Gate owner: Sage.
|
||||
|
||||
## What changed
|
||||
|
||||
Only `scripts/stack-release.sh` and its two node test files.
|
||||
|
||||
- `activate --send` puts `--send` into the run's Console flags after `--sso` and before the tester
|
||||
flags, where webui-service.sh renders it. It refuses `send-needs-sso` unless those flags hold `--sso`,
|
||||
given or carried. The plan line is `send: on; --send was given`, or `send: carried` when the pointer
|
||||
already holds it. `check_target` lets it name the pointer's copy only when the pointer holds no `--send`,
|
||||
so a second `--send` on the same copy refuses `already-active`.
|
||||
- `activate --no-sso` refuses `sso-not-on` when the pointer holds no `--sso`. Otherwise it takes the
|
||||
Console flags from a rollback set (below) and keeps the pointer's tester flags. `send_for_target`
|
||||
drops `--send`, whether it came from the set or the pointer. It is the only place that does, so one
|
||||
mutant there (M3) shows the drop is tested. The plan prints `sso: off; Console flags from <set>/<file>; restores <flags>`
|
||||
and a send line, `send: dropped; --no-sso drops --send (F39)` or `send: off; --no-sso was given and the
|
||||
pointer holds no --send`. The steps log gets `drop --send; --no-sso was given` and
|
||||
`turn off --sso; the Console flags come from <set>/<file>`.
|
||||
- Usage errors: `--send` with `--no-send`; `--no-sso` with `--sso`, `--send`, a proof pair or
|
||||
`--no-proof`; either flag on any verb but activate; either flag under `--units external`.
|
||||
`--no-sso --no-send` is allowed, since the brief doesn't forbid it and both drop the same flag.
|
||||
- The set read that `sso_base` did inline for a rollback to a Console without `--sso` moved into
|
||||
`set_flags`, which both paths call. Its three messages are unchanged, and T57 still pins them.
|
||||
- `from_log` has a new mode, `sets`: the activation of each ok activate and rollback line, newest first,
|
||||
stopping at the adopt line, which took no rollback set.
|
||||
|
||||
## The consequential choice: which set --no-sso reads
|
||||
|
||||
The brief says the flags come from "the rollback set of the activation that turned `--sso` on", and that
|
||||
"a set whose Console already ran with `--sso`" refuses. Each set holds the Console unit from before its
|
||||
run. So the activation that turned `--sso` on is the newest one whose set holds a Console without
|
||||
`--sso`: every activation after it ran with `--sso`, and so did every set it left.
|
||||
|
||||
`no_sso_base` walks the log's sets newest first and stops at the first set whose Console has no `--sso`.
|
||||
It refuses `sso-off-flags` at the first set it can't read (missing, failing its SHA256SUMS, or with no
|
||||
argv the script can parse), since it can't tell whether that set was the one. If every set ran with
|
||||
`--sso`, it refuses with `the Console in <set>/<file> already ran with --sso, and the log names no
|
||||
earlier activation`. A log with no set at all refuses with `the log names no activation with a rollback
|
||||
set`.
|
||||
|
||||
The tradeoff: a later same-copy re-pin that carried `--sso` (a `--no-send`, or a re-pin onto a newer
|
||||
copy) doesn't break `--no-sso`, which the phase 2 window needs if a re-pin lands between step 5 and a
|
||||
rollback. The cost is that "a set that ran with `--sso` refuses" now applies only when no older set
|
||||
without `--sso` exists. A tampered set on the walk still refuses, even one newer than the set the walk
|
||||
would have used. Filbert, please rule on this reading.
|
||||
|
||||
## Filbert's early look: B1 and N1 (sage-2315)
|
||||
|
||||
Filbert accepted the walk. Sage ruled both findings into this row.
|
||||
|
||||
- B1: row 200's rollback to a copy whose Console has no `--sso` took the flags from the set and kept
|
||||
the pointer's `--send`. From an `--sso --send` pointer, which this row's `--send` can now make, that
|
||||
gave a Console with `--send` and no `--sso`, which F39 b forbids. `send_for_target` now drops `--send`
|
||||
whenever the run drops the pointer's `--sso`, so it is still the one place that drops it. The plan
|
||||
line reads `send: dropped; the run drops --sso, and --send needs it (F39)`, and the steps log gets
|
||||
`drop --send; the run drops --sso`. Row 200's sso line now names only the tester as following the
|
||||
pointer.
|
||||
- Changed existing assertion, for the review to approve by name: T57 item 3 (sage-1389), "the
|
||||
plain case", ends with `assert.deepEqual(pointer(g).console,[...noSend(gbase),...pair(f)])`. It
|
||||
used to expect `'--send'` at the end. The case seeds a legacy `--send` pointer, turns `--sso` on
|
||||
(which carries `--send`), then rolls back to B, whose Console has no `--sso`. A carried `--send`
|
||||
that ends without `--sso` breaks F39 b whatever its source, so the old pin asserted the wrong
|
||||
outcome (Sage accepted this in sage-2321). Row 200's two sso plan strings also lose "--send and"
|
||||
(`ROLLBACK_PLAN` and the round 3 named-instance case), since `--send` no longer follows the pointer
|
||||
on that path.
|
||||
- N1: the walk skipped an ok line with no activation. Skipping it could land on an older set that
|
||||
isn't the right one, so it now refuses `sso-off-flags` with `an ok line in the log names no
|
||||
activation`. The walk reads the log through `mapfile`. That gives no entry for an empty log, so a
|
||||
log with no set still gets its own message.
|
||||
|
||||
## test-release.sh
|
||||
|
||||
The window plan says test-release.sh "gets cases for both". The brief lists it only as a file to run
|
||||
whole. test-release.sh is release.sh's Docker selftest and doesn't call stack-release.sh, so the cases
|
||||
live in the node tests and test-release.sh runs unchanged.
|
||||
|
||||
## Tests (T58 in stack-release.test.mjs)
|
||||
|
||||
- T1: `--sso --send` from B onto C1 with a tester port: plan, pointer, unit and steps. `--send` beside a
|
||||
carried `--sso` re-pins C1 once; a second `--send` refuses `already-active`; C carries it.
|
||||
- T2: `--send` without `--sso` refuses on another copy and on the pointer's copy, also when the pointer
|
||||
carries `--send` alone; `--plan` lists the refusal.
|
||||
- T2 (sage-2315 B1): `--sso --send` onto C1, then a rollback to B, whose Console has no `--sso`. The
|
||||
pointer and the unit end with neither flag, and the plan and steps name the drop.
|
||||
- T2 and T4 usage: every forbidden pairing and verb, checked against the full usage text.
|
||||
- T3: from an `--sso --send` pointer, `--no-sso` on the same copy gives back the pre-`--sso` ExecStart
|
||||
line byte for byte, without `--send`. A second case walks past a `--no-send` re-pin that ran with
|
||||
`--sso` and keeps the pointer's tester port (7334), which differs from the set's (7333). A third
|
||||
(sage-2305 a) turns `--sso` on, then re-pins twice with `--send` and `--no-send`, so the two newest
|
||||
sets both hold `--sso`. `--no-sso` then gives back the arrival's ExecStart line byte for byte.
|
||||
- T4 (sage-2305 b): two sets, both edited or written to hold `--sso` with sums intact, refuse
|
||||
`sso-off-flags` through `refused()`.
|
||||
- T4: `sso-not-on`; an ok line with no activation; a set that fails its sums, ran with `--sso`, has no
|
||||
argv or is missing; a log with no set. Each runs through `refused()`, so nothing stops and nothing else changes.
|
||||
- T5: stack-release-external.test.mjs adds `--send` and `--no-sso` to the row 232 usage list.
|
||||
- T55 test 5 and the T57 usage test match the new usage line.
|
||||
|
||||
## Mutants
|
||||
|
||||
| # | Change | Expected killer |
|
||||
|---|---|---|
|
||||
| M1 | `set_flags` skips the SHA256SUMS comparison when `--no-sso` is given | T4 tampered set |
|
||||
| M2 | `no_sso_base` skips the `sso-not-on` refusal | T4 `sso-not-on` |
|
||||
| M3 | the `--no-sso` branch of `send_for_target` keeps `--send` | T3 |
|
||||
| M4 | `--send` skips the `send-needs-sso` refusal | T2 |
|
||||
| M5 | parse_opts drops the `--send`/`--no-send` rule | T2 and T4 usage |
|
||||
| M6 | a rollback to a Console without `--sso` keeps `--send` (B1) | T2 (sage-2315 B1) |
|
||||
| M7 | the walk skips an ok line with no activation (N1) | T4 no-activation line |
|
||||
|
||||
Runs and results go in the round's notes once Sage clears the slot.
|
||||
@@ -1,80 +0,0 @@
|
||||
# Row 268 build notes (Gizmoduck)
|
||||
|
||||
Case 2 C2-01c, playground levels. Gitea #1773, Vikunja 464. Brief: docs/plans/2026-10-20_case2-rows.md,
|
||||
"C2-01c playground levels: universe-level prefixes and draft universes" (blob a6ac627c8). The ruling is
|
||||
agents/gosalyn/work/case2/DESIGN.md "Ruling after r11: playgrounds at three levels" (:49-88 at
|
||||
db1e7732a), and it wins where the two differ. Reviewer Webby, gate owner Sage. Branch gizmoduck/row268
|
||||
from refactor db1e7732a. Line numbers are on this branch unless a commit is named.
|
||||
|
||||
## mapping.mjs
|
||||
|
||||
- `kind` (:71). An entry with a `kind` key must say `"hybrid"` or `"draft"`. Before, a plain universe
|
||||
with `kind` refused as an unknown key, and `kind: "draft"` did the same.
|
||||
- A draft (:73-86) refuses `books` with its own message before the key check, so the cause reads
|
||||
plainly. It takes `kind`, `name` and `playground`, needs one prefix or more, and comes back as
|
||||
`{ kind: 'draft', name, books: [], playground }`, frozen with the rest.
|
||||
- The prefix level check moved out of the per-entry loop to :127-140, after every entry is read,
|
||||
because it needs every entry's books. It runs after the book-holds-book, prefix-holds-prefix and
|
||||
listed-twice checks, so an overlap still reports as before. For each prefix and each book folder:
|
||||
- equal to any book folder: `library-mapping-invalid` (brief, What ships, "or equal to a book folder");
|
||||
- inside or holding another entry's book: `library-playground-other-universe`, and the message says
|
||||
which, with the book and its entry;
|
||||
- holding its own entry's book: `library-mapping-invalid`.
|
||||
A prefix inside its own book is book level, and one that touches no book is universe level. A draft
|
||||
has no books, so its prefixes are either outside every book or refused as another entry's.
|
||||
- `sources` (:117-120) now refuses any entry with a `kind`, so a draft can't be a source either. The
|
||||
message changed from "not a non-hybrid universe" to "not a plain universe". mapping.test.mjs:61 on
|
||||
db1e7732a pinned the old words, and that line moves with it.
|
||||
- `library-playground-outside-book` is gone from packages and docs/case2.
|
||||
|
||||
## scope.mjs
|
||||
|
||||
`classify` (:12-24) now runs two passes. The first finds a prefix in any entry, and the file is
|
||||
`playground` with that entry's id and `book` set to the entry's book folder that holds the prefix, or
|
||||
`null`. The second finds a book folder, and the file is `canon`. `place` (:26-32) works out `type` and
|
||||
`folder` from the first folder under the prefix or the book, as before. The validator keeps prefixes
|
||||
from overlapping, so the first pass finds at most one.
|
||||
|
||||
## Readers on this base
|
||||
|
||||
- reader.mjs:182 and :194 spread `classify`'s answer into each file record, so a universe-level or
|
||||
draft file carries `book: null`. Nothing in the reader reads `book`.
|
||||
- reader.mjs:206-209. R5 fires for a canon file linking into any playground. R6 fires when the target's
|
||||
universe differs and isn't a source. A draft can't be a source, so a link into one gives R5 and R6.
|
||||
A link into the file's own universe-level prefix gives R5 only. No code change was needed. The new
|
||||
test covers both.
|
||||
- survey.mjs:66 and mirror.mjs:246 read only `scope`. mirror.mjs:251 calls `readLibrary` and checks
|
||||
only `path`.
|
||||
- No other package calls this `classify` or reads `universes` (git grep over packages/*/src).
|
||||
- C2-05a (row 216) and C2-06 (row 217) have no candidate branch on origin at the time of writing. I
|
||||
check again before in-review.
|
||||
|
||||
## Tests
|
||||
|
||||
- mapping.test.mjs: the old outside-book test splits into the other-universe refusals (inside another
|
||||
entry's book, holding one, a draft prefix inside a book), the mapping-invalid ones (equal to a book,
|
||||
own or another's, and holding its own), universe level in a plain universe and in a hybrid with
|
||||
`books: []`, and the draft shape (frozen with `books: []`, with `books`, with none or empty
|
||||
prefixes, an extra key, and five bad `kind` values). The overlap test gains a cross-entry hold and a
|
||||
cross-entry duplicate. The hybrid test gains a draft source. The caller-supplied `fail` test now
|
||||
uses `Second World/Playground/` and sees the new code, since `Elsewhere/` is valid now.
|
||||
- scope.test.mjs, new: one case per level (book, universe in a plain universe, universe in a hybrid,
|
||||
draft), `.canvas` under each new prefix staying unmapped, prefixes first inside a book that holds a
|
||||
prefix, and the reader case for R5 and R6, with `book: null` on the read records.
|
||||
- business.test.mjs: `Elsewhere/Playground/` now loads, and `Second World/Playground/` refuses with
|
||||
`library-playground-other-universe` through `validateBusinessDocument`.
|
||||
|
||||
## Docs
|
||||
|
||||
- packages/library/README.md: the universe keys, a line on the three levels, the refusal table and
|
||||
the Scope section.
|
||||
- docs/case2/SETUP-SHEET.md "Your playground": one line per level and the draft entry.
|
||||
- docs/case2/SURVEY-RUN.md:114: the new code and message.
|
||||
|
||||
## Hash pins
|
||||
|
||||
`git grep -E '[0-9a-f]{64}'` over packages/*/tests finds no pin on any changed file.
|
||||
|
||||
## Runs
|
||||
|
||||
None yet. Every run waits for Sage's CLEAR.
|
||||
@@ -1052,34 +1052,3 @@ Doc-only. `git diff 899e30a80 <this commit> -- packages` is empty, so the runs c
|
||||
- **Correction to N4 above.** "Until a human verb or a new end clears it" is wrong. `#aliveAfterFire`
|
||||
checks only `session.ended`, and today nothing else clears the flag. It stays until the follow-up
|
||||
row adds a clear.
|
||||
|
||||
### b15 (a), product change: the constructor's argument checks move ahead of the store reads (sage-2501)
|
||||
|
||||
- **Why.** The b14 runb8 (`run-20261022T052118Z`) went red on chief-of-staff T8b (`:864/868`). It
|
||||
builds `new Broker({ store: null, roleFile: 'roles' })` and expects `roleFile must be a function`.
|
||||
Row 191 (4bdc7e0e8) reads `dirname(store.directory)` in the constructor before the roleFile check,
|
||||
so a null store throws its own TypeError first. The order was already like this at b8, but the last
|
||||
194 run before 191 landed was b7, and runb8 had never run on 191's base until today.
|
||||
- **Change.** The harnessOn (row 65), testerOn and roleFile type checks move up, unchanged, to just after
|
||||
the invalid-business check and before `this.#businesses`, `this.#store` and every store read. Each
|
||||
descriptive comment stays with its assignment, and one new comment line goes above the moved checks.
|
||||
Nothing else moves. 191's lines are byte-identical. invalid-business stays first because it was
|
||||
already ahead of every store read. Diff: broker.mjs +4/-3.
|
||||
- **Pins.** chief-of-staff.test `:868` (roleFile, null store) now gets its message.
|
||||
routes-verb.test `:89` (harnessOn 'yes', a real store) keeps its message.
|
||||
|
||||
### b15 (b'), test fixture: T15 drops the reviewer stand-in's registry entry (sage-2503, sage-2507)
|
||||
|
||||
- **Why.** The other b14 red was cli lifecycle T15 (`:744`). The debug run printed the launch log tail:
|
||||
after the resume the coder launch closes `launch-failed` with why `running session has no exact
|
||||
provider/model; reconcile before launching` (business/src/launch.mjs usageCounts, row 122). The
|
||||
reviewer stand-in has exited, but its registry entry is still there, and that entry carries no
|
||||
provider/model. The launcher's exit handler only removes the runs it started itself.
|
||||
- **Not (b).** I didn't give standIn's entry provider/model (honker-0118). prepare()'s limits are
|
||||
`{ sonnet: 1 }`, and the reviewer and coder both run claude-sonnet-5-5, so the stale entry would count
|
||||
1 against a limit of 1 and the same launch would refuse on the limit instead. Sage ruled (b')
|
||||
in place of (b) (sage-2507). standIn is unchanged.
|
||||
- **Change.** T15, after `assert.equal(await x.exited, 143)`, adds
|
||||
`s.launcher.registry.remove("acme", "reviewer-run")` with N6's comment. That's the convention at
|
||||
N6 `:763-764`, and it's test-only. standIn's `t.after` removal still runs, and a second remove of
|
||||
a missing run is the same no-op it already is in N6.
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
# Row 205a (193b1a, #1703): the trail and replies message filter
|
||||
|
||||
Design: DESIGN.md d2 in this directory, with rulings in section 7 (sage-2288). Base: refactor 02da6a2ae. No schema
|
||||
change. Nothing has run yet: every test run waits for Sage's CLEAR.
|
||||
|
||||
## Changes
|
||||
|
||||
`packages/bus/src/broker.mjs`:
|
||||
- `#hiddenMessage(s, id)`: the message's thread (`message_threads` joined to `threads`) is owned by a `user:`
|
||||
other than `#owner(s)`, and `#readable(s, t)` is false. A message with no thread, or in the business human's
|
||||
or the tester's thread, is never hidden. A reader session owns nothing, so every user thread is hidden from it.
|
||||
The tester reads through its reader view, and `#owner` still gives `tester`.
|
||||
- `#readable(s, t)` returns false. Rule 1 (a share in force) can't hold before 193b2's schema 3j, so nobody
|
||||
reads another's thread. 193b2 adds the share rule and rules 2-4 here.
|
||||
- `#trail`: a hidden subject returns `[]` before anything is read, exactly as an unknown id does (ruling 3).
|
||||
After the rows are collected, it drops hidden `messages` rows, `deliveries` rows of a hidden message, and
|
||||
`events` rows whose subject is a hidden message. Decisions, decision events, task snapshots, run events and
|
||||
claims stay.
|
||||
- `replies`: a hidden id fails `message-not-found`, as an unknown id does. Hidden replies are left out in SQL
|
||||
(`NOT EXISTS` a thread whose owner starts with `user:` and isn't the caller), so the `REPLIES` limit counts
|
||||
only visible rows.
|
||||
- The SQL clause doesn't call `#readable`. That is exact while `#readable` is false. 193b2 must add the share
|
||||
exception to the clause and to `#readable` together.
|
||||
|
||||
`packages/bus/tests/message-filter.test.mjs` (new). It writes a `user:alice` thread and its messages
|
||||
straight to the store, as R3's `thread.send` and the run's `to: 'user'` reply will write them, because nothing
|
||||
makes a user session before R3.
|
||||
- `trail` on a hidden id equals `trail` on an unknown id, byte for byte, for the owner, a reader and the tester.
|
||||
- `replies` on a hidden id equals `replies` on an unknown id (code and message), for all three.
|
||||
- `trail` on a user-thread run's decision shows the decision and the owner's message, and drops the user
|
||||
thread message, its delivery and its event.
|
||||
- `replies` with `REPLIES` hidden replies ahead of a visible one returns the visible one.
|
||||
- Messages in the business human's and the tester's threads stay visible on both verbs (row 177 control).
|
||||
- The governance pin, one assertion per item in the user sentence: inbox entry, claim, task, project file and
|
||||
the closed decision in `decisions {list: 'recent'}` show to the owner. `trail` and `replies` hide the user
|
||||
message, and the decision's trail carries no user body.
|
||||
|
||||
## Mutants (each must fail its named test in message-filter.test.mjs)
|
||||
|
||||
| Mutant | Edit | Named test |
|
||||
|---|---|---|
|
||||
| M1 | `#readable` returns true | governance pin: the owner sees decisions, inbox entries, claims, tasks and project files, but not the user messages |
|
||||
| M11 | the trail drop loop iterates nothing | trail on a decision keeps the decision and drops the user thread messages, their deliveries and their events |
|
||||
| M12 | the replies `NOT EXISTS` clause removed | replies leaves out other users thread messages and still fills a page |
|
||||
| M13 | trail fails `message-not-found` for a hidden subject | trail on a hidden message id answers exactly as on an unknown id, for the owner, a reader and the tester |
|
||||
| M14 | replies returns `[]` for a hidden id | replies on a hidden message id answers exactly as on an unknown id, for the owner, a reader and the tester |
|
||||
|
||||
## Gate
|
||||
|
||||
The kit is /mnt/storage/scratch/morgana-r205 (`slot205.sh`, `mutate.py`, `busy.sh`), run as
|
||||
`bash busy.sh && CAND=<sha> bash slot205.sh` on Sage's CLEAR. It runs these files whole:
|
||||
- message-filter;
|
||||
- the bus files that call trail or replies: replies, tester, tester-threads, tester-writes, broker, decisions,
|
||||
decision-close, end-launch and task-read.
|
||||
|
||||
Then it runs the bus suite, then M1 and M11-M14, each on its named test and restored after each. It uses umask
|
||||
022 and TMPDIR from `mktemp -d /mnt/storage/scratch/tmp/g205XXXX`. It refuses unless HEAD is the candidate
|
||||
and the tree is clean, and it stops at the first unexpected failure (sage-2371).
|
||||
|
||||
Sage's gate adds every `scripts/test-*.sh`. The webui tests that read trail or replies run there.
|
||||
|
||||
Static check: `node --check` on broker.mjs and the new test, run from `/`. Both parse. All five mutant anchors
|
||||
match exactly once.
|
||||
|
||||
## r2 (after the 742cba805 slot, failure 1 of the window, sage-2428)
|
||||
|
||||
slot205 on 742cba805 stopped red in message-filter, 4 pass and 2 fail. Both fixes are in the test only.
|
||||
broker.mjs is unchanged (sage-2430).
|
||||
|
||||
- "trail on a decision ..." (:124, its event shows). `#trail` reaches events on a decision trail by
|
||||
`subject` = the decision or `body.$.decision` = the decision. `put()` wrote every event body as `{}`, so the
|
||||
shown message's event was out of reach. That also made the "no hidden event" check (:127) vacuous: the hidden
|
||||
event was never collected, so dropping it proved nothing. Fix: `put()` writes `{decision}` as the event body
|
||||
when the message has a decision. Both events are now collected; the filter keeps one and drops the other.
|
||||
- Governance pin, claims item (:175). A thread run's `role.claim` writes `thread_claims` only and returns
|
||||
(broker.mjs:2682). `agents` (:3309) reads `role_claims` only. No owner verb shows a thread claim. The gap
|
||||
predates 205. Ruling sage-2430, option (a): the pin checks through `threadsState` (the launcher view) that
|
||||
the claim is recorded with holder `assistant-run` and isn't filtered. `agents` is unchanged in 205.
|
||||
Follow-up: Sage adds a row for an owner-visible thread-claim read. Like the filter, it lands before any
|
||||
user thread goes live, since PRD :1084 and the FED R6 sentence promise that the owner sees claims.
|
||||
|
||||
M1 still fails the pin: with `#readable` true, `trail` on the user message returns rows instead of `[]`.
|
||||
@@ -1,173 +0,0 @@
|
||||
# Row 205 (193b1, #1703): viewer verbs, board refusals and the message filter
|
||||
|
||||
Owner Morgana, reviewer Duckworth, gate owner Sage (sage-2280). Brief: `docs/plans/2026-10-20_human-users-build.md`,
|
||||
"Brief: 193b1, viewer verbs, board refusals and the message filter" (blob a73e1bba0, rev 3088). Design:
|
||||
row 193 DESIGN.md r5 (e2d161e2e, Duckworth approved), sections 4.3, 5.4, 5.5, 5.7, 8 and 9. Base: refactor
|
||||
02da6a2ae. Draft 2: Sage's rulings (sage-2288) are in section 7. Sections 1-6 are d1 as sent (morgana-0063).
|
||||
|
||||
## 1. The dependency gap
|
||||
|
||||
The brief chains 193b1 on FED R3, FED R4 and row 196's verifier. Only row 196 exists (7247d80c7). On 02da6a2ae:
|
||||
|
||||
- R3 and R4 aren't filed. The FED brief (`docs/plans/2026-10-20_federation-r1-r2-r5.md`:12-13) files R3 "after
|
||||
R1 and row 196" and R4 after R3, R5 and 193a. No `*/fed-r3` branch is on origin.
|
||||
- Row 196's `verifyPrincipal` returns the `user` kind, and server.mjs accepts the `user` envelope, but
|
||||
runtime.mjs wires only `authenticateHuman` and `authenticateTester`. The broker has no `bindUser`, no
|
||||
`s.user`, no per-request grant read and no collaborator verb list. FED 3.6 and row R3 own all of these.
|
||||
- So nothing makes a user session today, and no thread is owned by `user:<id>` except through a direct
|
||||
store write.
|
||||
|
||||
193b1 has two halves that depend on R3 in different ways.
|
||||
|
||||
| Item | Needs a user session (R3) | Testable on 02da6a2ae |
|
||||
|---|---|---|
|
||||
| Viewer verb list (4.3) | yes: it extends R3's collaborator list | no |
|
||||
| Per-grant level checks via `covers(..., {level})` | yes: R3's grant read | no |
|
||||
| Board reads refused to users (5.5) | yes | no |
|
||||
| `trail` and `replies` filter (5.7) | no: it filters owner, reader and tester sessions | yes, with seeded `user:<id>` threads |
|
||||
| `#readable` owner-only | no | yes |
|
||||
| Governance pin test (owner side) | no: the owner reads decisions, inbox, agents, tasks and `project.file` | yes, with a seeded user-thread run |
|
||||
| Mutants 6 (viewer `thread.send`), 10 (user allowed `trail`) | yes | no |
|
||||
| Mutants 11, 12 (trail, replies filter removed) | no | yes |
|
||||
| Mutants 1, 3 (`#readable` rules 1 and 3 dropped) | see 4 | see 4 |
|
||||
|
||||
## 2. Recommendation: split 205 into 205a now and 205b after R3
|
||||
|
||||
- **205a, the message filter.** `trail` and `replies` hide messages in other users' threads from the owner,
|
||||
reader sessions and the tester, with `#readable` owner-only. Plus the owner-side governance pin test and
|
||||
mutants 11 and 12. No R3 dependency, no schema change.
|
||||
- **205b, viewer verbs and board refusals.** Built on R3's candidate, as Q177 chains a row on its parent's
|
||||
candidate. The viewer list, the level checks, users refused on board reads, the user-session half of the
|
||||
pin test, mutants 6 and 10.
|
||||
|
||||
Why split. The filter is the item the boundary orders first: "No user thread goes live before 193b1's
|
||||
message filter has landed" (mos-1021 B2, FED R8). Landing it before R3 means R3 and every later row can't
|
||||
create a user thread that the owner can read on `trail`. Waiting for R3 holds the filter behind a row that
|
||||
isn't filed. The other option, building all of 193b1 against R3's named interface as 193a did with R1,
|
||||
doesn't work here: 193a only called R1's exported `covers`, while 193b1 would have to write `bindUser`, the
|
||||
grant read and the collaborator list itself, which is R3's scope and owner.
|
||||
|
||||
Tradeoff: two rows and two reviews in place of one, and 205b rebases onto R3. The split is a brief change,
|
||||
so it's Sage's to rule.
|
||||
|
||||
## 3. 205a design
|
||||
|
||||
### 3.1 The hidden-message check
|
||||
|
||||
One broker method, `#hiddenMessage(s, id)`:
|
||||
|
||||
```
|
||||
SELECT t.owner FROM message_threads mt JOIN threads t ON t.id = mt.thread
|
||||
WHERE mt.message = ? AND t.business = ?
|
||||
```
|
||||
|
||||
A message is hidden when that owner starts with `user:`, isn't `#owner(s)`, and `#readable(s, t)` is false.
|
||||
A message with no thread row, or in a thread owned by the business human or `tester`, is never hidden, so
|
||||
row 177's behaviour is unchanged. A reader session has no `#owner`, so every user thread's messages are
|
||||
hidden from it.
|
||||
|
||||
`#readable(s, t)` in 205a returns false. Before 193b2's schema 3j there is no `thread_shares` table, so rule 1
|
||||
(a share in force) can't hold, and the function is false for anyone but the thread's owner (5.7: "b1 hides
|
||||
every message in another user's thread"). It is written as its own method so 193b2 adds the share rule and
|
||||
rules 2-4 in one place.
|
||||
|
||||
### 3.2 `trail`
|
||||
|
||||
- If `subject` is a hidden message id, return `[]`. Design 5.7 says `message-not-found`, "as an unknown id
|
||||
does", but `trail` on an unknown id returns `[]` today (it has no not-found check). A different code for a
|
||||
hidden id would confirm the id exists, which is what 5.7 wants to prevent, so I follow its reason over its
|
||||
code. Question 3.
|
||||
- After `#trail` collects its rows, drop: `messages` rows that are hidden, `deliveries` rows whose `message`
|
||||
is hidden, and `events` rows whose `subject` is a hidden message id. This covers each way `#trail` reaches
|
||||
a message: by id, by `decision`, and through `task.created` → `human.input` → `body.message`.
|
||||
- Decision rows, decision events, task snapshots, run events and role claims stay. 5.7 puts them on the
|
||||
governance side.
|
||||
|
||||
### 3.3 `replies`
|
||||
|
||||
A hidden `id` fails `message-not-found`, and hidden messages are dropped from the result. The `LIMIT`
|
||||
applies before the filter today; the filter moves into the SQL (`AND NOT EXISTS` a thread owned by another
|
||||
`user:`) so a page of hidden replies doesn't return short. For 205a that SQL form is exact because
|
||||
`#readable` is false; 193b2 adds the share exception to the same clause.
|
||||
|
||||
### 3.4 Tests (packages/bus/tests/message-filter.test.mjs, new)
|
||||
|
||||
Fixtures seed a project, a thread owned by `user:alice` with messages in `message_threads`, a delivery and an
|
||||
event on one of them, and a decision raised by that thread's run that cites the message. Sessions: the
|
||||
business human, a reader session and the tester.
|
||||
|
||||
- `trail` on a hidden message id: `[]` for all three sessions, the same as an unknown id.
|
||||
- `trail` on the decision: the decision row and its events show; the user's message, its delivery and its
|
||||
events don't.
|
||||
- `trail` on a human-owned thread's message: unchanged (row 177 control).
|
||||
- `replies` on a hidden id: `message-not-found`. `replies` on a visible id with hidden and visible replies:
|
||||
only the visible ones, and a full page when hidden replies come first.
|
||||
- Governance pin, owner side: for the user-thread run, `decisions {list: 'recent'}`, `inbox`, `agents`,
|
||||
`tasks` and `project.file` each show its item, and `trail` and `replies` hide the user's message body.
|
||||
Each item in the user sentence is one named assertion.
|
||||
|
||||
### 3.5 Mutants
|
||||
|
||||
| Mutant | Edit | Named test |
|
||||
|---|---|---|
|
||||
| 11 | the `trail` filter removed | trail on the decision hides the user's message, delivery and events |
|
||||
| 12 | the `replies` filter removed | replies hides other users' thread messages |
|
||||
| 11b | the hidden-subject early return removed | trail on a hidden message id returns [] |
|
||||
| 1 | `#readable` returns true | governance pin: trail and replies hide the user body |
|
||||
|
||||
## 4. Mutants 1 and 3
|
||||
|
||||
Design section 8 lists mutants 1 (rule 1 dropped) and 3 (rule 3 dropped) for b1. With no shares table,
|
||||
rule 1 is always false, so `#readable` is false whatever rules 2-4 say. Dropping rule 3 changes nothing a
|
||||
test can see until 193b2 adds shares, and rules 2 and 3 need R3's grant read. So:
|
||||
|
||||
- Mutant 1 in 205a is "`#readable` returns true", killed by the pin test above.
|
||||
- Mutant 3 moves to 193b2, where rule 1 can hold and rule 3 decides.
|
||||
|
||||
This is a second brief change for Sage to rule on.
|
||||
|
||||
## 5. Gate (Sage's slot, on CLEAR only)
|
||||
|
||||
The brief's gate: Duckworth approves the manifest; the bus suite and every `scripts/test-*.sh` green on
|
||||
Sage's gate; the mutants killed. The new test file whole, the touched existing files whole, then the bus
|
||||
suite, then each mutant on its named test with a restore check. umask 022, TMPDIR from
|
||||
`mktemp -d /mnt/storage/scratch/tmp/gXXXXXX`. No test touches the live data root, config, units, slot
|
||||
files, any live access.json or `~/.mosaic`.
|
||||
|
||||
## 6. Questions for Sage
|
||||
|
||||
1. Split 205 into 205a (filter, now) and 205b (viewer verbs and board refusals, after R3's candidate)?
|
||||
2. Mutant 1 as "`#readable` returns true" in 205a, and mutant 3 moved to 193b2?
|
||||
3. A hidden `trail` subject returns `[]`, the same as an unknown id, in place of 5.7's `message-not-found`
|
||||
(3.2)? `replies` already fails `message-not-found` on an unknown id, so there the code stays.
|
||||
|
||||
## 7. Rulings (sage-2288, re morgana-0063)
|
||||
|
||||
1. **Split approved.** 205a is built now: the 5.7 `trail` and `replies` filter over owner, reader and tester
|
||||
sessions, `#readable` owner-only, the owner-side governance pin test, and mutants 11 and 12. 205b comes
|
||||
after R3's candidate and R4: viewer verbs, `covers` level checks, board reads refused to users, the
|
||||
user-side pin, and mutants 6 and 10. 205a's base is origin/refactor 02da6a2ae or later. R3 builds on
|
||||
205a's candidate and extends the filter to user sessions, so the filter isn't written twice.
|
||||
2. **Mutant 1** in 205a is "`#readable` returns true", killed by the pin test. **Mutant 3** moves to 193b2
|
||||
(row 206). Sage changes the brief to match.
|
||||
3. **Hidden equals unknown.** A hidden `trail` subject returns `[]`, exactly as an unknown id does. `replies`
|
||||
keeps `message-not-found` for both. The point of 5.7 is that a caller can't tell hidden from unknown.
|
||||
So 205a adds:
|
||||
- one test per verb comparing the hidden response with the unknown-id response byte for byte
|
||||
(`JSON.stringify` of the result, or of the error's code and message), for each of the three sessions;
|
||||
- a mutant M13 that makes the hidden path distinguishable: `trail` fails `message-not-found` for a
|
||||
hidden subject. The `trail` equality test must kill it. M14 does the same for `replies`: a hidden id
|
||||
returns `[]` instead of failing. The `replies` equality test must kill it.
|
||||
|
||||
### 7.1 205a mutant table (replaces 3.5)
|
||||
|
||||
| Mutant | Edit | Named test |
|
||||
|---|---|---|
|
||||
| M1 (design 1) | `#readable` returns true | governance pin: the owner sees decisions, inbox entries, claims, tasks and project files, but not the user's messages |
|
||||
| M11 (design 11) | the `trail` filter of hidden rows removed | trail on the decision hides the user's message, its delivery and its events |
|
||||
| M12 (design 12) | the `replies` filter removed | replies drops other users' thread messages and still fills a page |
|
||||
| M13 | `trail` fails `message-not-found` for a hidden subject | trail on a hidden id answers exactly as on an unknown id |
|
||||
| M14 | `replies` returns `[]` for a hidden id | replies on a hidden id answers exactly as on an unknown id |
|
||||
|
||||
Queue: Sage re-pins 205 to the split brief and adds 205b and the R3 row at the next gap. I claim after
|
||||
that. No run before Sage's CLEAR.
|
||||
@@ -1,814 +0,0 @@
|
||||
# Row 191 stopRun inspection round
|
||||
|
||||
Design: ../DESIGN-r2.md, approved by Dewey in 29473; scope sage-2244;
|
||||
per-run contract ../STOP-RUN-CONTRACT.md, honker-0079/0081. Not review-ready:
|
||||
full package/shell/Docker gate and acceptance/guard mutants remain pending.
|
||||
|
||||
Current commit 7aa18b0f6e1a09188fb602853ebb02815b642ac9, new branch
|
||||
rocko/row191-stoprun-dcd8-20261022, parent dcd8d4dda. Worktree
|
||||
/mnt/storage/scratch/rocko-r191-r3. Earlier inspection f7bf7dfec is preserved.
|
||||
All 79 manifest paths have identical blobs at f7bf7dfec and 7aa18b0f6;
|
||||
rebase-product-diff.stat is empty, rebase-product-check.txt names the check.
|
||||
The manifest SHA-256 stays
|
||||
9971ac5fe56d0d36eb914ecaf2c282e14ab3cd29860fd27b268ec0baadaf0e52.
|
||||
Rocko author and committer identity were selected explicitly. No attribution
|
||||
lines, force-push or branch deletion. Sage publishes through jarvis.
|
||||
|
||||
## Changes Dewey must review: two focused-run fixes
|
||||
|
||||
1. packages/bus/src/broker.mjs, requestHost: the new processingWork guard was
|
||||
initially inserted into the inner refusal logger's try block. That let the
|
||||
original request reach validation, then prevented its refusal being logged
|
||||
while halted, returning storage-unavailable. Move it to the main admission
|
||||
try, before keys/credentials/authority/effects. The refusal logger retains
|
||||
its existing unconditional audit behavior. The new host-admission test now
|
||||
expects processing-halted and proves neither executor method was called.
|
||||
Initial evidence: ../logs/stoprun-focused-packages_bus_tests_processing.test.mjs.log.
|
||||
|
||||
2. packages/bus/tests/processing.test.mjs, real socket await test: row 196's
|
||||
asynchronous kernel-peer subprocess now precedes dispatch. The old 5 ms
|
||||
server deadline could fire during that subprocess, before the processing
|
||||
await branch extends it. This test already stubs authenticateHuman; give it
|
||||
a deterministic peerReader too, with read and close, and assert exactly two
|
||||
proof reads for halt/resume. Keep the 5 ms ordinary timeout and 30 ms halt
|
||||
delay. Production peer discovery, proof/transport and timeout behavior are
|
||||
unchanged. The test still fails if the async branch timeout is removed.
|
||||
The first fixture retry omitted close(); its teardown failed and left its
|
||||
own server running. Only that verified test group 2831504 was killed. Both
|
||||
unsuccessful logs remain. Corrected evidence:
|
||||
../logs/stoprun-focused-bus-processing-fixed-2.log (14/14).
|
||||
|
||||
These are diagnosed code/fixture mistakes, not declared flakes. No failed log
|
||||
was removed and no existing security assertion was weakened.
|
||||
|
||||
## Focused evidence, sage-2250
|
||||
|
||||
Ran singly on 41b0cf755 because none of row 254's seven paths overlaps ours.
|
||||
Sage-2265 carries this evidence to dcd8d4dda after the empty 79-path diff.
|
||||
Scripted busy check exited 0 before the first file. Every test runner used its
|
||||
own process group, 180 s timeout, scratch TMPDIR
|
||||
/mnt/storage/scratch/rocko-r191-tmp and DOCKER_HOST=unix:///nonexistent.sock.
|
||||
There was no Docker, browser, package suite, shell suite or mutant run.
|
||||
|
||||
| File | Final passed | Failed | Skipped |
|
||||
|---|---:|---:|---:|
|
||||
| processing-control/tests/stop-run.test.mjs | 12 | 0 | 0 |
|
||||
| processing-control/tests/runtimes.test.mjs | 10 | 0 | 0 |
|
||||
| processing-control/tests/coordinator.test.mjs | 3 | 0 | 0 |
|
||||
| processing-control/tests/containers.test.mjs | 6 | 0 | 0 |
|
||||
| processing-control/tests/effects.test.mjs | 5 | 0 | 0 |
|
||||
| processing-control/tests/task.test.mjs | 7 | 0 | 0 |
|
||||
| bus/tests/processing.test.mjs | 14 | 0 | 0 |
|
||||
| bus/tests/processing-runtime.test.mjs | 2 | 0 | 0 |
|
||||
| bus/tests/project-runtime.test.mjs | 3 | 0 | 0 |
|
||||
| Script sum | 62 | 0 | 0 |
|
||||
|
||||
All final runners exited 0. The batch stopped at the initial bus failure,
|
||||
then that file was diagnosed/rerun before the final two files. Counts are from
|
||||
focused-run-table-final.json and include only each final successful file log.
|
||||
Earlier bus failures are reported above, not silently included as green.
|
||||
Approximate run span 23:59Z–00:00:41Z; start second was not recorded.
|
||||
Cwd-scoped node/chromium sweep was empty at 00:00:41Z; slot returned to Sage.
|
||||
|
||||
## stopRun implementation
|
||||
|
||||
The export resolves host-owned run identity even without a bound bus claim.
|
||||
It checks boot/start/group identity immediately before each signal, preserves
|
||||
verified member anchors, waits 5 s before KILL and observes for 2 s. Signals
|
||||
are acknowledgements only, never invented. Root/business/run cache joins the
|
||||
same Promise. Atomic hard-link publication plus durable exclusive claim
|
||||
coordinates other host processes. First owner/reason/deadline/result persists;
|
||||
completed retries never re-escalate or overwrite that result. Halt links its
|
||||
generation to the first fire receipt without relabelling the runtime's stop
|
||||
cause. A later verified exit is separate immutable observation evidence.
|
||||
The seam writes no bus events. Honker maps killed/alive to lifecycle events.
|
||||
|
||||
No global unit, live config, binding, token, slot file or live store touched.
|
||||
No schema migration. First activation still requires stopping old processing
|
||||
before trusted initialization and aligning the copy/image/read-only mount in
|
||||
Mos's window. Existing result.json evidence remains write-once.
|
||||
|
||||
## Integration and outstanding work
|
||||
|
||||
The 12 latest-base conflict resolutions are listed in STATUS.md. New landed
|
||||
host execution, publish and library sync paths are now wrapped in processing
|
||||
scopes; host credential cancellation composes with its existing revocation
|
||||
signal. This changes only files already owned by 191. Those wider integrations
|
||||
still need the full owning-file/package gate and mutant evidence.
|
||||
|
||||
Fifteen proposed per-run mutants preflight exact once in stoprun-mutants.json;
|
||||
none has been applied or run. The broader kill-switch acceptance/guard table
|
||||
and executable mutant runner are still being completed. No kill count or
|
||||
review-ready claim is made. Ask Sage for the later CLEAR when the packet is
|
||||
complete, as sage-2259/2262 requires.
|
||||
|
||||
### Gate preparation after the focused slot
|
||||
|
||||
The published product implementation is unchanged. Three uncommitted test-file
|
||||
strengthenings are saved in post-inspection-tests.patch: effects.test.mjs adds a
|
||||
4-second bounded abort expectation for the watcher mutant; Discord's early
|
||||
start fence is also checked before a malformed journal can be read; WebUI's
|
||||
body limit now uses oversized valid JSON, and a direct-handler test isolates
|
||||
its own origin/site guards from serve's outer fence. These edits are unrun and
|
||||
are not included in the published 9971ac5f manifest. They must pass before a
|
||||
new candidate is cut. Thus 62/62 is prior focused evidence, not a claim for
|
||||
these changed test bytes.
|
||||
|
||||
The complete proposed table has 70 exact-once sites in all-mutants.json,
|
||||
including expected killing test names. Static preflight is clean; no mutant
|
||||
has been applied. run-mutants.py validates preflight, uses new process groups,
|
||||
tracks only its own verified descendant identities, kills those groups on
|
||||
timeout, checks named TAP failures, and restores all source bytes in finally.
|
||||
A timeout or wrong-test failure is not counted as a valid kill. The table and
|
||||
runner are prepared evidence, not a kill result. The requested nine-package,
|
||||
ten-shell, seventy-mutant gate is in gate-plan.json; Sage CLEAR is pending.
|
||||
|
||||
## Published test-strengthening commit and full gate (sage-2269/2271)
|
||||
|
||||
81889b58d57889b12a584aa225e1ac26e90e5700 is one fast-forward commit on
|
||||
7aa18b0f6, same branch rocko/row191-stoprun-dcd8-20261022. It commits the
|
||||
three test changes saved in post-inspection-tests.patch; that patch remains
|
||||
historical evidence, not an uncommitted candidate. Product implementation is
|
||||
unchanged. Earlier manifest 9971ac5f belongs to 7aa18b0f6; candidate.txt now
|
||||
names the manifest for 81889b58d. Sage published this tip before granting CLEAR.
|
||||
|
||||
The full gate checks HEAD equality and clean product bytes before its first
|
||||
file. Changed test files run singly, then nine packages, all ten shell suites,
|
||||
then seventy mutants. Each step gates on its exit status and retains its full
|
||||
log. run-gate.sh uses pipefail and an EXIT trap for the label-verified Compose
|
||||
network rocko-r191-gate_default, project rocko-r191-gate. TMPDIR is
|
||||
/mnt/storage/scratch/tmp/rocko-r191-gate. Docker is available only for test-task
|
||||
and test-release; other steps use unix:///nonexistent.sock. Live provider calls
|
||||
are disabled. No daemon, socket, volume or live configuration changes.
|
||||
|
||||
Gate start: 2026-10-22T00:18:00Z. Results remain pending until gate-results.json
|
||||
and mutant-results.json provide actual exit statuses and counts.
|
||||
|
||||
### First full-gate stop and fixture correction (sage-2274)
|
||||
|
||||
The 81889b58d run stopped at its first failure, 00:18:00Z–00:19:21Z.
|
||||
27 files completed: 268 passed, 1 failed, 0 skipped. Packages, shells and
|
||||
mutants did not start. Full logs/results are in gate-attempt-81889/.
|
||||
The tester refusal test's fixture requested tester:true over TCP, which row
|
||||
196 now refuses before route handling. This is a stale fixture, not a flake.
|
||||
The correction uses the existing startTesterSocket helper, a private fixture
|
||||
root, socketPath requests, TESTER_ORIGIN and no human identity header. Every
|
||||
assertion remains; the request now reaches the intended processing refusal
|
||||
rather than failing listener setup or the outer identity fence. A grep of all
|
||||
changed test files found no other tester:true TCP setup. The cwd node/chromium
|
||||
sweep returned []; no Docker test workload ran. Commit c78f48946 is a single
|
||||
fast-forward test-only fix on 81889b58d, authorized by sage-2274. The complete
|
||||
gate restarts from its first single file only after Sage publishes this tip.
|
||||
|
||||
Sage-2275 published c78f48946 and granted full restart. Second attempt begins
|
||||
2026-10-22T00:21:03Z; any further failure stops before additional edits.
|
||||
Candidate manifest b49fd493dc75ef2484ffc255213dc8eeaaaa348dee416c8d26d1c2bab8e20067.
|
||||
|
||||
### Second attempt stopped; no further changes (sage-2275)
|
||||
|
||||
Run 00:21:03Z–00:23:50Z on published c78f48946: all 27 changed singles
|
||||
269/269, processing-control 61/61, bus 646/646. The CLI package emitted 26
|
||||
failed subtests before its verified own runner group 3119310 was stopped.
|
||||
Its result is interrupted, not a complete package count. Six gate-lane image
|
||||
checks refuse because scripts/testing/lane-image.mjs pins the old four COPY
|
||||
lines and 191 adds processing-control to Containerfile. Twenty launch-account,
|
||||
launch-limit-checks, launch-limits and launch-routes cases hit
|
||||
processing-uninitialized on fixture roots with no explicit control init.
|
||||
No edits, retries, later packages, shells, Docker test workloads or mutants
|
||||
followed this second failure. Parent runner exited; cwd node/chromium sweep
|
||||
returned [] at 00:23:50Z. Slot returned to Sage at 00:24:05Z with the exact
|
||||
failures and a request for scope on image-manifest and fixture initialization.
|
||||
This is an integration failure, not a declared flake or a passing gate.
|
||||
|
||||
## Image-input manifest and launcher fixture scope (sage-2278, sage-2282)
|
||||
|
||||
Commit eb3abba12 is one fast-forward commit on c78f48946. This is an image-input
|
||||
manifest change: scripts/testing/lane-image.mjs now pins the exact Containerfile
|
||||
COPY of packages/processing-control/src/state.mjs and entrypoint.mjs and hashes
|
||||
both named source paths, without a wildcard. Its only two changed lines add
|
||||
those inputs. Without them, a lane could reuse a stale image after a reader or
|
||||
entrypoint change. The image test fixtures copy both files and each has its
|
||||
own receipt-invalidating test. Mutant KS56 drops state.mjs from the hash list;
|
||||
its named killer is the state.mjs receipt-invalidating test. Static preflight
|
||||
is 71 sites / 0 errors. No new run result is claimed before CLEAR.
|
||||
|
||||
The launch-account, launch-limit-checks, launch-limits and launch-routes fixtures
|
||||
now explicitly call initializeControl(f.dataRoot) before constructing their
|
||||
launchers. Existing assertion lines are byte-identical. A new launch-limit-checks
|
||||
test leaves initialization off and asserts processing-uninitialized, no
|
||||
mayLaunch/authorizeLaunch, and no registered session. A live root gets control
|
||||
initialized by the bus broker. The re-pin order is bus start before any seat
|
||||
launch; a launcher started before that refuses. This supplements the existing
|
||||
window precondition to stop old processing before the first trusted init.
|
||||
|
||||
Sage-2282 supersedes the test-only image ruling: lane-image.mjs is a product
|
||||
blob, so mos-1200 carries no earlier results. The complete plan restarts from
|
||||
the first single file, all nine packages, all ten shells and all 71 mutants
|
||||
only after publication and Sage CLEAR. Earlier attempts remain in their
|
||||
separate gate-attempt directories; neither is a passing full gate.
|
||||
|
||||
Sage-2283 published eb3abba12. Current 85-path candidate manifest is
|
||||
01a2b33651414c9b0cb094d2108f9e39c48a41b79974dcc16bdec374f8371091.
|
||||
The gate prints HEAD and this digest, verifies every manifest blob before its
|
||||
first test, and carries no old results. Awaiting CLEAR after Gander 253.
|
||||
|
||||
## Full restart on eb3abba12 stopped at Discord (sage-2286)
|
||||
|
||||
Verified HEAD and all 85 manifest blobs before tests. Run span:
|
||||
2026-10-22T00:34:50Z–00:47:33Z. No old result carried.
|
||||
|
||||
| Step | Passed | Failed | Skipped | Exit |
|
||||
|---|---:|---:|---:|---:|
|
||||
| 32 changed test files singly | 304 | 0 | 0 | 0 |
|
||||
| processing-control | 61 | 0 | 0 | 0 |
|
||||
| bus | 646 | 0 | 0 | 0 |
|
||||
| cli | 761 | 0 | 0 | 0 |
|
||||
| discord | 190 | 2 | 0 | 1 |
|
||||
|
||||
Singles sum independently confirmed by awk over all 32 TAP logs. Discord's
|
||||
binding.test.mjs:201 STOP check and recover.test.mjs:145 ready recovery check
|
||||
both get processing-uninitialized before the expected behavior. Those older
|
||||
fixture roots do not explicitly initialize control. The gate stopped at this
|
||||
step; no subsequent package, shell suite, Docker test workload or mutant ran.
|
||||
Docker availability was checked read-only (29.7.2); no daemon/volume changes.
|
||||
The EXIT trap completed. Cwd node/chromium sweep returned [] at 00:47:49Z,
|
||||
source tree remains clean, and the slot was handed back at 00:47:58Z.
|
||||
No test or product edits or retries followed this failure; Sage has the table
|
||||
and the fixture-initialization recommendation. This is not a green full gate.
|
||||
|
||||
## Discord fixture init and all-package static sweep (sage-2294)
|
||||
|
||||
Commit e6800380dc0765ce3f1477044e2ce4f773ebb43c is test-only and fast-forwards eb3abba12.
|
||||
Only binding.test.mjs and recover.test.mjs change: one initializeControl import
|
||||
and one initializeControl(dep.dataRoot) call in each affected CLI fixture.
|
||||
Every original assertion line is retained. Product blobs are unchanged.
|
||||
FIXTURE-SWEEP.md and fixture-sweep.json enumerate 338 source call-site hits,
|
||||
with the two fixes and the already-initialized chains, plus the screens for
|
||||
rootless optional contexts and read-only/usage CLI calls. The generator reads
|
||||
repository source only and invokes no fixture. Deliberate missing/deleted/
|
||||
corrupt-state refusal tests remain negative; no shared helper masks them.
|
||||
|
||||
Current manifest be36af8f0855f57336e6a33283aa0a8e94297f338b1f8180936cbccf1119c60a, 87 paths. Sage-2294 carries only unchanged
|
||||
processing-control 61/61, bus 646/646, CLI 761/761 and unchanged singles from
|
||||
gate-attempt-eb3/. The resume must run both touched files wholly, whole Discord,
|
||||
then the never-run WebUI/tasks/seat/project/library packages, every shell suite
|
||||
and all 71 mutants. No result is claimed for the new test bytes before CLEAR.
|
||||
The live initialization order remains bus start before any seat or Discord
|
||||
start; no fixture change initializes or repairs a live root.
|
||||
|
||||
## Resume on e6800380d stopped at WebUI (sage-2311)
|
||||
|
||||
Start 2026-10-22T01:27:40Z; failed-step exit 01:28:45Z. Startup verified HEAD,
|
||||
manifest be36af8f and all 87 blobs, and read-only Docker availability (29.7.2).
|
||||
|
||||
| New step | Passed | Failed | Skipped | Exit |
|
||||
|---|---:|---:|---:|---:|
|
||||
| binding.test.mjs whole | 15 | 0 | 0 | 0 |
|
||||
| recover.test.mjs whole | 5 | 0 | 0 | 0 |
|
||||
| Discord whole | 192 | 0 | 0 | 0 |
|
||||
| WebUI whole | 314 | 4 | 1 | 1 |
|
||||
|
||||
Carried unchanged under sage-2294: 32 singles 304/304, processing-control 61/61,
|
||||
bus 646/646 and CLI 761/761, from gate-attempt-eb3/. These are explicitly carried
|
||||
results, not fresh runs on e6800380d.
|
||||
|
||||
Four WebUI failures are retained in gate-logs/package-webui.log:
|
||||
- board-held.test.mjs:91: processing's config/state GETs omit redirect:manual.
|
||||
- board-held.test.mjs:194 and send-browser.test.mjs:58: processing's independent
|
||||
hash/focus/interval refresh continues to read after the shell signs out.
|
||||
- shell.test.mjs:104: the added control bar makes the short desktop page 1095px
|
||||
high at a 1000px viewport. Its new height is not accounted for by the existing
|
||||
frame/sidebar/footer layout.
|
||||
|
||||
Static diagnosis: processing.js ignores the existing body.signed-out state and
|
||||
mosaic-signed-out event that app.js and bus.js already share. Its GETs also lack
|
||||
manual redirect handling. processing.css adds an external bar while shell.css's
|
||||
frame minimum and sidebar heights still subtract only bar-h and foot-h. These
|
||||
are product integration defects; no assertions were weakened and no fix was
|
||||
made after the failed step. Sage received the table and recommendations.
|
||||
|
||||
One TAP skip: the editor rebuild requires exactly esbuild 0.28.2; installed
|
||||
shared node_modules has 0.28.1. Full skip line is in tap-skips.json. No shell
|
||||
suite ran, so there are no ^skip shell lines (skip-lines.txt remains empty).
|
||||
No tasks/seat/project/library suite, shell Docker workload or mutant ran after
|
||||
WebUI failed. Parent runner exited, EXIT cleanup completed, cwd node/chromium
|
||||
sweep returned [] at 01:29:00Z, source tree is clean, and slot returned to Sage.
|
||||
No retries or source edits were made. This is not a passing gate.
|
||||
|
||||
## Console shared sign-out and bounded desktop layout (sage-2317)
|
||||
|
||||
Commit 8e1f55c1db6a096e227b5114cd13a7142493b112, fast-forward on e6800380d, changes only the
|
||||
processing assets and their owning two tests. Current 87-path manifest:
|
||||
d3b014e6a0e9e547a29ae780eb27b1c0e57cc7b0e73dc49954abbff623929f41.
|
||||
|
||||
All three processing fetch sites use redirect:manual. responseBody dispatches
|
||||
the existing mosaic-signed-out event for an opaque redirect, or its signIn
|
||||
variant for exactly 401/sign-in required. No independent sign-out state is
|
||||
added: refresh/action guards read body.signed-out. The existing event cancels
|
||||
the interval, invalidates pending reads, clears stale state and disables
|
||||
writes. In-flight answers cannot restore state after sign-out. Initial work
|
||||
waits for DOMContentLoaded because this deferred asset precedes app.js in the
|
||||
HTML and needs its shared sign-out listener registered first. app.js/bus.js
|
||||
and their proof baselines remain untouched.
|
||||
|
||||
The CSS keeps the control bar in normal document flow. On desktop, the frame
|
||||
flexes into the remaining viewport rather than imposing another full-height
|
||||
minimum below the bar. Fixed navigation retains the shell's command/footer
|
||||
bounds and existing responsive column widths. Mobile retains natural flow.
|
||||
No short-page, sidebar or footer assertion is changed; rendering remains to
|
||||
be verified on the next authorized gate, not claimed from static checks.
|
||||
|
||||
The VM fixture models the existing body class, document events and DOM ready;
|
||||
its original assertion lines are unchanged. Six new browser cases cover config,
|
||||
state and POST opaque redirects and sign-in-required replies, manual redirect
|
||||
requests, interval cancellation and no subsequent fetch from forced refreshes
|
||||
or clicks. KS57 removes manual redirect from the config GET; KS58 removes the
|
||||
refresh signed-out guard. Both name the config-redirect browser case as their
|
||||
killer. Static preflight: 73 exact-once sites / 0 errors. Syntax checks pass;
|
||||
no owning test or mutant has run on this commit.
|
||||
|
||||
A product blob changes, so sage-2317/mos-1200 carries nothing. The next CLEAR
|
||||
runs all changed files singly, all nine package suites, all ten shell suites
|
||||
with Docker available and all 73 mutants. The editor rebuild's esbuild0.28.1
|
||||
vs pinned0.28.2 skip remains host drift and is reported separately. Earlier
|
||||
failed attempts remain immutable in gate-attempt-* directories.
|
||||
|
||||
## Rebase onto row 202 (sage-2329)
|
||||
|
||||
New branch rocko/row191-stoprun-ddfb-20261022, tip eafcbd3e7d6ef6e259fb59d87a7b0857b42337aa,
|
||||
base ddfb29af7. The prior published branch is preserved; no force-push, delete
|
||||
or old-name reuse. Six Rocko commits rebased, with one manual conflict in
|
||||
scripts/mosaic's human CLI case: prepend halt|resume|processing and retain
|
||||
row 202's appended access. packages/cli/src/cli.mjs auto-merges retain the
|
||||
access import/branch and all three processing commands. CLI README retains
|
||||
both the Access and Instance processing switch sections.
|
||||
|
||||
The full old/new tip diff has 15 paths (base plans/queue/logs, row 202's new
|
||||
access files and its three shared CLI paths), 2327 insertions/32 deletions.
|
||||
Within row 191's owned paths only CLI README, cli.mjs and scripts/mosaic differ,
|
||||
with the row 202 additions. rebase-ddfb-log.txt, rebase-ddfb-tip-diff.stat,
|
||||
rebase-ddfb-owned-diff.stat and rebase-ddfb-range-diff.txt retain exact evidence.
|
||||
|
||||
Manifest fd0f2740b1cccadaaad8c613640fdddb0497cdab33ec2c0fd11debf3cae6c4ee, 87 candidate paths. The package command lists were
|
||||
regenerated from this base; CLI includes access.test.mjs. All 73 mutant sites
|
||||
must preflight again. No tests ran, no result carries, and the complete gate
|
||||
waits for publication and Sage CLEAR after Megavolt's debug run.
|
||||
|
||||
Sage-2333 published eafcbd3e7. Their per-file patch-id comparison matches
|
||||
the prior six-commit range except the exactly ruled scripts/mosaic dispatch
|
||||
line; binary/secrets/attribution checks pass. Gate remains unrun pending CLEAR.
|
||||
|
||||
## eafcbd3e7 full gate stopped on timer fixture attribution (sage-2339)
|
||||
|
||||
Run 2026-10-22T02:18:04Z–02:19:25Z. HEAD, 87 blobs and fd0f2740 manifest
|
||||
verified. Short mktemp TMPDIR /mnt/storage/scratch/tmp/gxbC; named Compose
|
||||
project rocko-r191-gate. Nothing carried. 32 changed files completed:
|
||||
313 passed, 6 failed, 0 skipped. All six new processing-browser sign-out
|
||||
cases stop at their common precondition, processingTimers length2 vs1.
|
||||
The original two browser cases pass. Their recorder attributes every 5000ms
|
||||
interval to processing, but app.js:307 already arms its own freshness timer.
|
||||
The intended processing interval is at processing.js:87. These new cases have
|
||||
not yet exercised sign-out or killed KS57/KS58, so no behavior proof is claimed.
|
||||
|
||||
The gate stopped at this first red step. No package, shell, Docker workload
|
||||
or mutant ran; the esbuild rebuild was not reached. Runner exited, EXIT cleanup
|
||||
completed and cwd node/chromium sweep returned [] at 02:19:34Z. No source edit
|
||||
or retry followed the failure. Sage received the exact failure and a proposed
|
||||
test-only caller-attribution filter with the assertions unchanged. This is a
|
||||
fixture error, not a passing gate or a declared flake.
|
||||
|
||||
## Timer recorder attribution correction (sage-2345)
|
||||
|
||||
Commit 4db8b57785895bc62f5f015468a69515da7fc77f, fast-forward on eafcbd3e7, is a one-line
|
||||
test-only correction in processing-browser.test.mjs. Cause: app.js:307's
|
||||
freshness interval is also 5000ms, and the recorder incorrectly counted it as
|
||||
a processing interval. The recorder now requires the processing.js caller
|
||||
stack. Every assertion remains byte-identical, including exactly one timer
|
||||
before sign-out and zero after it. A second 5000ms interval from processing.js
|
||||
would still be counted and fail the exactly-one assertion. No product byte
|
||||
changes, and no test or mutant ran for this correction.
|
||||
|
||||
Manifest ffb46fbdb875f97ff2eb7a7bed8bf6d5c4df53b8a63c738ffcde5fc5f6b7f6ad, 87 paths. Full restart after publication and CLEAR,
|
||||
with nothing carried. Sage-2345 counts the timer-fixture red as the first in
|
||||
this 191 window; any second red stops and is escalated to Mos. Previous logs
|
||||
are retained in gate-attempt-eaf/.
|
||||
|
||||
## Full gate on 0f8235277: second red (sage-2351)
|
||||
|
||||
Candidate: 0f8235277e1fc21588edb6f2931d66c8e154a400 on ddfb29af7.
|
||||
Manifest: ffb46fbdb875f97ff2eb7a7bed8bf6d5c4df53b8a63c738ffcde5fc5f6b7f6ad.
|
||||
No prior result carried. Start 2026-10-22T02:33:41Z; failed-step exit
|
||||
2026-10-22T02:46:17Z. Fresh TMPDIR /mnt/storage/scratch/tmp/giNF.
|
||||
Compose project rocko-r191-gate, trapped ownership-checked network cleanup.
|
||||
|
||||
| Step | Passed | Failed | Skipped | Exit |
|
||||
|---|---:|---:|---:|---:|
|
||||
| 34 changed test files singly | 330 | 0 | 0 | 0 |
|
||||
| processing-control | 61 | 0 | 0 | 0 |
|
||||
| bus | 646 | 0 | 0 | 0 |
|
||||
| cli (including access) | 783 | 0 | 0 | 0 |
|
||||
| discord | 192 | 0 | 0 | 0 |
|
||||
| webui | 323 | 1 | 1 | 1 |
|
||||
| tasks, seat, project, library | not run | — | — | — |
|
||||
| all ten scripts/test-*.sh | not run | — | — | — |
|
||||
| all 73 mutants | not run | — | — | — |
|
||||
|
||||
Singles sum independently confirmed with awk over all 34 TAP logs.
|
||||
The sole failure is shell.test.mjs:380 in the full shell-browser test:
|
||||
scrollHeight 1062 vs innerHeight 1000. Full evidence is
|
||||
gate-logs/package-webui.log (not ok 271, line 1626).
|
||||
All prior manual-redirect/sign-out failures and eight processing-browser cases
|
||||
pass, but the desktop short-page geometry is still wrong. No passing layout
|
||||
or full-gate claim is made.
|
||||
|
||||
Known host-drift TAP skip: editor rebuild requires exactly esbuild 0.28.2,
|
||||
while shared node_modules has 0.28.1. Full line is in tap-skips.json. This skip
|
||||
is not counted as a red. No shell suite ran, so skip-lines.txt has no ^skip
|
||||
shell line. No Docker test workload or mutant started.
|
||||
|
||||
Stopped at the first failed step without retry or product edits, per sage-2351.
|
||||
This is the second red in the 191 window and is with Sage for Mos escalation
|
||||
under mos-0823. Parent runner exited; EXIT cleanup completed. Cwd-scoped node
|
||||
and chromium sweep returned [] at 02:47:14Z, product worktree is clean, and the
|
||||
slot was returned. No in-review move was made.
|
||||
|
||||
|
||||
### mos-1248 / sage-2363: desktop viewport allocation (unrun static candidate)
|
||||
|
||||
The second red on 0f8235277 was shell.test.mjs:380 (1062 versus 1000).
|
||||
The shell gives .frame a viewport-based minimum at packages/webui/src/public/shell.css:135;
|
||||
processing.css:12-14 replaced that minimum but used a column flex body with only
|
||||
min-height:100vh, so the new bar was not allocated a bounded share of the viewport.
|
||||
The desktop body now uses explicit grid rows for the command bar, controls, optional
|
||||
banner, frame and footer. The frame row is minmax(min-content,1fr): it takes the
|
||||
remaining short-page space while long content may grow the document. No clipping,
|
||||
overflow suppression, fixed body height, test viewport change or assertion removal.
|
||||
The existing shell.test.mjs:380 equality stays byte-identical. Added assertions
|
||||
check actual processing-bar visibility, positive height, viewport placement and
|
||||
no document scroll at 1440x1000; the existing 1440x420 long-page checks remain.
|
||||
KS59 reverts processing.css to 0f8235277's bytes and must fail that same shell
|
||||
browser test. Total: 74 planned mutants. No test or mutant has run on this fix.
|
||||
Webby must statically review this delta before Sage opens the full no-carry gate.
|
||||
|
||||
|
||||
### Correction after Webby B1 (webby-0104, 2026-10-22 03:00Z)
|
||||
|
||||
The cause stated in the mos-1248/sage-2363 note above is withdrawn.
|
||||
processing.css loads after shell.css and already overrides the frame minimum.
|
||||
With the tree fixed and inspector hidden, the remaining floor is the Board's
|
||||
main content. The grid min-content row preserves that floor, so 5cd32f4c1
|
||||
is not an accepted layout fix. Its static review is CHANGES at Webby's
|
||||
REVIEW-layout.md, commit e2e7c60e5. No run established a new layout measurement.
|
||||
Next step requires a granted fixture probe for main/control heights and an
|
||||
owner layout ruling; no further product change or gate is authorized yet.
|
||||
Existing shell assertions remain unchanged.
|
||||
|
||||
|
||||
### Static nav placement: mos-1249/mos-1250, sage-2383/2385/2386, webby-0106/0108
|
||||
|
||||
Fast-forward on 5cd32f4c1; the rejected grid is removed. The unchanged labeled
|
||||
region is now the first child of nav.tree, before its Console h2. The banner
|
||||
stays at its original body location with every id, role, label and shipped
|
||||
string unchanged. No processing.js change and no runtime reparenting.
|
||||
At >=760 the tree is the same fixed box, with the same width breakpoints and
|
||||
ordinary overflow:auto. The controls are non-shrinking and non-sticky; they
|
||||
scroll with overflowing nav links (sage-2386 withdraws persistent visibility).
|
||||
Below760 the region takes a full flex line before Console/Projects. Its mobile
|
||||
location changes from before .frame to first in the static nav; the banner
|
||||
therefore precedes it in a halted mobile view. Banner behavior itself is unchanged.
|
||||
Specificity (0,3,0) resets .btn margin/order and .small margin/basis, leaving
|
||||
the shell rules unchanged. No content is shortened and no overflow is hidden.
|
||||
|
||||
Correct height arithmetic (Webby B1): page=max(innerHeight,86+C), where C is
|
||||
main content height. Controls consume space within the existing nav box, not
|
||||
another body row. The old failing layout was max(innerHeight,86+barHeight+C).
|
||||
The halted banner remains a body row; Sage tracks that separately.
|
||||
|
||||
Candidate-test design change at processing-ui.test.mjs:67 under mos-1250.
|
||||
Old assertion:
|
||||
```js
|
||||
assert.ok(html.indexOf('id="processing-controls"') < html.indexOf('<div class="frame">'));
|
||||
```
|
||||
New assertion text:
|
||||
```js
|
||||
const controlsAt = html.indexOf('id="processing-controls"');
|
||||
const mainAt = html.indexOf('<main id="main"'), inspectorAt = html.indexOf('<aside class="inspector"');
|
||||
assert.ok(controlsAt >= 0 && controlsAt < mainAt, 'controls are outside and before #main');
|
||||
assert.ok(!(inspectorAt < controlsAt && controlsAt < html.indexOf('</aside>', inspectorAt)),
|
||||
'controls are outside aside.inspector');
|
||||
```
|
||||
Reason: the bar moves into the frame's first column under mos-1249 while
|
||||
remaining outside route-specific #main and aside.inspector. This is a change
|
||||
to our unlanded candidate assertion, not a landed assertion.
|
||||
|
||||
All existing shell assertions stay unchanged. Added bar-inside-tree assertion
|
||||
and diagnostic height output. New processing browser coverage checks 400px
|
||||
Stop order=0, visibility, focus and position above Projects; also on-load
|
||||
visibility/focus at1440x1000,1440x420,800x420. Debug logs report controls/tree
|
||||
heights at those desktop sizes and main height; Sage judges controls over half
|
||||
the 334px nav at1440x420 before the window. No run yet.
|
||||
|
||||
Mutant delta: KS59 now reverts the complete layout (HTML and CSS together);
|
||||
KS60 hides the controls; KS61 moves them into #main; KS62 drops the (0,3,0)
|
||||
button reset. Total77. Every new site has its named killing test.
|
||||
|
||||
|
||||
### sage-2394 debug on published da4334806 (2026-10-22)
|
||||
|
||||
03:14:37Z–03:14:53Z: shell.test.mjs whole 5/5, processing-browser.test.mjs
|
||||
whole 9/9, 0 failures/skips. awk sum14/0/0. Original shell short-page and
|
||||
long-page assertions pass unchanged. Logs/results and empty cwd sweep are in
|
||||
debug-da4334806/. Slot clear sent Sage/Webby03:15:11Z after sweep.
|
||||
Controls/tree/main heights: read-only shell1440x1000 212.5/914/914; writable
|
||||
processing fixture1440x1000 127/914/914;1440x420 127/334/907.734375;800x420
|
||||
127/334/1131.65625. Stop visible/order0/focusable/aboveProjects at400x1000.
|
||||
Writable127 is below half the334 nav. The read-only212.5 height at1000 was
|
||||
flagged for Sage's usability call; that state was not measured at420, so no
|
||||
claim is made that all states use less than half the short nav.
|
||||
No mutants or full gate run under this debug grant. Await separate CLEAR.
|
||||
|
||||
|
||||
### R6 accepted: sage-2399 / webby-0111 (2026-10-22 03:16Z)
|
||||
|
||||
Sage accepts the short-nav usability tradeoff. Writable controls occupy38%
|
||||
of the334px nav at1440x420. The read-only recovery note makes that about64%,
|
||||
inferred from the measured212.5px height at the same width. The region is
|
||||
non-sticky and scrolls away; Projects was already below the fold at that size
|
||||
before191. Webby confirmed the debug TAP and has no window blocker. Sage
|
||||
tracks the read-only note length with the halt-banner follow-up; no change
|
||||
to this row.
|
||||
|
||||
Do not rebase or run now. Row273 lands first. On Sage's landing message,
|
||||
rebase the candidate including the two latest layout commits onto the new
|
||||
refactor under a new branch name (mos-1086), then provide range-diff,
|
||||
patch-ids and the refreshed88-product-path manifest. The full no-carry
|
||||
window requires a separate Sage CLEAR on that published tip.
|
||||
|
||||
|
||||
### Rebase after row273: sage-2402 (2026-10-22 03:42Z)
|
||||
|
||||
New branch rocko/row191-stoprun-86f9-20261022, tip
|
||||
0fa7bf421fc153a226b5f06ed484e089e48e23ba, on86f95bb27. All10 commits
|
||||
rebase cleanly and range-diff pairs each with '='; no conflict resolution.
|
||||
All88 per-file patch-ids match the old candidate. Whole product diff stable
|
||||
patch-id before/after:0846823aefe165363601a6c68134ad46cc701c73.
|
||||
87 product blobs are identical; only docs/TOOLS.md changes because the new
|
||||
base carries row273's --send/--no-sso usage and three explanatory F39 lines.
|
||||
191's TOOLS hunks stay unchanged. New88-path manifestSHA256:
|
||||
0bcbf337433f6d46d809ee1dcaf8a5a8503160403d273cf73d6dac64adef3c02.
|
||||
Range-diff, per-path patch-ids and TOOLS comparison are rebase-86f9-* files.
|
||||
Static77-site exact-once preflight has0errors. No tests run, nothing carried
|
||||
into the required full window; await Sage publication and separate CLEAR.
|
||||
|
||||
|
||||
### Full no-carry window on0fa7bf421: stopped at SR08 (sage-2407/2418)
|
||||
|
||||
03:44:56Z–04:01:29Z. All35touched files passed336/0/0; nine packages
|
||||
passed2403/0 with1known editor/esbuild skip. Every shell exited0:425selftests
|
||||
plus156queue node tests passed; the canonical-root queue check and two
|
||||
explicit live-provider exclusions are saved in skip-lines.txt. See
|
||||
GATE-RESULTS.md for per-suite counts and mutant table.
|
||||
SR01–SR07 killed. SR08 timed out at90seconds without named assertion failure
|
||||
(TAP header only); runner restored all88candidate blobs and stopped. The69
|
||||
later mutants did not run. SR08 is not counted as killed. Cwd sweep[] and
|
||||
owned network cleanup completed; slot clear sent Sage04:02:12Z.
|
||||
Saved mutation, timeout policy lines64–89 and shell/skip table sent Sage in
|
||||
response to sage-2418. No source edit or retry; no in-review move. Await
|
||||
Mos ruling and explicit Sage CLEAR before any control/replay/resume.
|
||||
|
||||
|
||||
### SR08 timeout policy: mos-1259 / sage-2423 (2026-10-22 04:07Z)
|
||||
|
||||
Cause confirmed by Mos: runtimes.mjs:333 loops on now() <= deadline, while
|
||||
stop-run.test.mjs:106-108 gives the second host a fixed fake clock with real
|
||||
sleep. Removing the join branch enters the stop loop without advancing that
|
||||
clock. Original SR08 log contains TAP header only; original timeout record
|
||||
stays immutable. Mos permits separate classification as killed-by-timeout
|
||||
only after the unmutated same whole test file passes the same90second
|
||||
harness in this resumed run. **Control result: not run; awaiting CLEAR.**
|
||||
No assertion kill is claimed for SR08.
|
||||
|
||||
Runner review requested from Dewey, Sage copied. SHA256 of run-mutants.py:
|
||||
fe0d360f86d86ab2df967da5338479c593c27c88d06eb38a1389d99a08489369. Diff:runner-mos1259.diff; baseline:
|
||||
run-mutants.before-mos1259.py. Shared execution harness uses90seconds, own
|
||||
process groups, verified descendant cleanup and restored source bytes. A
|
||||
control must pass every test with exit0, no not-ok/skip/cancel/fail. Its record
|
||||
binds invocation id, candidate HEAD/manifest and test hash; all88candidate
|
||||
blobs verified before and after control, and before each mutation. The
|
||||
approved historical SR08 classification and69-site SR09+resume use separate
|
||||
files so the original seven kills and timeout evidence remain intact.
|
||||
Assertion kills and timeout kills have separate counters. No control for the
|
||||
same file in this invocation means a timeout stops; survivors and invalid
|
||||
failures stop too. Every timeout gets a cause/control record before review.
|
||||
|
||||
No product/test change, no control/mutant execution. Wait for independent
|
||||
runner approval and Sage CLEAR. Green suites carry only on unchanged0fa7bf421
|
||||
and manifest0bcbf337. Test clock fix is deferred to Vikunja502 as Mos ruled.
|
||||
|
||||
|
||||
### Independent runner approval: dewey-0789 (2026-10-22 04:11:20Z)
|
||||
|
||||
Dewey APPROVES the frozen fe0d360f86d86ab2df967da5338479c593c27c88d06eb38a1389d99a08489369
|
||||
runner, static only. Use only the proposed --control-file stop-run.test.mjs
|
||||
--adjudicate-timeout SR08 --resume-from SR09 invocation. A positional-id or
|
||||
full run would overwrite the original evidence and is not this resume.
|
||||
|
||||
Report the complete tally as7 prior assertion kills (old status killed),
|
||||
plus SR08 separately adjudicated by timeout after control passes, plus69
|
||||
resumed sites. The summary file counts only this invocation. No control or
|
||||
resume result exists yet; Sage CLEAR remains required.
|
||||
|
||||
Classification change: the reviewed runner recognizes indented not-ok lines
|
||||
with ^\s* rather than only top-level lines. Controls therefore reject nested
|
||||
failures too, and mutant assertion kills still require the named pattern in
|
||||
a failing test name. SR01–SR07 evidence was classified by the original runner.
|
||||
|
||||
Historical SR08 has no HEAD field. Its binding to0fa7bf421 relies on the saved
|
||||
commit.txt/log timestamps and the new candidate HEAD+88blob check, not a
|
||||
retroactively invented HEAD field in the old result. Preserve this provenance
|
||||
in the adjudication report. Any newly detected timeout needs a concrete cause
|
||||
before review; the generic placeholder is not accepted review evidence.
|
||||
|
||||
|
||||
### Control and resume: sage-2427, stopped on KS43
|
||||
|
||||
Control/resume began04:13:44Z; last saved mutant result2026-10-22T04:14:08Z; process
|
||||
absence confirmed04:14:56Z and slot returned to Sage. Whole unmutated
|
||||
stop-run.test.mjs control passed12/12, exit0, no not-ok, no skips/cancels,
|
||||
in0.459seconds. The reviewed runner adjudicated original SR08 separately
|
||||
as killed-by-timeout under mos-1259. The immutable original SR08 row/log
|
||||
stay unchanged; adjudication binds the control, exact cause, current HEAD
|
||||
and manifest. Historical HEAD provenance remains as Dewey N4 described.
|
||||
|
||||
Resume stopped at KS43, not retried. It removes the inner processingHTTP
|
||||
origin check and its selected outer-route test passed1/1(exit0). Saved
|
||||
evidence:resume-mutant-logs/KS43.tap and resume-mutant-results.json.
|
||||
Tally:7prior assertion kills +49resumed assertion kills =56assertion kills;
|
||||
1historical timeout kill;1survivor(KS43);19unrun. No new timeouts or placeholder
|
||||
causes. All88candidate blobs restored and resume cwd sweep[]; no product or
|
||||
test change. No in-review move. Sage and Mos notified directly.
|
||||
|
||||
Static diagnosis only: KS43 selects processing.test.mjs:52's outer-server
|
||||
fence test. The unchanged direct-handler test at:95 already isolates this
|
||||
origin guard from serve's outer refusal. Its pattern was not selected. Sent
|
||||
recommendation to Sage/Mos to correct only the mutant's named killer after
|
||||
their ruling, then run KS43+19remaining. No metadata edit or rerun authorized
|
||||
yet; no claim the direct-handler test kills it until the run proves it.
|
||||
|
||||
|
||||
### KS43 metadata retarget: mos-1261 (2026-10-22 04:16:41Z)
|
||||
|
||||
Original pattern `processing write fences refuse` selected processing.test:52.
|
||||
KS43 survived with1passing test and no writer call, preserved in
|
||||
resume-mutant-results.json and resume-mutant-logs/KS43.tap. The serve-level
|
||||
test cannot isolate the handler guard: outer fences and later refusal can
|
||||
mask its removal. No product defect or new kill is claimed from static read.
|
||||
New pattern: `processing handler independently refuses wrong origin and cross-site before its writer`,
|
||||
the existing direct processingHTTP test at:95-107 with valid user/site/content
|
||||
headers, asserted403 and no writer call. Only KS43's pattern changed in the
|
||||
77-site table; product/test/mutation bytes unchanged. Generator mirrors it.
|
||||
|
||||
TableSHA256:5dbc8308c995e1974d6da63b3daa967896d822154eab38a8bb96154be667edf5. Diff:mutant-table-mos1261.diff,
|
||||
baseline:all-mutants.before-mos1261.json. Dewey must independently review
|
||||
this metadata diff before the next run. Static audit of all19unrun sites:
|
||||
mutant-pattern-audit-mos1261.md; no other serve-level/direct-handler mismatch
|
||||
with an existing direct test warrants retargeting. KS44 body-bound case has
|
||||
no direct-handler counterpart; its oversized whitespace+{} case is valid
|
||||
JSON without the bound, so it retains the existing pattern.
|
||||
|
||||
Carry56assertion kills+1timeout kill and green suites only on unchanged
|
||||
0fa7bf421. Next approved scope is KS43+19sites after review and Sage CLEAR.
|
||||
No run authorized by this metadata change.
|
||||
|
||||
|
||||
### Retarget review APPROVE and C1 archive: dewey-0791 (2026-10-22 04:19:55Z)
|
||||
|
||||
Dewey approves table5dbc8308 and the19-site audit, conditional on preserving
|
||||
the first resume evidence before any next run. Archive:mos-1261-archive/,
|
||||
full per-file inventory:mos-1261-archive/sha256-manifest.txt.
|
||||
|
||||
- `resume-mutant-results.json` SHA256 `f5725ef26cdb488441285081fadaa9ce4a3e7d390ab2a1c6d04acfd27f105fc6`
|
||||
|
||||
- `resume-mutant-logs/KS43.tap` SHA256 `c778ee33edb667f795ab560a328fd5c1c04ef6acf99d7b79c364f6302cf29864`
|
||||
|
||||
- `unmutated-control.json` SHA256 `ee9ddcd69d24276165abe1185f159a2737157fcae8fd37f731768e9324b765e5`
|
||||
|
||||
- `SR08-timeout-adjudication.json` SHA256 `214a04696d3329ef67bf10578daf4d251599816fd246bc31abecae1a6230e1e0`
|
||||
|
||||
The50-row result, all first-resume logs and control/adjudication records
|
||||
were copied byte-for-byte. Original paths remain untouched too. A separate
|
||||
retarget-mos1261/ directory holds byte-identical approved runnerfe0d360f,
|
||||
reviewed table5dbc8308 and identical candidate/commit files. The proposed
|
||||
--resume-from KS43 invocation there selects20sites and writes its own logs
|
||||
and results without overwriting either original or archive. No control flag
|
||||
is needed for these tests; any timeout without a same-file control stops.
|
||||
Final tally will combine7old assertionkills +49first-resume assertionkills +
|
||||
SR08separate timeout adjudication +20retarget results. Still no run; awaiting
|
||||
Sage CLEAR. Product/test bytes remain unchanged.
|
||||
|
||||
|
||||
### KS43 retarget run: sage-2436, stopped on KS44 invalid mutation
|
||||
|
||||
Run began04:21:06Z; KS43 is killed by the named direct-handler assertion.
|
||||
KS44 then fails import with SyntaxError Unexpected token catch at
|
||||
processing-http.mjs:40. The failing TAP name is the test file, not the
|
||||
selected test, so runner records invalid-failure and stops without a kill.
|
||||
Evidence remains in retarget-mos1261/console.log,resume-mutant-results.json
|
||||
and resume-mutant-logs/KS43.tap,KS44.tap. No original evidence overwritten.
|
||||
|
||||
Cause: our KS44 mutation uses `// no body bound` to replace an inline
|
||||
`if (size > 1024) throw Error();` in a one-line for-await body. The comment
|
||||
swallows the remaining chunks.push and closing brace. This is malformed
|
||||
mutation metadata, not an observed product failure. No metadata correction
|
||||
or retry yet. Proposed to Sage/Mos: replace only the new text with `void 0;`,
|
||||
then independent review and a new CLEAR for KS44+18 on unchanged candidate.
|
||||
|
||||
Current tally57assertionkills (7+49+1),1SR08timeoutkill,1invalid(KS44),18unrun.
|
||||
Cwd sweep[] and all88candidate hashes restored04:21:30Z; slot returned and
|
||||
Sage/Mos notified. No in-review move. Wait for ruling before any edit or run.
|
||||
|
||||
|
||||
### KS44 syntax metadata correction: mos-1264 (2026-10-22 04:22:16Z)
|
||||
|
||||
Only KS44.new changes from `// no body bound` to `void 0;`. Old site,
|
||||
test and pattern stay unchanged. The invalid import result remains in
|
||||
retarget-mos1261/resume-mutant-results.json and resume-mutant-logs/KS44.tap.
|
||||
TableSHA256:85d9a7b13ad510e840f258d892afbfce393cefbc4006e1f808605b83adc84570. Diff:mutant-table-mos1264.diff;
|
||||
baseline:all-mutants.before-mos1264.json. Generator mirrors the one field.
|
||||
|
||||
Authorized syntax-class preflight applied KS44–KS62 individually in scratch,
|
||||
ran node --check on each JavaScript file, and restored before advancing.
|
||||
All15JS checks passed; no other replacement fix was needed. KS59–KS62
|
||||
change only HTML/CSS and are explicitly asset-only/not-applicable for the
|
||||
Node parser; Mos/Sage informed, no false JS syntax pass claimed. All19
|
||||
mutations restored and88candidate hashes match. Per-site logs/results and
|
||||
restoration record:syntax-mos1264/. No behavioral test or assertion-mutant
|
||||
run occurred. Dewey must review table diff and syntax results before next
|
||||
Sage CLEAR for KS44+18. Carry57assertionkills+1timeoutkill only on unchanged
|
||||
0fa7bf421. No product or test change.
|
||||
|
||||
|
||||
### dewey-0795 approval: syntaxfixed-mos1264 staged (unrun)
|
||||
|
||||
Dewey APPROVES table85d9a7b1 and syntax preflight, static only. Conditions
|
||||
met:syntaxfixed-mos1264/ holds byte copies of runnerfe0d360f, table85d9a7b1,
|
||||
commit.txt,candidate.txt,candidate-manifest.sha256. Full SHA256 and byte-cmp
|
||||
list is syntaxfixed-mos1264/byte-copy-check.txt. Invocation after Sage CLEAR:
|
||||
python3 syntaxfixed-mos1264/run-mutants.py --resume-from KS44 (19sites).
|
||||
All previous invalid/survivor evidence stays untouched in its original dirs.
|
||||
No behavioral run occurred during preparation.
|
||||
|
||||
|
||||
### Final19 resume stopped at KS54: sage-2444 (2026-10-22)
|
||||
|
||||
Run began04:27:45Z; KS44–KS53 are10named assertion kills. KS54 then timed out
|
||||
at90.073seconds. Its log contains the expected dependency-list assertion:
|
||||
"the runtime refuses an invalid adapter and closes a valid one" at
|
||||
bus/tests/tasks.test.mjs:263. The mutation drops processing from runtime.mjs
|
||||
tasks factory deps. The test opens runtime then asserts before close at:265;
|
||||
a failing assertion skips the close and leaves Node alive. No same-file
|
||||
control ran in this invocation, so this is timeout-without-control, not a
|
||||
kill. No assertion or timeout kill is claimed for KS54.
|
||||
|
||||
Raw resume result's generic cause sentence says a control passed, which is
|
||||
incorrect: its control:null and timeout-without-control status establish the
|
||||
opposite. The raw evidence remains unchanged; the concrete cause and
|
||||
correction are in syntaxfixed-mos1264/KS54-timeout-report.json. This explicit
|
||||
report replaces the placeholder as explanation without altering the log.
|
||||
|
||||
Current tally67assertionkills(7+49+1+10),1adjudicatedSR08timeoutkill,
|
||||
1unqualifiedKS54timeout,8unrun. All88candidate blobs restored; cwd sweep[]
|
||||
and slot returned04:30:06Z to Sage, Mos directly copied as instructed. No
|
||||
retry, product/test edit or in-review move. Sage's disclosed syntaxcheck
|
||||
caused no busy refusal or foreign-node report. Await owner ruling/CLEAR.
|
||||
|
||||
|
||||
### Final controls/mutants GREEN: mos-1267, sage-2448, dewey-0798
|
||||
|
||||
On unchanged0fa7bf421, whole-file tasks control9/9 passed in0.815s; KS54
|
||||
rerun killed-by-timeout with the exact dependency not-ok at tasks.test:263.
|
||||
KS55–KS62 are8assertionkills. Final run04:35:32Z–04:37:17Z, cwd sweep[] and
|
||||
88hashrestore04:37:48Z; slot returned to Sage and direct handoff to Dewey/Mos.
|
||||
Final77-site tally:75assertionkills(7+49+1+10+8),2separate timeoutkills
|
||||
(SR08adjudication,KS54control+rerun). final-mutant-results.json consolidates
|
||||
latest accepted evidence by id; no prior record or log overwritten.
|
||||
GATE-RESULTS.md is the final per-suite/mutant table; prior narrative saved
|
||||
as GATE-RESULTS-before-final.md.
|
||||
|
||||
KS54 raw placeholder result saved as resume-mutant-results.raw.json before
|
||||
filling concrete cause in its review result. Same-invocation control id
|
||||
1792643732624962173; prior syntaxfixed eleven-row result file remains exact
|
||||
0ede036954ff77c21f29e1a744b21d1d9b18eb75736f78ecd1cf4ae559358911.
|
||||
Dewey independently read logs/control/restoration and confirmed tally in
|
||||
dewey-0798, explicitly not yet a manifest verdict. N6test cleanup stays
|
||||
deferred under mos-1267/Vikunja502; no candidate byte changes permitted.
|
||||
|
||||
|
||||
### Claimant review handoff
|
||||
|
||||
Queue move rocko-191-review-r1 entered in-review at revision3114, round1
|
||||
on#1689, manifest0bcbf337. Revision3115 records the expected missing-token
|
||||
request failure; command exit1. Receipt:in-review-receipt.txt. Sage posts
|
||||
the request as jarvis; Dewey owns the manifest verdict. Candidate source
|
||||
remains published0fa7bf421 with88product paths, base86f95bb27. No live
|
||||
action, push, source change or further gate authorized by this handoff.
|
||||
@@ -1,56 +0,0 @@
|
||||
# Row279: stopRun deadline final observation
|
||||
|
||||
Scope: sage-2512, mos-1269; brief docs/plans/2026-10-22_stoprun-deadline.md.
|
||||
Base f40f2e770. Reviewer Dewey; gate owner Sage. V502 stays separate.
|
||||
|
||||
## Cause and smallest change
|
||||
|
||||
The loop's precondition now()<=deadline can skip the existing final status
|
||||
read when a sleep wakes beyond deadline. Use for(;;) so the existing
|
||||
now()>=deadline branch is the only time exit. Change that loop header only;
|
||||
all record/identity/ended exits and result mapping remain byte-identical.
|
||||
The old trailing fallback remains unreachable in the fixed loop. M1 restores
|
||||
only the old header and thereby restores the complete old fall-through path.
|
||||
|
||||
## Regression and evidence plan
|
||||
|
||||
Add one test to stop-run.test.mjs, preserving existing tests. Its fake sleep
|
||||
advances requested duration plus1ms, so the last sleep crosses the deadline.
|
||||
Its signal stub records TERM/KILL and returns success without killing the
|
||||
always-live fixture process. Expect both signals, time>7000ms and alive.
|
||||
The old loop should fail only the alive assertion with unknown.
|
||||
|
||||
Ask Sage CLEAR before any run, including the expected regression red. Then
|
||||
apply the one-line fix, run the touched whole file and processing-control
|
||||
package as granted, and kill M1 with that same named regression. Busy check,
|
||||
short scratch TMPDIR,deadDocker,owned process groups,timeouts,restore,sweep.
|
||||
No live state,units,store,provider,browser,Docker or V502 changes.
|
||||
|
||||
Packet includes base,patch,candidate hashes,regression/gate/mutant logs and
|
||||
exact source-diff check. Commit candidate and packet on the new branch only
|
||||
after authorized checks. No token is available; Sage publishes as jarvis.
|
||||
The business/CLI suites remain Sage's landing gate unless separately granted.
|
||||
|
||||
## Authorized run and result
|
||||
|
||||
Claim rev 3138, op rocko-279-start-r1. Sage granted this exact sequence in
|
||||
sage-2516 (2026-10-22T05:55:21Z). Runs: 05:56:03Z to 05:58:03Z.
|
||||
|
||||
| Step | Pass | Fail | Skip | Result |
|
||||
| --- | ---: | ---: | ---: | --- |
|
||||
| Regression on unfixed base | 0 | 1 | 0 | Expected assertion: unknown versus alive |
|
||||
| stop-run.test.mjs whole | 13 | 0 | 0 | Green |
|
||||
| processing-control package whole | 62 | 0 | 0 | Green |
|
||||
| M1 old loop | 0 | 1 | 0 | Killed by the named regression, unknown versus alive |
|
||||
|
||||
M1's killer is `a sleep past the stop deadline still observes an alive run
|
||||
after both signals`. It exits 1 with that assertion, never a syntax error or
|
||||
timeout. Logs and results.json retain the intentional failures separately.
|
||||
Green runs total 75 passes (the whole-file tests are also part of the package).
|
||||
No skips. All commands used a short scratch TMPDIR, a dead Docker socket and
|
||||
fixture-only configuration. Each node command ran in its own process group
|
||||
with a 120-second timeout. No timeout occurred. Final cwd sweep: empty.
|
||||
The source restoration and exact one-line product scope are checked in
|
||||
source-scope-check.json. The trailing unknown return stays unchanged and is
|
||||
unreachable after the fix. Business and CLI suites remain Sage's owner gate.
|
||||
Slot returned to Sage at 05:58:03Z. No live action or V502 change.
|
||||
@@ -1 +0,0 @@
|
||||
f40f2e770e0d8be394f1ef53b404045fd6a49c0e
|
||||
@@ -1,35 +0,0 @@
|
||||
diff --git a/packages/processing-control/src/runtimes.mjs b/packages/processing-control/src/runtimes.mjs
|
||||
index 05e439c1a..a11cb8e52 100644
|
||||
--- a/packages/processing-control/src/runtimes.mjs
|
||||
+++ b/packages/processing-control/src/runtimes.mjs
|
||||
@@ -330,7 +330,7 @@ async function ownStop(args, key, options) {
|
||||
};
|
||||
const termEnd = started + grace, deadline = termEnd + observe;
|
||||
let termTried = false, killTried = false;
|
||||
- while (now() <= deadline) {
|
||||
+ for (;;) {
|
||||
try { record = runtime(root, record.id); }
|
||||
catch {
|
||||
const present = readdirSync(directory(root, 'runtimes')).includes(record.id + '.json');
|
||||
diff --git a/packages/processing-control/tests/stop-run.test.mjs b/packages/processing-control/tests/stop-run.test.mjs
|
||||
index ed69bc111..5277ea7fe 100644
|
||||
--- a/packages/processing-control/tests/stop-run.test.mjs
|
||||
+++ b/packages/processing-control/tests/stop-run.test.mjs
|
||||
@@ -61,6 +61,17 @@ test('failed signal delivery observes alive, records no invented signals and nev
|
||||
assert.equal(f.sleeps.reduce((a,b)=>a+b,0), 7000);
|
||||
assert.deepEqual(await stopRun(f.args, f.options), result);
|
||||
});
|
||||
+test('a sleep past the stop deadline still observes an alive run after both signals', async t => {
|
||||
+ const f = setup(t); let time = 0;
|
||||
+ f.options.now = () => time;
|
||||
+ f.options.sleep = async ms => { time += ms + 1; };
|
||||
+ f.options.signal = (_r, sig) => { f.signals.push(sig); return true; };
|
||||
+ const result = await stopRun(f.args, f.options);
|
||||
+ assert.ok(time > 7000, 'the last sleep wakes past the complete stop deadline');
|
||||
+ assert.deepEqual(f.signals, ['SIGTERM', 'SIGKILL']);
|
||||
+ assert.equal(result.outcome, 'alive');
|
||||
+ assert.deepEqual(result.signals, ['SIGTERM', 'SIGKILL']);
|
||||
+});
|
||||
test('missing run and another business never borrow a pid or signal', async t => {
|
||||
const f = setup(t);
|
||||
for (const args of [{ ...f.args, run: 'missing' }, { ...f.args, business: 'other' }]) {
|
||||
@@ -1,2 +0,0 @@
|
||||
7145420aa354180689a5c84423928fc60c8123476dcfed3364c9cf4542f8c7ea packages/processing-control/src/runtimes.mjs
|
||||
7ce7a99363b987f8525f8992fd57940f4305597e870c6162fc158962f2101ff6 packages/processing-control/tests/stop-run.test.mjs
|
||||
@@ -1 +0,0 @@
|
||||
1016b85846c60dc159d49373f99ca36794a51fd9
|
||||
@@ -1,2 +0,0 @@
|
||||
packages/processing-control/src/runtimes.mjs
|
||||
packages/processing-control/tests/stop-run.test.mjs
|
||||
@@ -1 +0,0 @@
|
||||
1016b85846c60dc159d49373f99ca36794a51fd9
|
||||
@@ -1,32 +0,0 @@
|
||||
TAP version 13
|
||||
# Subtest: a sleep past the stop deadline still observes an alive run after both signals
|
||||
not ok 1 - a sleep past the stop deadline still observes an alive run after both signals
|
||||
---
|
||||
duration_ms: 40.278473
|
||||
type: 'test'
|
||||
location: '/mnt/storage/scratch/rocko-r279/packages/processing-control/tests/stop-run.test.mjs:64:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
'unknown' !== 'alive'
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: 'alive'
|
||||
actual: 'unknown'
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///mnt/storage/scratch/rocko-r279/packages/processing-control/tests/stop-run.test.mjs:72:10)
|
||||
async Test.run (node:internal/test_runner/test:1409:7)
|
||||
async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 0
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 89.021437
|
||||
@@ -1,382 +0,0 @@
|
||||
TAP version 13
|
||||
# Subtest: container admission publishes its generated name and root/runtime labels before dispatch
|
||||
ok 1 - container admission publishes its generated name and root/runtime labels before dispatch
|
||||
---
|
||||
duration_ms: 9.883733
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: container sweep sends TERM then KILL only after verifying exact id and both labels
|
||||
ok 2 - container sweep sends TERM then KILL only after verifying exact id and both labels
|
||||
---
|
||||
duration_ms: 66.167157
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: foreign labels and a replaced container id stay unknown and are never signalled
|
||||
ok 3 - foreign labels and a replaced container id stay unknown and are never signalled
|
||||
---
|
||||
duration_ms: 5.105671
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: an unverified missing container remains unknown rather than claiming a pending start ended
|
||||
ok 4 - an unverified missing container remains unknown rather than claiming a pending start ended
|
||||
---
|
||||
duration_ms: 15.538468
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a removed --rm container is settled only by its trusted owner completion receipt
|
||||
ok 5 - a removed --rm container is settled only by its trusted owner completion receipt
|
||||
---
|
||||
duration_ms: 28.897791
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: after signalling a verified container, successful empty Docker listing proves --rm removed that id
|
||||
ok 6 - after signalling a verified container, successful empty Docker listing proves --rm removed that id
|
||||
---
|
||||
duration_ms: 24.215826
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt publishes before awaiting stops, resume refuses pending, and only clear permits new work
|
||||
ok 7 - halt publishes before awaiting stops, resume refuses pending, and only clear permits new work
|
||||
---
|
||||
duration_ms: 161.569582
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a new coordinator replays a persisted halt and an unresolved start keeps clear refused
|
||||
ok 8 - a new coordinator replays a persisted halt and an unresolved start keeps clear refused
|
||||
---
|
||||
duration_ms: 1102.680874
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a new halt generation never inherits a previous quiescent status before its sweep
|
||||
ok 9 - a new halt generation never inherits a previous quiescent status before its sweep
|
||||
---
|
||||
duration_ms: 4.450121
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt aborts an active local request and prevents a subsequent effect after halt/resume
|
||||
ok 10 - halt aborts an active local request and prevents a subsequent effect after halt/resume
|
||||
---
|
||||
duration_ms: 35.831508
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: processing scopes isolate roots and cancel only the registered child group
|
||||
ok 11 - processing scopes isolate roots and cancel only the registered child group
|
||||
---
|
||||
duration_ms: 59.946603
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halted scopes never invoke their body and unscoped human work has no processing context
|
||||
ok 12 - halted scopes never invoke their body and unscoped human work has no processing context
|
||||
---
|
||||
duration_ms: 3.067699
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: host git is stopped promptly by the active scope rather than waiting for its long deadline
|
||||
ok 13 - host git is stopped promptly by the active scope rather than waiting for its long deadline
|
||||
---
|
||||
duration_ms: 151.711241
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a child leader exiting does not erase an unverified surviving group receipt
|
||||
ok 14 - a child leader exiting does not erase an unverified surviving group receipt
|
||||
---
|
||||
duration_ms: 117.914283
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: the actual nested read-only control mount refuses unlink, replacement and parent removal
|
||||
ok 15 - the actual nested read-only control mount refuses unlink, replacement and parent removal
|
||||
---
|
||||
duration_ms: 14.941666
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: the image entrypoint refuses halted and stale generations using the shared reader
|
||||
ok 16 - the image entrypoint refuses halted and stale generations using the shared reader
|
||||
---
|
||||
duration_ms: 89.020485
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt terminates a tracked stand-in and leaves honest write-once stop evidence
|
||||
ok 17 - halt terminates a tracked stand-in and leaves honest write-once stop evidence
|
||||
---
|
||||
duration_ms: 95.55672
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a TERM-resistant workload is killed after the bounded wait
|
||||
ok 18 - a TERM-resistant workload is killed after the bounded wait
|
||||
---
|
||||
duration_ms: 146.00258
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: wrong start ticks or boot identity cannot signal a live replacement
|
||||
ok 19 - wrong start ticks or boot identity cannot signal a live replacement
|
||||
---
|
||||
duration_ms: 65.844444
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a pending start cannot be reported quiescent and a second root is never signalled
|
||||
ok 20 - a pending start cannot be reported quiescent and a second root is never signalled
|
||||
---
|
||||
duration_ms: 93.749051
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: escalation still kills the tracked group after its leader exits
|
||||
ok 21 - escalation still kills the tracked group after its leader exits
|
||||
---
|
||||
duration_ms: 192.463864
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: session TERM targets its verified runner before forcing the outer namespace
|
||||
ok 22 - session TERM targets its verified runner before forcing the outer namespace
|
||||
---
|
||||
duration_ms: 100.923976
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: new runtime and stop directories sync their containing directories
|
||||
ok 23 - new runtime and stop directories sync their containing directories
|
||||
---
|
||||
duration_ms: 42.560646
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a vanished group leader with unverified surviving members stays unknown, never quiescent
|
||||
ok 24 - a vanished group leader with unverified surviving members stays unknown, never quiescent
|
||||
---
|
||||
duration_ms: 130.848284
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: persisted member identity anchors a group after the leader exited before the sweep
|
||||
ok 25 - persisted member identity anchors a group after the leader exited before the sweep
|
||||
---
|
||||
duration_ms: 124.574935
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: an unconfirmed secondary brake does not leave a verified workload running or claim success
|
||||
ok 26 - an unconfirmed secondary brake does not leave a verified workload running or claim success
|
||||
---
|
||||
duration_ms: 75.057063
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt persists across readers and resume needs the current generation
|
||||
ok 27 - halt persists across readers and resume needs the current generation
|
||||
---
|
||||
duration_ms: 9.437871
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: first initialization is explicit; missing state after control exists fails closed and halt repairs it
|
||||
ok 28 - first initialization is explicit; missing state after control exists fails closed and halt repairs it
|
||||
---
|
||||
duration_ms: 5.039685
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: refuses invalid JSON instead of enabling work
|
||||
ok 29 - refuses invalid JSON instead of enabling work
|
||||
---
|
||||
duration_ms: 1.867281
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: refuses unknown keys instead of enabling work
|
||||
ok 30 - refuses unknown keys instead of enabling work
|
||||
---
|
||||
duration_ms: 2.65956
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: refuses bad timestamp instead of enabling work
|
||||
ok 31 - refuses bad timestamp instead of enabling work
|
||||
---
|
||||
duration_ms: 2.144084
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: refuses nonboolean state instead of enabling work
|
||||
ok 32 - refuses nonboolean state instead of enabling work
|
||||
---
|
||||
duration_ms: 2.039112
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: refuses bad generation instead of enabling work
|
||||
ok 33 - refuses bad generation instead of enabling work
|
||||
---
|
||||
duration_ms: 2.085806
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: refuses loose mode instead of enabling work
|
||||
ok 34 - refuses loose mode instead of enabling work
|
||||
---
|
||||
duration_ms: 2.34307
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: refuses oversized file instead of enabling work
|
||||
ok 35 - refuses oversized file instead of enabling work
|
||||
---
|
||||
duration_ms: 2.916273
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a symlink leaf never follows its target; human halt replaces only the leaf
|
||||
ok 36 - a symlink leaf never follows its target; human halt replaces only the leaf
|
||||
---
|
||||
duration_ms: 4.530858
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: unsafe parent and interrupted initialization never get repaired as off
|
||||
ok 37 - unsafe parent and interrupted initialization never get repaired as off
|
||||
---
|
||||
duration_ms: 0.385291
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: repeated halt is a no-op and a different root keeps running
|
||||
ok 38 - repeated halt is a no-op and a different root keeps running
|
||||
---
|
||||
duration_ms: 7.00566
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: transition rejects nonstring identity before publishing state
|
||||
ok 39 - transition rejects nonstring identity before publishing state
|
||||
---
|
||||
duration_ms: 3.121939
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: bootstrap syncs the containing root as well as the state and control directory
|
||||
ok 40 - bootstrap syncs the containing root as well as the state and control directory
|
||||
---
|
||||
duration_ms: 36.144072
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: state ownership and bounded read guards refuse before trusting a document
|
||||
ok 41 - state ownership and bounded read guards refuse before trusting a document
|
||||
---
|
||||
duration_ms: 101.892703
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: canonical root aliases address one switch and never create independent control state
|
||||
ok 42 - canonical root aliases address one switch and never create independent control state
|
||||
---
|
||||
duration_ms: 4.179236
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: unbound run stops by verified registry identity, fixed 5s grace and 2s observe policy
|
||||
ok 43 - unbound run stops by verified registry identity, fixed 5s grace and 2s observe policy
|
||||
---
|
||||
duration_ms: 38.851257
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: same run joins the identical promise and completed repeats preserve owner and send no signals
|
||||
ok 44 - same run joins the identical promise and completed repeats preserve owner and send no signals
|
||||
---
|
||||
duration_ms: 27.976805
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: identity changed before TERM or between TERM and KILL refuses the changed signal
|
||||
ok 45 - identity changed before TERM or between TERM and KILL refuses the changed signal
|
||||
---
|
||||
duration_ms: 15.642865
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: failed signal delivery observes alive, records no invented signals and never restarts escalation
|
||||
ok 46 - failed signal delivery observes alive, records no invented signals and never restarts escalation
|
||||
---
|
||||
duration_ms: 32.602087
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a sleep past the stop deadline still observes an alive run after both signals
|
||||
ok 47 - a sleep past the stop deadline still observes an alive run after both signals
|
||||
---
|
||||
duration_ms: 31.045314
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: missing run and another business never borrow a pid or signal
|
||||
ok 48 - missing run and another business never borrow a pid or signal
|
||||
---
|
||||
duration_ms: 10.113655
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt joins an in-progress fire without another TERM or deadline and links its first receipt
|
||||
ok 49 - halt joins an in-progress fire without another TERM or deadline and links its first receipt
|
||||
---
|
||||
duration_ms: 30.224351
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a separate host joins durable first ownership without duplicate signals
|
||||
ok 50 - a separate host joins durable first ownership without duplicate signals
|
||||
---
|
||||
duration_ms: 99.128156
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: corrupt and symlinked final receipts refuse as unknown rather than signalling again
|
||||
ok 51 - corrupt and symlinked final receipts refuse as unknown rather than signalling again
|
||||
---
|
||||
duration_ms: 22.649789
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a later exit gets separate halt evidence while the original alive result stays immutable
|
||||
ok 52 - a later exit gets separate halt evidence while the original alive result stays immutable
|
||||
---
|
||||
duration_ms: 55.85559
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: root aliases join but a different root never shares the run stop
|
||||
ok 53 - root aliases join but a different root never shares the run stop
|
||||
---
|
||||
duration_ms: 45.6493
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a changed runtime record cannot replace the original stop identity after TERM
|
||||
ok 54 - a changed runtime record cannot replace the original stop identity after TERM
|
||||
---
|
||||
duration_ms: 8.507771
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: identity is rechecked at actual signal delivery, not just at the loop observation
|
||||
ok 55 - identity is rechecked at actual signal delivery, not just at the loop observation
|
||||
---
|
||||
duration_ms: 6.500324
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: task halt keeps the true Docker exit status, writes kill-switch once and leaves snapshots unchanged
|
||||
ok 56 - task halt keeps the true Docker exit status, writes kill-switch once and leaves snapshots unchanged
|
||||
---
|
||||
duration_ms: 201.141886
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt refuses direct task launch before Docker or a run record; clear allows a fresh normal result
|
||||
ok 57 - halt refuses direct task launch before Docker or a run record; clear allows a fresh normal result
|
||||
---
|
||||
duration_ms: 167.652567
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt refuses hello.sh before Docker, credentials or release alignment
|
||||
ok 58 - halt refuses hello.sh before Docker, credentials or release alignment
|
||||
---
|
||||
duration_ms: 122.654442
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt refuses verify.sh before Docker, credentials or release alignment
|
||||
ok 59 - halt refuses verify.sh before Docker, credentials or release alignment
|
||||
---
|
||||
duration_ms: 122.064969
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt refuses agent.sh before Docker, credentials or release alignment
|
||||
ok 60 - halt refuses agent.sh before Docker, credentials or release alignment
|
||||
---
|
||||
duration_ms: 120.632718
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a nonzero Docker client exit retains its unresolved runtime receipt (task)
|
||||
ok 61 - a nonzero Docker client exit retains its unresolved runtime receipt (task)
|
||||
---
|
||||
duration_ms: 93.3117
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a nonzero Docker client exit retains its unresolved runtime receipt (container-cli)
|
||||
ok 62 - a nonzero Docker client exit retains its unresolved runtime receipt (container-cli)
|
||||
---
|
||||
duration_ms: 97.234461
|
||||
type: 'test'
|
||||
...
|
||||
1..62
|
||||
# tests 62
|
||||
# suites 0
|
||||
# pass 62
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 1323.026518
|
||||
@@ -1,32 +0,0 @@
|
||||
TAP version 13
|
||||
# Subtest: a sleep past the stop deadline still observes an alive run after both signals
|
||||
not ok 1 - a sleep past the stop deadline still observes an alive run after both signals
|
||||
---
|
||||
duration_ms: 53.588908
|
||||
type: 'test'
|
||||
location: '/mnt/storage/scratch/rocko-r279/packages/processing-control/tests/stop-run.test.mjs:64:1'
|
||||
failureType: 'testCodeFailure'
|
||||
error: |-
|
||||
Expected values to be strictly equal:
|
||||
|
||||
'unknown' !== 'alive'
|
||||
|
||||
code: 'ERR_ASSERTION'
|
||||
name: 'AssertionError'
|
||||
expected: 'alive'
|
||||
actual: 'unknown'
|
||||
operator: 'strictEqual'
|
||||
stack: |-
|
||||
TestContext.<anonymous> (file:///mnt/storage/scratch/rocko-r279/packages/processing-control/tests/stop-run.test.mjs:72:10)
|
||||
async Test.run (node:internal/test_runner/test:1409:7)
|
||||
async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
|
||||
...
|
||||
1..1
|
||||
# tests 1
|
||||
# suites 0
|
||||
# pass 0
|
||||
# fail 1
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 100.649138
|
||||
@@ -1,88 +0,0 @@
|
||||
TAP version 13
|
||||
# Subtest: unbound run stops by verified registry identity, fixed 5s grace and 2s observe policy
|
||||
ok 1 - unbound run stops by verified registry identity, fixed 5s grace and 2s observe policy
|
||||
---
|
||||
duration_ms: 36.122553
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: same run joins the identical promise and completed repeats preserve owner and send no signals
|
||||
ok 2 - same run joins the identical promise and completed repeats preserve owner and send no signals
|
||||
---
|
||||
duration_ms: 24.270208
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: identity changed before TERM or between TERM and KILL refuses the changed signal
|
||||
ok 3 - identity changed before TERM or between TERM and KILL refuses the changed signal
|
||||
---
|
||||
duration_ms: 13.289288
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: failed signal delivery observes alive, records no invented signals and never restarts escalation
|
||||
ok 4 - failed signal delivery observes alive, records no invented signals and never restarts escalation
|
||||
---
|
||||
duration_ms: 27.743499
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a sleep past the stop deadline still observes an alive run after both signals
|
||||
ok 5 - a sleep past the stop deadline still observes an alive run after both signals
|
||||
---
|
||||
duration_ms: 26.252224
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: missing run and another business never borrow a pid or signal
|
||||
ok 6 - missing run and another business never borrow a pid or signal
|
||||
---
|
||||
duration_ms: 9.103416
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: halt joins an in-progress fire without another TERM or deadline and links its first receipt
|
||||
ok 7 - halt joins an in-progress fire without another TERM or deadline and links its first receipt
|
||||
---
|
||||
duration_ms: 25.918671
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a separate host joins durable first ownership without duplicate signals
|
||||
ok 8 - a separate host joins durable first ownership without duplicate signals
|
||||
---
|
||||
duration_ms: 99.095272
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: corrupt and symlinked final receipts refuse as unknown rather than signalling again
|
||||
ok 9 - corrupt and symlinked final receipts refuse as unknown rather than signalling again
|
||||
---
|
||||
duration_ms: 23.700708
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a later exit gets separate halt evidence while the original alive result stays immutable
|
||||
ok 10 - a later exit gets separate halt evidence while the original alive result stays immutable
|
||||
---
|
||||
duration_ms: 55.938599
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: root aliases join but a different root never shares the run stop
|
||||
ok 11 - root aliases join but a different root never shares the run stop
|
||||
---
|
||||
duration_ms: 42.386018
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: a changed runtime record cannot replace the original stop identity after TERM
|
||||
ok 12 - a changed runtime record cannot replace the original stop identity after TERM
|
||||
---
|
||||
duration_ms: 7.168469
|
||||
type: 'test'
|
||||
...
|
||||
# Subtest: identity is rechecked at actual signal delivery, not just at the loop observation
|
||||
ok 13 - identity is rechecked at actual signal delivery, not just at the loop observation
|
||||
---
|
||||
duration_ms: 6.715559
|
||||
type: 'test'
|
||||
...
|
||||
1..13
|
||||
# tests 13
|
||||
# suites 0
|
||||
# pass 13
|
||||
# fail 0
|
||||
# cancelled 0
|
||||
# skipped 0
|
||||
# todo 0
|
||||
# duration_ms 445.396108
|
||||
@@ -1 +0,0 @@
|
||||
{"id":"M1","file":"packages/processing-control/src/runtimes.mjs","old":" for (;;) {\n try { record = runtime(root, record.id); }","new":" while (now() <= deadline) {\n try { record = runtime(root, record.id); }","test":"packages/processing-control/tests/stop-run.test.mjs","pattern":"a sleep past the stop deadline still observes an alive run after both signals","required":"named assertion kill, never syntax or timeout"}
|
||||
@@ -1,20 +0,0 @@
|
||||
6d33d35302499d66036145976f8f777a4c438c6b3f5c7b613fcfa5651c49faab BUILD.md
|
||||
8521af77deed1d3b2c722f30b776159eb373df407a2a698ee116ef4174125f01 base.txt
|
||||
74efdcea480e6c089f586b7330591b66164a3aa338fb1e1a60b74f6b7b9f3b0a build.patch
|
||||
312ed511d8f1cff826ee2fd547de8368923130c7bfe06236d8e29d8655b80aaa candidate-manifest.sha256
|
||||
960c366a732e4dc20133bf490d842cc42a345fefad1432ca6eba6dbd0058f337 candidate.txt
|
||||
3099049a5acd051207fb5631b7bb6362dd84c246191009a44eca1ba696d27d73 changed-paths.txt
|
||||
960c366a732e4dc20133bf490d842cc42a345fefad1432ca6eba6dbd0058f337 commit.txt
|
||||
98a4da4e1c62f7e4ed5f50adc16cf99462a5e012e9736e658441e8eda3db894c logs/M1.log
|
||||
7f878c13be43640f501b72d36e8d9e0c8d844bc5451f969154cd75d8fab0ee42 logs/processing-control-whole.log
|
||||
62f83e511ad860d0f7da42d87e063eb691a95f29a0806b88784912374d2e7c47 logs/regression-red.log
|
||||
4de8028674472cc75f61dc78cac624c336c8db785580a189e0b705584f80d636 logs/stop-run-whole.log
|
||||
7669ce9f04189f659dbc23dae6b635d5ffac354e03d00fbae10e6fadc7e98791 mutant-plan.json
|
||||
84f1080a9689374f7000197119074e53b459641cd709745f95eb0ebe37b5ef2f reader-search.txt
|
||||
dd6b2ea95782154e1c9839bae7a6d76a60566762a2374901ae64b22f9a7f54f7 results.json
|
||||
b9408890f30a72451d9171d8ceec40eb4f4f671811b30ba74f50f178e0eb8350 run-step.py
|
||||
b8140e3919a5d342eb92c1cd34b13bbb62d6419c6a5a01a9cb4870e9a94c64ed scan-result.json
|
||||
9e5c2e8cd2b59ac4559b0d67348a2a98e59b44a71eec7359018ea7a84d7a4082 skips.txt
|
||||
43d77fe5bffa916f444a77bacda5b4ddbe78035b6ca7631378056c3158aa3253 source-scope-check.json
|
||||
37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570 sweep.json
|
||||
74b3eae937fdcc92cf2b0dd15fb67f4f6addd4a046f74e934febc565e4b5d2ed tmpdir.txt
|
||||
@@ -1,12 +0,0 @@
|
||||
packages/processing-control/tests/runtimes.test.mjs:9:const api = await import('../src/runtimes.mjs').catch(e => { if (e.code === 'ERR_MODULE_NOT_FOUND') return {}; throw e; });
|
||||
packages/processing-control/tests/runtimes.test.mjs:139: new URL('../src/runtimes.mjs', import.meta.url).href, new URL('../src/state.mjs', import.meta.url).href, root], { encoding: 'utf8' });
|
||||
packages/processing-control/tests/effects.test.mjs:60: const { listRuntimes } = await import('../src/runtimes.mjs');
|
||||
packages/processing-control/tests/coordinator.test.mjs:9:import { registerRuntime, updateRuntime, processIdentity, unregisterRuntime } from '../src/runtimes.mjs';
|
||||
packages/processing-control/tests/containers.test.mjs:62: const { updateRuntime } = await import('../src/runtimes.mjs');
|
||||
packages/processing-control/tests/task.test.mjs:12: const runtimes = new URL('../src/runtimes.mjs', import.meta.url).href;
|
||||
packages/processing-control/tests/stop-run.test.mjs:7:import { registerRuntime, updateRuntime, runtime, stopRun, sweepRuntimes, readStops } from '../src/runtimes.mjs';
|
||||
packages/processing-control/tests/stop-run.test.mjs:104: const f = setup(t), source = new URL('../src/runtimes.mjs', import.meta.url).href;
|
||||
packages/processing-control/tests/stop-run.test.mjs:148: const { processIdentity } = await import('../src/runtimes.mjs');
|
||||
packages/bus/tests/processing-runtime.test.mjs:10:import { registerRuntime, updateRuntime, processIdentity } from '../../processing-control/src/runtimes.mjs';
|
||||
packages/discord/tests/processing-stop.test.mjs:35: const { registerRuntime, updateRuntime } = await import('../../processing-control/src/runtimes.mjs');
|
||||
packages/discord/tests/processing.test.mjs:68: const { listRuntimes, sweepRuntimes, processIdentity } = await import('../../processing-control/src/runtimes.mjs');
|
||||
@@ -1,62 +0,0 @@
|
||||
[
|
||||
{
|
||||
"step": "regression-red",
|
||||
"start": "2026-10-22T05:56:03Z",
|
||||
"end": "2026-10-22T05:56:03Z",
|
||||
"exit": 1,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"skipped": 0
|
||||
},
|
||||
"failing": [
|
||||
"a sleep past the stop deadline still observes an alive run after both signals"
|
||||
],
|
||||
"log": "/mnt/storage/scratch/rocko-r279/agents/rocko/work/queue-279/logs/regression-red.log"
|
||||
},
|
||||
{
|
||||
"step": "stop-run-whole",
|
||||
"start": "2026-10-22T05:57:47Z",
|
||||
"end": "2026-10-22T05:57:47Z",
|
||||
"exit": 0,
|
||||
"counts": {
|
||||
"tests": 13,
|
||||
"pass": 13,
|
||||
"fail": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"failing": [],
|
||||
"log": "/mnt/storage/scratch/rocko-r279/agents/rocko/work/queue-279/logs/stop-run-whole.log"
|
||||
},
|
||||
{
|
||||
"step": "processing-control-whole",
|
||||
"start": "2026-10-22T05:57:47Z",
|
||||
"end": "2026-10-22T05:57:49Z",
|
||||
"exit": 0,
|
||||
"counts": {
|
||||
"tests": 62,
|
||||
"pass": 62,
|
||||
"fail": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"failing": [],
|
||||
"log": "/mnt/storage/scratch/rocko-r279/agents/rocko/work/queue-279/logs/processing-control-whole.log"
|
||||
},
|
||||
{
|
||||
"step": "M1",
|
||||
"start": "2026-10-22T05:58:03Z",
|
||||
"end": "2026-10-22T05:58:03Z",
|
||||
"exit": 1,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"skipped": 0
|
||||
},
|
||||
"failing": [
|
||||
"a sleep past the stop deadline still observes an alive run after both signals"
|
||||
],
|
||||
"log": "/mnt/storage/scratch/rocko-r279/agents/rocko/work/queue-279/logs/M1.log"
|
||||
}
|
||||
]
|
||||
@@ -1,15 +0,0 @@
|
||||
from pathlib import Path
|
||||
import subprocess,signal,os,json,time,sys,re
|
||||
root=Path('/mnt/storage/scratch/rocko-r279');p=root/'agents/rocko/work/queue-279';logs=p/'logs';logs.mkdir(exist_ok=True);name=sys.argv[1];command=sys.argv[2:]
|
||||
start=time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime());log=logs/(name+'.log')
|
||||
with log.open('w') as out:
|
||||
child=subprocess.Popen(command,cwd=root,env=os.environ,stdout=out,stderr=subprocess.STDOUT,start_new_session=True)
|
||||
try:rc=child.wait(timeout=120)
|
||||
except subprocess.TimeoutExpired:
|
||||
os.killpg(child.pid,signal.SIGKILL);child.wait();rc=124
|
||||
text=log.read_text();counts={k:int(v) for k,v in re.findall(r'^# (tests|pass|fail|skipped) (\d+)\s*$',text,re.M)};failing=re.findall(r'^not ok \d+ - (.*)$',text,re.M)
|
||||
row=dict(step=name,start=start,end=time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime()),exit=rc,counts=counts,failing=failing,log=str(log));result=p/'results.json';rows=json.loads(result.read_text()) if result.exists() else [];rows.append(row);result.write_text(json.dumps(rows,indent=2)+'\n');print(json.dumps(row));print(text[-3200:])
|
||||
if name in ['regression-red','M1']:
|
||||
ok=rc==1 and failing==['a sleep past the stop deadline still observes an alive run after both signals'] and "actual: 'unknown'" in text and "expected: 'alive'" in text
|
||||
print('EXPECTED_UNKNOWN_VS_ALIVE',ok);raise SystemExit(0 if ok else 1)
|
||||
raise SystemExit(rc)
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"secret_matches": [],
|
||||
"binary_files": []
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
None. All four TAP records report skipped 0.
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"base": "f40f2e770e0d8be394f1ef53b404045fd6a49c0e",
|
||||
"only_product_change": "while (now() <= deadline) -> for (;;)",
|
||||
"other_product_bytes_unchanged": true,
|
||||
"trailing_unknown_fallback": "unchanged; unreachable"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
[]
|
||||
@@ -1 +0,0 @@
|
||||
/mnt/storage/scratch/tmp/gwxq
|
||||
@@ -1,222 +0,0 @@
|
||||
# Slim packet and full-evidence location
|
||||
|
||||
This packet keeps the build note, candidate manifest and patch, summaries,
|
||||
per-run counts/durations/exit statuses, mutant definitions and cleanup
|
||||
records. Raw TAP logs, per-attempt config/log trees, diagnostic byte dumps,
|
||||
runner scripts and transient TMPDIR notes remain only in the full packet.
|
||||
References below to those files resolve at the full evidence commit.
|
||||
|
||||
Full evidence is retained permanently at commit
|
||||
`d6c924764d387ea320365c4bb160b4b57ed8d635` on
|
||||
`origin/rocko/row280-da5d-20261022`, under
|
||||
`agents/rocko/work/queue-280/`. Its 3,531-entry inventory SHA256 is
|
||||
`7d155092cb6edb547dbb7c8ba2fbabb1dd74f966c5c20965ef4fe6af2e7121b8`.
|
||||
The full branch is retained; this slim packet does not replace its evidence.
|
||||
The inventory in this directory describes only this slim packet.
|
||||
|
||||
Sage-2541 requested this doc-only follow-up on b765f5cb8 after the green
|
||||
owner gate: bus 656/0/0, grant-executor 41/0/0, host-run 26/0/0 (#1785 c30431).
|
||||
No source or test byte changes and no additional test run.
|
||||
|
||||
## Portability limit and carry notes
|
||||
|
||||
Duckworth N2: M2's demonstrated kill holds only while the host's ephemeral
|
||||
range has lo <= 32768 <= hi. On another range, the picker test still checks
|
||||
the outside-range property, but the old-picker mutant may not be killed by
|
||||
a fixed sample. The evidence here applies to this host's 32768-60999 range.
|
||||
|
||||
For the next row touching scratch-sshd.mjs, carry these non-blocking notes:
|
||||
- N3: add one helper comment line naming MOSAIC_SSHD_EVIDENCE.
|
||||
- N4: remove the double blank lines in both owning test files.
|
||||
|
||||
These are follow-ups, not changes to the tested candidate in this packet.
|
||||
|
||||
---
|
||||
|
||||
# Row 280: scratch sshd owns its port
|
||||
|
||||
Design before code; Sage assignment sage-2530, mos-1270. Base
|
||||
`da5d3651d75bff113b27d91abefc824c077dabbe`. Claim rev 3148,
|
||||
`rocko-280-start-r1`. Reviewer Duckworth; gate owner Sage.
|
||||
|
||||
## Proposed change
|
||||
|
||||
Both helpers currently return on `listening(port)` alone
|
||||
(grant-executor.test.mjs:86 and host-run.test.mjs:91). A foreign listener
|
||||
can satisfy that probe while our daemon fails its bind. Move only their
|
||||
common launch/retry/readiness loop and port selection into a shared test
|
||||
helper, `packages/bus/tests/scratch-sshd.mjs`; retain their distinct key,
|
||||
authorized-key and command-stub setup in their existing files.
|
||||
|
||||
For each of the existing five attempts, write a fresh, attempt-specific
|
||||
sshd log, start the child, and accept only after all three checks hold:
|
||||
a successful loopback connect, the exact `Server listening on 127.0.0.1
|
||||
port N.` line from this attempt's log, and the child's exitCode/signalCode
|
||||
still null after the asynchronous connect. No previous attempt's log can
|
||||
prove a later attempt. Early exit or failed bind advances to a fresh pick;
|
||||
kill and await an unsuccessful child before retry. Exhaustion keeps the
|
||||
existing `scratch sshd did not start` error, never a skip. Register cleanup
|
||||
for the successful child as well.
|
||||
|
||||
Read and validate `/proc/sys/net/ipv4/ip_local_port_range`. Select uniformly
|
||||
from eligible ports 1024 through 65535 outside the inclusive range, refusing
|
||||
invalid input or an empty eligible set. No fixed 32768 assumption. Expose a
|
||||
first-attempt port override only to the regression, then use the normal picker.
|
||||
|
||||
In each owning file, a regression opens a plain TCP listener, supplies that
|
||||
occupied port for attempt one, and asserts the helper rejects it and returns
|
||||
a different port. The helper's log/liveness proof still governs that returned
|
||||
port. Register TCP listener cleanup before awaiting startup.
|
||||
Add a deterministic picker assertion using injected random samples spanning
|
||||
[0,1); every selected port must be unprivileged and outside the actual proc
|
||||
range. M2 restores the old picker. If the actual host range makes M2 escape
|
||||
this assertion, record it and ask Duckworth to adjudicate as the brief allows.
|
||||
|
||||
## X5 closure
|
||||
|
||||
DEFERRED.md:311-321 binds the `sleep 30` after the grant in G22/X5.
|
||||
Use the fixture's existing fake-command PATH: a `sleep` stub delegates every
|
||||
other argument to /usr/bin/sleep, but for 30 waits in short intervals only
|
||||
while its scratch directory exists. The existing `sleep 30` argv, grant,
|
||||
sudo-log assertion and revoke assertions stay unchanged. Remote cleanup no
|
||||
longer leaves a 30-second child after the fixture directory is removed.
|
||||
Append a closing line to the DEFERRED entry; do not rewrite its history.
|
||||
|
||||
## Evidence and slot request plan
|
||||
|
||||
No run before Sage CLEAR. First run the new occupied-port regressions red
|
||||
against the old acceptance, then green after the helper change. Run both
|
||||
whole files, M1 (old connect-only acceptance) and M2 (old random picker),
|
||||
with each killing test named. Do not classify a timeout or syntax error as
|
||||
an assertion kill. Save process-group timeout output and restore hashes.
|
||||
|
||||
After the whole-file durations are known, refine the repeat estimate.
|
||||
Provisional estimate: allow 60-90 minutes for both 30-run whole-file repeats
|
||||
under continuous CLI-suite load, with per-run counts and elapsed time saved.
|
||||
The load and repeats are intentional concurrency within one granted slot;
|
||||
all other commands stay sequential. Both files must complete all 30 without
|
||||
timeout, and the CLI load must remain green. Any unexpected red stops for
|
||||
Sage/Mos. Use a fresh short scratch TMPDIR, dead Docker socket, no live
|
||||
configuration, no Docker or browser, and kill owned process groups on timeout.
|
||||
Sweep owned node and sshd/stub processes and restore candidate hashes before
|
||||
returning the slot. Sage runs the whole bus suite in the owner gate.
|
||||
|
||||
Owned paths: the two existing test files, the shared test helper,
|
||||
`docs/plans/DEFERRED.md`, and this packet. No product change, no live action.
|
||||
|
||||
## Phase 1 runner setup correction
|
||||
|
||||
The initial red-grant invocation at 07:22:02Z ran no test: packet runner
|
||||
parents[5] selected the scratch parent instead of the worktree. The invalid
|
||||
record and log stay unchanged. Sage-2534 approved parents[4], a git-root
|
||||
and test-file existence preflight, and a fresh CLEAR. No source or test
|
||||
byte changed for this correction; it is not a test red.
|
||||
|
||||
## Accepted design conditions and first test stop
|
||||
|
||||
Sage-2533 and duckworth-0120 approved the design. C1 samples are
|
||||
[0, 0.25, 0.5, 0.6384, 0.75, 0.999999]; M2 uses rand(), never Math.random().
|
||||
C2 checks attempt-zero's config names the occupied port and its log has no
|
||||
listening proof for that port. C3's 30/60-second stub delegates other
|
||||
arguments to absolute /usr/bin/sleep, so hold-add/remove's 0.05 sleeps do
|
||||
not recurse. The same stub covers host-run's remote long sleeps (N1).
|
||||
Attempt logs are sshd-N.log; exhaustion names the final log (N2).
|
||||
|
||||
After sage-2534's runner correction, both old-acceptance regression runs
|
||||
failed exactly on returned port equaling the occupied listener port.
|
||||
The first green regression then failed: no accepted sshd after five
|
||||
attempts (07:22:56Z–07:23:09Z, 12.193 s), while the picker assertion passed.
|
||||
The exact log comparison may be rejecting line framing, but this is only a
|
||||
hypothesis: fixture cleanup removed the raw attempt logs. Stopped without
|
||||
retry and requested diagnostic CLEAR to capture the logs before cleanup.
|
||||
No later whole-file run or mutant was executed. Slot returned 07:23:34Z;
|
||||
own cwd node/sshd sweep is empty. This evidence is not a passing gate.
|
||||
|
||||
## Confirmed log framing and correction
|
||||
|
||||
Sage-2535 granted a diagnostic rerun and the conditional CR-only correction.
|
||||
The saved diagnostic TAP and diagnostic-bytes.json prove the occupied-port
|
||||
bind refusal, then four listening lines with trailing hex 0d before newline.
|
||||
Only the comparison changed: the exact expected line, optionally followed
|
||||
by one CR, is accepted. No trim or substring match is used. The temporary
|
||||
dump is removed. Both focused files pass 2/2 after this correction.
|
||||
The earlier diagnostic red is retained as build evidence, not hidden.
|
||||
|
||||
## Phase 1 complete
|
||||
|
||||
Whole grant-executor: 41/41 in 20.673 s; whole host-run: 26/26 in
|
||||
14.367 s. Focused regressions: 2/2 in each file. No skips or timeouts.
|
||||
M1 and M2 are each assertion-killed by the named regression in both files
|
||||
(4/4 executions, two distinct mutant sites). M2 deterministically hits
|
||||
32768 at injected sample 0.6384. Source restored. Post-run pgrep finds no
|
||||
process naming the fixture TMPDIR; cwd node/sshd sweep is empty, proving
|
||||
the long-sleep stub cleanup requested in C3. Logs retain the prior invalid
|
||||
runner invocation and the diagnosed CRLF build failure separately.
|
||||
|
||||
## Repeat preparation (sage-2536)
|
||||
|
||||
Before the repeat commit, the shared helper adds optional fixture evidence
|
||||
output via MOSAIC_SSHD_EVIDENCE. It saves each attempted config/log before
|
||||
accepting or abandoning that attempt, so test cleanup cannot erase the
|
||||
startup evidence. The repeat runner assigns a packet directory per run.
|
||||
No acceptance, picker, stub or existing assertion changes for this capture.
|
||||
The repeated full files verify this final committed helper.
|
||||
|
||||
Repeat source commit: b765f5cb812e60789e4129ed2ab8009f5439a5be. Four-path manifest SHA256: 27806c0579c76d0999d2e6be4180c3867570df0268af9d7e0d7b971af799e6f5.
|
||||
All four blobs are rechecked before and after each run. No candidate
|
||||
bytes may change after this point.
|
||||
|
||||
## Final committed-byte evidence
|
||||
|
||||
Sage-2536 granted the repeat on committed bytes, with no changes carried
|
||||
through the run. Source commit b765f5cb812e60789e4129ed2ab8009f5439a5be;
|
||||
manifest 27806c0579c76d0999d2e6be4180c3867570df0268af9d7e0d7b971af799e6f5.
|
||||
Repeat window: 2026-10-22T07:29:03Z to 07:48:38Z. Both whole files ran
|
||||
sequentially under continuous CLI-suite load, with full output, exit status,
|
||||
counts and durations retained per run in repeat-results.json/repeat-logs/.
|
||||
Each run checks HEAD and all four hashes before and after. The load is the
|
||||
actual complete CLI glob, not a substitute stress loop. Sage received the
|
||||
required 15-minute report at 07:44:01Z.
|
||||
|
||||
| Repeat file | Whole runs | Pass | Fail | Skip | Timeout |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| grant-executor.test.mjs | 30 | 1230 | 0 | 0 | 0 |
|
||||
| host-run.test.mjs | 30 | 780 | 0 | 0 | 0 |
|
||||
| CLI load, two whole cycles | 2 | 1588 | 0 | 0 | 0 |
|
||||
|
||||
Repeat assertions total 2010/2010; load assertions 1588/1588. The in-progress
|
||||
second CLI load was allowed to finish whole before stopping. No skips.
|
||||
Each repeat has a 180 s process-group timeout; each load a 900 s timeout.
|
||||
Neither bound fired. Attempt config/log evidence was saved before cleanup
|
||||
under attempt-logs/<run>/<fixture>/; these are generated fixture paths only.
|
||||
|
||||
grant-executor: seconds min 20.611, median 20.811, max 26.419.
|
||||
|
||||
host-run: seconds min 14.207, median 14.408, max 14.609.
|
||||
|
||||
cli-load: seconds min 587.109, median 587.409, max 587.709.
|
||||
|
||||
Sage-2537 granted final M1/M2 replays after the complete CLI load exited,
|
||||
because the optional attempt-log capture was added before the repeat commit.
|
||||
07:48:56Z–07:48:57Z: four focused executions, all assertion kills:
|
||||
|
||||
| Mutant | Named killer, in both owning files | Result |
|
||||
| --- | --- | --- |
|
||||
| M1: connect-only acceptance | row 280: an occupied TCP port is attempted, refused, and retried with our sshd | Both fail returned-port inequality |
|
||||
| M2: 20000 + Math.floor(rand() * 20000) | row 280: every injected picker sample is unprivileged and outside the ephemeral range | Both fail at sample 0.6384, port 32768 |
|
||||
|
||||
No timeout or syntax failure is counted as a kill. Phase-1 runner, table and
|
||||
logs remain separately recorded; final replays use the exact b765 helper.
|
||||
Restored-hashes.json records 4/4 with no drift. Final-sweep.json records no
|
||||
node, chromium or sshd under owned cwd paths and no process naming either
|
||||
owned TMPDIR. This also supplies C3's post-test long-sleep cleanup evidence.
|
||||
Slot returned at 07:49:17Z. No source byte changed during the repeat; the
|
||||
final mutations were restored under sage-2537. No live file, unit or config
|
||||
was touched. The whole bus suite remains Sage's owner gate.
|
||||
|
||||
Existing assertions/refusals remain unchanged (289 grant lines, 125 host
|
||||
lines); assertion-preservation.json records the static check. The reader
|
||||
search found only the intended shared-helper imports and no outside reader
|
||||
of either owning file. Duckworth also confirmed no owning-file hash pin.
|
||||
The two extra blank-line pairs are acknowledged style nits, left unchanged
|
||||
after the committed repeat (sage-2537).
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"packages/bus/tests/grant-executor.test.mjs": {
|
||||
"existing_assertion_refusal_lines": 289,
|
||||
"all_preserved": true
|
||||
},
|
||||
"packages/bus/tests/host-run.test.mjs": {
|
||||
"existing_assertion_refusal_lines": 125,
|
||||
"all_preserved": true
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
da5d3651d75bff113b27d91abefc824c077dabbe
|
||||
@@ -1,333 +0,0 @@
|
||||
diff --git a/docs/plans/DEFERRED.md b/docs/plans/DEFERRED.md
|
||||
index 197a29ecb..7945a6829 100644
|
||||
--- a/docs/plans/DEFERRED.md
|
||||
+++ b/docs/plans/DEFERRED.md
|
||||
@@ -319,6 +319,10 @@ at every gate. Started 2026-09-12 during the control board MVP.
|
||||
waits 30 s before it calls a lone `sleep 30` a leak. The row 197
|
||||
lanes scan only at lane end, about 15 minutes after pkg-bus, so they
|
||||
can't see it (mos-1169). (2026-10-21)
|
||||
+ Closing note, row 280 (2026-10-22): both scratch sshd fixtures install a
|
||||
+ bounded 30/60-second sleep stub that exits when its test directory is gone;
|
||||
+ other sleep arguments exec /usr/bin/sleep unchanged. Evidence is recorded
|
||||
+ in agents/rocko/work/queue-280/BUILD.md.
|
||||
|
||||
- **Row 66 live checks: the unslop notice on a live managed session, both harnesses.**
|
||||
(mos-1186, Vikunja #454.) Row 66's gate asked for one landing session per
|
||||
diff --git a/packages/bus/tests/grant-executor.test.mjs b/packages/bus/tests/grant-executor.test.mjs
|
||||
index 1992f1525..b27d91dc4 100644
|
||||
--- a/packages/bus/tests/grant-executor.test.mjs
|
||||
+++ b/packages/bus/tests/grant-executor.test.mjs
|
||||
@@ -6,9 +6,9 @@
|
||||
// reaches another host.
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
-import { execFileSync, spawn } from 'node:child_process';
|
||||
+import { execFileSync } from 'node:child_process';
|
||||
import { createHash } from 'node:crypto';
|
||||
-import { connect } from 'node:net';
|
||||
+import { createServer } from 'node:net';
|
||||
import { appendFileSync, chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
||||
import { tmpdir, userInfo } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
@@ -19,6 +19,8 @@ import { hostExecutor, runHost } from '../src/host-run.mjs';
|
||||
import { Store } from '../src/store.mjs';
|
||||
import { grantDecision, hostRecord } from './host-fixtures.mjs';
|
||||
|
||||
+import { ephemeralRange, installSleepStub, pickPort, startScratchSshd } from './scratch-sshd.mjs';
|
||||
+
|
||||
const SSHD = '/usr/bin/sshd';
|
||||
const USER = userInfo().username;
|
||||
const AT = '2026-10-21T00:00:00.000Z';
|
||||
@@ -35,12 +37,7 @@ const DEFINITIONS = {
|
||||
pm: { roleVersion: 2, credentials: [] },
|
||||
ops: { roleVersion: 2, credentials: [{ service: 'host' }] },
|
||||
};
|
||||
-const listening = (port) =>
|
||||
- new Promise((resolve) => {
|
||||
- const s = connect(port, '127.0.0.1');
|
||||
- s.on('connect', () => (s.destroy(), resolve(true)));
|
||||
- s.on('error', () => resolve(false));
|
||||
- });
|
||||
+
|
||||
async function until(fn, ms = 10000) {
|
||||
const end = Date.now() + ms;
|
||||
while (!fn()) {
|
||||
@@ -54,12 +51,13 @@ async function until(fn, ms = 10000) {
|
||||
// Both also stop when the test dir is gone, since a held stub on the sshd side outlives its test (#1750).
|
||||
// wrap.sh logs every request. The sudo stub logs its arguments to sudo.log and runs the command as the
|
||||
// test's user.
|
||||
-async function sshd(t, dir) {
|
||||
+async function sshd(t, dir, options) {
|
||||
if (!existsSync(SSHD)) throw new Error(`${SSHD} is missing: the executor tests need it and fail, never skip`);
|
||||
keygen(join(dir, 'hostkey'));
|
||||
keygen(join(dir, 'installer'));
|
||||
writeFileSync(join(dir, 'authorized_keys'), readFileSync(join(dir, 'installer.pub')), { mode: 0o600 });
|
||||
mkdirSync(join(dir, 'fake'));
|
||||
+ installSleepStub(dir);
|
||||
const stub = (name, body) => writeFileSync(join(dir, 'fake', name), `#!/bin/sh\nD='${dir}'\n${body}\n`, { mode: 0o755 });
|
||||
stub('list', '[ -e "$D/fail-list" ] && exit 1\n[ -e "$D/granted" ] && grep " mosaic-[0-9a-f]*$" "$D/granted"\nexit 0');
|
||||
stub(
|
||||
@@ -76,26 +74,42 @@ async function sshd(t, dir) {
|
||||
`#!/bin/sh\nprintf '%s\\n' "$SSH_ORIGINAL_COMMAND" >> '${dir}/requests.log'\nPATH=${dir}/fake:/usr/bin:/bin; export PATH\nexec /bin/sh -c "$SSH_ORIGINAL_COMMAND"\n`,
|
||||
{ mode: 0o755 },
|
||||
);
|
||||
- for (let attempt = 0; attempt < 5; attempt++) {
|
||||
- const port = 20000 + Math.floor(Math.random() * 20000);
|
||||
- writeFileSync(
|
||||
- join(dir, 'sshd_config'),
|
||||
- [`Port ${port}`, 'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`, `AuthorizedKeysFile ${dir}/authorized_keys ${dir}/granted`,
|
||||
- `PidFile ${dir}/sshd.pid`, 'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
- `ForceCommand ${dir}/wrap.sh`, ''].join('\n'),
|
||||
- );
|
||||
- const daemon = spawn(SSHD, ['-D', '-f', join(dir, 'sshd_config'), '-E', join(dir, 'sshd.log')], { stdio: 'ignore' });
|
||||
- t.after(() => daemon.kill('SIGKILL'));
|
||||
- const deadline = Date.now() + 3000;
|
||||
- while (Date.now() < deadline && daemon.exitCode === null) {
|
||||
- if (await listening(port)) return port;
|
||||
- await sleep(30);
|
||||
- }
|
||||
- daemon.kill('SIGKILL');
|
||||
- }
|
||||
- throw new Error('scratch sshd did not start');
|
||||
+ return startScratchSshd(t, dir, [
|
||||
+ 'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`,
|
||||
+ `AuthorizedKeysFile ${dir}/authorized_keys ${dir}/granted`, `PidFile ${dir}/sshd.pid`,
|
||||
+ 'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
+ `ForceCommand ${dir}/wrap.sh`,
|
||||
+ ], options);
|
||||
}
|
||||
|
||||
+
|
||||
+test('row 280: an occupied TCP port is attempted, refused, and retried with our sshd', async t => {
|
||||
+ const dir = mkdtempSync(join(tmpdir(), 'sshd280-'));
|
||||
+ t.after(() => rmSync(dir, { recursive: true, force: true }));
|
||||
+ const server = createServer(socket => socket.end());
|
||||
+ await new Promise((resolve, reject) => {
|
||||
+ server.once('error', reject);
|
||||
+ server.listen(0, '127.0.0.1', resolve);
|
||||
+ });
|
||||
+ t.after(() => new Promise(resolve => server.close(resolve)));
|
||||
+ const occupied = server.address().port;
|
||||
+ const port = await sshd(t, dir, { firstPort: occupied });
|
||||
+ assert.match(readFileSync(join(dir, 'sshd-0.conf'), 'utf8'), new RegExp(`^Port ${occupied}\\n`));
|
||||
+ assert.equal(readFileSync(join(dir, 'sshd-0.log'), 'utf8').includes(`Server listening on 127.0.0.1 port ${occupied}.`), false);
|
||||
+ assert.notEqual(port, occupied);
|
||||
+ assert.ok([1, 2, 3, 4].some(n => existsSync(join(dir, `sshd-${n}.log`)) &&
|
||||
+ readFileSync(join(dir, `sshd-${n}.log`), 'utf8').includes(`Server listening on 127.0.0.1 port ${port}.`)));
|
||||
+});
|
||||
+
|
||||
+test('row 280: every injected picker sample is unprivileged and outside the ephemeral range', () => {
|
||||
+ const [lo, hi] = ephemeralRange();
|
||||
+ for (const sample of [0, 0.25, 0.5, 0.6384, 0.75, 0.999999]) {
|
||||
+ const port = pickPort(() => sample);
|
||||
+ assert.ok(port >= 1024 && port <= 65535);
|
||||
+ assert.ok(port < lo || port > hi, `sample ${sample}: ${port} inside ${lo}-${hi}`);
|
||||
+ }
|
||||
+});
|
||||
+
|
||||
async function setup(t, opts = {}) {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'g235x-'));
|
||||
t.after(() => rmSync(dir, { recursive: true, force: true }));
|
||||
diff --git a/packages/bus/tests/host-run.test.mjs b/packages/bus/tests/host-run.test.mjs
|
||||
index 6f5949b5c..f7eebd45e 100644
|
||||
--- a/packages/bus/tests/host-run.test.mjs
|
||||
+++ b/packages/bus/tests/host-run.test.mjs
|
||||
@@ -4,7 +4,7 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { execFileSync, spawn } from 'node:child_process';
|
||||
-import { connect, createServer } from 'node:net';
|
||||
+import { createServer } from 'node:net';
|
||||
import { chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
|
||||
import { tmpdir, userInfo } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
@@ -19,6 +19,8 @@ import { hostGrant } from '../src/host-grant.mjs';
|
||||
import { startBroker } from '../src/runtime.mjs';
|
||||
import { businessDoc, rolesCopy, systemFor, writeJson } from '../../business/tests/helpers.mjs';
|
||||
|
||||
+import { ephemeralRange, installSleepStub, pickPort, startScratchSshd } from './scratch-sshd.mjs';
|
||||
+
|
||||
const SSHD = '/usr/bin/sshd';
|
||||
const REPO = fileURLToPath(new URL('../../../', import.meta.url));
|
||||
const USER = userInfo().username;
|
||||
@@ -50,22 +52,18 @@ async function until(fn, ms = 5000) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
-const listening = (port) =>
|
||||
- new Promise((resolve) => {
|
||||
- const s = connect(port, '127.0.0.1');
|
||||
- s.on('connect', () => (s.destroy(), resolve(true)));
|
||||
- s.on('error', () => resolve(false));
|
||||
- });
|
||||
+
|
||||
|
||||
// A scratch sshd. ForceCommand puts the fake sudo first on PATH and hands the command to /bin/sh, so
|
||||
// the remote side parses the command line the way a real host's POSIX shell does.
|
||||
-async function sshd(t, dir) {
|
||||
+async function sshd(t, dir, options) {
|
||||
if (!existsSync(SSHD)) throw new Error(`${SSHD} is missing: the executor tests need it and fail, never skip`);
|
||||
keygen(join(dir, 'hostkey'));
|
||||
keygen(join(dir, 'otherhost'));
|
||||
keygen(join(dir, 'user'));
|
||||
writeFileSync(join(dir, 'authorized_keys'), readFileSync(join(dir, 'user.pub')), { mode: 0o600 });
|
||||
mkdirSync(join(dir, 'fake'));
|
||||
+ installSleepStub(dir);
|
||||
writeFileSync(
|
||||
join(dir, 'fake', 'sudo'),
|
||||
`#!/bin/sh\n'${process.execPath}' -e 'require("fs").appendFileSync(process.argv[1], JSON.stringify(process.argv.slice(2)) + "\\n")' '${dir}/argv.json' "$@"\nshift 2\nexec "$@"\n`,
|
||||
@@ -75,26 +73,42 @@ async function sshd(t, dir) {
|
||||
writeFileSync(join(dir, 'fake', 'fail255'), '#!/bin/sh\necho "Host key verification failed." >&2\nexit 255\n', { mode: 0o755 });
|
||||
writeFileSync(join(dir, 'wrap.sh'), `#!/bin/sh\nPATH=${dir}/fake:/usr/bin:/bin; export PATH\nexec /bin/sh -c "$SSH_ORIGINAL_COMMAND"\n`);
|
||||
chmodSync(join(dir, 'wrap.sh'), 0o755);
|
||||
- for (let attempt = 0; attempt < 5; attempt++) {
|
||||
- const port = 20000 + Math.floor(Math.random() * 20000);
|
||||
- writeFileSync(
|
||||
- join(dir, 'sshd_config'),
|
||||
- [`Port ${port}`, 'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`, `AuthorizedKeysFile ${dir}/authorized_keys`,
|
||||
- `PidFile ${dir}/sshd.pid`, 'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
- `ForceCommand ${dir}/wrap.sh`, ''].join('\n'),
|
||||
- );
|
||||
- const daemon = spawn(SSHD, ['-D', '-f', join(dir, 'sshd_config'), '-E', join(dir, 'sshd.log')], { stdio: 'ignore' });
|
||||
- t.after(() => daemon.kill('SIGKILL'));
|
||||
- const deadline = Date.now() + 3000;
|
||||
- while (Date.now() < deadline && daemon.exitCode === null) {
|
||||
- if (await listening(port)) return port;
|
||||
- await sleep(30);
|
||||
- }
|
||||
- daemon.kill('SIGKILL');
|
||||
- }
|
||||
- throw new Error('scratch sshd did not start');
|
||||
+ return startScratchSshd(t, dir, [
|
||||
+ 'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`,
|
||||
+ `AuthorizedKeysFile ${dir}/authorized_keys`, `PidFile ${dir}/sshd.pid`,
|
||||
+ 'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
+ `ForceCommand ${dir}/wrap.sh`,
|
||||
+ ], options);
|
||||
}
|
||||
|
||||
+
|
||||
+test('row 280: an occupied TCP port is attempted, refused, and retried with our sshd', async t => {
|
||||
+ const dir = mkdtempSync(join(tmpdir(), 'sshd280-'));
|
||||
+ t.after(() => rmSync(dir, { recursive: true, force: true }));
|
||||
+ const server = createServer(socket => socket.end());
|
||||
+ await new Promise((resolve, reject) => {
|
||||
+ server.once('error', reject);
|
||||
+ server.listen(0, '127.0.0.1', resolve);
|
||||
+ });
|
||||
+ t.after(() => new Promise(resolve => server.close(resolve)));
|
||||
+ const occupied = server.address().port;
|
||||
+ const port = await sshd(t, dir, { firstPort: occupied });
|
||||
+ assert.match(readFileSync(join(dir, 'sshd-0.conf'), 'utf8'), new RegExp(`^Port ${occupied}\\n`));
|
||||
+ assert.equal(readFileSync(join(dir, 'sshd-0.log'), 'utf8').includes(`Server listening on 127.0.0.1 port ${occupied}.`), false);
|
||||
+ assert.notEqual(port, occupied);
|
||||
+ assert.ok([1, 2, 3, 4].some(n => existsSync(join(dir, `sshd-${n}.log`)) &&
|
||||
+ readFileSync(join(dir, `sshd-${n}.log`), 'utf8').includes(`Server listening on 127.0.0.1 port ${port}.`)));
|
||||
+});
|
||||
+
|
||||
+test('row 280: every injected picker sample is unprivileged and outside the ephemeral range', () => {
|
||||
+ const [lo, hi] = ephemeralRange();
|
||||
+ for (const sample of [0, 0.25, 0.5, 0.6384, 0.75, 0.999999]) {
|
||||
+ const port = pickPort(() => sample);
|
||||
+ assert.ok(port >= 1024 && port <= 65535);
|
||||
+ assert.ok(port < lo || port > hi, `sample ${sample}: ${port} inside ${lo}-${hi}`);
|
||||
+ }
|
||||
+});
|
||||
+
|
||||
const GRANT = [['true'], ['false'], ['echo'], ['sleep'], ['head'], ['cat'], ['systemctl', 'status']];
|
||||
async function hostFixture(t, { commands = GRANT, reviewerHosts, wrongHostKey = false, coderWeb2 = false } = {}) {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'h210-'));
|
||||
diff --git a/packages/bus/tests/scratch-sshd.mjs b/packages/bus/tests/scratch-sshd.mjs
|
||||
new file mode 100644
|
||||
index 000000000..2dde26de3
|
||||
--- /dev/null
|
||||
+++ b/packages/bus/tests/scratch-sshd.mjs
|
||||
@@ -0,0 +1,88 @@
|
||||
+// Row 280: fixture-only sshd startup. A TCP connect alone does not prove ownership.
|
||||
+import { spawn } from 'node:child_process';
|
||||
+import { once } from 'node:events';
|
||||
+import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
+import { connect } from 'node:net';
|
||||
+import { basename, join } from 'node:path';
|
||||
+
|
||||
+export const ephemeralRange = () => {
|
||||
+ const text = readFileSync('/proc/sys/net/ipv4/ip_local_port_range', 'utf8').trim();
|
||||
+ if (!/^\d+\s+\d+$/.test(text)) throw Error('invalid ephemeral port range');
|
||||
+ const range = text.split(/\s+/).map(Number);
|
||||
+ if (range[0] < 1 || range[1] > 65535 || range[0] > range[1]) throw Error('invalid ephemeral port range');
|
||||
+ return range;
|
||||
+};
|
||||
+
|
||||
+export function pickPort(rand = Math.random) {
|
||||
+ const [lo, hi] = ephemeralRange();
|
||||
+ const below = Math.max(0, Math.min(lo, 65536) - 1024);
|
||||
+ const above = Math.max(0, 65535 - Math.max(hi, 1023));
|
||||
+ const sample = rand();
|
||||
+ if (!below && !above) throw Error('no scratch sshd port available');
|
||||
+ if (!(sample >= 0 && sample < 1)) throw Error('invalid random sample');
|
||||
+ const offset = Math.floor(sample * (below + above));
|
||||
+ return offset < below ? 1024 + offset : Math.max(hi + 1, 1024) + offset - below;
|
||||
+}
|
||||
+
|
||||
+const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
+const listening = port => new Promise(resolve => {
|
||||
+ const socket = connect(port, '127.0.0.1');
|
||||
+ const done = result => { socket.destroy(); resolve(result); };
|
||||
+ socket.setTimeout(200, () => done(false));
|
||||
+ socket.on('connect', () => done(true));
|
||||
+ socket.on('error', () => done(false));
|
||||
+});
|
||||
+const stop = async daemon => {
|
||||
+ if (daemon.pid === undefined || daemon.exitCode !== null || daemon.signalCode !== null) return;
|
||||
+ const exited = once(daemon, 'exit');
|
||||
+ daemon.kill('SIGKILL');
|
||||
+ await exited;
|
||||
+};
|
||||
+
|
||||
+export async function startScratchSshd(t, dir, config, { firstPort } = {}) {
|
||||
+ let lastLog;
|
||||
+ for (let attempt = 0; attempt < 5; attempt++) {
|
||||
+ const port = attempt === 0 && firstPort !== undefined ? firstPort : pickPort();
|
||||
+ const configFile = join(dir, `sshd-${attempt}.conf`);
|
||||
+ lastLog = join(dir, `sshd-${attempt}.log`);
|
||||
+ writeFileSync(configFile, [`Port ${port}`, ...config, ''].join('\n'));
|
||||
+ writeFileSync(lastLog, '');
|
||||
+ const daemon = spawn('/usr/bin/sshd', ['-D', '-f', configFile, '-E', lastLog], { stdio: 'ignore' });
|
||||
+ t.after(() => stop(daemon));
|
||||
+ const saveLog = () => {
|
||||
+ if (!process.env.MOSAIC_SSHD_EVIDENCE) return;
|
||||
+ const evidence = join(process.env.MOSAIC_SSHD_EVIDENCE, basename(dir));
|
||||
+ mkdirSync(evidence, { recursive: true });
|
||||
+ writeFileSync(join(evidence, basename(lastLog)), readFileSync(lastLog));
|
||||
+ writeFileSync(join(evidence, basename(configFile)), readFileSync(configFile));
|
||||
+ };
|
||||
+ let spawnError;
|
||||
+ daemon.on('error', error => { spawnError = error; });
|
||||
+ const deadline = Date.now() + 3000;
|
||||
+ while (Date.now() < deadline && !spawnError && daemon.exitCode === null && daemon.signalCode === null) {
|
||||
+ if (await listening(port) && daemon.exitCode === null && daemon.signalCode === null &&
|
||||
+ readFileSync(lastLog, 'utf8').split('\n').some(line =>
|
||||
+ (line === `Server listening on 127.0.0.1 port ${port}.` ||
|
||||
+ line === `Server listening on 127.0.0.1 port ${port}.\r`))) { saveLog(); return port; }
|
||||
+ await sleep(30);
|
||||
+ }
|
||||
+ await stop(daemon);
|
||||
+ saveLog();
|
||||
+ }
|
||||
+ throw Error(`scratch sshd did not start: ${lastLog}`);
|
||||
+}
|
||||
+
|
||||
+// Long remote sleeps remain in flight for their original duration, but cannot outlive the fixture.
|
||||
+export function installSleepStub(dir) {
|
||||
+ const script = `const fs = require("node:fs");
|
||||
+const end = Date.now() + Number(process.argv[2]) * 1000;
|
||||
+const timer = setInterval(() => {
|
||||
+ if (!fs.existsSync(process.argv[1]) || Date.now() >= end) { clearInterval(timer); }
|
||||
+}, 50);`;
|
||||
+ writeFileSync(join(dir, 'fake', 'sleep'), `#!/bin/sh
|
||||
+case "$#:$1" in
|
||||
+ 1:30|1:60) exec '${process.execPath}' -e '${script}' '${dir}' "$1" ;;
|
||||
+ *) exec /usr/bin/sleep "$@" ;;
|
||||
+esac
|
||||
+`, { mode: 0o755 });
|
||||
+}
|
||||
@@ -1,4 +0,0 @@
|
||||
1cb0971e745745e3db329c7c75f36197664d7bf0687def33c0819134f121975f packages/bus/tests/grant-executor.test.mjs
|
||||
140ec358fff212b747412691e3cb5952844c13c7fe43d3ff1013d24f0df886d2 packages/bus/tests/host-run.test.mjs
|
||||
3b647e59f09e7fc43b41d072e46c3cea5ed7641d5d4a95c5b39c240f73cdb75e packages/bus/tests/scratch-sshd.mjs
|
||||
94c21723cd42f551bbd6249d5133cbfaa12ac25efef5a72bf525998ac3c52100 docs/plans/DEFERRED.md
|
||||
@@ -1 +0,0 @@
|
||||
b765f5cb812e60789e4129ed2ab8009f5439a5be
|
||||
@@ -1,4 +0,0 @@
|
||||
packages/bus/tests/grant-executor.test.mjs
|
||||
packages/bus/tests/host-run.test.mjs
|
||||
packages/bus/tests/scratch-sshd.mjs
|
||||
docs/plans/DEFERRED.md
|
||||
@@ -1 +0,0 @@
|
||||
b765f5cb812e60789e4129ed2ab8009f5439a5be
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"cwd_processes": [],
|
||||
"pgrep_checks": [
|
||||
{
|
||||
"tmpdir": "/mnt/storage/scratch/tmp/gInD",
|
||||
"exit": 1,
|
||||
"matches": []
|
||||
},
|
||||
{
|
||||
"tmpdir": "/mnt/storage/scratch/tmp/gVtU",
|
||||
"exit": 1,
|
||||
"matches": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"helper_sha256": "3b647e59f09e7fc43b41d072e46c3cea5ed7641d5d4a95c5b39c240f73cdb75e",
|
||||
"restored": true
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": "M1",
|
||||
"old": " if (await listening(port) && daemon.exitCode === null && daemon.signalCode === null &&\n readFileSync(lastLog, 'utf8').split('\\n').some(line =>\n (line === `Server listening on 127.0.0.1 port ${port}.` ||\n line === `Server listening on 127.0.0.1 port ${port}.\\r`))) { saveLog(); return port; }",
|
||||
"new": " if (await listening(port)) return port;",
|
||||
"pattern": "row 280: an occupied TCP port"
|
||||
},
|
||||
{
|
||||
"id": "M2",
|
||||
"old": "export function pickPort(rand = Math.random) {\n const [lo, hi] = ephemeralRange();\n const below = Math.max(0, Math.min(lo, 65536) - 1024);\n const above = Math.max(0, 65535 - Math.max(hi, 1023));\n const sample = rand();\n if (!below && !above) throw Error('no scratch sshd port available');\n if (!(sample >= 0 && sample < 1)) throw Error('invalid random sample');\n const offset = Math.floor(sample * (below + above));\n return offset < below ? 1024 + offset : Math.max(hi + 1, 1024) + offset - below;\n}\n",
|
||||
"new": "export function pickPort(rand = Math.random) {\n return 20000 + Math.floor(rand() * 20000);\n}\n",
|
||||
"pattern": "row 280: every injected picker sample"
|
||||
}
|
||||
]
|
||||
@@ -1,21 +0,0 @@
|
||||
d5d82d7cb679332e7d90ed26220cd7d3170931d2e8aa2ccdfc35ceea12147c11 BUILD.md
|
||||
0e8f1e76f8c13d7de5cbea1ae8b8c2f178ca5aa0283ac0dbd00bffcd4c39bea5 assertion-preservation.json
|
||||
052e9e79aa3c9ba1b6f8dedc7af00440e104d308ed9451a076e872c903704c7d base.txt
|
||||
5898d3c45b4274a9cbf117018811f2b6206987e3849e97ce171c3aaa42d314da build.patch
|
||||
27806c0579c76d0999d2e6be4180c3867570df0268af9d7e0d7b971af799e6f5 candidate-manifest.sha256
|
||||
634e46d73bbcdbdea70660954fcc8290dc3d6c8d15554218d59c78feafbd0b08 candidate.txt
|
||||
84f2091c0eb1b55c34b4462775160b5f808a6843e68b3e4cb54e1f7a2421eaf3 changed-paths.txt
|
||||
634e46d73bbcdbdea70660954fcc8290dc3d6c8d15554218d59c78feafbd0b08 commit.txt
|
||||
eb9f55fd5de0ec370742702f15d737fb91e35542dbda727d43502adce92903a9 final-sweep.json
|
||||
f9a578b95bd6f9e07dc231002a28ea9c3ae14fe2e269f3fbca50c4fc97ba61e0 mutant-restore.json
|
||||
72cfbf942b4437720d6b92ddef0bc138d27bd6ecef1f1da0b32a2b0250b3cd61 mutants.json
|
||||
b435b731ea4ccff12f90e1b53023cbc54bf65c08ad0f7feaf8a810088156a0b6 post-phase1-pgrep.txt
|
||||
9f8458487a1c5146230e70d40428b6fb218c93f378fd1a8e8607fab80c446b2c reader-search.txt
|
||||
634e46d73bbcdbdea70660954fcc8290dc3d6c8d15554218d59c78feafbd0b08 repeat-commit.txt
|
||||
42e240961767b817fb5f1d183bc949074b3b90c72335d65c3e0278a3db4294ea repeat-results.json
|
||||
e26b6ecefd1a6db69fbaaa38c4f08abe0ad69035ecaa8e2e29f5da2961e5da15 repeat-summary.json
|
||||
3e1903ee103b0a9ef8febeb4d2073848aca0e42fd4ecd1c586381f2ab7404be2 restored-hashes.json
|
||||
f38eaa23861b8acb1738ed082f25a0e6661d976b87da140993373de41bc4053d results.json
|
||||
76c5c03767ca34bc38a7f69c14fbf1c06e8ebcc93120bc577a44e2271f6fdb16 scan-result.json
|
||||
e7f560ce5fc957432ddcad231897a5decd33be06f1201926adabb62d3c218c83 skips.txt
|
||||
37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570 sweep-phase1.json
|
||||
@@ -1 +0,0 @@
|
||||
No process names the owned fixture TMPDIR.
|
||||
@@ -1,28 +0,0 @@
|
||||
Search: packages/bus/tests/grant-executor.test.mjs
|
||||
(none)
|
||||
|
||||
Search: grant-executor.test.mjs
|
||||
(none)
|
||||
|
||||
Search: packages/bus/tests/host-run.test.mjs
|
||||
(none)
|
||||
|
||||
Search: host-run.test.mjs
|
||||
(none)
|
||||
|
||||
Search: packages/bus/tests/scratch-sshd.mjs
|
||||
(none)
|
||||
|
||||
Search: scratch-sshd.mjs
|
||||
packages/bus/tests/grant-executor.test.mjs:22:import { ephemeralRange, installSleepStub, pickPort, startScratchSshd } from './scratch-sshd.mjs';
|
||||
packages/bus/tests/host-run.test.mjs:22:import { ephemeralRange, installSleepStub, pickPort, startScratchSshd } from './scratch-sshd.mjs';
|
||||
|
||||
Search: docs/plans/DEFERRED.md
|
||||
packages/queue/tests/fixtures/genesis-render.md:35:| 30 | Open gaps from the MVP work | unassigned | — | parked | — | Jason reopens (jason) | `docs/plans/DEFERRED.md` § Open | Fixed only when a gate needs them |
|
||||
packages/queue/tests/fixtures/queue-marked.md:25:Gaps found while working go to `docs/plans/DEFERRED.md`, not here.
|
||||
|
||||
Search: DEFERRED.md
|
||||
packages/queue/tests/fixtures/genesis-render.md:35:| 30 | Open gaps from the MVP work | unassigned | — | parked | — | Jason reopens (jason) | `docs/plans/DEFERRED.md` § Open | Fixed only when a gate needs them |
|
||||
packages/queue/tests/fixtures/queue-marked.md:25:Gaps found while working go to `docs/plans/DEFERRED.md`, not here.
|
||||
packages/queue/tests/fixtures/queue-marked.md:83:| Open gaps from the MVP work | Fixed only when a gate needs them | DEFERRED.md, "Open" |
|
||||
packages/queue/tests/fixtures/queue-marked.md:92:- 2026-09-13 — created; rows 1 to 8 taken from CURRENT.md, DEFERRED.md and the plan page.
|
||||
@@ -1 +0,0 @@
|
||||
b765f5cb812e60789e4129ed2ab8009f5439a5be
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"head": "b765f5cb812e60789e4129ed2ab8009f5439a5be",
|
||||
"manifest_sha256": "27806c0579c76d0999d2e6be4180c3867570df0268af9d7e0d7b971af799e6f5",
|
||||
"start": "2026-10-22T07:29:03Z",
|
||||
"end": "2026-10-22T07:48:38Z",
|
||||
"failed": false,
|
||||
"repeat_runs": 60,
|
||||
"load_runs": 2,
|
||||
"counts": {
|
||||
"repeat": {
|
||||
"tests": 2010,
|
||||
"pass": 2010,
|
||||
"fail": 0,
|
||||
"skipped": 0,
|
||||
"cancelled": 0
|
||||
},
|
||||
"cli-load": {
|
||||
"tests": 1588,
|
||||
"pass": 1588,
|
||||
"fail": 0,
|
||||
"skipped": 0,
|
||||
"cancelled": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"paths": 4,
|
||||
"drift": []
|
||||
}
|
||||
@@ -1,368 +0,0 @@
|
||||
[
|
||||
{
|
||||
"step": "red-grant",
|
||||
"start": "2026-10-22T07:22:02Z",
|
||||
"end": "2026-10-22T07:22:02Z",
|
||||
"seconds": 0.029,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "red-grant-actual",
|
||||
"start": "2026-10-22T07:22:42Z",
|
||||
"end": "2026-10-22T07:22:43Z",
|
||||
"seconds": 0.111,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "red-host-actual",
|
||||
"start": "2026-10-22T07:22:43Z",
|
||||
"end": "2026-10-22T07:22:43Z",
|
||||
"seconds": 0.143,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/host-run.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "green-grant-regressions",
|
||||
"start": "2026-10-22T07:22:56Z",
|
||||
"end": "2026-10-22T07:23:09Z",
|
||||
"seconds": 12.193,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 2,
|
||||
"pass": 1,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280:",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "diagnostic-log-bytes",
|
||||
"start": "2026-10-22T07:24:22Z",
|
||||
"end": "2026-10-22T07:24:34Z",
|
||||
"seconds": 12.196,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "green-grant-regressions-crlf",
|
||||
"start": "2026-10-22T07:25:03Z",
|
||||
"end": "2026-10-22T07:25:03Z",
|
||||
"seconds": 0.178,
|
||||
"exit": 0,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 2,
|
||||
"pass": 2,
|
||||
"fail": 0,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280:",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "green-host-regressions-crlf",
|
||||
"start": "2026-10-22T07:25:03Z",
|
||||
"end": "2026-10-22T07:25:03Z",
|
||||
"seconds": 0.212,
|
||||
"exit": 0,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 2,
|
||||
"pass": 2,
|
||||
"fail": 0,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280:",
|
||||
"packages/bus/tests/host-run.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "grant-whole",
|
||||
"start": "2026-10-22T07:25:03Z",
|
||||
"end": "2026-10-22T07:25:24Z",
|
||||
"seconds": 20.673,
|
||||
"exit": 0,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 41,
|
||||
"pass": 41,
|
||||
"fail": 0,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "host-whole",
|
||||
"start": "2026-10-22T07:25:24Z",
|
||||
"end": "2026-10-22T07:25:38Z",
|
||||
"seconds": 14.367,
|
||||
"exit": 0,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 26,
|
||||
"pass": 26,
|
||||
"fail": 0,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"packages/bus/tests/host-run.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M1-grant-executor",
|
||||
"start": "2026-10-22T07:26:25Z",
|
||||
"end": "2026-10-22T07:26:25Z",
|
||||
"seconds": 0.113,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M1-host-run",
|
||||
"start": "2026-10-22T07:26:25Z",
|
||||
"end": "2026-10-22T07:26:26Z",
|
||||
"seconds": 0.146,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/host-run.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M2-grant-executor",
|
||||
"start": "2026-10-22T07:26:26Z",
|
||||
"end": "2026-10-22T07:26:26Z",
|
||||
"seconds": 0.095,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: every injected picker sample",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M2-host-run",
|
||||
"start": "2026-10-22T07:26:26Z",
|
||||
"end": "2026-10-22T07:26:26Z",
|
||||
"seconds": 0.128,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: every injected picker sample",
|
||||
"packages/bus/tests/host-run.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M1-final-grant-executor",
|
||||
"start": "2026-10-22T07:48:56Z",
|
||||
"end": "2026-10-22T07:48:57Z",
|
||||
"seconds": 0.12,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M1-final-host-run",
|
||||
"start": "2026-10-22T07:48:57Z",
|
||||
"end": "2026-10-22T07:48:57Z",
|
||||
"seconds": 0.164,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: an occupied TCP port",
|
||||
"packages/bus/tests/host-run.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M2-final-grant-executor",
|
||||
"start": "2026-10-22T07:48:57Z",
|
||||
"end": "2026-10-22T07:48:57Z",
|
||||
"seconds": 0.108,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: every injected picker sample",
|
||||
"packages/bus/tests/grant-executor.test.mjs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "M2-final-host-run",
|
||||
"start": "2026-10-22T07:48:57Z",
|
||||
"end": "2026-10-22T07:48:57Z",
|
||||
"seconds": 0.138,
|
||||
"exit": 1,
|
||||
"timeout": false,
|
||||
"counts": {
|
||||
"tests": 1,
|
||||
"pass": 0,
|
||||
"fail": 1,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"command": [
|
||||
"node",
|
||||
"--test",
|
||||
"--test-reporter=tap",
|
||||
"--test-name-pattern=row 280: every injected picker sample",
|
||||
"packages/bus/tests/host-run.test.mjs"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"binary_files": [],
|
||||
"secret_matches": []
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
None. All 60 repeat files and both complete CLI load cycles report skipped 0.
|
||||
@@ -1 +0,0 @@
|
||||
[]
|
||||
@@ -1,50 +0,0 @@
|
||||
// Sage, 2026-10-22: row 191 (kill switch) landed, comment on P19 414 (Q174 landing comment). Sage's own key (bot user 13); the sync key reads back. Comments only: no task edits.
|
||||
// Checks each task's title before posting. Prints no secret.
|
||||
// Usage: node comment-r191-landed.mjs https://tasks.woltje.com SAGE_TOKEN_FILE SYNC_TOKEN_FILE OUT_JSON
|
||||
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
||||
const [ORIGIN, KEY, SYNC, OUT] = process.argv.slice(2);
|
||||
if (!/^https:\/\/tasks\.woltje\.com$/.test(ORIGIN)) throw new Error("tasks.woltje.com only");
|
||||
if (!OUT || existsSync(OUT)) throw new Error("OUT_JSON missing or exists; refusing");
|
||||
const PROJECT = 19;
|
||||
const PSIG = "Posted by Sage (T3 1ef1e4f8) with Sage's own key (bot user 13).";
|
||||
const esc = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
||||
const ps = (xs) => xs.map((x) => `<p>${esc(x)}</p>`).join("") + `<p>${esc(PSIG)}</p>`;
|
||||
const POSTS = [
|
||||
{ id: 414, title: /^MVP platform: the Given list for Cases 1 and 2/, body: [
|
||||
"Row 191 (kill switch, stopRun) landed on refactor as 0fa7bf421 on 10-22 (recorded 04:49Z), a fast-forward on 86f95bb27. An owner can halt an instance: agent verbs that start or continue work refuse with a fixed code, reads and the human's own verbs (including the clear) still work, and running runs are stopped. Gitea #1689 is closed (comment 30360). Queue row 191 is done (rev 3120).",
|
||||
"Rocko built it, and Dewey approved the manifest (88 paths, digest 0bcbf337, comment 30359, rev 3118). Gate on 0fa7bf421: 35 touched files whole, every package suite, the ten scripts/test-*.sh, and 77/77 mutants checked. Sage ran the runs suite 43/0/0 for Dewey's N7. Follow-ups are on Vikunja 502 (real clock, exact HTTP refusals, runtime close in finally, runner cause text).",
|
||||
"It isn't live yet. Live is still 86f95bb27. The switch reaches dragon-lin at the next re-pin, through the window plan and Mos.",
|
||||
] },
|
||||
];
|
||||
const key = readFileSync(KEY, "utf8").trim(), sync = readFileSync(SYNC, "utf8").trim();
|
||||
async function api(method, path, body, auth) {
|
||||
const r = await fetch(ORIGIN + path, { method, headers: { Authorization: `Bearer ${auth}`, "Content-Type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body), redirect: "error" });
|
||||
const t = await r.text(); let json = null; try { json = JSON.parse(t); } catch {}
|
||||
return { status: r.status, json };
|
||||
}
|
||||
const list = (j) => j?.items ?? (Array.isArray(j) ? j : []);
|
||||
const rec = { at: new Date().toISOString(), comments: [], problems: [] };
|
||||
const save = () => {
|
||||
const out = JSON.stringify(rec, null, 1) + "\n";
|
||||
if (out.includes(key) || out.includes(sync)) throw new Error("secret in the record; not written");
|
||||
writeFileSync(OUT, out);
|
||||
};
|
||||
for (const P of POSTS) {
|
||||
const t = await api("GET", `/api/v2/tasks/${P.id}`, undefined, sync);
|
||||
if (t.status !== 200 || t.json?.project_id !== PROJECT || !P.title.test(t.json?.title ?? "")) throw new Error(`task ${P.id}: ${t.status}, title check failed; nothing posted`);
|
||||
}
|
||||
writeFileSync(OUT, "", { flag: "wx" });
|
||||
for (const P of POSTS) {
|
||||
const c = await api("PUT", `/api/v1/tasks/${P.id}/comments`, { comment: ps(P.body) }, key);
|
||||
const e = { task: P.id, status: c.status, id: c.json?.id ?? null };
|
||||
rec.comments.push(e);
|
||||
if (c.status >= 300 || !Number.isSafeInteger(c.json?.id)) { rec.problems.push(`comment ${P.id}: ${c.status} ${c.json?.message ?? ""}`); save(); continue; }
|
||||
const back = await api("GET", `/api/v2/tasks/${P.id}/comments?per_page=50`, undefined, sync);
|
||||
const found = list(back.json).find((x) => x.id === c.json.id);
|
||||
Object.assign(e, { readBack: back.status, found: Boolean(found) });
|
||||
if (back.status !== 200 || !found) rec.problems.push(`comment ${P.id} read-back: ${back.status}`);
|
||||
save();
|
||||
}
|
||||
save();
|
||||
process.stdout.write(JSON.stringify(rec, null, 1) + "\n");
|
||||
if (rec.problems.length) process.exit(2);
|
||||
@@ -1,61 +0,0 @@
|
||||
// Sage, 2026-10-22: files the 10-27 owner thread-claim row (mos-1262) as a P19 task. No relation, labels, assignees,
|
||||
// due dates or bucket moves. Sage's own key (bot user 13); the sync key reads back. Refuses if the title exists.
|
||||
// Prints no secret.
|
||||
// Usage: node file-thread-claims.mjs https://tasks.woltje.com SAGE_TOKEN_FILE SYNC_TOKEN_FILE OUT_JSON ROW ISSUE
|
||||
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
||||
const [ORIGIN, KEY, SYNC, OUT, ROW, ISSUE] = process.argv.slice(2);
|
||||
if (!/^[0-9]+$/.test(ROW ?? "") || !/^[0-9]+$/.test(ISSUE ?? "")) throw new Error("ROW and ISSUE must be numbers");
|
||||
if (!/^https:\/\/tasks\.woltje\.com$/.test(ORIGIN)) throw new Error("tasks.woltje.com only");
|
||||
if (!OUT || existsSync(OUT)) throw new Error("OUT_JSON missing or exists; refusing");
|
||||
const PROJECT = 19;
|
||||
const SIG = "Created by Sage (T3 1ef1e4f8) with Sage's own key (bot user 13).";
|
||||
const esc = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
||||
const ps = (sig, xs) => xs.map((x) => `<p>${esc(x)}</p>`).join("") + `<p>${esc(sig)}</p>`;
|
||||
const TASKS = [
|
||||
{
|
||||
title: `The owner sees a thread agent's claims: agents lists held thread claims (row ${ROW}, #${ISSUE}, 10-27)`,
|
||||
description: ps(SIG, [
|
||||
"Filed by Mos's ruling mos-1262 as a 10-27 row, not post-v1. Row 205's message filter found it (morgana-0072, Sage ruling sage-2430).",
|
||||
"A thread run's role.claim writes thread_claims only (broker.mjs:2682), and the owner's agents verb reads role_claims only (:3309). So the owner can't see a thread agent's claim, which PRD :1083-1084 and the FED R6 user sentence promise. No user thread goes live before this row lands, the same bind as the 193b1a filter. Q176 Case 1 needs it.",
|
||||
`Queue row ${ROW}, after row 205, owner Morgana, reviewer Duckworth, gate Sage. Brief: docs/plans/2026-10-22_owner-thread-claims.md. If it can't make 10-27, that's a scope question for Jason, and it goes to Mos first.`,
|
||||
]),
|
||||
},
|
||||
];
|
||||
const key = readFileSync(KEY, "utf8").trim(), sync = readFileSync(SYNC, "utf8").trim();
|
||||
async function api(method, path, body, auth) {
|
||||
const r = await fetch(ORIGIN + path, { method, headers: { Authorization: `Bearer ${auth}`, "Content-Type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body), redirect: "error" });
|
||||
const t = await r.text(); let json = null; try { json = JSON.parse(t); } catch {}
|
||||
return { status: r.status, json };
|
||||
}
|
||||
const list = (j) => j?.items ?? (Array.isArray(j) ? j : []);
|
||||
async function existing() {
|
||||
const out = [];
|
||||
for (let page = 1; page < 20; page++) {
|
||||
const r = await api("GET", `/api/v2/projects/${PROJECT}/tasks?per_page=50&page=${page}`, undefined, sync);
|
||||
if (r.status !== 200) throw new Error(`list tasks: ${r.status}`);
|
||||
out.push(...list(r.json));
|
||||
if (list(r.json).length < 50) return out;
|
||||
}
|
||||
throw new Error("more than 19 pages");
|
||||
}
|
||||
const rec = { at: new Date().toISOString(), project: PROJECT, created: null, problems: [] };
|
||||
const save = () => {
|
||||
const out = JSON.stringify(rec, null, 1) + "\n";
|
||||
if (out.includes(key) || out.includes(sync)) throw new Error("secret in the record; not written");
|
||||
writeFileSync(OUT, out);
|
||||
};
|
||||
const have = await existing();
|
||||
for (const T of TASKS) if (have.some((t) => t.title === T.title)) throw new Error("title exists; refusing");
|
||||
writeFileSync(OUT, "", { flag: "wx" });
|
||||
rec.created = [];
|
||||
for (const T of TASKS) {
|
||||
const r = await api("PUT", `/api/v1/projects/${PROJECT}/tasks`, { title: T.title, description: T.description }, key);
|
||||
const c = { status: r.status, id: r.json?.id ?? null };
|
||||
rec.created.push(c);
|
||||
if (r.status >= 300 || !Number.isSafeInteger(r.json?.id)) { rec.problems.push(`create: ${r.status} ${r.json?.message ?? ""}`); continue; }
|
||||
const back = await api("GET", `/api/v2/tasks/${r.json.id}`, undefined, sync);
|
||||
Object.assign(c, { readBack: back.status, done: back.json?.done });
|
||||
if (back.status !== 200 || back.json?.title !== T.title || back.json?.done) rec.problems.push(`read-back differs for ${r.json.id}`);
|
||||
}
|
||||
save();
|
||||
console.log(JSON.stringify(rec));
|
||||
@@ -1,69 +0,0 @@
|
||||
// Sage, 2026-10-22: re-pin window 7247d80c7 to 86f95bb27 done (mos-1253, mos-1263). Comments on P19 386 and 435 (Mos posted 412 himself, mos-1266),
|
||||
// text from Darkwing (darkwing-0160). No task is closed. Sage's own key (bot user 13); the sync key reads back.
|
||||
// Checks each task's title before anything is posted. Prints no secret.
|
||||
// Usage: node post-w12-86f95bb27.mjs https://tasks.woltje.com SAGE_TOKEN_FILE SYNC_TOKEN_FILE OUT_JSON
|
||||
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
||||
const [ORIGIN, KEY, SYNC, OUT] = process.argv.slice(2);
|
||||
if (!/^https:\/\/tasks\.woltje\.com$/.test(ORIGIN)) throw new Error("tasks.woltje.com only");
|
||||
if (!OUT || existsSync(OUT)) throw new Error("OUT_JSON missing or exists; refusing");
|
||||
const PROJECT = 19;
|
||||
const PSIG = "Posted by Sage (T3 1ef1e4f8) with Sage's own key (bot user 13). Text from Darkwing, the window operator.";
|
||||
const esc = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
||||
const ps = (xs) => xs.map((x) => `<p>${esc(x)}</p>`).join("") + `<p>${esc(PSIG)}</p>`;
|
||||
const WIN = "agents/darkwing/work/window-repin-86f95bb27/";
|
||||
const POSTS = [
|
||||
{ id: 386, title: /^Q173 test system/, close: false, body: [
|
||||
"Re-pin 7247d80c7 to 86f95bb27 done on dragon-lin, 2026-10-22, with Darkwing operating. Activation 20261022T040256Z-86f95bb27f6c, pointer at 04:03:00Z UTC, schema 3j with no migration. P1 to P6, B0, W0 to W5 and W9 to W11 passed. Nothing was rolled back, and there's no counted failure (mos-1260). W5 backup SHA256SUMS 45b18429.",
|
||||
"S1 to S2 (03:55:33Z to 04:24:42Z UTC): schema 3j at both, events 1798 to 1817 with no grant.* kind, and hosts and host_grants at 0 rows.",
|
||||
"W12 (w12c.sh, mos-1263) W12_PASS at 04:26:43Z. Backup w12-20261022T042555Z first (SHA256SUMS 210ce775). The chief relayed the pm read and launched pm r2cf8536da2c3, which answered PRD 1.14 with 85 ids. Row 66 on chief rd0b8fdb4d62d: turn 1 drew 4 banned words and the [unslop: note, turn 2 got the notice, and counts went from 1/0/0 to checked 6, flagged 1, notices 1, broken null.",
|
||||
`STATE: ${WIN}STATE.md`,
|
||||
] },
|
||||
{ id: 435, title: /^Console inbox: Approve\/Deny/, close: false, body: [
|
||||
"Re-pin to 86f95bb27 (activation 20261022T040256Z-86f95bb27f6c). Row 202's access verbs are live, and nobody created a grant. The bus journal since W5 has no grant.* event, and hosts and host_grants hold 0 rows.",
|
||||
`STATE: ${WIN}STATE.md`,
|
||||
] },
|
||||
];
|
||||
const key = readFileSync(KEY, "utf8").trim(), sync = readFileSync(SYNC, "utf8").trim();
|
||||
async function api(method, path, body, auth) {
|
||||
const r = await fetch(ORIGIN + path, { method, headers: { Authorization: `Bearer ${auth}`, "Content-Type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body), redirect: "error" });
|
||||
const t = await r.text(); let json = null; try { json = JSON.parse(t); } catch {}
|
||||
return { status: r.status, json };
|
||||
}
|
||||
const list = (j) => j?.items ?? (Array.isArray(j) ? j : []);
|
||||
const rec = { at: new Date().toISOString(), comments: [], closes: [], problems: [] };
|
||||
const save = () => {
|
||||
const out = JSON.stringify(rec, null, 1) + "\n";
|
||||
if (out.includes(key) || out.includes(sync)) throw new Error("secret in the record; not written");
|
||||
writeFileSync(OUT, out);
|
||||
};
|
||||
const before = {};
|
||||
for (const P of POSTS) {
|
||||
const t = await api("GET", `/api/v2/tasks/${P.id}`, undefined, sync);
|
||||
if (t.status !== 200 || t.json?.project_id !== PROJECT || !P.title.test(t.json?.title ?? "")) throw new Error(`task ${P.id}: ${t.status}, title check failed; nothing posted`);
|
||||
if (P.close && t.json.done) throw new Error(`task ${P.id} is already done; nothing posted`);
|
||||
before[P.id] = { title: t.json.title, description: t.json.description };
|
||||
}
|
||||
writeFileSync(OUT, "", { flag: "wx" });
|
||||
for (const P of POSTS) {
|
||||
const c = await api("PUT", `/api/v1/tasks/${P.id}/comments`, { comment: ps(P.body) }, key);
|
||||
const e = { task: P.id, status: c.status, id: c.json?.id ?? null };
|
||||
rec.comments.push(e);
|
||||
if (c.status >= 300 || !Number.isSafeInteger(c.json?.id)) { rec.problems.push(`comment ${P.id}: ${c.status} ${c.json?.message ?? ""}`); save(); continue; }
|
||||
const back = await api("GET", `/api/v2/tasks/${P.id}/comments?per_page=50`, undefined, sync);
|
||||
const found = list(back.json).find((x) => x.id === c.json.id);
|
||||
Object.assign(e, { readBack: back.status, found: Boolean(found) });
|
||||
if (back.status !== 200 || !found) { rec.problems.push(`comment ${P.id} read-back: ${back.status}`); save(); continue; }
|
||||
if (P.close) {
|
||||
const full = await api("GET", `/api/v1/tasks/${P.id}`, undefined, key);
|
||||
if (full.status !== 200 || full.json?.id !== P.id) { rec.problems.push(`v1 get ${P.id}: ${full.status}`); save(); continue; }
|
||||
const u = await api("POST", `/api/v1/tasks/${P.id}`, { ...full.json, done: true }, key);
|
||||
const b2 = await api("GET", `/api/v2/tasks/${P.id}`, undefined, sync);
|
||||
const x = { task: P.id, status: u.status, readBack: b2.status, done: b2.json?.done, titleSame: b2.json?.title === before[P.id].title, descriptionSame: b2.json?.description === before[P.id].description, inverse: `mark undone: POST /api/v1/tasks/${P.id} done false (sage key)` };
|
||||
rec.closes.push(x);
|
||||
if (u.status >= 300 || b2.status !== 200 || b2.json?.done !== true || !x.titleSame || !x.descriptionSame) rec.problems.push(`close ${P.id}: update or read-back differs`);
|
||||
}
|
||||
save();
|
||||
}
|
||||
save();
|
||||
process.stdout.write(JSON.stringify(rec, null, 1) + "\n");
|
||||
if (rec.problems.length) process.exit(2);
|
||||
@@ -1,118 +0,0 @@
|
||||
# Re-pin 7247d80c7 to 86f95bb27 (rows 251, 244, 254, 202, 273, PRD 1.11-1.14), no migration
|
||||
|
||||
Sage, 2026-10-22, for mos-1253 under DECISIONS Q173 and mos-1246. The step layout is
|
||||
`repin-1024-draft1.md`, with the copy changed and `--migrate` dropped. Where a step is unchanged I name it
|
||||
and say only what differs. Mos checks this file's sha256 before P0, and any change after that means a new
|
||||
check (mos-0849/0850). This file stays uncommitted until row 191's window ends, because refactor doesn't
|
||||
move while a rebased candidate's gate runs.
|
||||
|
||||
## Who, and what nobody does
|
||||
|
||||
- Darkwing operates if free. Otherwise I operate. Mos verifies each step's output before the next one,
|
||||
runs P3, and gives the W5 go. Row 191's full window keeps first claim on the slot (mos-1225). Steps that
|
||||
start no test and no stub run alongside it: P1, W0, P4, P5, P6, B0, W1-W4. P2 waits for a gap or CLEAR,
|
||||
because it starts node stubs that a busy check counts.
|
||||
- Jason has no step. Nothing is pruned. Nobody acts as Jason: no `--by jason`, no human shell or tmux
|
||||
pane, every bus read and write carries `--tester`, and `bus.tester` stays as it is. If it isn't `true`,
|
||||
stop at P1.
|
||||
- No pi (#383). No Save in the human Console, no `mosaic name`.
|
||||
- Outside reach doesn't change. No `--send`, no `--sso`, no proof pair. Both go on together in the phase 2
|
||||
window, which still waits for Jason's start (Vikunja 412). The tunnel forwards 7332 only.
|
||||
- dragon-lin only. .53 and .54 take nothing (mos-1198, mos-1167).
|
||||
|
||||
## Names
|
||||
|
||||
- OLD, live: `7247d80c7af7ffa70fc61557406bf491cdf3bfc7`, schema 3j, pointer `pm: true`, activation
|
||||
`20261021T215926Z-7247d80c7af7`. Console flags at W5 last time: `--port 7332 --public-host
|
||||
mosaic.woltje.com --auth-header X-authentik-username --allow-user jason.woltje --tester-socket`. P1
|
||||
re-reads them from `status`. I don't copy them from this file.
|
||||
- NEW: `86f95bb27f6cb237bf9fa9ba53320bace6c4de0b`, 59 commits past OLD (`git rev-list --count`). The last
|
||||
code landing in it is 0bbf0f6d1 (row 273). The two commits after that are docs and queue files.
|
||||
- `WIN=agents/darkwing/work/window-repin-86f95bb27/` if Darkwing operates, else
|
||||
`agents/sage/work/window-repin-86f95bb27/`. The scripts adapt last window's, in
|
||||
`agents/sage/work/window-repin-7247d80c7/`, with NEW and OLD changed and every `--migrate` removed.
|
||||
|
||||
## What NEW carries over OLD
|
||||
|
||||
Non-test paths changed from OLD to NEW (`git diff --name-only`, tests and READMEs left out):
|
||||
|
||||
| Row | Commit | Paths | Live effect to check |
|
||||
|---|---|---|---|
|
||||
| 251, 244 | d37210288, e69260a3c | scripts/test-release.sh, test-task.sh, scripts/testing/* | Gate tooling. Not in the live path. |
|
||||
| PRD 1.11-1.14 | ea0b2a16d..db1e7732a | packages/tasks/requirements.json | W9: the pm's requirements read gives 1.14 with 85 ids. |
|
||||
| 254 | 331597709 | packages/bus/src/human-cli.mjs (library.sync client timeout 130 s), packages/webui/src/bus.mjs (six `library-*` STATUS codes) | No library entry is live, so neither path runs. |
|
||||
| 202 | ddfb29af7 | packages/cli/src/access.mjs, cli.mjs, scripts/mosaic | `mosaic access list/grant/revoke`. Nobody runs them in this window (Q188, mos-1141). |
|
||||
| 273 | 7991662dc..0bbf0f6d1 | scripts/stack-release.sh | `--send` and `--no-sso`. With neither given, the plan keeps the pointer's Console flags. W3 checks that. |
|
||||
|
||||
Nothing else in packages/bus/src or packages/webui/src changed (`git diff --quiet` with those two files left
|
||||
out). The four service scripts and scripts/stack-copy.sh are unchanged from OLD (`git diff --quiet 7247d80c7
|
||||
86f95bb27 --` on them). package-lock.json is unchanged.
|
||||
|
||||
## Schema and backups
|
||||
|
||||
- `SCHEMA_VERSION` is 3j at both commits (`packages/bus/src/store.mjs:17`). No migration step and no
|
||||
schema.sql change in the range. W3's plan must show no migration line. If it asks for `--migrate`, stop.
|
||||
- B0 is the backup taken first. It's an online copy of the live store through sqlite's backup API, read only
|
||||
on the source, as in last window's W12. It is laid out the way `rehearse --backup PATH` reads it
|
||||
(`stack-release.sh:2232-2235`): `$DATA/backups/b0-<STAMP>/bus/bus.sqlite`, `SHA256SUMS` written from
|
||||
inside `bus/`, `SCHEMA` reading 3j, and `CHECK` holding the integrity_check result, the event count and
|
||||
maxSeq. The operator sends Mos the path and the SHA256SUMS sha256 before P3.
|
||||
- W5 takes the stopped-store backup every activate takes, plus the rollback set. That one is the rollback
|
||||
point.
|
||||
- The grant look-alike count from draft 1 is dropped. It guarded the 3i-3j migration, and there is none.
|
||||
- Rollback is a pointer flip. OLD and NEW share 3j, so `rollback --plan` then the real run, with no
|
||||
`--restore`. Any restore goes to Mos and ends the window (mos-1226, mos-1253 item 5).
|
||||
|
||||
## Before the window (nothing stopped)
|
||||
|
||||
| # | Who | Step |
|
||||
|---|-----|------|
|
||||
| P0 | Mos | The sha check of NEW and of this file. |
|
||||
| P1 | operator | `status`: pointer, activation, 3j, Console flags, unit flags match. Business file sha256 and `business-check.mjs` LOAD_OK for OLD now and for NEW after W0. `ls -ld $DATA/console` is 0700 and `tester.sock` is 0600 (row 196 made them at the last W5). `bus.tester` is `true`. |
|
||||
| W0 | operator | `scripts/stack-copy.sh copy $NEW`. The copy has `tools/unslop-hook` and `packages/library/bin/askpass` with NEW's mode. |
|
||||
| P2 | operator, in a gap | The two stub runs from last window's p2.sh against NEW's copy, then render both units from REPO's service scripts and diff them against the live units. The only difference allowed is the copy path. |
|
||||
| B0 | operator | The backup above. Path and SHA256SUMS sha256 to Mos. |
|
||||
| P3 | Mos | `stack-release.sh rehearse $NEW mosaic-stack --backup <B0 path> --port <scratch>`, no `--migrate`. It must show no migration, the interpreter preflight passing, one receipt line, no `library:` line, and one pm reply. Mos also reads healthz, `/api/config` and the two tester-http reads on NEW's Console with the pointer's flags, as in mos-1107. |
|
||||
| P4 | operator | The tunnel read. |
|
||||
| P5 | operator | The four service scripts held at NEW, and empty porcelain on them. |
|
||||
| P6 | operator | The 7332 matrix (a)-(g) on OLD as `$WIN/matrix-old.txt`, plus the two tester-http reads, for W10. |
|
||||
|
||||
## The window
|
||||
|
||||
| # | Who | Step |
|
||||
|---|-----|------|
|
||||
| W0b | operator | The business file copy. |
|
||||
| W1 | operator | Idle check, start stamp from `date -u`, S1 with `$SNAP --held`. Open pm tasks: the pm finishes or parks them, or the operator records which piece crosses the window. |
|
||||
| W2 | operator | `status`: pointer on OLD, `pm: true`, 3j, unit flags match. |
|
||||
| W3 | operator | `stack-release.sh activate $NEW mosaic-stack --pm --tester-socket --plan`. It must show OLD to NEW, no migration, the backup line, and a Console line with OLD's flags exactly: `--tester-socket`, no `--send`, no `--sso`, no proof pair, no drop line. Any other difference stops here. |
|
||||
| W4 | operator | The unit reads, as last window. W3 and W4 go to Mos for the W5 go. |
|
||||
| W5 | operator, on Mos's go | The same command without `--plan`. Exit 0, `result ok`, every gate check passing, `pm_launched` included. Record the activation id, backup path, STAMP and the backup SHA256SUMS sha256. Then `status`. |
|
||||
| W9 | operator, after Mos verifies W5 | Last window's W9 list: no `Sign-in:` line in the webui journal since the W5 stamp (with `UTC`), `/proc/<Console pid>/cwd` names NEW's copy, `tester.sock` 0600 in a 0700 `console/`, one new `peercred-starts.jsonl` line, no `library:` line in the bus journal. The pm's requirements read gives 1.14 with 85 ids. If the pm isn't relaunched by the restart (mos-1230), the read moves to W12, as last time. |
|
||||
| W10 | operator | The matrix again as `$WIN/matrix-new.txt`, identical to `matrix-old.txt` apart from named lines. The two tester-http reads match P6's. No listener on 7333 (`ss -ltn`). P4 again. A Console POST on the main port with no signed-in session is refused (the mos-1195 baseline). |
|
||||
| W11 | operator | STATE report in `$WIN/STATE.md`, posted on P19 386, 412 and 435, and on the Gitea issues for 202 (#1700), 254 (#1759) and 273 (#1778). |
|
||||
| W12 | operator, after W11 | Row 66's live check as last time: backup first, one Claude Code managed session with a known tell, the RESULT note, the next-turn notice and the `unslop.jsonl` counts. Pi isn't run (#383). |
|
||||
|
||||
After W12 I write draft 3 of the phase 2 plan naming 86f95bb27. That window still waits for Jason.
|
||||
|
||||
## Steps skipped, and why
|
||||
|
||||
Mos allowed skipping a step that only repeats a test row 273's or row 202's gate already ran on the same
|
||||
code. The blob ids at the gated commit and at NEW are equal for every one of those files (`git rev-parse`):
|
||||
scripts/stack-release.sh `7c7676c71` at 0bbf0f6d1 and NEW, and access.mjs `a0a7c9364`, cli.mjs `b14b8fd79`,
|
||||
scripts/mosaic `91c79ab4b` and human-cli.mjs `27b67fbf7` at ddfb29af7 and NEW.
|
||||
|
||||
- No separate run of the `--send`/`--no-sso` walk or the rollback flag carry. Darkwing's gate on 0bbf0f6d1
|
||||
ran stack-release.test.mjs 218/218 (T53, T57, T58 c0/c1) and test-release.sh rc 0. W3's live plan line is
|
||||
the only check left.
|
||||
- No live `mosaic access` run. Row 202's gate ran access.test.mjs on ddfb29af7. A live grant would also
|
||||
break Q188.
|
||||
- The grant look-alike count, for the reason under Schema. It's a scope drop, not a gate repeat.
|
||||
|
||||
Nothing else is skipped. P2 and P3 aren't gate repeats: they check NEW's copy as built on dragon-lin.
|
||||
|
||||
## Stop conditions and rollback
|
||||
|
||||
As in draft 1. The first failure stops the step and goes to Mos. A second failure, or any restore, ends
|
||||
the window (mos-0823, mos-1253 item 5). Before W5 there's nothing to undo. After W5, rollback is
|
||||
`rollback --plan` then the real run, which flips the pointer to OLD with the same Console flags. Keep every
|
||||
copy. Prune nothing.
|
||||
@@ -1455,53 +1455,4 @@ are never rewritten or removed; corrections are new entries.
|
||||
2026-10-21T22:30:20Z | Huey (gpt-6.1-sol) | T1 item 7 r3, scrooge-0007 R1, Vikunja 463 | isolated session-workspaces root and nesting mutant recorded; R1-only confirmation requested, other r2 findings closed; doc-only checks
|
||||
2026-10-21 | Ludwig | PRD 1.11-1.14 drafts (Vikunja 459, 462, 463, 464) | approved by Della, handed to Sage
|
||||
2026-10-21T22:51:07Z | Sage (Opus 5.5) | PRD 1.13 and 1.14 landing with Gosalyn's C2-01c brief and Case 2 design (51fdfb7e2), rows 264-268 filed (#1769-#1773), Case 2 re-pin to a6ac627c8, Vikunja 463 closed | pushed 6ba8a582e..db1e7732a; requirements tests 3/3 and 3/3 and verbs 31/31 on 5f73b388c and db1e7732a
|
||||
2026-10-21 23:39:21 UTC | Rocko (d99326cc) | row 191 inspection handoff, sage-2242 | authorized local snapshot d52b4db1c on new rocko/row191-inspection-20261021; 78 blobs match a4f780c2; no push credential, no push or tests; Sage/Honker messaged directly; per-run API seam and mutants/gate pending.
|
||||
2026-10-22 00:04:05 UTC | Rocko (d99326cc) | row 191 stopRun focused stage and S6 handoff | 9 files final 62/62; two bus failures diagnosed/fixed and logged, own failed fixture group cleaned; no runners remain, slot returned. Export in f7bf7dfec, rebased on new branch to 7aa18b0f6 (dcd8d4dda), 79 product blobs identical. Honker/Sage handed the sha directly; broader gate/mutants pending, no live action.
|
||||
2026-10-22T00:18:12Z | Sage (Opus 5.5) | row 254 landing, rows 269-272 (264b-264e, #1774-#1777), 268 r2 request, row 191 publish and gate slot | 331597709 and eb9672c91 landed, queue e3c0446f5 pushed; rocko/row191-stoprun-dcd8-20261022 7aa18b0f6 and 81889b58d published as jarvis; 191 full gate on Rocko's slot from 00:17Z
|
||||
2026-10-22 00:24:34 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 full gate on c78f48946 | stopped on second integration failure per sage-2275; singles 269/269, processing-control 61/61, bus 646/646; CLI interrupted with 26 observed failures; no further edits; cwd sweep empty and slot returned to Sage.
|
||||
2026-10-22 00:48:20 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 eb3abba12 full gate | stopped at Discord 190/192; 32 singles 304/304, processing-control 61/61, bus 646/646, cli 761/761; two uninitialized Discord fixtures reported to Sage; no later run; cwd sweep empty, slot clear.
|
||||
2026-10-22 00:58:27 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2294 fixture fix | e6800380d on eb3abba12, two test files/four additions, assertions preserved; 338-entry static all-package sweep recorded; no tests; sent Sage for publication and Honker for dependent gate.
|
||||
2026-10-22T01:04:44Z | Dewey (Opus 5.5, 84fb346c) | FED R3 early look, e7d2dc3e6 (morgana-0065) | static only, no queue record; mutant rulings: M3x stays plus reply-chain under M3x, #threadFor user clause equivalent, 193b1a filter mutant n/a; N1 role key user to fix in R3 (:359 and instance-settings:90), Sage rules on widening; dewey-0777 to Morgana, dewey-0778 to Sage
|
||||
2026-10-22T01:08:21Z | Dewey (Opus 5.5, 84fb346c) | FED R3 r2 62de33760 delta (morgana-0066) | static, no findings; N1 fixed at broker :361 and instance-settings :91 with tests; Sage rules instance-settings scope; dewey-0779 Morgana, dewey-0780 Sage
|
||||
2026-10-22 01:30:04 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 e6800380d resume | binding15/15, recover5/5, Discord192/192; stopped WebUI314 passed/4 failed/1 esbuild skip; processing polling violates sign-out/manual redirect and bar changes layout; no fixes/retries, cwd sweep empty, slot returned.
|
||||
2026-10-22 01:38:08 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2317 Console integration fix | 8e1f55c1d on e6800380d; shared sign-out/manual redirect/interval and desktop frame fixes, assertions retained, six browser cases, 73 mutant sites preflight; syntax only, no tests; sent Sage/Honker.
|
||||
2026-10-22 02:06:38 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 rebase sage-2329 | eafcbd3e7 on ddfb29af7, new branch, dispatcher retains processing and access; CLI/readme auto-merges checked; 87-path fd0f2740 manifest and 73-site preflight; Sage2333 published, awaiting CLEAR; no tests.
|
||||
2026-10-22 02:20:51 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 eafcbd3e7 full gate | stopped singles313/6: six new browser cases count app freshness timer as processing timer; diagnosis sent Sage, no fix/retry; no suites/shells/mutants; cwd sweep empty, slot clear.
|
||||
2026-10-22 02:23:13 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2345 timer fixture | 4db8b5778 on eafcbd3e7, one line attributes timer to processing.js; all assertions retained, no product change or tests; sent Sage and Honker; awaiting publication/CLEAR.
|
||||
2026-10-22 02:25:29 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 sage-2349 record commit | 0f8235277 on 4db8b5778 adds packet BUILD.md cause record; product manifest remains ffb46fbd/87 paths; no amend, product change or tests; Sage/Honker notified.
|
||||
2026-10-22 02:48:36 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 0f8235277 full gate second red | singles330/330, processing61/61, bus646/646, cli783/783, discord192/192; WebUI323/1/1 host esbuild skip; shell geometry1062vs1000; stopped/no retry, no later suites/shells/mutants; cwd sweep empty, slot returned, Sage escalates Mos.
|
||||
2026-10-22 02:57:36 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 #1689 mos-1248 desktop layout restart | FF 5cd32f4c1 on 0f8235277: desktop grid allocates processing bar, existing shell assertions kept, visibility/no-scroll assertions added; 74 static mutant sites; candidate 2f93ef19; sent Webby/Sage for static review; no runs, awaiting review and CLEAR.
|
||||
2026-10-22T02:58:24Z | Dewey (Opus 5.5, 84fb346c) | row 236 (#1742) early static look at 8bf442be9 (megavolt-0112) | B1 step 7 revoke undone by step 8 write, B2 sweep fire retry skips D1 id check, N1-N4; dewey-0781 Megavolt, dewey-0782 Sage; no queue verdict
|
||||
2026-10-22 03:01:02 UTC | Rocko (d99326cc) | row 191 Webby static review | B1 accepted: 5cd32f4c1 preserves the content floor; earlier root-cause claim withdrawn in BUILD.md; no runs; requesting fixture measurement slot and owner layout ruling.
|
||||
2026-10-22T03:08:58Z | Dewey (Opus 5.5, 84fb346c) | row 236 (#1742) r2 77dd43c9e delta look (megavolt-0115) | B1 and B2 closed by reading; N5 (settle unknown/401 branches unguarded) not blocking; N1-N4 DEFERRED agreed with README lines; dewey-0783 Megavolt, dewey-0784 Sage; no queue verdict
|
||||
2026-10-22T03:10:55Z | Dewey (Opus 5.5, 84fb346c) | row 236 (#1742) r3 7965efd0f delta look (megavolt-0119) | N5 closed by reading; r3 is the run candidate; dewey-0785 Megavolt, dewey-0786 Sage; no queue verdict
|
||||
2026-10-22 03:11:09 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 191 static nav layout, mos-1249/1250 | FF da4334806 on 5cd32f4c1; controls first in nav, non-sticky per sage-2386/webby-0108; candidate-only placement assertion changed, landed shell assertions preserved; 77 mutants statically preflighted; manifest 245dceb1; Webby/Sage handoff sent, no runs, awaiting static look/publish/debug CLEAR.
|
||||
2026-10-22T03:11:36Z | Dewey (Opus 5.5, 84fb346c) | row 236 (#1742) r4 1c0048911 static look (sage-2390) | README N3/N4 sentences match the rulings; N5 test split per branch, same asserts; r4 is the run candidate; dewey-0787 Sage, dewey-0788 Megavolt
|
||||
2026-10-22 03:15:11 UTC | Rocko (d99326cc) | row 191 sage-2394 debug | da4334806 shell5/5 and processing-browser9/9, awk14/0/0; geometry heights reported with read-only distinction; cwd sweep[] and slot returned; full window awaits separate CLEAR.
|
||||
2026-10-22T03:36:37Z | Filbert (Opus 5.5, sage-2398) | row 273 (#1778) static review, darkwing/row273 978143bf4 to cac7d0f67, carried to 0bbf0f6d1 | APPROVE c30308, queue rev 3111 (filbert-273-record-r1), digest e1031023 rebuilt and matched; B1/N1 fixed, T57 item 3 change approved, N1 TOOLS.md by Sage at landing. Posted before sage-2396 hold; my drift check missed row 202 scripts/mosaic (test-copied). Merge-scoped carry c30319 on 0bbf0f6d1: range-diff 6/6 =, patch-ids equal; rerun green per darkwing-0147 (not mine). Line left uncommitted: HEAD 378a76b85 behind origin 0bbf0f6d1.
|
||||
2026-10-22T03:42:29Z | Darkwing (claude-opus-5-5) | row 273 (#1778) activate --send/--no-sso, sage-2301/mos-1246 F39 | LANDED 0bbf0f6d1 (docs 5365adaef, done rev 3113, #1778 closed c30324); 978143bf4 run red (stale T53 usage pin, fixed cac7d0f67), cac7d0f67 green on old base, rebased darkwing/row273-b2 (range-diff all =, digest e1031023) green 218/218, 25/25, 14/0, M1-M7 killed; in-review rev 3109/3110 c30307; TOOLS.md F39 lines match darkwing-0137
|
||||
2026-10-22 04:02:12 UTC | Rocko (d99326cc) | row191 full window0fa7bf421 | touched35files336pass, packages2403pass/1esbuildskip, shells425selftests+156queue node pass; SR01–07killed, SR08timeout,69unrun; stopped/no retry;88blobs restored,cwd sweep[],owned network removed,slot returned Sage; await Mos ruling.
|
||||
2026-10-22T04:11:48Z | Dewey (Opus 5.5, 84fb346c) | row 191 runner review (sage-2424, mos-1259 item 3): run-mutants.py fe0d360f static | APPROVE to Rocko dewey-0789 and Sage dewey-0790; N1-N5 non-blocking (placeholder timeout cause, 7+1+69 tally, indented not-ok match, SR08 time binding, resume-only invocation)
|
||||
2026-10-22 04:14:56 UTC | Rocko (d99326cc) | row191 control/resume sage-2427 | control12/12;SR08separate timeoutkill;49resumed assertionkills thenKS43survived;total56assertionkills+1timeout,1survivor,19unrun;88blobs restored,cwd sweep[],slot returned,Sage/Mos informed;no retry/edit.
|
||||
2026-10-22T04:20:27Z | Dewey (Opus 5.5, 84fb346c) | row 191 mos-1261 mutant table review: all-mutants.json 5dbc8308 KS43 pattern retarget + 19-site audit, static | APPROVE to Rocko dewey-0791 and Sage dewey-0792; C1 archive resume-mutant-results.json (f5725ef2) and KS43.tap (c778ee33) before a --resume-from KS43 run
|
||||
2026-10-22 04:21:30 UTC | Rocko (d99326cc) | row191 KS43+19 retarget run | KS43assertionkill thenKS44invalid mutation syntax;57assertionkills+1timeout,1invalid,18unrun;stopped,no edit/retry;88hashes restored,cwd sweep[],slot returned,Sage/Mos notified.
|
||||
2026-10-22T04:25:19Z | Dewey (Opus 5.5, 84fb346c) | row 191 mos-1264 KS44 table fix (85d9a7b1, // -> void 0) + 19-site syntax preflight, static; also C1 archive check (dewey-0793/0794) | APPROVE to Rocko dewey-0795 and Sage dewey-0796; run condition: new subdir with byte copies, --resume-from KS44 (19 sites); tally 57 kills + SR08
|
||||
2026-10-22 04:30:06 UTC | Rocko (d99326cc) | row191 KS44+18 resume | 10assertionkills thenKS54timeout-without-control despite dependency assertion;total67assertionkills+1timeoutkill,1unqualifiedtimeout,8unrun;88hashes restored,cwd sweep[],slot returned,Sage/Mos notified,no retry/edit.
|
||||
2026-10-22T04:38:59Z | Dewey (Opus 5.5, 84fb346c) | row 191 final mutant evidence check (control-ks54-mos1267, syntaxfixed-mos1264), static | tally 75 assertion + 2 timeout kills = 77 confirmed (dewey-0798 Rocko, dewey-0799 Sage); N6 tasks.test.mjs:262-266 runtime not closed on failure, Sage rules
|
||||
2026-10-22 04:41:46 UTC | Rocko (Codex gpt-6.1-sol,d99326cc) | row191 #1689 builder complete/in-review | published0fa7bf421,manifest0bcbf337;35singles336pass,9packages2403pass/1knownskip,10shells425selftests+156queue nodepass;75assertionkills+2controlledtimeoutkills=77;88hashrestore,cwd sweep[],slotreturned;in-review rev3114,expected no-token failure3115(exit1);Sage/Dewey handoff,no live action.
|
||||
2026-10-22T04:46:51Z | Dewey (Opus 5.5, 84fb346c) | row 191 manifest review round 1 (#1689, candidate 0bcbf337, source 0fa7bf421 on 86f95bb27) | APPROVE comment 30359, queue rev 3118; manifest, gate logs (2739/0/1 named), 77 mutants and 712-file packet checked; N6 carried to Vikunja 502; N7/N8 non-blocking; dewey-0800 Sage, dewey-0801 Rocko
|
||||
2026-10-22T04:52:40Z | Dewey (Opus 5.5, 84fb346c) | row 236 static look at rebase 08840f3c1 on 0fa7bf421 (#1742) | clean, not a verdict: commit 1 only the three 191 union lines, 2-6 =, commit 7 grants.status read with a test; manifest 32 paths digest 1e40433b matches; dewey-0802 Megavolt, dewey-0803 Sage
|
||||
2026-10-22 05:03:18 UTC | Rocko (Codex gpt-6.1-sol,d99326cc) | Vikunja502 processing test/runner hardening | brief+isolatedrocko-v502;expected wordingred→green,Node27/27,Python4/4,5/5assertionkills(includingSR08andKS54nohang),0skips/timeouts;sweep[],candidate5hashrestored,slotreturned05:01:29Z;candidate968d6ee3,runnerc5bdc764;packetready,no commit/push/liveaction.
|
||||
2026-10-22 05:07:34 UTC | Rocko (d99326cc) | Vikunja502 committed/review handoff sage-2482 | newbranchrocko/vikunja502-ce6a-20261022,source8e3c6a79b+packet9bf4683c6 on ce6a96ad6;5paths no base drift,range-diff=,patch-id37135ebe unchanged;manifest968d6ee3,packet93889519 verifies39/39;focused runs carry;Sage publish/Dewey review handoff sent,no push/liveaction.
|
||||
2026-10-22 05:10:00 UTC | Sage (Opus 5.5, 1ef1e4f8) | landings 191, 205, 268 (MVP 10-27) | 191 LANDED 0fa7bf421 (P19 414 c595); 205 LANDED ce6a96ad6 (gate GATE_PASSED 04:56:43Z, Duckworth APPROVE rev 3125, done rev 3127, #1703 closed c30379); 268 r4 LANDED c27207f6e as a carry on 205 (rerun 14/83/209, Webby 0112/0113, done rev 3129, #1773 closed c30384); doc commit adds the #1782 brief, re-pin plan, phase 2 draft 3
|
||||
2026-10-22T05:11:59Z | Dewey (Opus 5.5, 84fb346c) | Vikunja 502 (191 follow-up, Rocko) static review: source 8e3c6a79b, packet 9bf4683c6, manifest 968d6ee3, runner c5bdc764 vs fe0d360f | APPROVE; N6 finally-close, exact refusal statuses, truthful no-control cause checked; 5/5 assertion kills; dewey-0804 Sage, dewey-0805 Rocko
|
||||
2026-10-22T05:11:59Z | Dewey (Opus 5.5, 84fb346c) | row 274 (FED R3, #1779) rebase look at 226e1f63d on ce6a96ad6 | not a verdict: range-diff ! only at 191 meets, manifest 7d9c9d9b rebuilt and matches; drift to b3665f5ab (268 library) and halt-flag test to Sage; dewey-0806 Morgana, dewey-0807 Sage
|
||||
2026-10-22 05:58:59 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 279 #1784 stopRun deadline | candidate 1016b8584, packet cad927137 on f40f2e770; expected unknown/alive red, stop-run 13/13, package 62/62, M1 killed, 0 skips, sweep clear; Sage publishes, Dewey reviews.
|
||||
2026-10-22T06:04:20Z | Dewey (Opus 5.5, 84fb346c) | row 279 (#1784, Rocko) stopRun deadline fix, manifest review r1 on cad927137 (312ed511, 2 paths) | APPROVE, Gitea c30409, queue rev 3143 op dewey-279-r1-verdict; N1 run-before-commit (Sage gate binds), N2 discord processing tests (Sage added to gate); dewey-0809 Sage, dewey-0810 Rocko
|
||||
2026-10-22T06:13:54Z | Dewey (Opus 5.5, 84fb346c) | row 279 (#1784) carry to ceadad993 (sage-2520) | APPROVE carried: range-diff 1:= 2:=, patch-ids match, product blobs equal, manifest 312ed511 ok; posted c30410
|
||||
2026-10-22 06:15:54 UTC | Sage (Opus 5.5, 1ef1e4f8) | row 279 stopRun deadline (mos-1269) | LANDED ceadad993 06:13:49Z, carry on 343b6dd76, Dewey c30409 + carry c30410, done rev 3145; 194 b16 9cdc47d04 (Webby carry webby-0118) has the slot for runb8 + gate.sh, new window
|
||||
2026-10-22 07:17:54 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 280 #1785 scratch sshd port ownership | claimed rev 3148 on da5d3651d; proposed test-only shared readiness/picker and X5 cleanup in queue-280/BUILD.md, sent Sage and Duckworth before code; no tests run, CLEAR requested.
|
||||
2026-10-22 07:51:04 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 280 #1785 scratch sshd owns port | source b765f5cb8, packet d6c924764; grant 30/30 runs1230/1230, host30/30 runs780/780, CLI load1588/1588, no skips/timeouts, final M1/M2 four assertion kills; source restored and slot clear; no live action.
|
||||
2026-10-22 07:56:59 UTC | Rocko (Codex gpt-6.1-sol, d99326cc) | row 280 slim packet under sage-2541 | b0fd28b6f on rocko/row280-packet-b765, parent b765f5cb8; 22 text files, 21-entry slim inventory914f888d, full evidence d6c924764 retained, portability/follow-ups recorded; no tests or source changes.
|
||||
2026-10-22 08:00:02 UTC | Sage (1ef1e4f8) | row 280 review, gate and landing | design approve sage-2533; CLEARs for phase 1, diagnostic and repeat; published d6c924764 as jarvis; review request rev 3151/3152; gate bus 656/0/0; landed b0fd28b6f (ff), note 3154, done 3155; #1785 closed; P19 511 comment 623; Honker told for 194 b17.
|
||||
2026-10-22 08:38:11 UTC | Sage (1ef1e4f8) | row 194 b17/b18 window and landing | b17 CLEAR (sage-2544), then my refactor push forced b18 (sage-2545, Webby sage-2546); review request rev 3158/3159; landed fd6dd327c (ff), note 3161, done 3162; #1692 closed; P19 414 comment 625
|
||||
|
||||
+1
-4
@@ -480,7 +480,7 @@ reports checkout or copy identity and refactor drift, and writes nothing.
|
||||
```
|
||||
scripts/stack-release.sh adopt BUSINESS
|
||||
scripts/stack-release.sh activate ID BUSINESS [--pm | --pm-after-harness] [--migrate] [--tester-socket | --tester-port N (legacy copies)]
|
||||
[--proof-header NAME --proof-file PATH | --no-proof | --sso | --no-sso] [--send | --no-send] [--timeout S] [--plan]
|
||||
[--proof-header NAME --proof-file PATH | --no-proof | --sso] [--no-send] [--timeout S] [--plan]
|
||||
scripts/stack-release.sh pm-on BUSINESS [--timeout S]
|
||||
scripts/stack-release.sh rollback BUSINESS [--restore ACTIVATION [--events N]] [--timeout S] [--plan]
|
||||
scripts/stack-release.sh status BUSINESS
|
||||
@@ -490,9 +490,6 @@ scripts/stack-release.sh gate ID BUSINESS --units external --since EPOCH [--time
|
||||
common options: --copies DIR, --bin DIR, --instance NAME, --units user|external
|
||||
--events N is the total of the per-table counts the post-backup-events refusal prints: events and
|
||||
every table in COUNTED.
|
||||
--send needs --sso in the run's Console flags, given or carried. --no-sso needs --sso in the
|
||||
pointer's, and takes the Console flags from the rollback set of the activation that turned it on.
|
||||
--no-sso drops the pointer's --send, and so does a rollback to a Console without --sso.
|
||||
```
|
||||
|
||||
This is an operator plan, not an action agents run. Both reviews and the
|
||||
|
||||
@@ -22,15 +22,9 @@ edits it by hand, and the agents can't change it. He will ask you to confirm it
|
||||
|
||||
## Your playground
|
||||
|
||||
A folder named in the `playground` list of that entry is your playground. A playground folder can sit
|
||||
at one of three levels:
|
||||
- Book level: inside one book folder, for ideas about that book, for example `<book>/playground/`.
|
||||
- Universe level: outside every book folder, for ideas about a universe that aren't tied to one book.
|
||||
- A new universe: a draft universe entry with a name and its own playground folders and no books, for a
|
||||
world you are only starting. When it is real, Jason turns it into a plain universe with books and you
|
||||
move the notes in Obsidian.
|
||||
|
||||
You choose the names and tell Jason. Until you have one, every note in a book folder is canon.
|
||||
A folder named in the `playground` list of that entry is your playground. Each playground folder sits
|
||||
inside one book folder, so one per book works well, for example `<book>/playground/`. You choose the
|
||||
names and tell Jason. Until you have one, every note in a book folder is canon.
|
||||
|
||||
What the playground means for the agents:
|
||||
- They search canon unless they ask for the playground on purpose.
|
||||
|
||||
@@ -111,7 +111,7 @@ repo, so a bad mapping gives exit 3 even when the repo path is wrong too.
|
||||
| 4 | `library survey: usage: mosaic library survey <repo> [--mapping <file>]` | no repo, two repos, an unknown flag, `--mapping` without a file or twice | Fix the command |
|
||||
| 3 | `library survey: library-mapping-invalid: <file> is not a readable JSON file` | missing, unreadable by `mosaic`, or not JSON | Fix the file or its mode |
|
||||
| 3 | `library survey: library-mapping-invalid: <file> <reason>` | the entry breaks the schema. The reason names the key | Give it to Jason for the draft |
|
||||
| 3 | `library survey: library-playground-other-universe: <file> universes.<u>.playground "<prefix>" lies inside book folder "<book>" of universes.<v>`, or `holds book folder` | a playground prefix inside, or holding, another universe's book folder | Give it to Jason for the draft |
|
||||
| 3 | `library survey: library-playground-outside-book: <file> universes.<u>.playground "<prefix>" is not inside one of its books` | a playground prefix outside its universe's books | Give it to Jason for the draft |
|
||||
| 2 | `library survey: library-git: <repo> is not a directory` | wrong path | Check `<repo>` |
|
||||
| 2 | `library survey: library-git: repository has no readable HEAD commit (project-git)` | not a repo, a folder inside one, another owner, no commits, a `HEAD` with no commit, or no `git` on `PATH` | Check each. If `<repo>` is the bus mirror, stop and report to Sage |
|
||||
| 2 | `library survey: library-git: <other reason>`, such as `tree listing refused (project-git)` | git failed or ran past 100 seconds | Report to Sage |
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
# The owner sees a thread agent's claims (10-27 row)
|
||||
|
||||
Sage, 2026-10-22, for mos-1262. Row 205's message filter found the gap (morgana-0072, ruling sage-2430).
|
||||
|
||||
## Why
|
||||
|
||||
PRD :1083-1084 promises that what a thread's agent does with the owner's authority stays visible to the
|
||||
owner: its decisions, inbox entries, claims, tasks and project files. FED R6 shows users the same list word
|
||||
for word. Today a thread run's `role.claim` writes `thread_claims` only and returns at broker.mjs:2682. The
|
||||
`agents` verb (:3309) reads `role_claims` only, and no other owner verb shows thread claims. So the owner
|
||||
can't see a thread agent's claim.
|
||||
|
||||
Mos ruled this a 10-27 row, not post-v1 (mos-1262). No user thread goes live before it lands, the same
|
||||
bind as the 193b1a filter. Q176 Case 1 ("Shared and private agent sessions available per user; RBAC")
|
||||
needs it. If it can't make 10-27, that's a scope question for Jason, and it goes to Mos first.
|
||||
|
||||
## Brief: the owner sees thread claims
|
||||
|
||||
Chained on row 205 (193b1a). Start from refactor after 205 lands.
|
||||
|
||||
What to build:
|
||||
|
||||
1. A human or reader session's `agents` result also lists every thread claim currently held in the
|
||||
business: thread id, holder run, harness and claim time. A claim counts as held when its thread's
|
||||
latest `thread_claims` op is `claim`. Role claim rows keep their current shape and order. Thread
|
||||
claim rows are added after them, marked so a reader can tell the two apart.
|
||||
2. A role session's `agents` result is unchanged.
|
||||
3. The rows carry no message content and no thread name a user wrote. The 205 filter still hides user
|
||||
messages. This row adds claims only.
|
||||
4. The CLI's `agents` output (packages/cli format.mjs reads `c.role` and `holder_run`) shows the thread
|
||||
rows without breaking the role rows.
|
||||
5. Row 205's governance pin (message-filter.test.mjs, the "claims" item) moves from `threadsState` to the
|
||||
owner's `agents` call. Its comment naming this row goes away.
|
||||
|
||||
If the builder finds a cleaner shape, for example a separate owner verb, it goes in BUILD.md to Duckworth
|
||||
before code. A widening beyond owner and reader sessions goes to Mos (mos-1202).
|
||||
|
||||
Tests:
|
||||
|
||||
- Owner `agents` shows a held thread claim. After revoke or release, it doesn't.
|
||||
- A role session's `agents` result is byte-equal to before for the same store.
|
||||
- No message body or user-written thread text appears in the output.
|
||||
- The CLI renders a mixed list.
|
||||
|
||||
Mutants, each killed by a named test:
|
||||
|
||||
- M1. Thread rows dropped from the owner result.
|
||||
- M2. The held check reads the first op instead of the latest, so a released claim shows.
|
||||
- M3. Thread rows added to a role session's result.
|
||||
|
||||
Gate: Duckworth approves the manifest. The touched test files run whole, the bus and cli suites and every
|
||||
scripts/test-*.sh are green on Sage's gate, and the mutants are killed.
|
||||
|
||||
## Ruling on design r1 (sage-2487)
|
||||
|
||||
Duckworth approved Morgana's design r1 (3e9939b7b) as D1: a separate human and reader verb `thread.claims`,
|
||||
with `agents` unchanged, under conditions C1-C3 (duckworth-0118, agents/duckworth/work/row1782/DESIGN-r1.md
|
||||
at 13fb9abc5). The brief allowed that shape. Brief item 5's pin moves to `thread.claims`, as C3 records.
|
||||
Row 277 builds it.
|
||||
|
||||
The Console doesn't show thread claims under D1, and an owner who uses only the Console won't run
|
||||
`mosaic agents`. So PRD :1083-1084 isn't met until the Console shows them too. That's the follow-up brief
|
||||
below, with the same bind as row 277.
|
||||
|
||||
## Brief: the Console shows thread claims
|
||||
|
||||
Chained on row 277. Start from refactor after 277 lands.
|
||||
|
||||
What to build:
|
||||
|
||||
1. The Console's Agents view gets a "Thread claims" section for a human or reader session. It reads
|
||||
`thread.claims` and lists each held claim: thread id, holder run, harness and claim time.
|
||||
2. The existing role rows (webui public/bus.js :447, :462, :474) keep their shape, counts and order.
|
||||
3. No message body and no thread name a user wrote appears in the section.
|
||||
4. An empty result shows an empty-state line, not an error. A refusal from `thread.claims` shows the
|
||||
refusal and leaves the role rows intact.
|
||||
|
||||
Tests:
|
||||
|
||||
- The section lists a held claim and drops it after release.
|
||||
- Role rows and their counts are byte-equal to before for the same store.
|
||||
- No message body or user-written thread text in the rendered section.
|
||||
- A refused `thread.claims` call leaves the role rows rendered.
|
||||
|
||||
Mutants, each killed by a named test:
|
||||
|
||||
- M1. The section is not rendered.
|
||||
- M2. Thread claims are counted into the role totals.
|
||||
|
||||
Gate: Webby approves the manifest. The touched test files run whole, the webui and bus suites and every
|
||||
scripts/test-*.sh are green on Sage's gate, and the mutants are killed. No user thread goes live before this
|
||||
row lands.
|
||||
@@ -1,61 +0,0 @@
|
||||
# The bus tests' scratch sshd proves it owns its port (194 gate follow-up, MVP)
|
||||
|
||||
Sage, 2026-10-22, for mos-1270. Row 194 b16's gate found it (honker-0125), and Honker's diagnosis placed it
|
||||
on the base (honker-0127).
|
||||
|
||||
## Why
|
||||
|
||||
`sshd()` in packages/bus/tests/grant-executor.test.mjs (:57-97, from row 249, 9de5a57ab) and the same
|
||||
helper in packages/bus/tests/host-run.test.mjs (:79-97) pick a port with
|
||||
`20000 + Math.floor(Math.random() * 20000)`, start sshd on it, and return the port as soon as
|
||||
`listening(port)` connects. This host's ephemeral range is 32768-60999, so about a third of the picks fall
|
||||
inside it.
|
||||
|
||||
Honker's diagnosis run hung on base ceadad993, with no row 194 code, in G23 at :433. sshd.log said "Bind to
|
||||
port 38927 on 127.0.0.1 failed: Address already in use", and the sshd child had exited 255. Even so,
|
||||
`listening(port)` had returned true, so the helper returned a port that our sshd never held. The install
|
||||
never reached our sshd (no requests.log), the hold-add stub never wrote `holding`, and the first `until`
|
||||
timed out at 10 s. Row 194's G13 red at :733 has the same shape. The connect that succeeded was either a
|
||||
short-lived foreign listener or a TCP self-connect, which can succeed with no listener at all when the
|
||||
source port equals the destination port. Both need a port inside the ephemeral range. Live is 86f95bb27 and
|
||||
nothing running uses these helpers. This is a test defect, not a product defect.
|
||||
|
||||
## Brief: the scratch sshd's port is ours before a test uses it
|
||||
|
||||
No `--after`. This row lands before row 194 b17, which rebases onto it and reruns its gate whole
|
||||
(mos-1270 item 3, the same order as row 279).
|
||||
|
||||
What to build, in both helpers:
|
||||
|
||||
1. The helper returns a port only when our sshd holds it. A connect alone isn't enough. One shape:
|
||||
`daemon.exitCode === null` after `listening` returns true, plus sshd.log's "Server listening on
|
||||
127.0.0.1 port N" line. The builder picks the proof and records it in BUILD.md.
|
||||
2. A bind failure or an early sshd exit retries with a new port, within the existing attempt limit. When
|
||||
every attempt fails, the helper still throws 'scratch sshd did not start'. Never a skip.
|
||||
3. Ports come from outside the host's ephemeral range. Read /proc/sys/net/ipv4/ip_local_port_range rather
|
||||
than hard-coding 32768, and keep the pick at or above 1024.
|
||||
4. DEFERRED X5 binds this row because it touches grant-executor.test.mjs (DEFERRED.md, the "Grant executor
|
||||
test X5 starts a `sleep 30`" entry). The `run(['sleep', '30'])` that X5 starts and then revokes
|
||||
(grant-executor.test.mjs :989-990 at ceadad993) must not outlive its test. Use a stub that exits once its test dir is gone, as row 248 did for the hold stubs, or a shorter
|
||||
sleep. The builder picks and records it in BUILD.md. The DEFERRED entry gets a closing line naming this
|
||||
row.
|
||||
5. No product file changes. Nothing outside the two test files, plus a shared test helper if the builder
|
||||
moves `sshd()` into one, plus DEFERRED.md and the packet.
|
||||
|
||||
Tests:
|
||||
|
||||
- A regression: a port already held by a plain TCP listener the test opens is refused, and the helper
|
||||
retries and returns a different port that our sshd holds. The test may pass a port to the helper for this.
|
||||
- Every existing test in both files passes unchanged.
|
||||
- Repeat: each of the two files runs whole 30 times with the cli suite as load, with no timeout. Save the
|
||||
counts and durations.
|
||||
|
||||
Mutants, each killed by a named test:
|
||||
|
||||
- M1. The old acceptance: return the port on `listening(port)` alone.
|
||||
- M2. The old pick, `20000 + Math.floor(Math.random() * 20000)`. If no single run kills it, record the
|
||||
repeat counts and the reason, and Duckworth rules on it.
|
||||
|
||||
Gate: Duckworth approves the manifest. Both files run whole, the bus suite is green on Sage's gate, the
|
||||
30-run repeat has no timeout, and M1 is killed. Row 194 b17's full gate then runs on top of this row. Any red
|
||||
goes to Mos (mos-1270).
|
||||
@@ -1,24 +1,36 @@
|
||||
# Plan: Q175 phase 2 window, the live Console switches to --sso
|
||||
|
||||
Sage, 2026-10-22. Draft 3 for Mos, after mos-1266. It names 86f95bb27, live since 04:03:00Z on 10-22. Sources: `agents/sage/work/q175-sso/DESIGN.md` sections 5
|
||||
Sage, 2026-10-22. Draft 2 for Mos, after mos-1245. Sources: `agents/sage/work/q175-sso/DESIGN.md` sections 5
|
||||
and 10 (phase 2 order, rollback, Jason-gated steps), Mos's C1 condition (mos-0977, b416d2ede), Jason's phase 2
|
||||
answers (Q209, mos-1216, mos-1217), mos-1195, mos-1197 and mos-1245. Rows 192 (phase 1), 200 (`activate --sso`),
|
||||
its N1 follow-up and 273 (`activate --send` and `--no-sso`) have landed. Vikunja #412, Gitea #385.
|
||||
answers (Q209, mos-1216, mos-1217), mos-1195, mos-1197 and mos-1245. Rows 192 (phase 1), 200 (`activate --sso`)
|
||||
and its N1 follow-up have landed. Vikunja #412, Gitea #385.
|
||||
|
||||
## The tool gap is closed
|
||||
## Blocked on a tool gap
|
||||
|
||||
Draft 2 found two missing `scripts/stack-release.sh` flags: `activate --send` and `activate --no-sso`. Row 273
|
||||
added both (mos-1246, F39). It landed as 0bbf0f6d1 (Gitea #1778), and the 86f95bb27 re-pin put it live
|
||||
(activation 20261022T040256Z-86f95bb27f6c). `--send` refuses unless the run's Console flags hold `--sso`,
|
||||
given or carried. `--no-sso` takes the Console flags from the rollback set of the activation that turned
|
||||
`--sso` on, and it drops `--send`. Neither flag ran in that re-pin, so step 5 and rollback 1 are their first
|
||||
live use. Darkwing's gate on 0bbf0f6d1 ran stack-release.test.mjs 218/218, including T53, T57 and T58.
|
||||
Two steps need `scripts/stack-release.sh` flags that don't exist at 02da6a2ae:
|
||||
|
||||
- `activate` has `--no-send` but no `--send`. The live pointer holds no `--send`: the 10-20 19:29:56Z
|
||||
re-pin of 490e2771d gave `--no-send`, and every activation since has carried it off. So step 5 can't turn
|
||||
`--send` on (mos-1195).
|
||||
- `activate` has no way to turn `--sso` off. Without `--sso`, `sso_base` carries it from the pointer
|
||||
(`sso: carried`), and `check_target` refuses the pointer's own copy as `already-active`. The pre-window
|
||||
flags (`--public-host`, `--auth-header`, `--allow-user`) have no activate option either. So R1's
|
||||
same-copy rollback can't run.
|
||||
|
||||
The fix is one small row, approved in mos-1246: `activate --send` and `activate --no-sso`. `--no-sso`
|
||||
takes the Console flags from the rollback set of the activation that turned `--sso` on, the way `sso_base`
|
||||
already does for a rollback to a copy without `--sso`. It drops `--send`, and its plan line says so. `--send`
|
||||
refuses unless the run's Console flags hold `--sso`, given or carried (F39). The cases for both go in
|
||||
`packages/cli/tests/stack-release.test.mjs`. F39 named test-release.sh, but that suite tests `release.sh`
|
||||
and never calls `stack-release.sh`, so it runs whole and unchanged. Darkwing builds it, and a seat other than Sage and Darkwing reviews it. Brief:
|
||||
`docs/plans/2026-10-22_activate-send-nosso.md`. It lands and is re-pinned before the window, on Mos's go,
|
||||
run by Jason or Mos. The steps below assume it, and draft 3 names the new copy.
|
||||
|
||||
## When
|
||||
|
||||
Only when Jason starts the window (mos-1197). Nothing below runs before his start. The re-pin condition is met:
|
||||
W12 passed on 86f95bb27 at 04:26:43Z on 10-22, and Mos closed that window in mos-1266. This plan names
|
||||
86f95bb27, which carries phase 1 and row 273, so its loader accepts a config with or without `console`. If another re-pin lands before
|
||||
Only when Jason starts the window (mos-1197). Nothing below runs before his start. The 10-24 re-pin
|
||||
condition is met: W12 passed on 7247d80c7 at 22:27:13Z (mos-1245). This plan names 7247d80c7, which already
|
||||
carries phase 1, so its loader accepts a config with or without `console`. If another re-pin lands before
|
||||
Jason starts, the plan names the copy live at that point, and step 3 runs against it.
|
||||
|
||||
## Who
|
||||
@@ -52,12 +64,12 @@ Jason starts, the plan names the copy live at that point, and step 3 runs agains
|
||||
`wc -l` is 1; `tr -cd '\r' <slot | wc -c` is 0; the last byte is a newline (`tail -c1 | od -An -c`).
|
||||
3. Straggler check (C1): list every running process, unit and timer that reads config.json, with the
|
||||
copy it runs from (`/proc/<pid>/exe` and cwd links, `systemctl --user list-units`, `list-timers`). Each one
|
||||
must run from 86f95bb27, or be shown never to re-read config. Step 4 waits until the list is clean.
|
||||
must run from 7247d80c7, or be shown never to re-read config. Step 4 waits until the list is clean.
|
||||
4. Config write 1 (agent, backup from step 1): add `console.sso` with the values above and one subject
|
||||
`{ "sub": "pending-first-sign-in", "name": "jason.woltje" }`. `scripts/mosaic-config.mjs validate`
|
||||
reads it back before anything starts.
|
||||
5. First `scripts/stack-release.sh activate 86f95bb27 mosaic-stack --sso --send --plan`. Its from line must
|
||||
name 86f95bb27 (`--expect-from` is for `--units external` only, so the live user units refuse it as a
|
||||
5. First `scripts/stack-release.sh activate 7247d80c7 mosaic-stack --sso --send --plan`. Its from line must
|
||||
name 7247d80c7 (`--expect-from` is for `--units external` only, so the live user units refuse it as a
|
||||
usage error). Then the same command without `--plan`, the same way earlier re-pins handled the
|
||||
Console. The tester stays the private socket from row 196 (`--tester-socket`). The `--plan` output
|
||||
names every flag it drops (`--public-host`, `--auth-header`, `--allow-user`) and every flag it carries.
|
||||
@@ -96,16 +108,15 @@ Jason starts, the plan names the copy live at that point, and step 3 runs agains
|
||||
|
||||
## Rollback
|
||||
|
||||
1. Same-copy re-activate (mos-1245 R1): `scripts/stack-release.sh activate 86f95bb27 mosaic-stack --no-sso
|
||||
1. Same-copy re-activate (mos-1245 R1): `scripts/stack-release.sh activate 7247d80c7 mosaic-stack --no-sso
|
||||
--plan`, then the same without `--plan`. R1 asked for `--expect-from 7247d80c7`, but `--expect-from` is
|
||||
for `--units external` only and the live units are user units, so the plan's from line must name
|
||||
86f95bb27 instead. The `--plan` output must show the pre-window Console flags from the step 1 pointer backup: `--port 7332 --public-host
|
||||
7247d80c7 instead. The `--plan` output must show the pre-window Console flags from the step 1 pointer backup: `--port 7332 --public-host
|
||||
mosaic.woltje.com --auth-header X-authentik-username --allow-user jason.woltje --tester-socket`, exactly.
|
||||
`--no-sso` drops `--send` (mos-1246 F39), so there's no `--send`. A plan that differs is a stop. Mos or Jason restarts the Console.
|
||||
2. Restore config.json from the step 1 backup, which removes `console`. 86f95bb27 loads config with or
|
||||
2. Restore config.json from the step 1 backup, which removes `console`. 7247d80c7 loads config with or
|
||||
without the key, so the order of 1 and 2 doesn't matter on this copy.
|
||||
3. STATE after the rollback reads config.json, the unit's Console flags and the pointer.
|
||||
4. Last resort only, and it goes to Mos first: `scripts/stack-release.sh rollback` goes to the previous
|
||||
distinct copy, 7247d80c7. Both copies are at schema 3j and 7247d80c7 carries phase 1, so it's a pointer
|
||||
flip with no `--restore`. Its `--plan` must show the pre-window Console flags above. Any restore goes to
|
||||
Mos and ends the window (mos-1226).
|
||||
4. Last resort only, and it waits for Jason: `scripts/stack-release.sh rollback` goes to the previous
|
||||
distinct copy, 4429a104f at schema 3i. The store has been at 3j since 21:59Z on 10-21, so that rollback
|
||||
needs `--restore`, and any events after the backup make it Jason's call (header condition 3).
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# stopRun reads a live run's status at the deadline (191 follow-up, MVP)
|
||||
|
||||
Sage, 2026-10-22, for mos-1269. Row 194 b15's gate found it (honker-0121, sage-2510).
|
||||
|
||||
## Why
|
||||
|
||||
`stopRun` in packages/processing-control/src/runtimes.mjs (row 191, 4bdc7e0e8) waits in
|
||||
`while (now() <= deadline)` (:333). Its final status read is inside `if (now() >= deadline)` (:356-359),
|
||||
and the loop sleeps `Math.min(20, Math.max(1, deadline - now()))` (:361). A real sleep can wake past the
|
||||
deadline. When it does, the loop condition fails before the final read runs, and :363 returns `'unknown'`
|
||||
for a process that is still alive and ignoring SIGTERM and SIGKILL. The expected outcome is `'alive'`.
|
||||
|
||||
Row 194's T9a (cli lifecycle.test.mjs:562) caught it in the loaded cli suite: 'unknown' where 'alive' was
|
||||
expected, while the same file passed alone. Row 191's tests missed it because their fake clock advances by
|
||||
exactly the sleep, so it never overshoots. Live is 86f95bb27, which doesn't carry 191, so nothing running
|
||||
is affected.
|
||||
|
||||
## Brief: stopRun's deadline branch is the only time exit
|
||||
|
||||
No `--after`. 191 has landed. This row lands before row 194 b16, which rebases onto it (mos-1269 item 4).
|
||||
|
||||
What to build:
|
||||
|
||||
1. The time loop's only exit on time is the existing deadline branch, so the final status read always runs
|
||||
once the deadline passes. One shape is `for (;;)` with the `now() >= deadline` branch as the time exit.
|
||||
The builder picks the shape and records it in BUILD.md.
|
||||
2. The other exits stay as they are: record gone (the catch), identity changed, ended or not alive, and the
|
||||
deadline branch's own mapping of `alive`, `killed`, `stopped`, `identity-changed` and `unknown`.
|
||||
3. Nothing else in runtimes.mjs changes. Vikunja 502's four items stay out (mos-1269 item 3). They follow
|
||||
row 194.
|
||||
|
||||
Tests:
|
||||
|
||||
- A fake sleep advances the clock past the deadline while the process stays alive and ignores both
|
||||
signals. stopRun reports `'alive'`.
|
||||
- The existing stop-run tests pass unchanged.
|
||||
|
||||
Mutants, each killed by a named test:
|
||||
|
||||
- M1. The old loop condition `while (now() <= deadline)` with the fall-through `return finish('unknown')`.
|
||||
|
||||
Gate: Dewey approves the manifest. The processing-control package's tests (runtimes.test.mjs and
|
||||
stop-run.test.mjs among them) and every other touched test file run whole, the business and cli suites are
|
||||
green on Sage's gate, and M1 is killed. Row 194 b16's full gate then runs on top of this row. Any red goes to
|
||||
Mos (mos-1269).
|
||||
@@ -319,10 +319,6 @@ at every gate. Started 2026-09-12 during the control board MVP.
|
||||
waits 30 s before it calls a lone `sleep 30` a leak. The row 197
|
||||
lanes scan only at lane end, about 15 minutes after pkg-bus, so they
|
||||
can't see it (mos-1169). (2026-10-21)
|
||||
Closing note, row 280 (2026-10-22): both scratch sshd fixtures install a
|
||||
bounded 30/60-second sleep stub that exits when its test directory is gone;
|
||||
other sleep arguments exec /usr/bin/sleep unchanged. Evidence is recorded
|
||||
in agents/rocko/work/queue-280/BUILD.md.
|
||||
|
||||
- **Row 66 live checks: the unslop notice on a live managed session, both harnesses.**
|
||||
(mos-1186, Vikunja #454.) Row 66's gate asked for one landing session per
|
||||
|
||||
+8
-13
@@ -33,7 +33,7 @@ Gaps found while working go to `docs/plans/DEFERRED.md`, not here.
|
||||
|
||||
<!-- mosaic-queue:begin -->
|
||||
|
||||
Generated from `docs/plans/queue.json` revision 3162 by `queue render`. Do not edit between the markers; change the queue with `scripts/mosaic queue`.
|
||||
Generated from `docs/plans/queue.json` revision 3102 by `queue render`. Do not edit between the markers; change the queue with `scripts/mosaic queue`.
|
||||
|
||||
| # | Piece | Owner | Issues | State | After | Gate | Brief | Note |
|
||||
|---|---|---|---|---|---|---|---|---|
|
||||
@@ -227,10 +227,10 @@ Generated from `docs/plans/queue.json` revision 3162 by `queue render`. Do not e
|
||||
| 188 | stack-release tests: a carried proof pair and a proof file inside the repository (P19 409, 410; gates Part B) | darkwing; reviewers filbert | #1686 | done | 187 settled | Filbert approves the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the brief mutants killed (sage) | `docs/plans/2026-10-20_proof-test-gaps.md` § Brief: tests for the two proof-file paths row 187 left open | Landed 8fc0ee216 (author Darkwing) on 23a609c5c; patch-id c9a56b167c07 matches candidate 86aa549bad75 and Filbert's r1 reading; stack-release.sh blob 2586a2a37cd2 unchanged. Sage gate passed 10:58Z: cli 453/453 and every package and scripts/test-*.sh green. Filbert approve 29433, rev 2212; N1 (REPO logical path) to P19 after Part B (mos-0959). |
|
||||
| 189 | stack-release activate --no-send drops the Console's --send and keeps the pointer in step (Q175 interim, mos-0972, P19 413) | sage; reviewers dewey | #1687 | done | 163 done | Dewey approves the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the brief mutants killed (sage) | `docs/plans/2026-10-20_activate-no-send.md` § Brief: activate --no-send drops the Console's --send | Landed ace27dc5e on refactor (cherry-pick of candidate d6116771f onto a4a42dbac). Gate GATE_PASSED on 0c177e9ef (base 0217b71c8), 2026-10-20T19:09:37Z-19:20:36Z, 25 suites rc=0. patch-id ce89378718f6 for both 0c177e9ef and ace27dc5e; range-diff differs only in the message. Landed manifest hashes to 67af69bd (Dewey approve 29485). Base drift 0217b71c8..a4a42dbac: 7 doc/README files, none on manifest paths, no test reads them. Brief re-pinned to blob 29a9e6d2d. |
|
||||
| 190 | several Mosaic Stack instances on one host: per-instance config, data root, units and ports (MVP T1.1, mos-0974, Vikunja #414) | darkwing; reviewers filbert | #1688 | done | — | Filbert approves DESIGN.md then the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the design mutants killed (sage) | `docs/plans/2026-10-20_multi-instance.md` § Brief: several Mosaic Stack instances on one host | Landed 00d4cc1f6 on refactor (base 99a406ed3). Patch-id 5ec610a7 matches git diff 176a6bf4b..df65a3d4c on the 25 manifest paths. Manifest cc0ea9e8, Filbert approve r3 29713. Gate on d0bbc5c1c: packages 2664/0, scripts 429/0. Mutants 20/20. Unpushed. |
|
||||
| 191 | one kill switch for the bus, every run, Discord and new launches, from the CLI and the Console (MVP T1.4, mos-0974, Vikunja #414) | rocko; reviewers dewey | #1689 | done | — | Dewey approves DESIGN.md then the manifest; cli, bus, discord and webui suites and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_kill-switch.md` § Brief: one kill switch for the bus, every run, Discord and new launches | Landed 0fa7bf421 fast-forward on 86f95bb27 (10 commits, 89 paths; manifest 0bcbf337 = 88 paths without BUILD.md). Dewey manifest APPROVE c30359 rev 3118. Gate: 77 mutants killed (75 assert + SR08, KS54 timeout with controls), suites green on Sage's window; N7 closed by runs suite 43/0/0 on 0fa7bf421. N6, clock fix, :52 assertion, generic cause go to Vikunja 502 (mos-1267/1268). Rebase next: 205, 236, 194, 253, 274, 268. |
|
||||
| 191 | one kill switch for the bus, every run, Discord and new launches, from the CLI and the Console (MVP T1.4, mos-0974, Vikunja #414) | rocko; reviewers dewey | #1689 | in-progress | — | Dewey approves DESIGN.md then the manifest; cli, bus, discord and webui suites and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_kill-switch.md` § Brief: one kill switch for the bus, every run, Discord and new launches | — |
|
||||
| 192 | Q175 phase 1: the Console verifies SSO itself (--sso), OIDC RP with oauth4webapi 3.8.8, no live change (MVP T1.2, #412) | launchpad; reviewers webby | #1690 | done | — | Webby approves the manifest; webui and cli suites, scripts/test-config.sh and every scripts/test-*.sh green on Sage's gate; design section 9 mutants killed (sage) | `docs/plans/2026-10-20_sso-phase1.md` § Brief: Q175 phase 1, the Console verifies SSO itself (--sso) | Landed 4429a104f on refactor (squash of launchpad/row192 53bb59462..37582e820, round 2 manifest 6f8cee14...7787). patch-id 4a4869026 matches the reviewed diff on all 18 paths. Gate on 088087ac9: package suites 2758/0, scripts 429/0, mutants 22 of 23 killed (#23 equivalent, sage-1407). npm ci in canonical, oauth4webapi 3.8.8. Live re-pin is a window with Mos (mos-1099 item 3). |
|
||||
| 193 | many humans per business, human roles, private and shared threads, one access.json store (MVP T1.3, Vikunja #414/#415) | morgana; reviewers duckworth | #1691 | in-progress | — | Duckworth approves DESIGN.md then the manifest; bus, business, cli and webui suites and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-users.md` § Brief: many humans per business, human roles, private and shared threads | — |
|
||||
| 194 | agent lifecycle from the Console and the CLI (create, launch, terminate, regenerate, delete) with a per-agent hire/fire veto (MVP T1.5, Vikunja #414/#415) | honker; reviewers webby | #1692 | done | — | Webby approves DESIGN.md then the manifest; bus, cli, business and webui suites and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_agent-lifecycle.md` § Brief: agent lifecycle from the Console and the CLI, with a per-agent hire/fire veto | Landed fd6dd327c on refactor, a fast-forward on e122aad8e. b18 is b17 3f451772d rebased: 16 commits =, series patch-id 64303253f8e6, packages equal b17. Webby approve webby-0120 on manifest 29f131ab. Honker gate on fd6dd327c: runb8 39 files 503/0/0, mutants 17/17; gate.sh 18 packages 3668/0, ten scripts rc=0, Docker up, skips environment-only and named. Overlap with 13 and 257 clean. #1692 closed. |
|
||||
| 194 | agent lifecycle from the Console and the CLI (create, launch, terminate, regenerate, delete) with a per-agent hire/fire veto (MVP T1.5, Vikunja #414/#415) | honker; reviewers webby | #1692 | in-progress | — | Webby approves DESIGN.md then the manifest; bus, cli, business and webui suites and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_agent-lifecycle.md` § Brief: agent lifecycle from the Console and the CLI, with a per-agent hire/fire veto | sage-1610 (honker-0049): a human add takes tracker {bot, botId}, required for a vikunja definition, refused otherwise, checked by checkBot and bot uniqueness; CLI and API only. Delete accepts a tracker bot when all credentials are store refs, and its result names the bot for removal by hand in Vikunja. No Vikunja account is created (Q188 untouched). Mutants: drop the requirement, refuse the bot on delete, skip checkBot on add. |
|
||||
| 195 | row 195: the Case 1 install on 10.1.1.53 as mosaic under /srv/mosaic, reusing C2-13's scripts by input under row 190's canon (Q181, Q182/Q183, Q185; ops-01 root steps under #423 step 1) | darkwing; reviewers duckworth | #1693 | done | 190 done, 226 done, 233 done | Duckworth approves DESIGN.md then the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_hub-own-uid.md` § Brief: the Case 1 install on 10.1.1.53 (row 195) | LANDED b65014647 (pushed 361ba2387 tip). Patch-id 656e43ff25de = 4ced5e63d..37171f65b; verify-commit ok, 5 paths. Combined gate with 213 on 38b83ea5c+paths 09:45:52-09:57:52Z: business 200/0 bus 542/0 harness 140/0 cli 663/0, all 10 scripts green, L1 killed. N1-N3 to DEFERRED next; follow-up darkwing/row195-n1 1e3c4767c. |
|
||||
| 196 | the human boundary across uids and humans: Console, tester listener, broker.sock and the path-bound human proof (P19 333, before federation R3, mos-0989) | gander; reviewers duckworth | #1694 | done | — | Duckworth approves DESIGN.md then the manifest; bus, webui and cli suites and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-boundary.md` § Brief: the human boundary across uids and humans (P19 333) | Landed 7247d80c7 on 666173292: 39 manifest paths of 527b9a1e6 (CANDIDATE.sha256 537d30ae), patch-id 6f3777d593e6 matches f48725cfc..527b9a1e6 on the manifest, blob diff empty, tree matches merge-tree. Gate gander-0066 2334/0/1, all 10 shells, 38/38 mutants. Approved rev 2973 and rev 2986 (Duckworth, c30156). Overlap: 202 cli README and 194 Honker branches rebase onto it. BUILD-LOG and C1 DEFERRED follow doc-only. |
|
||||
| 197 | a second gate lane: two full gates at once on dragon-lin, design first (mos-0977 item 6) | herb; reviewers webby | #1695 | done | — | Webby approves DESIGN.md then the manifest; cli suite and every scripts/test-*.sh green on Sage's gate, singly and in the two-lane proof (sage) | `docs/plans/2026-10-20_second-gate-lane.md` § Brief: a second gate lane, two full gates at once on dragon-lin | Landed a36523713 on refactor (base 5afff5490, pushed 18:40Z): Herb's c45ddeb6b cherry-picked. Range-diff = (only the cherry-pick line), patch-id 79c46b98c685 equals c45ddeb6b and candidate A d2de56bd2; 37 paths equal, marker test absent (mos-1174 check). Proof 6 PROOF_PASSED 18:40:06Z, sage-r197p6: 8 waves 26/26 steps, cb A 124 B 125, probe ok, no event or cleanup errors, final CLEAR/CLEAR. Webby approved r8 (rev 2867). |
|
||||
@@ -238,10 +238,10 @@ Generated from `docs/plans/queue.json` revision 3162 by `queue render`. Do not e
|
||||
| 199 | MVP T1 item 6: a credential store per agent, own git identity, pushes to a remote (G11, G13; mos-0974) | megavolt; reviewers duckworth | #1697 | done | — | Duckworth approves DESIGN.md; Mos rules on the authority model; Duckworth approves the manifest; bus, business, cli and tasks suites and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_agent-credentials.md` § Brief: a credential store per agent, own git identity, pushes to a remote | Landed cb5fdb064 on refactor (base 76134dfde), pushed. Patch-id 828fa21a matches git diff 00d4cc1f6..86963d281 on the 37 manifest paths; docs/TOOLS.md 3-way with row 200, hunk unchanged. Manifest 35f900fd, Duckworth approve r1 29779. Gate on 9e1085816+patch: packages 2735/0, scripts 429/0; landed blobs equal the gate tree. |
|
||||
| 200 | stack-release.sh activate --sso for the Q175 phase 2 window (row 192 F3; chained on 192) | launchpad; reviewers webby | #1698 | done | — | Webby approves the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_stack-release-sso.md` § Brief: stack-release.sh activates a Console with --sso (Q175 phase 2 prerequisite) | Landed 9e1085816 on refactor (base 722136772), pushed. Patch-id 7ebfa6a5 matches git diff 00d4cc1f6..9df40878f on the 3 manifest paths. Manifest b3ead55c, Webby approve r3 29772. Gate on 9df40878f: packages 2675/0, scripts 429/0. Mutants 13/14, M12 ruled equivalent (sage-1446). |
|
||||
| 201 | FED R1: access.json loader and validator, and covers (#414) | gizmoduck; reviewers duckworth | #1699 | done | — | Duckworth approves the manifest; business suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_federation-r1-r2-r5.md` § Brief: FED R1, the access.json loader and validator | Landed afad4993f on refactor (squash of gizmoduck ae3c36f24..44e36fc4c, manifest 225597146daf...0c520). patch-id ba604ad5e matches the reviewed diff on all 3 paths. Gate on 44e36fc4c in the slot (gizmoduck-0060): business 173/0, 10 scripts 422/0, mutants 44/44. Duckworth approve 29581. |
|
||||
| 202 | FED R5: mosaic access list, grant and revoke (#414) | quackerjack; reviewers duckworth | #1700 | done | — | Duckworth approves the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_federation-r1-r2-r5.md` § Brief: FED R5, mosaic access list, grant and revoke | Chained on row 201's candidate (Q177), not its done: claimable now, lands after 201 and rebases onto its landing (Sage) |
|
||||
| 202 | FED R5: mosaic access list, grant and revoke (#414) | quackerjack; reviewers duckworth | #1700 | in-review, round 2, request posted | — | Duckworth approves the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_federation-r1-r2-r5.md` § Brief: FED R5, mosaic access list, grant and revoke | Chained on row 201's candidate (Q177), not its done: claimable now, lands after 201 and rebases onto its landing (Sage) |
|
||||
| 203 | FED R2: the federation key in the system config (#414) | quackerjack; reviewers webby | #1701 | briefed | — | Webby approves the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_federation-r1-r2-r5.md` § Brief: FED R2, the federation key in the system config | Chained on row 192's candidate (Q177): starts on 192's candidate, lands after 192 (Sage) |
|
||||
| 204 | 193a: access level check widened to viewer (#1691) | morgana; reviewers duckworth | #1702 | done | — | Duckworth approves the manifest; business suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-users-build.md` § Brief: 193a, the access level check widened to viewer | Landed d0bbc5c1c on refactor (base c9f374284). Patch-id 92c18aea matches git diff 44e36fc4c..f869fd062 on the 3 manifest paths. Manifest d38de8c9, Duckworth approve 29595. Gate 2789/0 on 4385b9ec1, mutants 7/7. Unpushed. |
|
||||
| 205 | 193b1a: the message filter (#1703; FED R3 and 193b1b build on it) | morgana; reviewers duckworth | #1703 | done | 196 done | Duckworth approves the manifest; bus suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-users-build.md` § Brief: 193b1a, the message filter | Landed ce6a96ad6 fast-forward on 0fa7bf421 (3 commits, 4 paths, manifest 858463b1). Duckworth APPROVE r1 c30375 (signed :124 test diff, mos-1262). Gate: Morgana slot205 10 files, bus 652/0, M1 M11-M14 killed, 0 skips; Sage test-*.sh 10/10, 3 by-design skips. N1/N3 to 205b or R3, N2 to 193b2 brief, N4 = #1782 before any user thread. Rebase next: 268 r4, 194, 236, 253, 274. |
|
||||
| 205 | 193b1a: the message filter (#1703; FED R3 and 193b1b build on it) | morgana; reviewers duckworth | #1703 | briefed | 196 done | Duckworth approves the manifest; bus suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-users-build.md` § Brief: 193b1a, the message filter | — |
|
||||
| 206 | 193b2: thread shares, schema 3k-3l after the #436b build (#1691; live needs a --migrate window with Jason) | morgana; reviewers duckworth | #1704 | queued | 205 done, 234 done, 236 done, 275 done | Duckworth approves the manifest; bus suite, cli suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-users-build.md` § Brief: 193b2, thread shares (schema 3l) | — |
|
||||
| 207 | 193c: mosaic access user verbs and --level viewer (#1691) | morgana; reviewers duckworth | #1705 | queued | 202 done | Duckworth approves the manifest; cli suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-users-build.md` § Brief: 193c, mosaic access user verbs and --level viewer | — |
|
||||
| 208 | 193d: Console shared list, share controls and viewer read-only (#1691; also after FED R6 when filed) | morgana; reviewers duckworth | #1706 | queued | 192 done, 206 done | Duckworth approves the manifest; webui suite and every scripts/test-*.sh green on Sage's gate; the mutants killed (sage) | `docs/plans/2026-10-20_human-users-build.md` § Brief: 193d, the Console's shared list, share controls and viewer read-only | — |
|
||||
@@ -304,19 +304,14 @@ Generated from `docs/plans/queue.json` revision 3162 by `queue render`. Do not e
|
||||
| 265 | Case 2 C2-09b rooms: room.open, room.send with @tags, room.read | rocko; reviewers dewey | #1770 | queued | 219 done | Dewey approves the manifest. The brief's tests run whole plus the bus suite and every touched suite on Sage's slot. Grep for hash pins on changed files before in-review. (sage) | `docs/plans/2026-10-20_case2-rows.md` § C2-09b rooms: room.open, room.send with @tags, room.read | — |
|
||||
| 266 | Case 2 C2-10c Console room view: merged timeline and @name completion | researcher; reviewers dewey | #1771 | queued | 225 done, 265 done | Dewey approves the manifest. The webui suite is green on Sage's gate, along with every touched suite. Grep for hash pins on changed files before in-review. (sage) | `docs/plans/2026-10-20_case2-rows.md` § C2-10c Console room view: merged timeline and @name completion | Haiku high subagent under decision 129. |
|
||||
| 267 | Case 2 C2-15 hybrid universes: exclusions, pins and the end-to-end crossover | morgana; reviewers filbert | #1772 | queued | 216 done, 217 done, 224 done | Filbert approves the manifest. The brief's tests and the end-to-end crossover run whole plus every touched suite on Sage's slot. Grep for hash pins on changed files before in-review. (sage) | `docs/plans/2026-10-20_case2-rows.md` § C2-15 hybrid universes: exclusions, pins and the end-to-end crossover | R8 accepted (sage-2218). Webby's R8 noise note (gosalyn-0127) is for the builder. |
|
||||
| 268 | Case 2 C2-01c playground levels: universe-level prefixes and draft universes | gizmoduck; reviewers webby | #1773 | done | — | Webby approves the manifest. The brief's tests run whole plus the library suite and every touched suite on Sage's slot; the brief's gate grep over packages and docs/case2 finds no library-playground-outside-book. Grep for hash pins on changed files before in-review. (sage) | `docs/plans/2026-10-20_case2-rows.md` § C2-01c playground levels: universe-level prefixes and draft universes | Landed c27207f6e fast-forward on ce6a96ad6 (1 commit, 9 paths, digest caa0fa4e). r4 is a carry of r3 aca53c4f0: range-diff =, patch-id 2942acc8 equal, blobs equal. Webby APPROVE round 2 on ecd9b35eb stands; carries webby-0112 (r3) and webby-0113 (r4, notes 34e1ab2bf). Gate: Gizmoduck r4 rerun brief 14/14, library 83/83, business 209/209, 0 skips; gate grep empty. 194 rebases next (business.test.mjs). |
|
||||
| 268 | Case 2 C2-01c playground levels: universe-level prefixes and draft universes | gizmoduck; reviewers webby | #1773 | in-review, round 2, request posted | — | Webby approves the manifest. The brief's tests run whole plus the library suite and every touched suite on Sage's slot; the brief's gate grep over packages and docs/case2 finds no library-playground-outside-book. Grep for hash pins on changed files before in-review. (sage) | `docs/plans/2026-10-20_case2-rows.md` § C2-01c playground levels: universe-level prefixes and draft universes | MVP first claim (mos-1240). Lands before C2-05a (216) and C2-06 (217) read classify; if either has a candidate first, the change goes into it too (gosalyn-0134). Code library-playground-other-universe accepted (sage). |
|
||||
| 269 | 264b T1 item 7: per-session native store, workspace and single-writer fence | gizmoduck; reviewers duckworth | #1774 | briefed | 264 done | Duckworth approves this slice's manifest. Its design tests run whole plus every touched suite on Sage's slot, and its mutants are killed (RULINGS Q1). Tests T1 run half, T2 workspace and path mutants; whichever of 191 and 264b lands second wires 191's admission checks (Q5). (sage) | `docs/plans/2026-10-21_t1-sessions.md` § T1 item 7: independent sessions, compaction counts and clear context | — |
|
||||
| 270 | 264c T1 item 7: compaction count, exact for Pi | gizmoduck; reviewers duckworth | #1775 | briefed | 269 done | Duckworth approves this slice's manifest. Its design tests run whole plus every touched suite on Sage's slot, and its mutants are killed (RULINGS Q1). Test T3 Pi half; Claude shows unknown with the Vikunja 466 reason (Q6). (sage) | `docs/plans/2026-10-21_t1-sessions.md` § T1 item 7: independent sessions, compaction counts and clear context | — |
|
||||
| 271 | 264d T1 item 7: clear context through row 194's lifecycle stop | gizmoduck; reviewers duckworth | #1776 | briefed | 194 done, 269 done | Duckworth approves this slice's manifest. Its design tests run whole plus every touched suite on Sage's slot, and its mutants are killed (RULINGS Q1). Tests T4 and T6; rebased onto 194's landing with no 194 code copied (Q4). (sage) | `docs/plans/2026-10-21_t1-sessions.md` § T1 item 7: independent sessions, compaction counts and clear context | — |
|
||||
| 272 | 264e T1 item 7: mosaic session CLI and Console chooser | gizmoduck; reviewers duckworth | #1777 | briefed | 264 done | Duckworth approves this slice's manifest. Its design tests run whole plus every touched suite on Sage's slot, and its mutants are killed (RULINGS Q1). Tests T5 legacy single human and T7 Console half; controls for unlanded verbs refuse with a reason (Q1, Q7). (sage) | `docs/plans/2026-10-21_t1-sessions.md` § T1 item 7: independent sessions, compaction counts and clear context | — |
|
||||
| 273 | Q175 phase 2: stack-release.sh activate --send and --no-sso (F39, mos-1246) | darkwing; reviewers filbert | #1778 | done | — | Filbert approves the manifest. stack-release.test.mjs and stack-release-external.test.mjs run whole plus scripts/test-release.sh on Sage's slot, and the brief's mutants are killed. (sage) | `docs/plans/2026-10-22_activate-send-nosso.md` § Brief: activate --send and --no-sso | landed 0bbf0f6d1 03:35:55Z, FF of 378a76b85; rebase of cac7d0f67, 6 range-diff pairs =, patch-ids equal, manifest e1031023 unchanged. Gate by Darkwing on 0bbf0f6d1: stack-release.test 218/218, external 25/25, test-release.sh rc 0, T58 c0 pass c1 fail, M1-M7 killed. Filbert APPROVE rev 3111 c30308, carry c30319. Docs 5365adaef (TOOLS.md N1 + BUILD-LOG). #1778. |
|
||||
| 274 | FED R3: broker user principal (#414) | morgana; reviewers dewey | #1779 | in-progress | — | Dewey approves the manifest. The bus and harness suites and every scripts/test-*.sh are green on Sage's gate, and the mutants are killed. (sage) | `docs/plans/2026-10-22_federation-r3.md` § Brief: FED R3, the broker user principal | — |
|
||||
| 273 | Q175 phase 2: stack-release.sh activate --send and --no-sso (F39, mos-1246) | darkwing; reviewers filbert | #1778 | briefed | — | Filbert approves the manifest. stack-release.test.mjs and stack-release-external.test.mjs run whole plus scripts/test-release.sh on Sage's slot, and the brief's mutants are killed. (sage) | `docs/plans/2026-10-22_activate-send-nosso.md` § Brief: activate --send and --no-sso | — |
|
||||
| 274 | FED R3: broker user principal (#414) | morgana; reviewers dewey | #1779 | briefed | — | Dewey approves the manifest. The bus and harness suites and every scripts/test-*.sh are green on Sage's gate, and the mutants are killed. (sage) | `docs/plans/2026-10-22_federation-r3.md` § Brief: FED R3, the broker user principal | — |
|
||||
| 275 | 193b1b: viewer verbs and board refusals (also after FED R4 when filed) | morgana; reviewers duckworth | #1780 | briefed | 205 done, 274 done | Duckworth approves the manifest. The bus suite and every scripts/test-*.sh are green on Sage's gate, and the mutants are killed. (sage) | `docs/plans/2026-10-20_human-users-build.md` § Brief: 193b1b, viewer verbs and board refusals | — |
|
||||
| 276 | Row 253 F5: supervise the legacy AS_USER talk and diagnostics in the case scripts | gander; reviewers duckworth | #1781 | briefed | 253 done | Duckworth approves the manifest. The touched test files run whole, every scripts/test-*.sh is green on Sage's gate, and the mutants are killed. (sage) | `docs/plans/2026-10-22_case-sudo-legacy-followup.md` § Brief: supervised legacy AS_USER calls | — |
|
||||
| 277 | The owner sees a thread agent's claims: an owner or reader read lists held thread claims (10-27, mos-1262; no user thread live before it) | morgana; reviewers duckworth | #1782 | in-progress | 205 done | Duckworth approves the manifest. The touched test files run whole, the bus and cli suites and every scripts/test-*.sh are green on Sage's gate, and the mutants are killed. (sage) | `docs/plans/2026-10-22_owner-thread-claims.md` § Brief: the owner sees thread claims | — |
|
||||
| 278 | The Console Agents view shows thread claims (follow-up to row 277; no user thread live before it) | gander; reviewers webby | #1783 | briefed | 277 done | Webby approves the manifest. The touched test files run whole, the webui and bus suites and every scripts/test-*.sh are green on Sage's gate, and the mutants are killed. (sage) | `docs/plans/2026-10-22_owner-thread-claims.md` § Brief: the Console shows thread claims | — |
|
||||
| 279 | stopRun reads a live run's status at the deadline: the deadline branch is the only time exit (191 follow-up, MVP, mos-1269; lands before 194 b16) | rocko; reviewers dewey | #1784 | done | — | Dewey approves the manifest. The processing-control package's tests and every other touched test file run whole, the business and cli suites are green on Sage's gate, and M1 is killed. (sage) | `docs/plans/2026-10-22_stoprun-deadline.md` § Brief: stopRun's deadline branch is the only time exit | LANDED ceadad993 (carry of cad927137 onto 343b6dd76: range-diff 1:= 2:=, patch-ids 6d8ae7f4/e484c297 equal, Dewey APPROVE dewey-0809 c30409 + carry). Fix: stopRun loop is for(;;), deadline branch is the only time exit. Sage gate green: business 209/0/0, cli 794/0/0, discord processing+stop 9/0/0; Rocko stop-run 13/13, processing-control 62/62, M1 killed. Overlap sweep clean (13, 257). Next: 194 b16 rebases onto it (mos-1269). |
|
||||
| 280 | Bus tests: the scratch sshd proves it owns its port (194 gate follow-up, MVP, mos-1270) | rocko; reviewers duckworth | #1785 | done | — | Duckworth approves the manifest. Both files run whole, the bus suite is green on Sage's gate, the 30-run repeat has no timeout, and M1 is killed. Row 194 b17's full gate then runs on top. Any red goes to Mos (mos-1270). (sage) | `docs/plans/2026-10-22_sshd-port-race.md` § Brief: the scratch sshd's port is ours before a test uses it | Landed b0fd28b6f 07:57:30Z, ff from da5d3651d: b765f5cb8 (Duckworth approve rev 3153, manifest 27806c05) + slim packet. Sage gate bus 656/0/0, ge 41, hr 26 (c30431). Repeat 2010/2010 under cli 1588/1588, no timeout; M1/M2 killed 4/4. Full evidence d6c924764 on rocko/row280-da5d-20261022. N2-N4 carry in BUILD.md. 194 b17 rebases on b0fd28b6f. |
|
||||
|
||||
<!-- mosaic-queue:end -->
|
||||
|
||||
|
||||
+43
-2055
File diff suppressed because one or more lines are too long
@@ -376,10 +376,6 @@ export class Broker {
|
||||
// credentialStatus is the runtime's metadata-only Credentials.status(); the broker never gets use().
|
||||
constructor({ store, businesses, secretCheck = () => {}, credentialStatus = () => [], organization = null, project = null, library = null, usage = null, limits = null, harnessOn = null, credentialVerbs = null, hostGrant = null, hostKeys = null, processing = null, testerOn = null, roleFile = null }) {
|
||||
if (!object(businesses) || !Object.keys(businesses).length) fail('invalid-business');
|
||||
// Row 194 b15 (sage-2501): the function-argument checks come before anything reads the store.
|
||||
if (harnessOn !== null && typeof harnessOn !== 'function') throw new TypeError('harnessOn must be a function');
|
||||
if (testerOn !== null && typeof testerOn !== 'function') throw new TypeError('testerOn must be a function');
|
||||
if (roleFile !== null && typeof roleFile !== 'function') throw new TypeError('roleFile must be a function');
|
||||
this.#businesses = structuredClone(businesses);
|
||||
this.#store = store;
|
||||
// A Broker is a trusted host startup, including in-process hosts. Never repair an existing state as off.
|
||||
@@ -403,13 +399,16 @@ export class Broker {
|
||||
// Row 65: harnessOn(business, name) is true when the organization file's plugins.harness switches
|
||||
// the harness on now; the bus runtime reads it live. Without it (the unit tests' brokers) a
|
||||
// module-shaped name passes and the launcher's own harness-off check is the only one.
|
||||
if (harnessOn !== null && typeof harnessOn !== 'function') throw new TypeError('harnessOn must be a function');
|
||||
this.#harnessOn = harnessOn ?? (() => true);
|
||||
// Row 194 (#1692, D4.1, B8): testerOn(business) is true when the organization file as it stands
|
||||
// sets bus.tester to exactly true; the bus runtime reads it live, so a hand edit counts at the next
|
||||
// tester lifecycle call and at the take. Without it the broker's own copy decides.
|
||||
if (testerOn !== null && typeof testerOn !== 'function') throw new TypeError('testerOn must be a function');
|
||||
this.#testerOn = testerOn ?? ((business) => this.#business(business).vars?.['bus.tester'] === true);
|
||||
// Row 194 (#1692, D2.3): roleFile(name) loads role definition `name` from the roles directory as it
|
||||
// stands, for the hire checks. Without it a hire refuses not-configured.
|
||||
if (roleFile !== null && typeof roleFile !== 'function') throw new TypeError('roleFile must be a function');
|
||||
this.#roleFile = roleFile;
|
||||
// Row 90 (#1584): the approved PRD's requirement ids. A bad requirements.json refuses here.
|
||||
this.#requirements = loadRequirements();
|
||||
@@ -708,22 +707,6 @@ export class Broker {
|
||||
#owner(s) {
|
||||
return s.tester ? 'tester' : s.human;
|
||||
}
|
||||
// Row 205 (193b1a, #1703, row 193 design 5.7): a message in a thread a user other than the caller
|
||||
// owns is hidden from trail and replies unless #readable holds. The business human's and the
|
||||
// tester's threads are never hidden, so row 177 is unchanged. A reader owns nothing.
|
||||
#hiddenMessage(s, id) {
|
||||
const t = this.#store.get(
|
||||
'SELECT t.* FROM message_threads mt JOIN threads t ON t.id=mt.thread WHERE mt.message=? AND t.business=?',
|
||||
id,
|
||||
s.business,
|
||||
);
|
||||
return Boolean(t) && t.owner.startsWith('user:') && t.owner !== this.#owner(s) && !this.#readable(s, t);
|
||||
}
|
||||
// Row 193 design 5.4. Rule 1 needs a share in force, and there is no thread_shares table before
|
||||
// 193b2 (schema 3j), so nobody reads another's thread yet. 193b2 adds the share rule and rules 2-4.
|
||||
#readable(s, t) {
|
||||
return false;
|
||||
}
|
||||
#agent(s) {
|
||||
if (s.tester) fail('tester-refused');
|
||||
if (s.reader) fail('read-only');
|
||||
@@ -4175,15 +4158,10 @@ export class Broker {
|
||||
identifier(a.id);
|
||||
if (!this.#store.get('SELECT id FROM messages WHERE id=? AND business=?', a.id, s.business))
|
||||
fail('message-not-found');
|
||||
// Row 205 (design 5.7): a hidden id fails as an unknown one does. Hidden replies are left out
|
||||
// in the query, so a page of them doesn't come back short; #readable is false until 193b2,
|
||||
// which adds the share exception to this clause too.
|
||||
if (this.#hiddenMessage(s, a.id)) fail('message-not-found');
|
||||
return this.#store.all(
|
||||
`SELECT * FROM messages m WHERE business=? AND in_reply_to=? AND NOT EXISTS(SELECT 1 FROM message_threads mt JOIN threads t ON t.id=mt.thread WHERE mt.message=m.id AND substr(t.owner,1,5)='user:' AND t.owner IS NOT ?) ORDER BY seq LIMIT ${REPLIES}`,
|
||||
`SELECT * FROM messages WHERE business=? AND in_reply_to=? ORDER BY seq LIMIT ${REPLIES}`,
|
||||
s.business,
|
||||
a.id,
|
||||
this.#owner(s) || null,
|
||||
);
|
||||
}
|
||||
default:
|
||||
@@ -4432,8 +4410,6 @@ export class Broker {
|
||||
for (const m of rows) this.#delivery(m.id, 'routed', h);
|
||||
}
|
||||
#trail(s, subject) {
|
||||
// Row 205 (design 5.7, sage-2288): a hidden subject answers exactly as an unknown id does.
|
||||
if (this.#hiddenMessage(s, subject)) return [];
|
||||
const rows = new Map();
|
||||
const add = (table, list) => {
|
||||
for (const row of list) {
|
||||
@@ -4515,18 +4491,6 @@ export class Broker {
|
||||
this.#store.all('SELECT * FROM role_claims WHERE business=? AND holder_run=?', s.business, run),
|
||||
);
|
||||
}
|
||||
// Row 205 (design 5.7): drop hidden messages, their deliveries and the events about them.
|
||||
// Decision rows and their events stay: the run's governance is the owner's to see.
|
||||
const hidden = new Set(
|
||||
[...rows.values()].filter((r) => r.table === 'messages' && this.#hiddenMessage(s, r.id)).map((r) => r.id),
|
||||
);
|
||||
for (const [key, r] of rows)
|
||||
if (
|
||||
(r.table === 'messages' && hidden.has(r.id)) ||
|
||||
(r.table === 'deliveries' && hidden.has(r.message)) ||
|
||||
(r.table === 'events' && hidden.has(r.subject))
|
||||
)
|
||||
rows.delete(key);
|
||||
return [...rows.values()].sort(
|
||||
(a, b) => a.at.localeCompare(b.at) || a.table.localeCompare(b.table) || a.seq - b.seq,
|
||||
);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// reaches another host.
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { execFileSync, spawn } from 'node:child_process';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { createServer } from 'node:net';
|
||||
import { connect } from 'node:net';
|
||||
import { appendFileSync, chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
||||
import { tmpdir, userInfo } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
@@ -19,8 +19,6 @@ import { hostExecutor, runHost } from '../src/host-run.mjs';
|
||||
import { Store } from '../src/store.mjs';
|
||||
import { grantDecision, hostRecord } from './host-fixtures.mjs';
|
||||
|
||||
import { ephemeralRange, installSleepStub, pickPort, startScratchSshd } from './scratch-sshd.mjs';
|
||||
|
||||
const SSHD = '/usr/bin/sshd';
|
||||
const USER = userInfo().username;
|
||||
const AT = '2026-10-21T00:00:00.000Z';
|
||||
@@ -37,7 +35,12 @@ const DEFINITIONS = {
|
||||
pm: { roleVersion: 2, credentials: [] },
|
||||
ops: { roleVersion: 2, credentials: [{ service: 'host' }] },
|
||||
};
|
||||
|
||||
const listening = (port) =>
|
||||
new Promise((resolve) => {
|
||||
const s = connect(port, '127.0.0.1');
|
||||
s.on('connect', () => (s.destroy(), resolve(true)));
|
||||
s.on('error', () => resolve(false));
|
||||
});
|
||||
async function until(fn, ms = 10000) {
|
||||
const end = Date.now() + ms;
|
||||
while (!fn()) {
|
||||
@@ -51,13 +54,12 @@ async function until(fn, ms = 10000) {
|
||||
// Both also stop when the test dir is gone, since a held stub on the sshd side outlives its test (#1750).
|
||||
// wrap.sh logs every request. The sudo stub logs its arguments to sudo.log and runs the command as the
|
||||
// test's user.
|
||||
async function sshd(t, dir, options) {
|
||||
async function sshd(t, dir) {
|
||||
if (!existsSync(SSHD)) throw new Error(`${SSHD} is missing: the executor tests need it and fail, never skip`);
|
||||
keygen(join(dir, 'hostkey'));
|
||||
keygen(join(dir, 'installer'));
|
||||
writeFileSync(join(dir, 'authorized_keys'), readFileSync(join(dir, 'installer.pub')), { mode: 0o600 });
|
||||
mkdirSync(join(dir, 'fake'));
|
||||
installSleepStub(dir);
|
||||
const stub = (name, body) => writeFileSync(join(dir, 'fake', name), `#!/bin/sh\nD='${dir}'\n${body}\n`, { mode: 0o755 });
|
||||
stub('list', '[ -e "$D/fail-list" ] && exit 1\n[ -e "$D/granted" ] && grep " mosaic-[0-9a-f]*$" "$D/granted"\nexit 0');
|
||||
stub(
|
||||
@@ -74,41 +76,25 @@ async function sshd(t, dir, options) {
|
||||
`#!/bin/sh\nprintf '%s\\n' "$SSH_ORIGINAL_COMMAND" >> '${dir}/requests.log'\nPATH=${dir}/fake:/usr/bin:/bin; export PATH\nexec /bin/sh -c "$SSH_ORIGINAL_COMMAND"\n`,
|
||||
{ mode: 0o755 },
|
||||
);
|
||||
return startScratchSshd(t, dir, [
|
||||
'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`,
|
||||
`AuthorizedKeysFile ${dir}/authorized_keys ${dir}/granted`, `PidFile ${dir}/sshd.pid`,
|
||||
'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
`ForceCommand ${dir}/wrap.sh`,
|
||||
], options);
|
||||
}
|
||||
|
||||
|
||||
test('row 280: an occupied TCP port is attempted, refused, and retried with our sshd', async t => {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'sshd280-'));
|
||||
t.after(() => rmSync(dir, { recursive: true, force: true }));
|
||||
const server = createServer(socket => socket.end());
|
||||
await new Promise((resolve, reject) => {
|
||||
server.once('error', reject);
|
||||
server.listen(0, '127.0.0.1', resolve);
|
||||
});
|
||||
t.after(() => new Promise(resolve => server.close(resolve)));
|
||||
const occupied = server.address().port;
|
||||
const port = await sshd(t, dir, { firstPort: occupied });
|
||||
assert.match(readFileSync(join(dir, 'sshd-0.conf'), 'utf8'), new RegExp(`^Port ${occupied}\\n`));
|
||||
assert.equal(readFileSync(join(dir, 'sshd-0.log'), 'utf8').includes(`Server listening on 127.0.0.1 port ${occupied}.`), false);
|
||||
assert.notEqual(port, occupied);
|
||||
assert.ok([1, 2, 3, 4].some(n => existsSync(join(dir, `sshd-${n}.log`)) &&
|
||||
readFileSync(join(dir, `sshd-${n}.log`), 'utf8').includes(`Server listening on 127.0.0.1 port ${port}.`)));
|
||||
});
|
||||
|
||||
test('row 280: every injected picker sample is unprivileged and outside the ephemeral range', () => {
|
||||
const [lo, hi] = ephemeralRange();
|
||||
for (const sample of [0, 0.25, 0.5, 0.6384, 0.75, 0.999999]) {
|
||||
const port = pickPort(() => sample);
|
||||
assert.ok(port >= 1024 && port <= 65535);
|
||||
assert.ok(port < lo || port > hi, `sample ${sample}: ${port} inside ${lo}-${hi}`);
|
||||
for (let attempt = 0; attempt < 5; attempt++) {
|
||||
const port = 20000 + Math.floor(Math.random() * 20000);
|
||||
writeFileSync(
|
||||
join(dir, 'sshd_config'),
|
||||
[`Port ${port}`, 'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`, `AuthorizedKeysFile ${dir}/authorized_keys ${dir}/granted`,
|
||||
`PidFile ${dir}/sshd.pid`, 'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
`ForceCommand ${dir}/wrap.sh`, ''].join('\n'),
|
||||
);
|
||||
const daemon = spawn(SSHD, ['-D', '-f', join(dir, 'sshd_config'), '-E', join(dir, 'sshd.log')], { stdio: 'ignore' });
|
||||
t.after(() => daemon.kill('SIGKILL'));
|
||||
const deadline = Date.now() + 3000;
|
||||
while (Date.now() < deadline && daemon.exitCode === null) {
|
||||
if (await listening(port)) return port;
|
||||
await sleep(30);
|
||||
}
|
||||
daemon.kill('SIGKILL');
|
||||
}
|
||||
});
|
||||
throw new Error('scratch sshd did not start');
|
||||
}
|
||||
|
||||
async function setup(t, opts = {}) {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'g235x-'));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { execFileSync, spawn } from 'node:child_process';
|
||||
import { createServer } from 'node:net';
|
||||
import { connect, createServer } from 'node:net';
|
||||
import { chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
|
||||
import { tmpdir, userInfo } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
@@ -19,8 +19,6 @@ import { hostGrant } from '../src/host-grant.mjs';
|
||||
import { startBroker } from '../src/runtime.mjs';
|
||||
import { businessDoc, rolesCopy, systemFor, writeJson } from '../../business/tests/helpers.mjs';
|
||||
|
||||
import { ephemeralRange, installSleepStub, pickPort, startScratchSshd } from './scratch-sshd.mjs';
|
||||
|
||||
const SSHD = '/usr/bin/sshd';
|
||||
const REPO = fileURLToPath(new URL('../../../', import.meta.url));
|
||||
const USER = userInfo().username;
|
||||
@@ -52,18 +50,22 @@ async function until(fn, ms = 5000) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const listening = (port) =>
|
||||
new Promise((resolve) => {
|
||||
const s = connect(port, '127.0.0.1');
|
||||
s.on('connect', () => (s.destroy(), resolve(true)));
|
||||
s.on('error', () => resolve(false));
|
||||
});
|
||||
|
||||
// A scratch sshd. ForceCommand puts the fake sudo first on PATH and hands the command to /bin/sh, so
|
||||
// the remote side parses the command line the way a real host's POSIX shell does.
|
||||
async function sshd(t, dir, options) {
|
||||
async function sshd(t, dir) {
|
||||
if (!existsSync(SSHD)) throw new Error(`${SSHD} is missing: the executor tests need it and fail, never skip`);
|
||||
keygen(join(dir, 'hostkey'));
|
||||
keygen(join(dir, 'otherhost'));
|
||||
keygen(join(dir, 'user'));
|
||||
writeFileSync(join(dir, 'authorized_keys'), readFileSync(join(dir, 'user.pub')), { mode: 0o600 });
|
||||
mkdirSync(join(dir, 'fake'));
|
||||
installSleepStub(dir);
|
||||
writeFileSync(
|
||||
join(dir, 'fake', 'sudo'),
|
||||
`#!/bin/sh\n'${process.execPath}' -e 'require("fs").appendFileSync(process.argv[1], JSON.stringify(process.argv.slice(2)) + "\\n")' '${dir}/argv.json' "$@"\nshift 2\nexec "$@"\n`,
|
||||
@@ -73,41 +75,25 @@ async function sshd(t, dir, options) {
|
||||
writeFileSync(join(dir, 'fake', 'fail255'), '#!/bin/sh\necho "Host key verification failed." >&2\nexit 255\n', { mode: 0o755 });
|
||||
writeFileSync(join(dir, 'wrap.sh'), `#!/bin/sh\nPATH=${dir}/fake:/usr/bin:/bin; export PATH\nexec /bin/sh -c "$SSH_ORIGINAL_COMMAND"\n`);
|
||||
chmodSync(join(dir, 'wrap.sh'), 0o755);
|
||||
return startScratchSshd(t, dir, [
|
||||
'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`,
|
||||
`AuthorizedKeysFile ${dir}/authorized_keys`, `PidFile ${dir}/sshd.pid`,
|
||||
'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
`ForceCommand ${dir}/wrap.sh`,
|
||||
], options);
|
||||
}
|
||||
|
||||
|
||||
test('row 280: an occupied TCP port is attempted, refused, and retried with our sshd', async t => {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'sshd280-'));
|
||||
t.after(() => rmSync(dir, { recursive: true, force: true }));
|
||||
const server = createServer(socket => socket.end());
|
||||
await new Promise((resolve, reject) => {
|
||||
server.once('error', reject);
|
||||
server.listen(0, '127.0.0.1', resolve);
|
||||
});
|
||||
t.after(() => new Promise(resolve => server.close(resolve)));
|
||||
const occupied = server.address().port;
|
||||
const port = await sshd(t, dir, { firstPort: occupied });
|
||||
assert.match(readFileSync(join(dir, 'sshd-0.conf'), 'utf8'), new RegExp(`^Port ${occupied}\\n`));
|
||||
assert.equal(readFileSync(join(dir, 'sshd-0.log'), 'utf8').includes(`Server listening on 127.0.0.1 port ${occupied}.`), false);
|
||||
assert.notEqual(port, occupied);
|
||||
assert.ok([1, 2, 3, 4].some(n => existsSync(join(dir, `sshd-${n}.log`)) &&
|
||||
readFileSync(join(dir, `sshd-${n}.log`), 'utf8').includes(`Server listening on 127.0.0.1 port ${port}.`)));
|
||||
});
|
||||
|
||||
test('row 280: every injected picker sample is unprivileged and outside the ephemeral range', () => {
|
||||
const [lo, hi] = ephemeralRange();
|
||||
for (const sample of [0, 0.25, 0.5, 0.6384, 0.75, 0.999999]) {
|
||||
const port = pickPort(() => sample);
|
||||
assert.ok(port >= 1024 && port <= 65535);
|
||||
assert.ok(port < lo || port > hi, `sample ${sample}: ${port} inside ${lo}-${hi}`);
|
||||
for (let attempt = 0; attempt < 5; attempt++) {
|
||||
const port = 20000 + Math.floor(Math.random() * 20000);
|
||||
writeFileSync(
|
||||
join(dir, 'sshd_config'),
|
||||
[`Port ${port}`, 'ListenAddress 127.0.0.1', `HostKey ${dir}/hostkey`, `AuthorizedKeysFile ${dir}/authorized_keys`,
|
||||
`PidFile ${dir}/sshd.pid`, 'UsePAM no', 'StrictModes no', 'PasswordAuthentication no', 'KbdInteractiveAuthentication no',
|
||||
`ForceCommand ${dir}/wrap.sh`, ''].join('\n'),
|
||||
);
|
||||
const daemon = spawn(SSHD, ['-D', '-f', join(dir, 'sshd_config'), '-E', join(dir, 'sshd.log')], { stdio: 'ignore' });
|
||||
t.after(() => daemon.kill('SIGKILL'));
|
||||
const deadline = Date.now() + 3000;
|
||||
while (Date.now() < deadline && daemon.exitCode === null) {
|
||||
if (await listening(port)) return port;
|
||||
await sleep(30);
|
||||
}
|
||||
daemon.kill('SIGKILL');
|
||||
}
|
||||
});
|
||||
throw new Error('scratch sshd did not start');
|
||||
}
|
||||
|
||||
const GRANT = [['true'], ['false'], ['echo'], ['sleep'], ['head'], ['cat'], ['systemctl', 'status']];
|
||||
async function hostFixture(t, { commands = GRANT, reviewerHosts, wrongHostKey = false, coderWeb2 = false } = {}) {
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
// Row 205 (193b1a, #1703, row 193 design 5.7, sage-2288): a user's messages are private from the
|
||||
// business owner, reader sessions and the tester on trail and replies; the run's governance is not.
|
||||
// Nothing makes a user session before FED R3, so a user's thread and its messages are written to the
|
||||
// store as R3's thread.send and the run's reply will write them.
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { mkdtempSync, rmSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { randomUUID } from 'node:crypto';
|
||||
import { Store } from '../src/store.mjs';
|
||||
import { Broker, REPLIES } from '../src/broker.mjs';
|
||||
import { fixture } from './spec-fixtures.mjs';
|
||||
|
||||
const AT = '2026-10-21T00:00:00.000Z';
|
||||
const within = (grants) => ({ authority: { withinRole: grants, crossRole: [] } });
|
||||
const options = [{ key: 'yes', text: 'Yes' }, { key: 'no', text: 'No' }];
|
||||
|
||||
// A thread owned by `owner`, on the business's assistant instance.
|
||||
function threadOf(store, project, owner, name) {
|
||||
const id = randomUUID();
|
||||
store.run(
|
||||
'INSERT INTO threads(id,at,business,project,instance,owner,name) VALUES(?,?,?,?,?,?,?)',
|
||||
id, AT, 'demo', project, 'assistant', owner, name,
|
||||
);
|
||||
return id;
|
||||
}
|
||||
// A message with its thread row, its routed delivery and one event about it. The event names the
|
||||
// message's decision in its body, which is how #trail reaches it from the decision.
|
||||
function put(store, { thread = null, from_role, from_run, to_role, in_reply_to = null, decision = null, body }) {
|
||||
const id = randomUUID();
|
||||
store.run(
|
||||
'INSERT INTO messages(id,at,business,from_role,from_run,to_role,class,in_reply_to,decision,corrects,body) VALUES(?,?,?,?,?,?,?,?,?,?,?)',
|
||||
id, AT, 'demo', from_role, from_run, to_role, 'INFO', in_reply_to, decision, null, body,
|
||||
);
|
||||
if (thread) store.run('INSERT INTO message_threads(message,thread) VALUES(?,?)', id, thread);
|
||||
store.run('INSERT INTO deliveries(message,at,op,holder_run,transport,address) VALUES(?,?,?,?,?,?)', id, AT, 'routed', null, null, null);
|
||||
store.run(
|
||||
'INSERT INTO events(id,at,business,kind,actor_role,actor_run,subject,body) VALUES(?,?,?,?,?,?,?,?)',
|
||||
randomUUID(), AT, 'demo', 'action.allowed', from_role, from_run, id, JSON.stringify(decision ? { decision } : {}),
|
||||
);
|
||||
return id;
|
||||
}
|
||||
// From alice to the instance, as R3's thread.send writes it.
|
||||
const fromAlice = (store, thread, body, extra = {}) =>
|
||||
put(store, { thread, from_role: 'user', from_run: 'user:alice', to_role: 'assistant', body, ...extra });
|
||||
// The run's reply to alice, as R3's `to: 'user'` path writes it.
|
||||
const toAlice = (store, thread, body, extra = {}) =>
|
||||
put(store, { thread, from_role: 'assistant', from_run: 'assistant-run', to_role: 'user', body, ...extra });
|
||||
|
||||
function setup(t) {
|
||||
const root = mkdtempSync(join(tmpdir(), 'bus-message-filter-'));
|
||||
const store = new Store(root);
|
||||
t.after(() => {
|
||||
store.close();
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
});
|
||||
const b = new Broker({
|
||||
store,
|
||||
businesses: {
|
||||
demo: {
|
||||
id: 'demo', human: 'jason', arbiters: { technical: 'chief', delivery: 'chief' }, vars: { 'bus.tester': true },
|
||||
roles: { chief: { definition: 'chief-of-staff', ...within(['message.send']) }, assistant: { definition: 'assistant', ...within(['message.send']) } },
|
||||
},
|
||||
},
|
||||
});
|
||||
const caps = {
|
||||
human: b.bindHuman({ business: 'demo', human: 'jason', via: 'cli', outsideAgent: true }),
|
||||
reader: b.bindReader({ business: 'demo' }),
|
||||
tester: b.bindTester({ business: 'demo' }),
|
||||
};
|
||||
const call = (who, verb, args = {}) => b.request(caps[who], { verb, args });
|
||||
const project = call('human', 'project.create', { name: 'shared work' }).id;
|
||||
const U = threadOf(store, project, 'user:alice', 'alice');
|
||||
return { b, store, caps, call, project, U };
|
||||
}
|
||||
const sessions = ['human', 'reader', 'tester'];
|
||||
// What a caller sees of a call: its result, or its refusal's code and message.
|
||||
const answer = (fn) => {
|
||||
try {
|
||||
return JSON.stringify({ result: fn() });
|
||||
} catch (e) {
|
||||
return JSON.stringify({ code: e.code, message: e.message });
|
||||
}
|
||||
};
|
||||
|
||||
test('trail on a hidden message id answers exactly as on an unknown id, for the owner, a reader and the tester', (t) => {
|
||||
const { store, call, U } = setup(t);
|
||||
const A = fromAlice(store, U, 'alice: my salary is private');
|
||||
const unknown = randomUUID();
|
||||
for (const who of sessions) {
|
||||
const hidden = answer(() => call(who, 'trail', { subject: A }));
|
||||
assert.equal(hidden, answer(() => call(who, 'trail', { subject: unknown })), who);
|
||||
assert.equal(hidden, JSON.stringify({ result: [] }), who);
|
||||
}
|
||||
});
|
||||
|
||||
test('replies on a hidden message id answers exactly as on an unknown id, for the owner, a reader and the tester', (t) => {
|
||||
const { store, call, U } = setup(t);
|
||||
const A = fromAlice(store, U, 'alice: hello');
|
||||
toAlice(store, U, 'hello alice', { in_reply_to: A });
|
||||
const unknown = randomUUID();
|
||||
for (const who of sessions) {
|
||||
const hidden = answer(() => call(who, 'replies', { id: A }));
|
||||
assert.equal(hidden, answer(() => call(who, 'replies', { id: unknown })), who);
|
||||
assert.equal(JSON.parse(hidden).code, 'message-not-found', who);
|
||||
}
|
||||
});
|
||||
|
||||
test('trail on a decision keeps the decision and drops the user thread messages, their deliveries and their events', (t) => {
|
||||
const { b, store, call, U } = setup(t);
|
||||
const run = b.bindLaunch({ business: 'demo', role: 'assistant', run: 'assistant-run', harness: 'pi', thread: U });
|
||||
b.request(run, { verb: 'role.claim' });
|
||||
const d = b.request(run, {
|
||||
verb: 'decision.raise',
|
||||
args: { action: 'deploy', question: 'Ship it?', options, recommendation: 'yes', blocking: false },
|
||||
}).id;
|
||||
const hidden = toAlice(store, U, 'alice, I asked the owner about shipping', { decision: d });
|
||||
const shown = put(store, { from_role: 'assistant', from_run: 'assistant-run', to_role: 'human', body: 'Ship it, owner?', decision: d });
|
||||
for (const who of sessions) {
|
||||
const rows = call(who, 'trail', { subject: d });
|
||||
assert.ok(rows.some((r) => r.table === 'decisions' && r.id === d), `${who}: the decision row shows`);
|
||||
assert.ok(rows.some((r) => r.table === 'messages' && r.id === shown), `${who}: the owner's message shows`);
|
||||
assert.ok(rows.some((r) => r.table === 'deliveries' && r.message === shown), `${who}: its delivery shows`);
|
||||
assert.ok(rows.some((r) => r.table === 'events' && r.subject === shown), `${who}: its event shows`);
|
||||
assert.equal(rows.filter((r) => r.table === 'messages' && r.id === hidden).length, 0, `${who}: no hidden message`);
|
||||
assert.equal(rows.filter((r) => r.table === 'deliveries' && r.message === hidden).length, 0, `${who}: no hidden delivery`);
|
||||
assert.equal(rows.filter((r) => r.table === 'events' && r.subject === hidden).length, 0, `${who}: no hidden event`);
|
||||
assert.equal(JSON.stringify(rows).includes('alice, I asked'), false, `${who}: the body appears nowhere`);
|
||||
}
|
||||
});
|
||||
|
||||
test('replies leaves out other users thread messages and still fills a page', (t) => {
|
||||
const { store, call, U } = setup(t);
|
||||
const P = put(store, { from_role: 'human', from_run: 'human-cli', to_role: 'chief', body: 'Status, everyone?' });
|
||||
for (let i = 0; i < REPLIES; i++) toAlice(store, U, `hidden ${i}`, { in_reply_to: P });
|
||||
const shown = put(store, { from_role: 'chief', from_run: 'chief-run', to_role: 'human', body: 'All green.', in_reply_to: P });
|
||||
for (const who of sessions) assert.deepEqual(call(who, 'replies', { id: P }).map((m) => m.id), [shown], who);
|
||||
});
|
||||
|
||||
test('messages in the business human and tester threads are not hidden (row 177 unchanged)', (t) => {
|
||||
const { store, call, project } = setup(t);
|
||||
const H = threadOf(store, project, 'jason', 'mine');
|
||||
const T = threadOf(store, project, 'tester', 'probe');
|
||||
const h = put(store, { thread: H, from_role: 'human', from_run: 'human-cli', to_role: 'assistant', body: 'from jason' });
|
||||
const x = put(store, { thread: T, from_role: 'tester', from_run: 'tester-cli', to_role: 'assistant', body: 'from tester' });
|
||||
const hr = put(store, { thread: H, from_role: 'assistant', from_run: 'r', to_role: 'human', body: 'to jason', in_reply_to: h });
|
||||
const xr = put(store, { thread: T, from_role: 'assistant', from_run: 'r', to_role: 'tester', body: 'to tester', in_reply_to: x });
|
||||
for (const who of sessions) {
|
||||
for (const id of [h, x]) assert.ok(call(who, 'trail', { subject: id }).some((r) => r.table === 'messages' && r.id === id), `${who} ${id}`);
|
||||
assert.deepEqual(call(who, 'replies', { id: h }).map((m) => m.id), [hr], who);
|
||||
assert.deepEqual(call(who, 'replies', { id: x }).map((m) => m.id), [xr], who);
|
||||
}
|
||||
});
|
||||
|
||||
// Row 193's user sentence, one assertion per item: "The business owner sees your thread's agent's
|
||||
// decisions, inbox entries, claims, tasks and project files, but not your messages."
|
||||
test('governance pin: the owner sees decisions, inbox entries, claims, tasks and project files, but not the user messages', async (t) => {
|
||||
const f = await fixture(t, { roles: { assistant: { definition: 'assistant', ...within(['message.send', 'record.write']) } } });
|
||||
const project = (await f.call(f.human, 'project.create', { name: 'alice work' })).id;
|
||||
const U = threadOf(f.store, project, 'user:alice', 'alice');
|
||||
const run = f.broker.bindLaunch({ business: 'demo', role: 'assistant', run: 'assistant-run', harness: 'pi', thread: U });
|
||||
await f.call(run, 'role.claim');
|
||||
const A = fromAlice(f.store, U, 'alice: please write up my plan');
|
||||
toAlice(f.store, U, 'alice, done', { in_reply_to: A });
|
||||
await f.call(run, 'record.write', { project: 'stack', path: 'docs/alice-plan.md', record: '# Plan\n' });
|
||||
const d = (await f.call(run, 'decision.raise', { action: 'deploy', question: 'Ship the plan?', options, recommendation: 'yes', blocking: false })).id;
|
||||
f.store.run(
|
||||
'INSERT INTO task_snapshots(at,business,task_ref,updated,digest,fields,source,via,read_at,role,run) VALUES(?,?,?,?,?,?,?,?,?,?,?)',
|
||||
AT, 'demo', 'vikunja:3/47', AT, 'a'.repeat(64), JSON.stringify({ bucket: 1, done: false }), 'self', null, null, 'assistant', 'assistant-run',
|
||||
);
|
||||
|
||||
const inbox = await f.call(f.human, 'inbox');
|
||||
assert.ok(inbox.some((x) => x.id === d), 'inbox entries: the run raise is in the owner inbox');
|
||||
// A thread run's claim is in thread_claims, and `agents` reads role_claims only, so no owner verb
|
||||
// shows it yet (sage-2430). This is the launcher view: the claim is recorded and the filter leaves it
|
||||
// alone. The follow-up row Sage adds for an owner-visible thread-claim read moves this to an owner verb.
|
||||
const claim = f.broker.threadsState('demo').find((x) => x.thread === U);
|
||||
assert.equal(claim?.holder, 'assistant-run', 'claims: the run claim is recorded');
|
||||
const tasks = await f.call(f.human, 'tasks');
|
||||
assert.ok(tasks.some((x) => x.task_ref === 'vikunja:3/47' && x.run === 'assistant-run'), 'tasks: the run task write shows');
|
||||
const file = await f.call(f.human, 'project.file', { project: 'stack', path: 'docs/alice-plan.md' });
|
||||
assert.equal(file.content, '# Plan\n', 'project files: the run record shows');
|
||||
await f.call(f.human, 'decision.resolve', { id: d, choice: 'yes' });
|
||||
const recent = await f.call(f.human, 'decisions', { list: 'recent' });
|
||||
assert.ok(recent.some((x) => x.id === d), 'decisions: the closed raise shows in recent');
|
||||
|
||||
assert.deepEqual(await f.call(f.human, 'trail', { subject: A }), [], 'messages: trail hides the user message');
|
||||
await assert.rejects(Promise.resolve().then(() => f.call(f.human, 'replies', { id: A })), { code: 'message-not-found' }, 'messages: replies hides it');
|
||||
const trail = await f.call(f.human, 'trail', { subject: d });
|
||||
assert.ok(trail.some((r) => r.table === 'decisions' && r.id === d), 'decisions: the trail keeps the decision');
|
||||
assert.equal(JSON.stringify(trail).includes('alice'), false, 'messages: no user body on the decision trail');
|
||||
});
|
||||
@@ -1,88 +0,0 @@
|
||||
// Row 280: fixture-only sshd startup. A TCP connect alone does not prove ownership.
|
||||
import { spawn } from 'node:child_process';
|
||||
import { once } from 'node:events';
|
||||
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import { connect } from 'node:net';
|
||||
import { basename, join } from 'node:path';
|
||||
|
||||
export const ephemeralRange = () => {
|
||||
const text = readFileSync('/proc/sys/net/ipv4/ip_local_port_range', 'utf8').trim();
|
||||
if (!/^\d+\s+\d+$/.test(text)) throw Error('invalid ephemeral port range');
|
||||
const range = text.split(/\s+/).map(Number);
|
||||
if (range[0] < 1 || range[1] > 65535 || range[0] > range[1]) throw Error('invalid ephemeral port range');
|
||||
return range;
|
||||
};
|
||||
|
||||
export function pickPort(rand = Math.random) {
|
||||
const [lo, hi] = ephemeralRange();
|
||||
const below = Math.max(0, Math.min(lo, 65536) - 1024);
|
||||
const above = Math.max(0, 65535 - Math.max(hi, 1023));
|
||||
const sample = rand();
|
||||
if (!below && !above) throw Error('no scratch sshd port available');
|
||||
if (!(sample >= 0 && sample < 1)) throw Error('invalid random sample');
|
||||
const offset = Math.floor(sample * (below + above));
|
||||
return offset < below ? 1024 + offset : Math.max(hi + 1, 1024) + offset - below;
|
||||
}
|
||||
|
||||
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
const listening = port => new Promise(resolve => {
|
||||
const socket = connect(port, '127.0.0.1');
|
||||
const done = result => { socket.destroy(); resolve(result); };
|
||||
socket.setTimeout(200, () => done(false));
|
||||
socket.on('connect', () => done(true));
|
||||
socket.on('error', () => done(false));
|
||||
});
|
||||
const stop = async daemon => {
|
||||
if (daemon.pid === undefined || daemon.exitCode !== null || daemon.signalCode !== null) return;
|
||||
const exited = once(daemon, 'exit');
|
||||
daemon.kill('SIGKILL');
|
||||
await exited;
|
||||
};
|
||||
|
||||
export async function startScratchSshd(t, dir, config, { firstPort } = {}) {
|
||||
let lastLog;
|
||||
for (let attempt = 0; attempt < 5; attempt++) {
|
||||
const port = attempt === 0 && firstPort !== undefined ? firstPort : pickPort();
|
||||
const configFile = join(dir, `sshd-${attempt}.conf`);
|
||||
lastLog = join(dir, `sshd-${attempt}.log`);
|
||||
writeFileSync(configFile, [`Port ${port}`, ...config, ''].join('\n'));
|
||||
writeFileSync(lastLog, '');
|
||||
const daemon = spawn('/usr/bin/sshd', ['-D', '-f', configFile, '-E', lastLog], { stdio: 'ignore' });
|
||||
t.after(() => stop(daemon));
|
||||
const saveLog = () => {
|
||||
if (!process.env.MOSAIC_SSHD_EVIDENCE) return;
|
||||
const evidence = join(process.env.MOSAIC_SSHD_EVIDENCE, basename(dir));
|
||||
mkdirSync(evidence, { recursive: true });
|
||||
writeFileSync(join(evidence, basename(lastLog)), readFileSync(lastLog));
|
||||
writeFileSync(join(evidence, basename(configFile)), readFileSync(configFile));
|
||||
};
|
||||
let spawnError;
|
||||
daemon.on('error', error => { spawnError = error; });
|
||||
const deadline = Date.now() + 3000;
|
||||
while (Date.now() < deadline && !spawnError && daemon.exitCode === null && daemon.signalCode === null) {
|
||||
if (await listening(port) && daemon.exitCode === null && daemon.signalCode === null &&
|
||||
readFileSync(lastLog, 'utf8').split('\n').some(line =>
|
||||
(line === `Server listening on 127.0.0.1 port ${port}.` ||
|
||||
line === `Server listening on 127.0.0.1 port ${port}.\r`))) { saveLog(); return port; }
|
||||
await sleep(30);
|
||||
}
|
||||
await stop(daemon);
|
||||
saveLog();
|
||||
}
|
||||
throw Error(`scratch sshd did not start: ${lastLog}`);
|
||||
}
|
||||
|
||||
// Long remote sleeps remain in flight for their original duration, but cannot outlive the fixture.
|
||||
export function installSleepStub(dir) {
|
||||
const script = `const fs = require("node:fs");
|
||||
const end = Date.now() + Number(process.argv[2]) * 1000;
|
||||
const timer = setInterval(() => {
|
||||
if (!fs.existsSync(process.argv[1]) || Date.now() >= end) { clearInterval(timer); }
|
||||
}, 50);`;
|
||||
writeFileSync(join(dir, 'fake', 'sleep'), `#!/bin/sh
|
||||
case "$#:$1" in
|
||||
1:30|1:60) exec '${process.execPath}' -e '${script}' '${dir}' "$1" ;;
|
||||
*) exec /usr/bin/sleep "$@" ;;
|
||||
esac
|
||||
`, { mode: 0o755 });
|
||||
}
|
||||
@@ -21,12 +21,8 @@ test('C2-04: library mappings load without roots, remain frozen, and retain mapp
|
||||
assert.ok(Object.isFrozen(loaded.projects.books.universes.harbor.books));
|
||||
const only = structuredClone(doc); delete only.projects.stack;
|
||||
assert.deepEqual(Object.keys(validateBusinessDocument(only, file, { rolesDir: REPO_ROLES }).projects), ['books']);
|
||||
// C2-01c: a prefix outside every book is a universe-level playground; one inside another
|
||||
// universe's book refuses.
|
||||
doc.projects.books.universes.harbor.playground = ['Elsewhere/Playground/'];
|
||||
assert.deepEqual(validateBusinessDocument(doc, file, { rolesDir: REPO_ROLES }).projects.books.universes.harbor.playground, ['Elsewhere/Playground/']);
|
||||
doc.projects.books.universes.harbor.playground = ['Second World/Playground/'];
|
||||
refuses(() => validateBusinessDocument(doc, file, { rolesDir: REPO_ROLES }), /library-playground-other-universe/);
|
||||
refuses(() => validateBusinessDocument(doc, file, { rolesDir: REPO_ROLES }), /library-playground-outside-book/);
|
||||
doc.projects.books = { ...mappingEntry(), root: '/forbidden' };
|
||||
refuses(() => validateBusinessDocument(doc, file, { rolesDir: REPO_ROLES }), /library-mapping-invalid/);
|
||||
});
|
||||
|
||||
@@ -736,8 +736,6 @@ test("row 194 T15: while halted the pass closes a launch and a regenerate proces
|
||||
for (const request of [launch, regen]) assert.deepEqual([s.state(request).state, s.state(request).done.refusal], ["closed", "processing-halted"], request);
|
||||
assert.equal(s.state(end.request).state, "closed");
|
||||
assert.equal(await x.exited, 143);
|
||||
// The launcher's exit handler drops its own runs. A stand-in's entry goes by hand.
|
||||
s.launcher.registry.remove("acme", "reviewer-run");
|
||||
assert.deepEqual(launchLog(p.f).filter((e) => e.event === "lifecycle-end").map((e) => e.run), ["reviewer-run"]);
|
||||
assert.equal(asked, 0, "a halted tick runs no thread pass");
|
||||
assert.equal(s.running("coder").length, 0);
|
||||
|
||||
@@ -66,13 +66,13 @@ async function closed(e,x,a){
|
||||
const storeSha=(e)=>sha(e.store);
|
||||
const backupStore=(e,a)=>join(e.data,'backups','stack',a,'bus','bus.sqlite');
|
||||
|
||||
test('row 232: confirm, revert, gate, --to and --expect-from need --units external; the user-only flags are usage under it, and so are row 273\'s --send and --no-sso',async(t)=>{
|
||||
test('row 232: confirm, revert, gate, --to and --expect-from need --units external; the user-only flags are usage under it',async(t)=>{
|
||||
const {e,x}=await xseed(t);
|
||||
const logs=logLines(e).length;
|
||||
for(const a of [['confirm',C1,'acme'],['revert',C1,'acme'],['gate',B,'acme','--since','1'],['rollback','acme','--to',B],['activate',C1,'acme','--plan','--expect-from',B]]){
|
||||
const r=await run(e,...a);assert.equal(r.code,4,a.join(' '));assert.match(r.err,/^usage: stack-release.sh adopt BUSINESS\n/);
|
||||
}
|
||||
for(const a of [['activate',C1,'acme','--pm'],['activate',C1,'acme','--tester-port','7444'],['activate',C1,'acme','--no-proof'],['activate',C1,'acme','--no-send'],['activate',C1,'acme','--sso'],['activate',C1,'acme','--send'],['activate',C1,'acme','--no-sso'],['activate',C1,'acme','--proof-header','X','--proof-file','/p'],['rollback','acme'],['gate',B,'acme'],['activate',C1,'acme','--expect-from',B],['confirm',C1,'acme','--rollback',B],['confirm',C1,'acme','--cause','A5']]){
|
||||
for(const a of [['activate',C1,'acme','--pm'],['activate',C1,'acme','--tester-port','7444'],['activate',C1,'acme','--no-proof'],['activate',C1,'acme','--no-send'],['activate',C1,'acme','--sso'],['activate',C1,'acme','--proof-header','X','--proof-file','/p'],['rollback','acme'],['gate',B,'acme'],['activate',C1,'acme','--expect-from',B],['confirm',C1,'acme','--rollback',B],['confirm',C1,'acme','--cause','A5']]){
|
||||
const r=await run(x,...a);assert.equal(r.code,4,a.join(' '));
|
||||
}
|
||||
assert.equal(logLines(e).length,logs);
|
||||
|
||||
@@ -1258,7 +1258,7 @@ test('T53 row 187: activate sets, carries and drops the proof pair',async(t)=>{
|
||||
['activate',C1,'acme','--plan','--proof-file',f]]){
|
||||
const r=await prun(e,...args);assert.equal(r.code,4,args.join(' '));assert.equal(r.out,'');assert.equal(r.err,usageText);
|
||||
}
|
||||
assert.match(usageText,/\[--proof-header NAME --proof-file PATH \| --no-proof \| --sso \| --no-sso\]/);
|
||||
assert.match(usageText,/\[--proof-header NAME --proof-file PATH \| --no-proof \| --sso\]/);
|
||||
assert.deepEqual(fp(e),before);assert.deepEqual(startsStops(e,n),[]);assert.equal(logLines(e).length,logs);
|
||||
await noLeak(e);
|
||||
});
|
||||
@@ -1417,7 +1417,7 @@ test('T55 row 189: activate --no-send drops --send, and rollback and pm-on carry
|
||||
['rehearse','acme','--backup','/tmp/x','--port','7400','--no-send']]){
|
||||
const r=await prun(e,...args);assert.equal(r.code,4,args.join(' '));assert.equal(r.out,'');assert.equal(r.err,usageText);
|
||||
}
|
||||
assert.match(usageText,/\| --no-proof \| --sso \| --no-sso\] \[--send \| --no-send\]/);
|
||||
assert.match(usageText,/\| --no-proof \| --sso\] \[--no-send\]/);
|
||||
assert.deepEqual(fp(e),before);assert.deepEqual(startsStops(e,n),[]);assert.equal(logLines(e).length,logs);
|
||||
await noLeak(e);
|
||||
});
|
||||
@@ -1465,7 +1465,7 @@ const DROPS='--public-host console.example --auth-header x-user --allow-user jas
|
||||
const SHOW=`show-${CON}.txt`;
|
||||
const setOf=(e,act)=>join(e.state,'stack-rollback',act);
|
||||
const arrivalSet=(e,to)=>setOf(e,logLines(e).findLast((l)=>l.result==='ok'&&l.to===to&&l.from!==to).activation);
|
||||
const ROLLBACK_PLAN=(set)=>`sso: dropped; ${B}'s Console does not support --sso, so the rollback takes the Console flags from ${set}/${SHOW}, with --tester-port as the pointer has it`;
|
||||
const ROLLBACK_PLAN=(set)=>`sso: dropped; ${B}'s Console does not support --sso, so the rollback takes the Console flags from ${set}/${SHOW}, with --send and --tester-port as the pointer has them`;
|
||||
const KEY_MSG=(e,to,op,why)=>`${e.cfg} holds a console key, and ${to}'s loader refuses it (${why}); remove the key first (restore the config.json backup from the window's step 1), then run the ${op} again`;
|
||||
const RB_MSG=(why)=>`${B}'s Console does not support --sso, and the Console flags it ran with cannot be read: ${why}`;
|
||||
// Rewrites a file in a rollback set (0700, files kept by cp -p) and, unless sums is false, its SHA256SUMS line.
|
||||
@@ -1526,7 +1526,7 @@ test('T57 row 200: activate --sso, its refusals before any stop, and the rollbac
|
||||
['rollback','acme','--sso'],['pm-on','acme','--sso'],['status','acme','--sso'],['adopt','acme','--sso']]){
|
||||
const r=await prun(e,...args);assert.equal(r.code,4,args.join(' '));assert.equal(r.out,'');assert.equal(r.err,usageText);
|
||||
}
|
||||
assert.match(usageText,/\[--proof-header NAME --proof-file PATH \| --no-proof \| --sso \| --no-sso\] \[--send \| --no-send\]/);
|
||||
assert.match(usageText,/\[--proof-header NAME --proof-file PATH \| --no-proof \| --sso\] \[--no-send\]/);
|
||||
assert.deepEqual(fp(e),before);assert.deepEqual(startsStops(e,n),[]);assert.equal(logLines(e).length,logs);
|
||||
await noLeak(e);
|
||||
});
|
||||
@@ -1600,14 +1600,14 @@ test('T57 row 200: activate --sso, its refusals before any stop, and the rollbac
|
||||
assert.ok(conExec(e).endsWith(` --checkout ${repo} ${want.join(' ')}`),conExec(e));
|
||||
assert.ok(stepText(e).includes(`Z drop --sso; ${B}'s Console does not support it, so the Console flags come from ${set}/${SHOW}\n`));
|
||||
r=await prun(e,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
// The plain case: the preview set and pair come back as they were. --send lost its --sso, so it goes (row 273, F39 b).
|
||||
// The plain case: --send and the preview set and pair come back as they were.
|
||||
const g=await mk(t),gbase=await seedPreview(g,undefined,['--send']),f=await proofFile(g);
|
||||
r=await prun(g,'activate',B,'acme',...pair(f));assert.equal(r.code,0,r.out+r.err);
|
||||
await ssoConfig(g);
|
||||
r=await prun(g,'activate',C1,'acme','--sso');assert.equal(r.code,0,r.out+r.err);
|
||||
setKey(g,undefined);
|
||||
r=await prun(g,'rollback','acme');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.deepEqual(pointer(g).console,[...noSend(gbase),...pair(f)]);
|
||||
assert.deepEqual(pointer(g).console,[...noSend(gbase),...pair(f),'--send']);
|
||||
for(const x of [e,g])await noLeak(x);
|
||||
});
|
||||
await t.test('item 3: a rollback set that is missing, fails its sums, holds no argv or already ran --sso refuses sso-rollback-flags',async(t)=>{
|
||||
@@ -1679,7 +1679,7 @@ test('T57 row 200: activate --sso, its refusals before any stop, and the rollbac
|
||||
r=await prun(a,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
setKey(a,undefined);
|
||||
const set=arrivalSet(a,C1);assert.ok(existsSync(join(set,show)),show);
|
||||
assert.deepEqual(ssoLines(await planOnly(a,0,'rollback','acme')),[`sso: dropped; ${B}'s Console does not support --sso, so the rollback takes the Console flags from ${set}/${show}, with --tester-port as the pointer has it`]);
|
||||
assert.deepEqual(ssoLines(await planOnly(a,0,'rollback','acme')),[`sso: dropped; ${B}'s Console does not support --sso, so the rollback takes the Console flags from ${set}/${show}, with --send and --tester-port as the pointer has them`]);
|
||||
r=await prun(a,'rollback','acme');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.equal(pointer(a).copy,B);assert.deepEqual(pointer(a).console,want.slice(0,-1));
|
||||
assert.ok(stepText(a).includes(`Z drop --sso; ${B}'s Console does not support it, so the Console flags come from ${set}/${show}\n`));
|
||||
@@ -1695,198 +1695,6 @@ test('T57 row 200: activate --sso, its refusals before any stop, and the rollbac
|
||||
});
|
||||
});
|
||||
|
||||
// Row 273 (#1778, mos-1246 F39): activate --send turns send on only beside --sso, given or carried, and
|
||||
// activate --no-sso turns --sso off with the Console flags from the set of the activation that turned
|
||||
// it on, dropping --send. The tester follows the pointer.
|
||||
const SEND_MSG="--send needs --sso in the run's Console flags, given or carried; under forward auth any same-uid process could send (F39)";
|
||||
const NOT_ON_MSG="the pointer's Console flags hold no --sso, so --no-sso has nothing to turn off";
|
||||
const OFF_MSG=(why)=>`the Console flags from before --sso cannot be read: ${why}`;
|
||||
const OFF_PLAN=(set,restores)=>`sso: off; Console flags from ${set}/${SHOW}; restores ${restores}`;
|
||||
const NOTE=(to)=>`note: ${to} is the pointer's copy; the run re-pins it and only the Console flags change`;
|
||||
test('T58 row 273: activate --send and --no-sso',async(t)=>{
|
||||
await t.test('T1: --sso --send turns send on after --sso and before the tester port, and the plan says so',async(t)=>{
|
||||
const e=await mk(t);await seedPreview(e,undefined,['--tester-port','7333']);await ssoConfig(e);
|
||||
const want=['--port',e.port,'--business','acme','--sso','--send','--tester-port','7333'];
|
||||
const out=await planOnly(e,0,'activate',C1,'acme','--sso','--send');
|
||||
assert.deepEqual([...sendLines(out),...ssoLines(out)],['send: on; --send was given',`sso: on; drops ${DROPS}; carries --port ${e.port} --business acme --send --tester-port 7333`]);
|
||||
assert.equal(out.find((l)=>l.startsWith('Console: ')),`Console: scripts/webui-service.sh install --copy ${C1} --copies ${COPIES} ${want.join(' ')}`);
|
||||
let r=await prun(e,'activate',C1,'acme','--sso','--send');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.equal(pointer(e).copy,C1);assert.deepEqual(pointer(e).console,want);
|
||||
assert.ok(conExec(e).endsWith(` --checkout ${repo} ${want.join(' ')}`),conExec(e));
|
||||
const steps=stepText(e);
|
||||
assert.ok(steps.includes('Z turn on --send; --send was given\n'),steps);assert.ok(steps.includes(`Z turn on --sso; drop ${DROPS}\n`),steps);
|
||||
r=await prun(e,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
// The same copy with send on again is already active.
|
||||
await refused(e,['activate',C1,'acme','--send'],'already-active',`${C1} is the pointer's copy`);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T1: --send beside a carried --sso re-pins the live copy once, and the plan names the carried --sso',async(t)=>{
|
||||
const e=await mk(t);await seedPreview(e);await ssoConfig(e);
|
||||
let r=await prun(e,'activate',C1,'acme','--sso');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.deepEqual(pointer(e).console,['--port',e.port,'--business','acme','--sso']);
|
||||
const out=await planOnly(e,0,'activate',C1,'acme','--send');
|
||||
assert.deepEqual([...sendLines(out),...ssoLines(out)],['send: on; --send was given','sso: carried']);
|
||||
assert.ok(out.includes(NOTE(C1)),out.join('\n'));
|
||||
r=await prun(e,'activate',C1,'acme','--send');assert.equal(r.code,0,r.out+r.err);
|
||||
const l=logLines(e).at(-1);assert.deepEqual([l.op,l.from,l.to,l.result],['activate',C1,C1,'ok']);
|
||||
const want=['--port',e.port,'--business','acme','--sso','--send'];
|
||||
assert.deepEqual(pointer(e).console,want);assert.ok(conExec(e).endsWith(` --checkout ${repo} ${want.join(' ')}`),conExec(e));
|
||||
assert.ok(stepText(e).includes('Z turn on --send; --send was given\n'));assert.doesNotMatch(stepText(e),/^\S+Z .*sso/m);
|
||||
await refused(e,['activate',C1,'acme','--send'],'already-active',`${C1} is the pointer's copy`);
|
||||
// Another copy carries both.
|
||||
assert.deepEqual(sendLines(await planOnly(e,0,'activate',C,'acme','--send')),['send: carried']);
|
||||
r=await prun(e,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T2: --send without --sso, given or carried, refuses before any stop, and --plan lists it',async(t)=>{
|
||||
const e=await mk(t);await seedPreview(e);
|
||||
await refused(e,['activate',C1,'acme','--send'],'send-needs-sso',SEND_MSG);
|
||||
await refused(e,['activate',B,'acme','--send'],'send-needs-sso',SEND_MSG);
|
||||
const out=await planOnly(e,3,'activate',C1,'acme','--send');
|
||||
assert.deepEqual(sendLines(out),['send: off']);
|
||||
assert.deepEqual(out.filter((l)=>l.startsWith('refuses ')),[`refuses send-needs-sso: ${SEND_MSG}`]);
|
||||
// A pointer that already holds --send without --sso still refuses a --send.
|
||||
const g=await mk(t);await seedPreview(g,undefined,['--send']);
|
||||
await refused(g,['activate',C1,'acme','--send'],'send-needs-sso',SEND_MSG);
|
||||
await refused(g,['activate',B,'acme','--send'],'already-active',`${B} is the pointer's copy`);
|
||||
for(const x of [e,g])await noLeak(x);
|
||||
});
|
||||
await t.test('T2 (sage-2315 B1): a rollback from an --sso --send pointer to a Console without --sso ends with neither flag',async(t)=>{
|
||||
const e=await mk(t),base=await seedPreview(e);await ssoConfig(e);
|
||||
let r=await prun(e,'activate',C1,'acme','--sso','--send');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.deepEqual(pointer(e).console,['--port',e.port,'--business','acme','--sso','--send']);
|
||||
const set=arrivalSet(e,C1);
|
||||
setKey(e,undefined);
|
||||
const out=await planOnly(e,0,'rollback','acme');
|
||||
assert.deepEqual([...sendLines(out),...ssoLines(out)],['send: dropped; the run drops --sso, and --send needs it (F39)',ROLLBACK_PLAN(set)]);
|
||||
assert.equal(out.find((l)=>l.startsWith('Console: ')),`Console: scripts/webui-service.sh install --copy ${B} --copies ${COPIES} ${base.join(' ')}`);
|
||||
r=await prun(e,'rollback','acme');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.equal(pointer(e).copy,B);assert.deepEqual(pointer(e).console,base);
|
||||
assert.doesNotMatch(conExec(e),/ --sso( |$)| --send( |$)/);assert.ok(conExec(e).endsWith(` --checkout ${repo} ${base.join(' ')}`),conExec(e));
|
||||
assert.ok(stepText(e).includes('Z drop --send; the run drops --sso\n'),stepText(e));
|
||||
r=await prun(e,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T2 and T4: --send with --no-send, --no-sso with --sso, --send, a pair or --no-proof, and either flag on another verb, is a usage error',async(t)=>{
|
||||
const e=await mk(t);await seedPreview(e);await ssoConfig(e);const f=await proofFile(e);
|
||||
let r=await prun(e,'activate',C1,'acme','--sso','--send');assert.equal(r.code,0,r.out+r.err);
|
||||
const usageText=(await prun(e,'--help')).err,n=calls(e).length,logs=logLines(e).length,before=fp(e);
|
||||
for(const args of [['activate',C1,'acme','--send','--no-send'],['activate',C1,'acme','--no-send','--send','--plan'],['activate',C1,'acme','--sso','--send','--no-send'],
|
||||
['activate',C1,'acme','--no-sso','--sso'],['activate',C1,'acme','--sso','--no-sso','--plan'],['activate',C1,'acme','--no-sso','--send'],
|
||||
['activate',C1,'acme','--no-sso',...pair(f)],['activate',C1,'acme','--no-sso','--no-proof'],
|
||||
['rollback','acme','--send'],['rollback','acme','--no-sso'],['pm-on','acme','--send'],['pm-on','acme','--no-sso'],['status','acme','--no-sso'],['adopt','acme','--send']]){
|
||||
r=await prun(e,...args);assert.equal(r.code,4,args.join(' '));assert.equal(r.out,'');assert.equal(r.err,usageText);
|
||||
}
|
||||
assert.match(usageText,/\[--proof-header NAME --proof-file PATH \| --no-proof \| --sso \| --no-sso\] \[--send \| --no-send\]/);
|
||||
assert.match(usageText,/\n--send needs --sso in the run's Console flags, given or carried\. --no-sso needs --sso in the\n/);
|
||||
assert.deepEqual(fp(e),before);assert.deepEqual(startsStops(e,n),[]);assert.equal(logLines(e).length,logs);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T3: --no-sso on the same copy returns the unit and the pointer to the flags from before --sso, without --send',async(t)=>{
|
||||
const e=await mk(t),base=await seedPreview(e,undefined,['--send','--tester-port','7333']);await ssoConfig(e);
|
||||
let r=await prun(e,'activate',C1,'acme');assert.equal(r.code,0,r.out+r.err);
|
||||
const pre=conExec(e),want=noSend(base);
|
||||
assert.ok(pre.endsWith(` ${base.join(' ')}`),pre);
|
||||
r=await prun(e,'activate',C1,'acme','--sso');assert.equal(r.code,0,r.out+r.err);
|
||||
const set=setOf(e,pointer(e).activation);
|
||||
assert.deepEqual(pointer(e).console,['--port',e.port,'--business','acme','--sso','--send','--tester-port','7333']);
|
||||
const out=await planOnly(e,0,'activate',C1,'acme','--no-sso');
|
||||
assert.deepEqual([...proofLines(out),...sendLines(out),...ssoLines(out)],['proof: off','send: dropped; --no-sso drops --send (F39)',OFF_PLAN(set,want.slice(0,-2).join(' '))]);
|
||||
assert.ok(out.includes(NOTE(C1)),out.join('\n'));
|
||||
assert.equal(out[out.findIndex((l)=>l.startsWith('sso:'))+1],`Console: scripts/webui-service.sh install --copy ${C1} --copies ${COPIES} ${want.join(' ')}`);
|
||||
r=await prun(e,'activate',C1,'acme','--no-sso');assert.equal(r.code,0,r.out+r.err);
|
||||
const l=logLines(e).at(-1);assert.deepEqual([l.op,l.from,l.to,l.result],['activate',C1,C1,'ok']);
|
||||
assert.equal(pointer(e).copy,C1);assert.deepEqual(pointer(e).console,want);
|
||||
assert.equal(conExec(e),pre.replace(' --send --tester-port 7333',' --tester-port 7333'));
|
||||
const steps=stepText(e);
|
||||
assert.ok(steps.includes('Z drop --send; --no-sso was given\n'),steps);
|
||||
assert.ok(steps.includes(`Z turn off --sso; the Console flags come from ${set}/${SHOW}\n`),steps);
|
||||
r=await prun(e,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
// --sso is off now, so a second --no-sso has nothing to turn off.
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-not-on',NOT_ON_MSG);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T3: the set walk passes later re-pins that ran with --sso, and the tester follows the pointer',async(t)=>{
|
||||
const e=await mk(t),base=await seedPreview(e,undefined,['--send','--tester-port','7333']);await ssoConfig(e);
|
||||
// The activation that turns --sso on also moves the tester to 7334, so the set and the pointer differ.
|
||||
let r=await prun(e,'activate',C1,'acme','--sso','--tester-port','7334');assert.equal(r.code,0,r.out+r.err);
|
||||
const set=setOf(e,pointer(e).activation);
|
||||
r=await prun(e,'activate',C1,'acme','--no-send');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.match(readFileSync(join(setOf(e,pointer(e).activation),SHOW),'utf8'),/ --sso /);
|
||||
assert.deepEqual(pointer(e).console,['--port',e.port,'--business','acme','--sso','--tester-port','7334']);
|
||||
const restores=base.slice(0,-3),want=[...restores,'--tester-port','7334'];
|
||||
const out=await planOnly(e,0,'activate',C1,'acme','--no-sso');
|
||||
assert.deepEqual([...sendLines(out),...ssoLines(out)],['send: off; --no-sso was given and the pointer holds no --send',OFF_PLAN(set,restores.join(' '))]);
|
||||
r=await prun(e,'activate',C1,'acme','--no-sso');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.deepEqual(pointer(e).console,want);assert.ok(conExec(e).endsWith(` --checkout ${repo} ${want.join(' ')}`),conExec(e));
|
||||
assert.doesNotMatch(stepText(e),/drop --send/);
|
||||
r=await prun(e,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T3 (sage-2305 a): after --sso, two later re-pins that carry it, then --no-sso restores the flags from before --sso byte for byte',async(t)=>{
|
||||
const e=await mk(t),base=await seedPreview(e,undefined,['--tester-port','7333']);await ssoConfig(e);
|
||||
let r=await prun(e,'activate',C1,'acme');assert.equal(r.code,0,r.out+r.err);
|
||||
const pre=conExec(e);assert.ok(pre.endsWith(` ${base.join(' ')}`),pre);
|
||||
r=await prun(e,'activate',C1,'acme','--sso');assert.equal(r.code,0,r.out+r.err);
|
||||
const set=setOf(e,pointer(e).activation);
|
||||
// Two same-copy re-pins carry --sso, so the two newest sets both hold a Console with it.
|
||||
r=await prun(e,'activate',C1,'acme','--send');assert.equal(r.code,0,r.out+r.err);
|
||||
r=await prun(e,'activate',C1,'acme','--no-send');assert.equal(r.code,0,r.out+r.err);
|
||||
const acts=logLines(e).filter((l)=>l.result==='ok'&&l.op==='activate').map((l)=>l.activation).slice(-2);
|
||||
for(const a of acts)assert.match(readFileSync(join(setOf(e,a),SHOW),'utf8'),/ --sso /);
|
||||
const out=await planOnly(e,0,'activate',C1,'acme','--no-sso');
|
||||
assert.deepEqual(ssoLines(out),[OFF_PLAN(set,base.slice(0,-2).join(' '))]);
|
||||
r=await prun(e,'activate',C1,'acme','--no-sso');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.deepEqual(pointer(e).console,base);assert.equal(conExec(e),pre);
|
||||
r=await prun(e,'status','acme');assert.equal(r.code,0,r.err);assert.match(r.out,/unit flags: match the pointer/);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T4 (sage-2305 b): a log in which every set holds a Console with --sso refuses before any unit stops',async(t)=>{
|
||||
const e=await mk(t);await seedPreview(e,undefined,['--send']);await ssoConfig(e);
|
||||
let r=await prun(e,'activate',C1,'acme','--sso');assert.equal(r.code,0,r.out+r.err);
|
||||
const first=setOf(e,pointer(e).activation);
|
||||
r=await prun(e,'activate',C1,'acme','--no-send');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.match(readFileSync(join(setOf(e,pointer(e).activation),SHOW),'utf8'),/ --sso /);
|
||||
// The set of the activation that turned --sso on now claims its Console ran with it too, sums intact.
|
||||
setEdit(first,SHOW,' --public-host ',' --sso --public-host ');
|
||||
const why=OFF_MSG(`the Console in ${join(first,SHOW)} already ran with --sso, and the log names no earlier activation`);
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-off-flags',why);
|
||||
assert.deepEqual((await planOnly(e,3,'activate',C1,'acme','--no-sso')).filter((l)=>l.startsWith('refuses ')),[`refuses sso-off-flags: ${why}`]);
|
||||
await noLeak(e);
|
||||
});
|
||||
await t.test('T4: --no-sso refuses before any stop on a pointer without --sso, a tampered or missing set, a set that ran with --sso, an ok line with no activation, and a log with no set',async(t)=>{
|
||||
const e=await mk(t);await seedPreview(e,undefined,['--send']);
|
||||
await refused(e,['activate',B,'acme','--no-sso'],'sso-not-on',NOT_ON_MSG);
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-not-on',NOT_ON_MSG);
|
||||
assert.deepEqual((await planOnly(e,3,'activate',C1,'acme','--no-sso')).filter((l)=>l.startsWith('refuses ')),[`refuses sso-not-on: ${NOT_ON_MSG}`]);
|
||||
// One set, from the activation that turned --sso on.
|
||||
await ssoConfig(e);
|
||||
let r=await prun(e,'activate',C1,'acme','--sso');assert.equal(r.code,0,r.out+r.err);
|
||||
const set=setOf(e,pointer(e).activation),show=join(set,SHOW),text=readFileSync(show,'utf8');
|
||||
// An ok line with no activation stops the walk (sage-2315 N1); skipping it would reach the set above.
|
||||
const logText=readFileSync(e.log,'utf8');
|
||||
appendFileSync(e.log,JSON.stringify({at:'2026-10-22T00:00:00Z',op:'activate',from:C1,to:C1,backup:null,activation:null,result:'ok'})+'\n');
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-off-flags',OFF_MSG('an ok line in the log names no activation'));
|
||||
writeFileSync(e.log,logText);
|
||||
setEdit(set,SHOW,' --allow-user jason',' --allow-user mallory',false);
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-off-flags',OFF_MSG(`${show} does not match the set's SHA256SUMS`));
|
||||
assert.deepEqual((await planOnly(e,3,'activate',C1,'acme','--no-sso')).filter((l)=>l.startsWith('refuses ')),[`refuses sso-off-flags: ${OFF_MSG(`${show} does not match the set's SHA256SUMS`)}`]);
|
||||
setEdit(set,SHOW,' --allow-user mallory',' --sso --allow-user jason');
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-off-flags',OFF_MSG(`the Console in ${show} already ran with --sso, and the log names no earlier activation`));
|
||||
setEdit(set,SHOW,' serve ',' ');
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-off-flags',OFF_MSG(`${show} holds no Console argv this script can read`));
|
||||
rmSync(show);
|
||||
await refused(e,['activate',C1,'acme','--no-sso'],'sso-off-flags',OFF_MSG(`${set} has no ${SHOW} and SHA256SUMS`));
|
||||
writeFileSync(show,text);setEdit(set,SHOW,'\n','\n');
|
||||
r=await prun(e,'activate',C1,'acme','--no-sso');assert.equal(r.code,0,r.out+r.err);
|
||||
assert.doesNotMatch(conExec(e),/ --sso( |$)| --send( |$)/);
|
||||
// A pointer with --sso and only the adopt line: no activation took a set.
|
||||
const g=await mk(t);await seedPreview(g,undefined,['--sso']);
|
||||
await refused(g,['activate',C1,'acme','--no-sso'],'sso-off-flags',OFF_MSG('the log names no activation with a rollback set'));
|
||||
for(const x of [e,g])await noLeak(x);
|
||||
});
|
||||
});
|
||||
|
||||
// --- rehearse (D2, row 163; the brief's "Stack rehearsal on a scratch root") ---
|
||||
// Copies of their own in RCOPIES: the real scripts/mosaic, config loader, business loader, roles and
|
||||
// mosaic-config.mjs, with stand-ins for the bus host (cli.mjs), the Console, the Store and
|
||||
|
||||
@@ -34,30 +34,22 @@ deep-frozen copy. `where` names the entry in messages. `fail(code, message)` def
|
||||
- `types` maps a folder name to `character`, `place`, `research`, `tracker` or `summary`.
|
||||
`manuscript` lists folder names and shares none with `types`.
|
||||
- A universe has `name`, `books` and `playground`. A hybrid adds `kind: "hybrid"`, two or more
|
||||
plain-universe `sources`, `constraints` (each one `{ "exclude": ... }` or
|
||||
`{ "pin": { "entity", "field", "value" } }`) and `notes`, and may have `books: []`. A draft
|
||||
universe has only `kind: "draft"`, `name` and one or more `playground` prefixes, and comes back as
|
||||
`{ kind: "draft", name, books: [], playground }`. `kind` is absent, `"hybrid"` or `"draft"`.
|
||||
- A playground prefix ends in `/` and has one of three levels (C2-01c). Book level lies inside one of
|
||||
its own entry's book folders. Universe level, in a plain universe or a hybrid, lies outside every
|
||||
book folder. A draft's prefixes all lie outside every book folder. No prefix holds another or is
|
||||
listed twice, across every entry.
|
||||
non-hybrid `sources`, `constraints` (each one `{ "exclude": ... }` or
|
||||
`{ "pin": { "entity", "field", "value" } }`) and `notes`.
|
||||
|
||||
Refusals:
|
||||
|
||||
| Code | When |
|
||||
|---|---|
|
||||
| `library-playground-other-universe` | a playground prefix lies inside, or holds, a book folder of another entry |
|
||||
| `library-mapping-invalid` | any other shape fault: unknown key, bad remote or branch, an unknown `kind`, a book folder in two universes, a book folder that holds another, a playground prefix that holds another or is listed twice, a prefix equal to a book folder or holding its own entry's book, a draft with `books` or with no prefix, a hybrid source that is unknown, a hybrid or a draft |
|
||||
| `library-playground-outside-book` | a playground prefix is not strictly inside a book of its own universe |
|
||||
| `library-mapping-invalid` | any other shape fault: unknown key, bad remote or branch, a book folder in two universes, a book folder that holds another, a playground prefix that holds another, an unknown hybrid source |
|
||||
|
||||
## Scope
|
||||
|
||||
`classify(mapping, path)` decides scope from the path alone. Only paths ending in lowercase `.md` are
|
||||
mapped. It checks prefixes first. A path under any entry's playground prefix is `playground`, with that
|
||||
entry as `universe` and the book folder holding the prefix as `book`, or `null` at universe level and
|
||||
in a draft. Any other path under a book folder is `canon`. Everything else is `unmapped`. The type is
|
||||
the first folder after the playground prefix, or after the book: a `types` name, `manuscript`, or
|
||||
`null`.
|
||||
mapped. A path under a playground prefix is `playground`. Any other path under a book folder is
|
||||
`canon`. Everything else is `unmapped`. The type is the first folder after the book, or after the
|
||||
playground prefix: a `types` name, `manuscript`, or `null`.
|
||||
|
||||
## Reader
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// The library project entry of a business file (design 1.1): her folders mapped onto universes,
|
||||
// books, type folders, manuscript folders and playground prefixes at three levels (ruling after r11,
|
||||
// C2-01c): inside one of the entry's books, outside every book, or in a draft universe. A pure validator. Business file
|
||||
// books, type folders, manuscript folders and playground prefixes. A pure validator. Business file
|
||||
// loading wires it in C2-04, which passes its own `fail` so the refusal reads as a business file
|
||||
// problem. Agents can't write this entry (M9, C2-04).
|
||||
import { raise } from './problems.mjs';
|
||||
@@ -11,7 +10,6 @@ const BRANCH = /^[A-Za-z0-9][A-Za-z0-9._/-]{0,127}$/;
|
||||
// C2-03a (sage-2021): the bot account sync answers git's Username prompt with. Row 199's NAME.
|
||||
const USER = /^[A-Za-z0-9_.-]{1,100}$/;
|
||||
const CONSTRAINT_KEYS = ['exclude', 'pin'];
|
||||
const KINDS = ['hybrid', 'draft'];
|
||||
|
||||
// A folder segment from her vault: spaces and capitals are fine, separators, control characters
|
||||
// and dot names are not.
|
||||
@@ -63,29 +61,29 @@ export function checkMapping(entry, where = 'library', { fail = raise } = {}) {
|
||||
|
||||
object(entry.universes, 'universes');
|
||||
if (!Object.keys(entry.universes).length) bad('universes must name at least one universe');
|
||||
const universes = {}, bookOwner = new Map(), prefixes = [], prefixOwner = new Map();
|
||||
const universes = {}, bookOwner = new Map(), prefixes = [];
|
||||
for (const [id, universe] of Object.entries(entry.universes)) {
|
||||
const name = `universes.${id}`;
|
||||
if (!ID.test(id)) bad(`universe id ${JSON.stringify(id)} is not a plain id`);
|
||||
object(universe, name);
|
||||
if (Object.hasOwn(universe, 'kind') && !KINDS.includes(universe.kind)) bad(`${name}.kind must be "hybrid" or "draft"`);
|
||||
const hybrid = universe.kind === 'hybrid', draft = universe.kind === 'draft';
|
||||
if (draft && Object.hasOwn(universe, 'books')) bad(`${name} is a draft and takes no books`);
|
||||
only(universe, hybrid ? ['kind', 'name', 'sources', 'books', 'playground', 'constraints', 'notes']
|
||||
: draft ? ['kind', 'name', 'playground'] : ['name', 'books', 'playground'], name);
|
||||
const hybrid = universe.kind === 'hybrid';
|
||||
only(universe, hybrid ? ['kind', 'name', 'sources', 'books', 'playground', 'constraints', 'notes'] : ['name', 'books', 'playground'], name);
|
||||
if (typeof universe.name !== 'string' || !universe.name.trim() || universe.name.length > 128 || /[\u0000-\u001f]/.test(universe.name))
|
||||
bad(`${name}.name must be a short display name`);
|
||||
const books = draft ? [] : list(universe.books, `${name}.books`, folder, 'a folder path');
|
||||
if (!hybrid && !draft && !books.length) bad(`${name}.books must name at least one book folder`);
|
||||
const books = list(universe.books, `${name}.books`, folder, 'a folder path');
|
||||
if (!hybrid && !books.length) bad(`${name}.books must name at least one book folder`);
|
||||
for (const book of books) {
|
||||
if (bookOwner.has(book)) bad(`book folder ${JSON.stringify(book)} is in two universes`);
|
||||
bookOwner.set(book, id);
|
||||
}
|
||||
const playground = list(universe.playground ?? [], `${name}.playground`,
|
||||
value => typeof value === 'string' && value.endsWith('/') && folder(value.slice(0, -1)), 'a folder path ending in /');
|
||||
if (draft && !playground.length) bad(`${name}.playground must name at least one prefix`);
|
||||
for (const prefix of playground) { prefixes.push(prefix); prefixOwner.set(prefix, id); }
|
||||
if (draft) { universes[id] = { kind: 'draft', name: universe.name, books, playground }; continue; }
|
||||
for (const prefix of playground) {
|
||||
// Every playground file must have a universe and a book (1.1, B1).
|
||||
if (!books.some(book => holds(book, prefix) && prefix !== `${book}/`))
|
||||
fail('library-playground-outside-book', `${where} ${name}.playground ${JSON.stringify(prefix)} is not inside one of its books`);
|
||||
prefixes.push(prefix);
|
||||
}
|
||||
const out = { name: universe.name, books, playground };
|
||||
if (hybrid) {
|
||||
out.kind = 'hybrid';
|
||||
@@ -116,28 +114,14 @@ export function checkMapping(entry, where = 'library', { fail = raise } = {}) {
|
||||
}
|
||||
for (const [id, universe] of Object.entries(universes)) {
|
||||
for (const source of universe.sources ?? []) {
|
||||
if (!Object.hasOwn(universes, source) || Object.hasOwn(universes[source], 'kind'))
|
||||
bad(`universes.${id}.sources names ${JSON.stringify(source)}, which is not a plain universe`);
|
||||
if (!Object.hasOwn(universes, source) || universes[source].kind === 'hybrid')
|
||||
bad(`universes.${id}.sources names ${JSON.stringify(source)}, which is not a non-hybrid universe`);
|
||||
}
|
||||
}
|
||||
const books = [...bookOwner.keys()];
|
||||
for (const a of books) for (const b of books) if (a !== b && holds(a, b)) bad(`book folder ${JSON.stringify(a)} holds book folder ${JSON.stringify(b)}`);
|
||||
for (const a of prefixes) for (const b of prefixes) if (a !== b && holds(a, b)) bad(`playground ${JSON.stringify(a)} holds playground ${JSON.stringify(b)}`);
|
||||
if (new Set(prefixes).size !== prefixes.length) bad('a playground prefix is listed twice');
|
||||
// A prefix's level comes from where it sits (ruling after r11). Inside one of its own entry's books
|
||||
// is book level, outside every book is universe level, and a draft's prefixes are all outside. Scope
|
||||
// checks prefixes first (scope.mjs), so a prefix equal to or holding a book would turn that book
|
||||
// into playground.
|
||||
for (const [prefix, id] of prefixOwner) {
|
||||
for (const [book, owner] of bookOwner) {
|
||||
const at = `universes.${id}.playground ${JSON.stringify(prefix)}`;
|
||||
if (prefix === `${book}/`) bad(`${at} is the whole book folder ${JSON.stringify(book)}`);
|
||||
const inside = holds(book, prefix), holding = holds(prefix, book);
|
||||
if ((inside || holding) && owner !== id)
|
||||
fail('library-playground-other-universe', `${where} ${at} ${inside ? 'lies inside' : 'holds'} book folder ${JSON.stringify(book)} of universes.${owner}`);
|
||||
if (holding) bad(`${at} holds its own book folder ${JSON.stringify(book)}`);
|
||||
}
|
||||
}
|
||||
|
||||
return deepFreeze({
|
||||
kind: 'library', remote: entry.remote, branch: entry.branch,
|
||||
|
||||
@@ -3,30 +3,19 @@
|
||||
const inside = (folder, path) => path.startsWith(folder.endsWith('/') ? folder : `${folder}/`);
|
||||
|
||||
// { scope: 'playground' | 'canon', universe, book, type, folder } or { scope: 'unmapped' }.
|
||||
// Prefixes come first (ruling after r11, C2-01c): a `.md` file under any entry's playground prefix is
|
||||
// playground, with that entry as `universe` and the book folder that holds the prefix as `book`, or
|
||||
// null at universe level and in a draft. Otherwise a `.md` file in a book folder is canon. `type` is
|
||||
// the mapped type of the first folder under the prefix (playground) or under the book (canon),
|
||||
// 'manuscript' for a manuscript folder, else null. `folder` is that folder name. checkMapping keeps
|
||||
// prefixes from overlapping, so at most one matches.
|
||||
// `type` is the mapped type of the first folder under the book (canon) or under the playground
|
||||
// prefix (playground), 'manuscript' for a manuscript folder, else null. `folder` is that folder name.
|
||||
export function classify(mapping, path) {
|
||||
if (typeof path !== 'string' || !path.endsWith('.md')) return { scope: 'unmapped' };
|
||||
const entries = Object.entries(mapping.universes);
|
||||
for (const [universe, entry] of entries) {
|
||||
const prefix = entry.playground.find(p => inside(p, path));
|
||||
if (prefix) return place(mapping, path, prefix, { scope: 'playground', universe, book: entry.books.find(b => inside(b, prefix)) ?? null });
|
||||
}
|
||||
for (const [universe, entry] of entries) {
|
||||
for (const [universe, entry] of Object.entries(mapping.universes)) {
|
||||
const book = entry.books.find(b => inside(b, path));
|
||||
if (book) return place(mapping, path, `${book}/`, { scope: 'canon', universe, book });
|
||||
if (!book) continue;
|
||||
const prefix = entry.playground.find(p => inside(p, path));
|
||||
const rest = path.slice((prefix ?? `${book}/`).length).split('/');
|
||||
const folder = rest.length > 1 ? rest[0] : null;
|
||||
const type = folder === null ? null : Object.hasOwn(mapping.types, folder) ? mapping.types[folder]
|
||||
: mapping.manuscript.includes(folder) ? 'manuscript' : null;
|
||||
return { scope: prefix ? 'playground' : 'canon', universe, book, type, folder };
|
||||
}
|
||||
return { scope: 'unmapped' };
|
||||
}
|
||||
|
||||
function place(mapping, path, under, where) {
|
||||
const rest = path.slice(under.length).split('/');
|
||||
const folder = rest.length > 1 ? rest[0] : null;
|
||||
const type = folder === null ? null : Object.hasOwn(mapping.types, folder) ? mapping.types[folder]
|
||||
: mapping.manuscript.includes(folder) ? 'manuscript' : null;
|
||||
return { ...where, type, folder };
|
||||
}
|
||||
|
||||
@@ -13,57 +13,16 @@ test('the fixture mapping checks and comes back frozen', () => {
|
||||
assert.throws(() => { m.types.Extra = 'place'; });
|
||||
});
|
||||
|
||||
const draft = (playground = ['Drafts/New World/']) => ({ kind: 'draft', name: 'New World', playground });
|
||||
|
||||
test('C2-01c: a prefix inside or holding another entry\'s book refuses library-playground-other-universe', () => {
|
||||
refuses(e => { e.universes.harbor.playground = ['Second World/Playground/']; return e; },
|
||||
'library-playground-other-universe', /universes.harbor.playground "Second World\/Playground\/" lies inside book folder "Second World" of universes.second/);
|
||||
refuses(e => { e.universes.second.books = ['Worlds/Second']; e.universes.harbor.playground = ['Worlds/']; return e; },
|
||||
'library-playground-other-universe', /"Worlds\/" holds book folder "Worlds\/Second" of universes.second/);
|
||||
// A draft has no books, so a draft prefix inside a book is always inside another entry's.
|
||||
refuses(e => { e.universes.idea = draft(['Book One/New World/']); return e; },
|
||||
'library-playground-other-universe', /universes.idea.playground "Book One\/New World\/" lies inside book folder "Book One" of universes.harbor/);
|
||||
});
|
||||
|
||||
test('C2-01c: a prefix equal to a book folder, or holding its own, refuses library-mapping-invalid', () => {
|
||||
// The whole book as its playground would leave no canon.
|
||||
refuses(e => { e.universes.harbor.playground = ['Book One/']; return e; }, 'library-mapping-invalid', /is the whole book folder "Book One"/);
|
||||
refuses(e => { e.universes.harbor.playground = ['Second World/']; return e; }, 'library-mapping-invalid', /is the whole book folder "Second World"/);
|
||||
refuses(e => { e.universes.harbor.books = ['Shelf/Book One']; e.universes.harbor.playground = ['Shelf/']; return e; },
|
||||
'library-mapping-invalid', /"Shelf\/" holds its own book folder "Shelf\/Book One"/);
|
||||
});
|
||||
|
||||
test('C2-01c: universe-level prefixes lie outside every book, in a plain universe and in a hybrid with no books', () => {
|
||||
const m = mapping(e => {
|
||||
e.universes.harbor.playground = ['Book One/Playground/', 'Harbor Ideas/'];
|
||||
e.universes.cross = { kind: 'hybrid', name: 'Cross', sources: ['harbor', 'second'], books: [], playground: ['Crossover Ideas/'] };
|
||||
return e;
|
||||
});
|
||||
assert.deepEqual(m.universes.harbor.playground, ['Book One/Playground/', 'Harbor Ideas/']);
|
||||
assert.deepEqual([m.universes.cross.books, m.universes.cross.playground], [[], ['Crossover Ideas/']]);
|
||||
});
|
||||
|
||||
test('C2-01c: a draft takes kind, name and playground only, and comes back frozen with books []', () => {
|
||||
const m = mapping(e => { e.universes.idea = draft(); return e; });
|
||||
assert.deepEqual(m.universes.idea, { kind: 'draft', name: 'New World', books: [], playground: ['Drafts/New World/'] });
|
||||
assert.ok(Object.isFrozen(m.universes.idea) && Object.isFrozen(m.universes.idea.books) && Object.isFrozen(m.universes.idea.playground));
|
||||
refuses(e => { e.universes.idea = { ...draft(), books: ['New World'] }; return e; }, 'library-mapping-invalid', /universes.idea is a draft and takes no books/);
|
||||
refuses(e => { e.universes.idea = { ...draft(), books: [] }; return e; }, 'library-mapping-invalid', /takes no books/);
|
||||
refuses(e => { e.universes.idea = draft([]); return e; }, 'library-mapping-invalid', /universes.idea.playground must name at least one prefix/);
|
||||
refuses(e => { e.universes.idea = { kind: 'draft', name: 'New World' }; return e; }, 'library-mapping-invalid', /at least one prefix/);
|
||||
refuses(e => { e.universes.idea = { ...draft(), notes: 'x' }; return e; }, 'library-mapping-invalid', /unknown key "notes"/);
|
||||
for (const kind of ['library', 'Draft', 'plain', null, 1])
|
||||
refuses(e => { e.universes.harbor.kind = kind; return e; }, 'library-mapping-invalid', /universes.harbor.kind must be "hybrid" or "draft"/);
|
||||
test('a playground prefix outside its universe books refuses library-playground-outside-book', () => {
|
||||
refuses(e => { e.universes.harbor.playground = ['Second World/Playground/']; return e; }, 'library-playground-outside-book');
|
||||
refuses(e => { e.universes.harbor.playground = ['Elsewhere/']; return e; }, 'library-playground-outside-book');
|
||||
// The whole book as its playground would leave no canon: not inside the book.
|
||||
refuses(e => { e.universes.harbor.playground = ['Book One/']; return e; }, 'library-playground-outside-book');
|
||||
});
|
||||
|
||||
test('no playground prefix holds another, and no book folder holds another', () => {
|
||||
refuses(e => { e.universes.harbor.playground = ['Book One/Playground/', 'Book One/Playground/Deep/']; return e; },
|
||||
'library-mapping-invalid', /holds playground/);
|
||||
// The rule covers every level and every entry (C2-01c).
|
||||
refuses(e => { e.universes.harbor.playground = ['Ideas/']; e.universes.idea = draft(['Ideas/New World/']); return e; },
|
||||
'library-mapping-invalid', /playground "Ideas\/" holds playground "Ideas\/New World\/"/);
|
||||
refuses(e => { e.universes.harbor.playground = ['Ideas/']; e.universes.idea = draft(['Ideas/']); return e; },
|
||||
'library-mapping-invalid', /listed twice/);
|
||||
refuses(e => { e.universes.second.books = ['Second World', 'Book One/Part Two']; return e; }, 'library-mapping-invalid', /holds book folder/);
|
||||
refuses(e => { e.universes.second.books = ['Book One']; return e; }, 'library-mapping-invalid', /in two universes/);
|
||||
});
|
||||
@@ -99,10 +58,7 @@ test('a hybrid universe is a shape the query code can take (1.4), with sources t
|
||||
notes: 'Set after book one.' }; return e; };
|
||||
const m = checkMapping(hybrid(mappingEntry()));
|
||||
assert.deepEqual(m.universes.cross.sources, ['harbor', 'second']);
|
||||
refuses(e => { hybrid(e); e.universes.cross.sources = ['harbor', 'nowhere']; return e; }, 'library-mapping-invalid', /not a plain universe/);
|
||||
// A draft has no canon to draw on (C2-01c).
|
||||
refuses(e => { hybrid(e); e.universes.idea = draft(); e.universes.cross.sources = ['harbor', 'idea']; return e; },
|
||||
'library-mapping-invalid', /sources names "idea", which is not a plain universe/);
|
||||
refuses(e => { hybrid(e); e.universes.cross.sources = ['harbor', 'nowhere']; return e; }, 'library-mapping-invalid', /non-hybrid universe/);
|
||||
refuses(e => { hybrid(e); e.universes.cross.sources = ['harbor']; return e; }, 'library-mapping-invalid', /two or more/);
|
||||
refuses(e => { hybrid(e); e.universes.cross.constraints = [{ exclude: 'x', pin: {} }]; return e; }, 'library-mapping-invalid', /exactly one/);
|
||||
});
|
||||
@@ -111,9 +67,9 @@ test('a caller-supplied fail receives the code, as business file loading will pa
|
||||
const seen = [];
|
||||
const fail = (code, message) => { seen.push(code); throw new Error(message); };
|
||||
const entry = mappingEntry();
|
||||
entry.universes.harbor.playground = ['Second World/Playground/'];
|
||||
entry.universes.harbor.playground = ['Elsewhere/'];
|
||||
assert.throws(() => checkMapping(entry, 'businesses/acme.json projects.books', { fail }), /businesses\/acme.json projects.books/);
|
||||
assert.deepEqual(seen, ['library-playground-other-universe']);
|
||||
assert.deepEqual(seen, ['library-playground-outside-book']);
|
||||
});
|
||||
|
||||
test('scope comes from the path alone (design 1.2)', () => {
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { classify, readLibrary } from '../src/index.mjs';
|
||||
import { BASE, mapping, repo } from './helpers.mjs';
|
||||
|
||||
// Playgrounds at three levels (ruling after r11, C2-01c). The fixture's harbor keeps its book-level
|
||||
// prefix and gains a universe-level one. A hybrid with no books has a universe-level prefix, and a
|
||||
// draft has its own.
|
||||
const levels = () => mapping(e => {
|
||||
e.universes.harbor.playground = ['Book One/Playground/', 'Harbor Ideas/'];
|
||||
e.universes.cross = { kind: 'hybrid', name: 'Cross', sources: ['harbor', 'second'], books: [], playground: ['Crossover Ideas/'] };
|
||||
e.universes.idea = { kind: 'draft', name: 'New World', playground: ['Drafts/New World/'] };
|
||||
return e;
|
||||
});
|
||||
|
||||
test('C2-01c: each level gives its universe, and its book or null', () => {
|
||||
const m = levels();
|
||||
assert.deepEqual(classify(m, 'Book One/Playground/Characters/New.md'),
|
||||
{ scope: 'playground', universe: 'harbor', book: 'Book One', type: 'character', folder: 'Characters' });
|
||||
assert.deepEqual(classify(m, 'Harbor Ideas/Places/Island.md'),
|
||||
{ scope: 'playground', universe: 'harbor', book: null, type: 'place', folder: 'Places' });
|
||||
assert.deepEqual(classify(m, 'Harbor Ideas/Loose.md'), { scope: 'playground', universe: 'harbor', book: null, type: null, folder: null });
|
||||
assert.deepEqual(classify(m, 'Crossover Ideas/Chapters/Meeting.md'),
|
||||
{ scope: 'playground', universe: 'cross', book: null, type: 'manuscript', folder: 'Chapters' });
|
||||
assert.deepEqual(classify(m, 'Drafts/New World/Characters/Ana.md'),
|
||||
{ scope: 'playground', universe: 'idea', book: null, type: 'character', folder: 'Characters' });
|
||||
for (const path of ['Harbor Ideas/Board.canvas', 'Crossover Ideas/Sketch.canvas', 'Drafts/New World/Map.canvas',
|
||||
'Drafts/Other.md', 'Drafts/New World.md', 'Harbor Ideasx/a.md'])
|
||||
assert.deepEqual(classify(m, path), { scope: 'unmapped' }, path);
|
||||
});
|
||||
|
||||
test('C2-01c: prefixes come first: in a book that holds a prefix, a file outside it is canon and one under it playground', () => {
|
||||
const m = levels();
|
||||
assert.deepEqual(classify(m, 'Book One/Places/Dock.md'), { scope: 'canon', universe: 'harbor', book: 'Book One', type: 'place', folder: 'Places' });
|
||||
assert.deepEqual(classify(m, 'Book One/Playground.md'), { scope: 'canon', universe: 'harbor', book: 'Book One', type: null, folder: null });
|
||||
assert.deepEqual(classify(m, 'Book One/Playground/What If.md'),
|
||||
{ scope: 'playground', universe: 'harbor', book: 'Book One', type: null, folder: null });
|
||||
assert.deepEqual(classify(m, 'Second World/Chapters/01.md'), { scope: 'canon', universe: 'second', book: 'Second World', type: 'manuscript', folder: 'Chapters' });
|
||||
});
|
||||
|
||||
test('C2-01c: a canon file linking into a draft gives R6, and into its own universe-level prefix gives R5', async t => {
|
||||
const r = repo(t, { ...BASE, 'Harbor Ideas/Island.md': 'An island.\n', 'Drafts/New World/Ana.md': 'Ana.\n',
|
||||
'Book One/Places/Dock.md': 'See [[Island]].\n', 'Book One/Places/Pier.md': 'Like [[Ana]].\n' });
|
||||
const result = await readLibrary({ repo: r.repo, commit: r.commit, mapping: levels() });
|
||||
const codes = path => result.problems.filter(p => p.path === path).map(p => p.code).sort();
|
||||
const file = path => result.files.find(f => f.path === path);
|
||||
assert.deepEqual(codes('Book One/Places/Dock.md'), ['R5']);
|
||||
// Any playground gives R5. A draft is never a source, so it gives R6 as well.
|
||||
assert.deepEqual(codes('Book One/Places/Pier.md'), ['R5', 'R6']);
|
||||
assert.deepEqual(file('Book One/Places/Pier.md').links.map(l => l.path), ['Drafts/New World/Ana.md']);
|
||||
for (const [path, universe] of [['Harbor Ideas/Island.md', 'harbor'], ['Drafts/New World/Ana.md', 'idea']]) {
|
||||
assert.deepEqual([file(path).scope, file(path).universe, file(path).book], ['playground', universe, null], path);
|
||||
assert.deepEqual(codes(path), [], path);
|
||||
}
|
||||
});
|
||||
@@ -330,7 +330,7 @@ async function ownStop(args, key, options) {
|
||||
};
|
||||
const termEnd = started + grace, deadline = termEnd + observe;
|
||||
let termTried = false, killTried = false;
|
||||
for (;;) {
|
||||
while (now() <= deadline) {
|
||||
try { record = runtime(root, record.id); }
|
||||
catch {
|
||||
const present = readdirSync(directory(root, 'runtimes')).includes(record.id + '.json');
|
||||
|
||||
@@ -61,17 +61,6 @@ test('failed signal delivery observes alive, records no invented signals and nev
|
||||
assert.equal(f.sleeps.reduce((a,b)=>a+b,0), 7000);
|
||||
assert.deepEqual(await stopRun(f.args, f.options), result);
|
||||
});
|
||||
test('a sleep past the stop deadline still observes an alive run after both signals', async t => {
|
||||
const f = setup(t); let time = 0;
|
||||
f.options.now = () => time;
|
||||
f.options.sleep = async ms => { time += ms + 1; };
|
||||
f.options.signal = (_r, sig) => { f.signals.push(sig); return true; };
|
||||
const result = await stopRun(f.args, f.options);
|
||||
assert.ok(time > 7000, 'the last sleep wakes past the complete stop deadline');
|
||||
assert.deepEqual(f.signals, ['SIGTERM', 'SIGKILL']);
|
||||
assert.equal(result.outcome, 'alive');
|
||||
assert.deepEqual(result.signals, ['SIGTERM', 'SIGKILL']);
|
||||
});
|
||||
test('missing run and another business never borrow a pid or signal', async t => {
|
||||
const f = setup(t);
|
||||
for (const args of [{ ...f.args, run: 'missing' }, { ...f.args, business: 'other' }]) {
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
<button type="button" class="cmdk" id="cmdk" aria-haspopup="dialog" aria-controls="cmdk-dialog"><svg class="i" aria-hidden="true"><use href="/icons.svg#i-search"/></svg><span>Go to a view, decision or task</span><kbd>Ctrl K</kbd></button>
|
||||
<p class="fresh" id="fresh"><span id="fresh-board"></span><span id="fresh-bus"></span></p>
|
||||
<div class="cmd-right"><label>Palette<select id="palette"></select></label><label>Appearance<select id="mode"><option value="system">system</option><option value="light">light</option><option value="dim">dim</option><option value="dark">dark</option></select></label><button class="btn" id="refresh" type="button">Refresh</button><button class="btn" id="pause" type="button" aria-pressed="false">Pause</button><form id="sign-out" method="post" action="/auth/logout" hidden><button class="btn" type="submit">Sign out</button></form></div></header>
|
||||
<div id="processing-banner" class="processing-banner" role="alert" hidden></div>
|
||||
<div class="frame">
|
||||
<nav class="tree" aria-label="Console"><div id="processing-controls" class="processing-controls" role="region" aria-label="Instance processing">
|
||||
<div id="processing-controls" class="processing-controls" role="region" aria-label="Instance processing">
|
||||
<strong>Processing</strong><p id="processing-state" role="status">Reading processing state.</p>
|
||||
<button id="processing-halt" type="button" class="btn" disabled>Stop processing</button>
|
||||
<button id="processing-resume" type="button" class="btn" disabled hidden>Resume processing</button>
|
||||
<p id="processing-unavailable" class="processing-note small muted">Processing controls are unavailable here. Use mosaic halt or mosaic resume from the instance CLI.</p>
|
||||
<p id="processing-receipt" class="processing-receipt small" aria-live="polite"></p></div>
|
||||
<h2 class="tree-title">Console</h2><ul class="s1-sections" id="sections"></ul><div id="board-tree"><h2 class="tree-title">Projects</h2><div id="projects"><p class="muted">Loading projects…</p></div><p class="small muted">Select a project to filter sessions. Waiting on you always shows all projects.</p></div></nav>
|
||||
<div id="processing-banner" class="processing-banner" role="alert" hidden></div>
|
||||
<div class="frame">
|
||||
<nav class="tree" aria-label="Console"><h2 class="tree-title">Console</h2><ul class="s1-sections" id="sections"></ul><div id="board-tree"><h2 class="tree-title">Projects</h2><div id="projects"><p class="muted">Loading projects…</p></div><p class="small muted">Select a project to filter sessions. Waiting on you always shows all projects.</p></div></nav>
|
||||
<main id="main" class="content" tabindex="-1"><div id="signed-out" class="banner ref" role="alert" tabindex="-1" hidden></div><div id="bus-down" class="banner err" role="alert" hidden></div><div class="page-head" id="board-head"><div><h1>Control board</h1><p id="status" class="small muted" role="status">Loading board…</p></div><div class="filters"><label><input id="show-machine" type="checkbox">Show machine sessions</label></div></div>
|
||||
<section id="held-section" aria-labelledby="held-title"><h2 id="held-title">Held roles <span id="held-count" class="count">–</span></h2><p class="small muted">The stack's seats: each role a run holds on the bus, from the bus <code>agents</code> read. Machine sessions are under Show machine sessions.</p><div id="held"><div class="skel-rows" aria-busy="true"><span class="sr-only">Reading the held roles.</span><span class="skel"></span><span class="skel"></span></div></div></section>
|
||||
<div id="error" class="banner err" role="alert" hidden></div>
|
||||
|
||||
@@ -5,18 +5,16 @@
|
||||
.processing-controls button:focus-visible { outline:3px solid currentColor; outline-offset:3px; }
|
||||
.processing-banner { padding:.75rem 1rem; font-weight:600; border-bottom:2px solid currentColor; }
|
||||
.processing-controls [hidden], .processing-banner[hidden] { display:none; }
|
||||
/* The desktop controls share the nav's existing viewport box. They scroll with
|
||||
its contents: no sticky overlay may cover a focused navigation link. */
|
||||
.tree .processing-controls .btn { margin:0; order:0; }
|
||||
.tree .processing-controls .small { margin:0; flex-basis:100%; }
|
||||
/* Keep the controls in normal flow. On desktop the frame fills the remaining
|
||||
viewport rather than adding a full viewport below the controls. Navigation
|
||||
retains the shell's command-bar/footer bounds independently of this bar. */
|
||||
@media (min-width:760px) {
|
||||
body { --processing-nav:240px; }
|
||||
.processing-banner { margin-left:var(--processing-nav); }
|
||||
.tree > .processing-controls { flex:none; padding:.7rem .4rem; }
|
||||
body { --processing-nav:240px; display:flex; flex-direction:column; min-height:100vh; }
|
||||
.processing-controls, .processing-banner { margin-left:var(--processing-nav); }
|
||||
.frame { flex:1; min-height:0; }
|
||||
.frame > .content { grid-column:2; }
|
||||
.frame > .tree { position:fixed; width:var(--processing-nav); }
|
||||
}
|
||||
@media (max-width:759px) { .tree > .processing-controls { flex-basis:100%; } }
|
||||
@media (min-width:760px) and (max-width:959px) { body { --processing-nav:200px; } }
|
||||
@media (min-width:1900px) { body { --processing-nav:280px; } }
|
||||
@media (min-width:2560px) { body { --processing-nav:320px; } }
|
||||
|
||||
@@ -13,7 +13,7 @@ async function setup(t, readonly = false) {
|
||||
window.processingRequests=[];window.processingSignin=null;
|
||||
const interval=window.setInterval.bind(window),clear=window.clearInterval.bind(window),active=new Set();
|
||||
window.processingTimers=()=>[...active];
|
||||
window.setInterval=(fn,ms,...args)=>{const id=interval(fn,ms,...args);if(ms===5000&&new Error().stack.includes('/processing.js:'))active.add(id);return id};
|
||||
window.setInterval=(fn,ms,...args)=>{const id=interval(fn,ms,...args);if(ms===5000)active.add(id);return id};
|
||||
window.clearInterval=id=>{active.delete(id);return clear(id)};
|
||||
window.confirm=()=>{window.confirmed++;return window.confirmResume};
|
||||
window.processing={version:1,generation:'${GEN}',halted:${readonly},quiescent:true,remaining:0,stopped:0};
|
||||
@@ -93,30 +93,3 @@ for (const [name,path,kind] of [
|
||||
assert.equal(await b.evaluate('window.processingRequests.length'), count, 'no processing GET or POST after shared sign-out');
|
||||
if(kind==='signin') assert.equal(await b.evaluate(`!!document.querySelector('#signed-out a[href^="/auth/login"]')`), true);
|
||||
});
|
||||
|
||||
|
||||
test('processing browser: static nav controls keep Stop visible, ordered and keyboard reachable', async t => {
|
||||
const { b } = await setup(t);
|
||||
for (const [width, height] of [[400, 1000], [1440, 1000], [1440, 420], [800, 420]]) {
|
||||
await b.viewport(width, height);
|
||||
await b.evaluate('scrollTo(0,0);document.querySelector(".tree").scrollTop=0;true');
|
||||
const layout = await b.evaluate(`(() => {
|
||||
const controls = document.querySelector('#processing-controls'), stop = document.querySelector('#processing-halt');
|
||||
const c = controls.getBoundingClientRect(), n = document.querySelector('.tree').getBoundingClientRect();
|
||||
const s = stop.getBoundingClientRect(), bar = document.querySelector('.cmdbar').getBoundingClientRect();
|
||||
return { width: innerWidth, height: innerHeight, controls: c.height, tree: n.height,
|
||||
main: document.querySelector('#main').getBoundingClientRect().height,
|
||||
top: s.top, bottom: s.bottom, barBottom: bar.bottom,
|
||||
projectsTop: document.querySelector('#projects').getBoundingClientRect().top,
|
||||
order: getComputedStyle(stop).order, visible: stop.getClientRects().length > 0 &&
|
||||
getComputedStyle(stop).visibility === 'visible' && getComputedStyle(stop).display !== 'none' };
|
||||
})()`);
|
||||
console.log('ROW191_LAYOUT', JSON.stringify(layout));
|
||||
assert.ok(layout.visible && layout.top >= layout.barBottom && layout.bottom <= height,
|
||||
'Stop is visible below the command bar and inside the viewport on load');
|
||||
assert.equal(layout.order, '0', 'nav button rules do not reorder Stop');
|
||||
if (width === 400) assert.ok(layout.top < layout.projectsTop, 'Stop precedes Projects on mobile');
|
||||
await b.evaluate('document.querySelector("#processing-halt").focus();true');
|
||||
assert.equal(await b.evaluate('document.activeElement.id'), 'processing-halt');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -64,11 +64,7 @@ test('unknown writes are not retried or displayed as success and partial stops r
|
||||
});
|
||||
test('the persistent shell loads the control outside route-specific content with accessible status and native buttons', () => {
|
||||
const html = readFileSync(new URL('../src/public/index.html', import.meta.url), 'utf8');
|
||||
const controlsAt = html.indexOf('id="processing-controls"');
|
||||
const mainAt = html.indexOf('<main id="main"'), inspectorAt = html.indexOf('<aside class="inspector"');
|
||||
assert.ok(controlsAt >= 0 && controlsAt < mainAt, 'controls are outside and before #main');
|
||||
assert.ok(!(inspectorAt < controlsAt && controlsAt < html.indexOf('</aside>', inspectorAt)),
|
||||
'controls are outside aside.inspector');
|
||||
assert.ok(html.indexOf('id="processing-controls"') < html.indexOf('<div class="frame">'));
|
||||
assert.match(html, /src="\/processing.js"/); assert.match(html, /href="\/processing.css"/);
|
||||
assert.match(html, /id="processing-receipt"[^>]*aria-live="polite"/);
|
||||
assert.match(html, /<button[^>]*id="processing-halt"[^>]*type="button"/);
|
||||
|
||||
@@ -378,28 +378,6 @@ test('shell in a browser: System default, seeded states, 400px, focus and the Ct
|
||||
const edges = 'JSON.stringify(["cmdbar","tree","foot"].map(c=>document.querySelector("."+c).getBoundingClientRect()).map(r=>[Math.round(r.top),Math.round(r.bottom)]).concat([[document.documentElement.scrollHeight,innerHeight]]))';
|
||||
let [bar, tree, foot, [scrollH, innerH]] = JSON.parse(await b.evaluate(edges));
|
||||
assert.equal(scrollH, innerH);
|
||||
const processingBar = JSON.parse(await b.evaluate(`JSON.stringify((() => {
|
||||
const el = document.querySelector('#processing-controls'), rect = el.getBoundingClientRect();
|
||||
const style = getComputedStyle(el);
|
||||
return { visible: el.getClientRects().length > 0 && style.display !== 'none' && style.visibility === 'visible',
|
||||
top: rect.top, bottom: rect.bottom, height: rect.height, viewport: innerHeight,
|
||||
scroll: document.documentElement.scrollHeight };
|
||||
})())`));
|
||||
assert.ok(processingBar.visible && processingBar.height > 0, 'the processing bar is visible on the short Board');
|
||||
const treeRect = await b.evaluate(`(() => {
|
||||
const r = document.querySelector('.tree').getBoundingClientRect();
|
||||
return { top: r.top, bottom: r.bottom };
|
||||
})()`);
|
||||
assert.ok(processingBar.top >= treeRect.top && processingBar.bottom <= treeRect.bottom,
|
||||
'the processing bar sits inside the existing tree box');
|
||||
console.log('ROW191_LAYOUT', JSON.stringify(await b.evaluate(`(() => {
|
||||
const height = s => document.querySelector(s).getBoundingClientRect().height;
|
||||
return { width: innerWidth, height: innerHeight, controls: height('#processing-controls'),
|
||||
tree: height('.tree'), main: height('#main') };
|
||||
})()`)));
|
||||
assert.ok(processingBar.top >= bar[1] && processingBar.bottom <= processingBar.viewport,
|
||||
'the processing bar sits inside the viewport below the command bar');
|
||||
assert.equal(processingBar.scroll, processingBar.viewport, 'the visible processing bar adds no short-page scroll');
|
||||
assert.deepEqual([tree[0], tree[1]], [bar[1], foot[0]]);
|
||||
await b.viewport(1440, 420); await b.evaluate('scrollTo(0, 1e5)'); await flat();
|
||||
[bar, tree, foot, [scrollH, innerH]] = JSON.parse(await b.evaluate(edges));
|
||||
|
||||
+21
-142
@@ -5,8 +5,6 @@
|
||||
# Console tester listener flags follow target support (row 176, #1674); so does the row 178 proof
|
||||
# pair, which activate sets or drops (row 187, #1685). activate --no-send drops --send (row 189, #1687).
|
||||
# activate --sso swaps the preview set and the pair for the Console's own sign-in (row 200, #1698).
|
||||
# activate --send turns send on, only beside --sso, and activate --no-sso turns --sso off with the
|
||||
# Console flags from before it, dropping --send (row 273, #1778, mos-1246 F39).
|
||||
# Design and tests: agents/darkwing/work/queue-162/BUILD.md.
|
||||
#
|
||||
# Who runs it. Decision 96 (Mos, mos-0716) lets this script stop and start the live units under
|
||||
@@ -40,14 +38,14 @@ COPIES="${XDG_DATA_HOME:-$HOME/.local/share}/mosaic-stack/copies"
|
||||
BIN="$HOME/.npm-global/bin"
|
||||
UNIT_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user"
|
||||
TIMEOUT=60 WANT_PM=0 AFTER_HARNESS=0 MIGRATE=0 PLAN=0 RESTORE="" EVENTS="" TESTER_PORT="" TESTER_SOCKET=0 EXPECTED_INTERPRETER=""
|
||||
PROOF_HEADER="" PROOF_FILE="" NO_PROOF=0 NO_SEND=0 SEND=0 SSO=0 NO_SSO=0 R_BACKUP="" R_PORT=""
|
||||
PROOF_HEADER="" PROOF_FILE="" NO_PROOF=0 NO_SEND=0 SSO=0 R_BACKUP="" R_PORT=""
|
||||
UNITS=user TO_FLAG="" EXPECT_FROM="" SINCE="" ROLLBACK_OLD="" CAUSE=""
|
||||
|
||||
usage() {
|
||||
cat >&2 <<'USAGE'
|
||||
usage: stack-release.sh adopt BUSINESS
|
||||
stack-release.sh activate ID BUSINESS [--pm | --pm-after-harness] [--migrate] [--tester-socket | --tester-port N (legacy copies)]
|
||||
[--proof-header NAME --proof-file PATH | --no-proof | --sso | --no-sso] [--send | --no-send] [--timeout S] [--plan]
|
||||
[--proof-header NAME --proof-file PATH | --no-proof | --sso] [--no-send] [--timeout S] [--plan]
|
||||
stack-release.sh pm-on BUSINESS [--timeout S]
|
||||
stack-release.sh rollback BUSINESS [--restore ACTIVATION [--events N]] [--timeout S] [--plan]
|
||||
stack-release.sh status BUSINESS
|
||||
@@ -63,9 +61,7 @@ every table in COUNTED.
|
||||
--units external (row 232) reads root's system units and starts or stops none. adopt, activate,
|
||||
rollback, status, confirm, revert and gate take it; rollback then needs --to ID, the previous copy.
|
||||
activate and rollback --plan take --expect-from OLD. --pm, --pm-after-harness, --tester-port, the
|
||||
proof flags, --no-proof, --send, --no-send, --sso, --no-sso and pm-on are not for it.
|
||||
--send needs --sso in the run's Console flags, given or carried. --no-sso needs --sso in the
|
||||
pointer's, and takes the Console flags from the rollback set of the activation that turned it on.
|
||||
proof flags, --no-proof, --no-send, --sso and pm-on are not for it.
|
||||
USAGE
|
||||
exit "${1:-4}"
|
||||
}
|
||||
@@ -132,9 +128,7 @@ parse_opts() {
|
||||
--proof-file) [ "$OP" = activate ] && [ $# -ge 2 ] && [ -n "$2" ] || usage; PROOF_FILE="$2"; shift 2 ;;
|
||||
--no-proof) [ "$OP" = activate ] || usage; NO_PROOF=1; shift ;;
|
||||
--no-send) [ "$OP" = activate ] || usage; NO_SEND=1; shift ;;
|
||||
--send) [ "$OP" = activate ] || usage; SEND=1; shift ;;
|
||||
--sso) [ "$OP" = activate ] || usage; SSO=1; shift ;;
|
||||
--no-sso) [ "$OP" = activate ] || usage; NO_SSO=1; shift ;;
|
||||
--migrate) [ "$OP" = activate ] || usage; MIGRATE=1; shift ;;
|
||||
--restore) [ "$OP" = rollback ] && [ $# -ge 2 ] && [[ "$2" =~ ^[0-9]{8}T[0-9]{6}Z-[0-9a-f]{12}(-[1-9])?$ ]] || usage; RESTORE="$2"; shift 2 ;;
|
||||
--backup) [ "$OP" = rehearse ] && [ $# -ge 2 ] && { [ "$2" = last ] || [[ "$2" =~ ^[0-9]{8}T[0-9]{6}Z-[0-9a-f]{12}(-[1-9])?$ ]] || [[ "$2" =~ ^/[A-Za-z0-9/._+-]*$ ]]; } || usage; R_BACKUP="$2"; shift 2 ;;
|
||||
@@ -156,8 +150,7 @@ parse_opts() {
|
||||
[ "$OP" != confirm ] && [ "$OP" != revert ] && [ "$OP" != gate ] && [ -z "$TO_FLAG" ] && [ -z "$EXPECT_FROM" ] || usage
|
||||
else
|
||||
[ "$OP" != rollback ] || [ -n "$TO_FLAG" ] || usage
|
||||
[ "$TESTER_SOCKET" = 0 ] && [ "$WANT_PM" = 0 ] && [ -z "$TESTER_PORT" ] && [ -z "$PROOF_HEADER" ] && [ -z "$PROOF_FILE" ] && [ "$NO_PROOF" = 0 ] && [ "$NO_SEND" = 0 ] && [ "$SSO" = 0 ] &&
|
||||
[ "$SEND" = 0 ] && [ "$NO_SSO" = 0 ] || usage
|
||||
[ "$TESTER_SOCKET" = 0 ] && [ "$WANT_PM" = 0 ] && [ -z "$TESTER_PORT" ] && [ -z "$PROOF_HEADER" ] && [ -z "$PROOF_FILE" ] && [ "$NO_PROOF" = 0 ] && [ "$NO_SEND" = 0 ] && [ "$SSO" = 0 ] || usage
|
||||
fi
|
||||
[ "$OP" != gate ] || [ -n "$SINCE" ] || usage
|
||||
[ -z "$EXPECT_FROM" ] || [ "$PLAN" = 1 ] || usage
|
||||
@@ -174,10 +167,6 @@ parse_opts() {
|
||||
[ "$NO_PROOF" = 0 ] || [ -z "$PROOF_HEADER" ] || usage
|
||||
# --sso drops the pair itself, so it takes neither a pair nor --no-proof (row 200).
|
||||
[ "$SSO" = 0 ] || { [ -z "$PROOF_HEADER" ] && [ "$NO_PROOF" = 0 ]; } || usage
|
||||
# Row 273: --send and --no-send contradict. --no-sso takes its Console flags from a rollback set
|
||||
# and drops --send, so it goes with no --sso, --send, pair or --no-proof.
|
||||
[ "$SEND" = 0 ] || [ "$NO_SEND" = 0 ] || usage
|
||||
[ "$NO_SSO" = 0 ] || { [ "$SSO" = 0 ] && [ "$SEND" = 0 ] && [ -z "$PROOF_HEADER" ] && [ "$NO_PROOF" = 0 ]; } || usage
|
||||
local d
|
||||
for d in "$COPIES" "$BIN"; do
|
||||
case "$d" in /*) ;; *) usage ;; esac
|
||||
@@ -236,8 +225,7 @@ for(const k of open.keys())process.stdout.write(k+"\n");' -- "$LOG"
|
||||
# line that made the pointer's copy live, the backup a rollback would restore. `newest` prints the
|
||||
# backup field of the newest line that has one, rehearse's --backup last (row 233). `arrival` prints the
|
||||
# activation and `from` of the line that moved the stack onto the pointer's copy from another one,
|
||||
# past any same-copy re-pin after it (row 200, sage-1389). `sets` prints the activation of each
|
||||
# activate and rollback, newest first, back to the adopt line, whose run took no rollback set (row 273).
|
||||
# past any same-copy re-pin after it (row 200, sage-1389).
|
||||
from_log() {
|
||||
[ -f "$LOG" ] || return 1
|
||||
node -e '
|
||||
@@ -246,13 +234,12 @@ const lines=require("fs").readFileSync(file,"utf8").split("\n").filter((l)=>l.tr
|
||||
for(const l of lines.reverse()){
|
||||
let o;try{o=JSON.parse(l)}catch{continue}
|
||||
if(o.result!=="ok"||!["adopt","activate","rollback"].includes(o.op)||!o.to)continue;
|
||||
if(mode==="sets"){if(o.op==="adopt")process.exit(0);process.stdout.write(`${o.activation??""}\n`);continue}
|
||||
if(mode==="previous"&&o.to!==current){process.stdout.write(o.to+"\n");process.exit(0)}
|
||||
if(mode==="backup"&&o.to===current){if(o.backup)process.stdout.write(o.backup+"\n");process.exit(o.backup?0:1)}
|
||||
if(mode==="newest"&&o.backup){process.stdout.write(o.backup+"\n");process.exit(0)}
|
||||
if(mode==="arrival"&&o.to===current&&o.from!==current){process.stdout.write(`${o.activation??""} ${o.from??""}\n`);process.exit(0)}
|
||||
}
|
||||
process.exit(mode==="sets"?0:1);' -- "$LOG" "$1" "$P_COPY"
|
||||
process.exit(1);' -- "$LOG" "$1" "$P_COPY"
|
||||
}
|
||||
|
||||
# --- Reading the units ---
|
||||
@@ -336,18 +323,15 @@ in_chain() { local v; for v in "${T_CHAIN[@]}"; do [ "$v" != "$1" ] || return 0;
|
||||
|
||||
# The item 3 checks on the target copy, in order: copy, schema, already-active. An activate that
|
||||
# sets a proof pair, drops the pointer's pair with --no-proof, drops the pointer's --send with
|
||||
# --no-send, turns on --sso, turns on --send, or turns off --sso may name the pointer's copy: it
|
||||
# re-pins the live copy with new Console flags (row 187, Part B's B3 and B-R1; row 189, mos-0972;
|
||||
# row 200, the phase 2 window; row 273). --no-sso on a pointer without --sso gets past here and
|
||||
# refuses sso-not-on in no_sso_base, which names the reason.
|
||||
# --no-send, or turns on --sso, may name the pointer's copy: it re-pins the live copy with new
|
||||
# Console flags (row 187, Part B's B3 and B-R1; row 189, mos-0972; row 200, the phase 2 window).
|
||||
check_target() {
|
||||
copy_exists "$TO" 2>/dev/null || refuse copy-missing "no copy $TO in $COPIES"
|
||||
copy_ok "$TO" 2>/dev/null || refuse copy-unreachable "$TO is not reachable from refactor and origin/refactor"
|
||||
target_schema "$TO" || refuse copy-schema-unknown "cannot read SCHEMA_VERSION and its chain from $COPIES/$TO/packages/bus/src/store.mjs"
|
||||
[ "$TO" != "$P_COPY" ] || [ -n "$PROOF_HEADER" ] || [ "$NO_SSO" = 1 ] ||
|
||||
[ "$TO" != "$P_COPY" ] || [ -n "$PROOF_HEADER" ] ||
|
||||
{ [ "$NO_PROOF" = 1 ] && [[ " ${P_CONSOLE[*]} " == *" --proof-header "* ]]; } ||
|
||||
{ [ "$NO_SEND" = 1 ] && [[ " ${P_CONSOLE[*]} " == *" --send "* ]]; } ||
|
||||
{ [ "$SEND" = 1 ] && [[ " ${P_CONSOLE[*]} " != *" --send "* ]]; } ||
|
||||
{ [ "$SSO" = 1 ] && [[ " ${P_CONSOLE[*]} " != *" --sso "* ]]; } ||
|
||||
refuse already-active "$TO is the pointer's copy"
|
||||
}
|
||||
@@ -870,17 +854,21 @@ has_flag() { local f="$1"; shift; [[ " $* " == *" $f "* ]]; }
|
||||
# skips sso_checks after a refusal here, so --plan lists that refusal alone.
|
||||
sso_base() {
|
||||
BASE_CONSOLE=("${P_CONSOLE[@]}") SSO_PLAN="" SSO_STEP="" SSO_NO_TARGET=""
|
||||
if [ "$NO_SSO" = 1 ]; then no_sso_base; return 0; fi
|
||||
has_flag --sso "${P_CONSOLE[@]}" || return 0
|
||||
[ "$SSO" = 1 ] || SSO_PLAN="sso: carried"
|
||||
[ "$OP" = rollback ] && ! sso_supported || return 0
|
||||
local f="show-$CONSOLE_UNIT.txt" why="" act="" from="" set
|
||||
local f="show-$CONSOLE_UNIT.txt" argv="" why="" act="" from="" set
|
||||
read -r act from <<< "$(from_log arrival || true)"
|
||||
set="$STATE/stack-rollback/$act"
|
||||
if [ "$from" != "$TO" ]; then why="the log names no activation that moved the stack from $TO onto $P_COPY"
|
||||
elif ! [[ "$act" =~ ^[0-9]{8}T[0-9]{6}Z-[0-9a-f]{12}(-[1-9])?$ ]]; then why="the activation $act that moved the stack onto $P_COPY names no rollback set"
|
||||
elif ! set_flags "$set"; then why="$SET_WHY"
|
||||
elif has_flag --sso "${SERVE_FLAGS[@]}"; then why="the Console in $set/$f already ran with --sso"
|
||||
elif [ ! -f "$set/$f" ] || [ ! -f "$set/SHA256SUMS" ]; then why="$set has no $f and SHA256SUMS"
|
||||
elif [ "$(sum_of "$set" "$f")" != "$(sha256sum < "$set/$f" | cut -d' ' -f1)" ]; then why="$set/$f does not match the set's SHA256SUMS"
|
||||
else
|
||||
argv="$(argv_of "$(cat "$set/$f")")"
|
||||
if ! unquoted "$argv" || ! serve_flags "$argv"; then why="$set/$f holds no Console argv this script can read"
|
||||
elif has_flag --sso "${SERVE_FLAGS[@]}"; then why="the Console in $set/$f already ran with --sso"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$why" ]; then
|
||||
SSO_NO_TARGET=1
|
||||
@@ -888,8 +876,7 @@ sso_base() {
|
||||
return 0
|
||||
fi
|
||||
# --send and --tester-port follow the pointer, so a --no-send or a tester port set after that
|
||||
# activation stays (row 189's rule that rollback carries --send off). A --send carried here has
|
||||
# lost its --sso, so send_for_target drops it (row 273, F39 b).
|
||||
# activation stays (row 189's rule that rollback carries --send off).
|
||||
local i
|
||||
BASE_CONSOLE=()
|
||||
for ((i = 0; i < ${#SERVE_FLAGS[@]}; i++)); do
|
||||
@@ -907,79 +894,10 @@ sso_base() {
|
||||
--tester-socket) BASE_CONSOLE+=(--tester-socket) ;;
|
||||
esac
|
||||
done
|
||||
SSO_PLAN="sso: dropped; $TO's Console does not support --sso, so the rollback takes the Console flags from $set/$f, with --tester-port as the pointer has it"
|
||||
SSO_PLAN="sso: dropped; $TO's Console does not support --sso, so the rollback takes the Console flags from $set/$f, with --send and --tester-port as the pointer has them"
|
||||
SSO_STEP="drop --sso; $TO's Console does not support it, so the Console flags come from $set/$f"
|
||||
}
|
||||
|
||||
# Sets SERVE_FLAGS to the Console flags in rollback set $1's show-$CONSOLE_UNIT.txt, the Console
|
||||
# unit as it was before that set's run, checked against the set's SHA256SUMS. Returns 1 with
|
||||
# SET_WHY when the file is missing, fails its sum or holds no argv this script can read.
|
||||
set_flags() {
|
||||
local set="$1" f="show-$CONSOLE_UNIT.txt" argv
|
||||
SET_WHY=""
|
||||
if [ ! -f "$set/$f" ] || [ ! -f "$set/SHA256SUMS" ]; then SET_WHY="$set has no $f and SHA256SUMS"
|
||||
elif [ "$(sum_of "$set" "$f")" != "$(sha256sum < "$set/$f" | cut -d' ' -f1)" ]; then SET_WHY="$set/$f does not match the set's SHA256SUMS"
|
||||
else
|
||||
argv="$(argv_of "$(cat "$set/$f")")"
|
||||
unquoted "$argv" && serve_flags "$argv" && return 0
|
||||
SET_WHY="$set/$f holds no Console argv this script can read"
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# Row 273 (#1778, mos-1246 F39 a): activate --no-sso turns --sso off. The Console flags come from the
|
||||
# rollback set of the activation that turned --sso on. Each set holds the Console from before its
|
||||
# run, so that activation is the newest one whose set holds a Console without --sso: every newer
|
||||
# set ran with it. The walk reads the log's activations newest first, back to the adopt line, and
|
||||
# refuses at the first set it can't read, since it can't tell whether that set is the one. --send
|
||||
# is dropped (F39 a) and the tester follows the pointer. Sets BASE_CONSOLE, SSO_PLAN and SSO_STEP.
|
||||
no_sso_base() {
|
||||
local f="show-$CONSOLE_UNIT.txt" why="" act set="" found=0 i restored=""
|
||||
local -a acts=()
|
||||
if ! has_flag --sso "${P_CONSOLE[@]}"; then
|
||||
check_refuse sso-not-on "the pointer's Console flags hold no --sso, so --no-sso has nothing to turn off"
|
||||
return 0
|
||||
fi
|
||||
# An empty entry is an ok line with no activation; skipping it could land on an older set.
|
||||
mapfile -t acts < <(from_log sets || true)
|
||||
for act in "${acts[@]}"; do
|
||||
set="$STATE/stack-rollback/$act"
|
||||
if [ -z "$act" ]; then why="an ok line in the log names no activation"; break; fi
|
||||
if ! [[ "$act" =~ ^[0-9]{8}T[0-9]{6}Z-[0-9a-f]{12}(-[1-9])?$ ]]; then why="the activation $act names no rollback set"; break; fi
|
||||
set_flags "$set" || { why="$SET_WHY"; break; }
|
||||
has_flag --sso "${SERVE_FLAGS[@]}" || { found=1; break; }
|
||||
done
|
||||
if [ -z "$why" ] && [ "$found" = 0 ]; then
|
||||
if [ -z "$set" ]; then why="the log names no activation with a rollback set"
|
||||
else why="the Console in $set/$f already ran with --sso, and the log names no earlier activation"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$why" ]; then
|
||||
SSO_NO_TARGET=1
|
||||
check_refuse sso-off-flags "the Console flags from before --sso cannot be read: $why"
|
||||
return 0
|
||||
fi
|
||||
# A --send in the set stays here: send_for_target is the one place that drops it, so the
|
||||
# restores list leaves it out.
|
||||
BASE_CONSOLE=()
|
||||
for ((i = 0; i < ${#SERVE_FLAGS[@]}; i++)); do
|
||||
case "${SERVE_FLAGS[i]}" in
|
||||
--tester-port) i=$((i + 1)) ;;
|
||||
--tester-socket) ;;
|
||||
*) BASE_CONSOLE+=("${SERVE_FLAGS[i]}")
|
||||
[ "${SERVE_FLAGS[i]}" = --send ] || restored+="${restored:+ }${SERVE_FLAGS[i]}" ;;
|
||||
esac
|
||||
done
|
||||
for ((i = 0; i < ${#P_CONSOLE[@]}; i++)); do
|
||||
case "${P_CONSOLE[i]}" in
|
||||
--tester-port) i=$((i + 1)); BASE_CONSOLE+=(--tester-port "${P_CONSOLE[i]:-}") ;;
|
||||
--tester-socket) BASE_CONSOLE+=(--tester-socket) ;;
|
||||
esac
|
||||
done
|
||||
SSO_PLAN="sso: off; Console flags from $set/$f; restores ${restored:-nothing}"
|
||||
SSO_STEP="turn off --sso; the Console flags come from $set/$f"
|
||||
}
|
||||
|
||||
# Row 200 (#1698): activate --sso drops the preview set and the proof pair, which serve refuses beside
|
||||
# it, and puts --sso where webui-service.sh renders it: after the other flags, before --send and
|
||||
# --tester-port. Sets SSO_DROP (the plan's dropped preview flags), PROOF_PLAN and PROOF_STEP.
|
||||
@@ -1099,53 +1017,14 @@ process.exit(d!==null&&typeof d==="object"&&Object.hasOwn(d,"console")?0:1)' --
|
||||
# Row 189 (mos-0972): --no-send drops --send from RUN_CONSOLE, so the unit and the pointer both lose
|
||||
# it; without the flag the pointer's --send goes on unchanged. Rollback and pm-on never take it, so
|
||||
# they carry the pointer as it is. Sets SEND_PLAN (the plan's send: line) and SEND_STEP.
|
||||
# Row 273 (mos-1246 F39): under forward auth any same-uid process can send as the signed-in user
|
||||
# through the Console's port, so --send turns send on only when the run's Console flags hold --sso,
|
||||
# given or carried. --no-sso drops the pointer's --send, and so does a rollback to a Console without
|
||||
# --sso.
|
||||
send_for_target() {
|
||||
local had=0 i
|
||||
local -a without_send=() with_send=()
|
||||
local -a without_send=()
|
||||
for ((i = 0; i < ${#RUN_CONSOLE[@]}; i++)); do
|
||||
if [ "${RUN_CONSOLE[i]}" = --send ]; then had=1; else without_send+=("${RUN_CONSOLE[i]}"); fi
|
||||
done
|
||||
SEND_STEP=""
|
||||
if [ "$NO_SSO" = 1 ]; then
|
||||
RUN_CONSOLE=("${without_send[@]}")
|
||||
if has_flag --send "${P_CONSOLE[@]}"; then
|
||||
SEND_PLAN="send: dropped; --no-sso drops --send (F39)"
|
||||
SEND_STEP="drop --send; --no-sso was given"
|
||||
else
|
||||
SEND_PLAN="send: off; --no-sso was given and the pointer holds no --send"
|
||||
fi
|
||||
elif has_flag --sso "${P_CONSOLE[@]}" && ! has_flag --sso "${RUN_CONSOLE[@]}"; then
|
||||
# Row 273 (F39 b): a rollback to a Console without --sso drops it, and --send goes with it.
|
||||
RUN_CONSOLE=("${without_send[@]}")
|
||||
if [ "$had" = 1 ]; then
|
||||
SEND_PLAN="send: dropped; the run drops --sso, and --send needs it (F39)"
|
||||
SEND_STEP="drop --send; the run drops --sso"
|
||||
else
|
||||
SEND_PLAN="send: off"
|
||||
fi
|
||||
elif [ "$SEND" = 1 ]; then
|
||||
if ! has_flag --sso "${RUN_CONSOLE[@]}"; then
|
||||
SEND_PLAN="send: off"
|
||||
check_refuse send-needs-sso "--send needs --sso in the run's Console flags, given or carried; under forward auth any same-uid process could send (F39)"
|
||||
return 0
|
||||
fi
|
||||
if [ "$had" = 1 ]; then
|
||||
SEND_PLAN="send: carried"
|
||||
return 0
|
||||
fi
|
||||
# webui-service.sh renders --send after --sso, before the tester flags.
|
||||
for ((i = 0; i < ${#RUN_CONSOLE[@]}; i++)); do
|
||||
case "${RUN_CONSOLE[i]}" in --tester-port | --tester-socket) break ;; esac
|
||||
with_send+=("${RUN_CONSOLE[i]}")
|
||||
done
|
||||
RUN_CONSOLE=("${with_send[@]}" --send "${RUN_CONSOLE[@]:i}")
|
||||
SEND_PLAN="send: on; --send was given"
|
||||
SEND_STEP="turn on --send; --send was given"
|
||||
elif [ "$NO_SEND" = 1 ]; then
|
||||
if [ "$NO_SEND" = 1 ]; then
|
||||
RUN_CONSOLE=("${without_send[@]}")
|
||||
if [ "$had" = 1 ]; then
|
||||
SEND_PLAN="send: dropped; --no-send was given"
|
||||
|
||||
Reference in New Issue
Block a user