Repository navigation
Batch 681 wave 1 fleet tooling: invariant stamps, missing-root refusals, gate receipt refusal, Stop notice systemMessage, mail key pins (BACKLOG #7557, #7558, #1247, #7575, #7581) - #3249
Conversation
…ant culture The marker's stamps were formatted with the current culture. Measured: under th-TH marked_at and effective_from came out in Buddhist year 2569, so an account marked unavailable now read PENDING; fi-FI wrote '.' for ':'; ar-SA refused the documented -EffectiveFrom 2026-10-01. Format with InvariantCulture and parse -EffectiveFrom with InvariantCulture and AssumeUniversal, so a bare date is UTC midnight. A failed write or rename no longer leaves the .tmp file behind. New-Item -Path was measured not to expand wildcards; a test pins it. BACKLOG #7557
…ctory marker is refused Only -Mark refused a -ConfigDir that does not exist. Measured: -Clear on a typo'd root printed NOTHING TO CLEAR and -Status printed AVAILABLE, both exit 0, while the real root's marker stayed in force. Both now refuse with exit 1. A directory at the marker path, which the reader takes as MALFORMED, made -Clear print NOTHING TO CLEAR and -Mark die in File.Move; both now refuse by name and leave it for removal by hand. BACKLOG #7558, including its added items 1 and 2. Proposed PR title: account-availability: invariant-culture stamps, and -Clear/-Status refuse a missing root (BACKLOG #7557, #7558) Proposed banners: #7557 CLOSED: culture-invariant format and parse fixed with tests; the New-Item wildcard sub-claim reviewed not-a-bug and pinned. #7558 CLOSED: -Clear and single-root -Status refuse a missing root; added items 1 and 2 fixed (directory marker refused by -Clear and -Mark).
… invariantly Review round 1 repairs. -EffectiveFrom is parsed with TryParseExact against the ISO-8601 forms only, so 'Jan 5' or an en-GB '01/10/2026' is refused rather than read as a past date; an explicit empty value is refused rather than read as "now"; a form with no offset keeps its old meaning, local time. Get-RootUnavailability formats marked_at and effective_from with the invariant culture, so -Status under ar-SA no longer throws on a year past 2077 and th-TH no longer prints Buddhist years. Assert-ConfigRoot takes the root as a parameter. The temp-file test now fails inside the write (a read-only marker), not before it. BACKLOG #7557, #7558 Proposed PR title: account-availability: invariant-culture stamps, and -Clear/-Status refuse a missing root (BACKLOG #7557, #7558) Proposed banners: #7557 CLOSED: culture-invariant format and ISO-only parse, writer and reader, with tests; the New-Item wildcard sub-claim reviewed not-a-bug and pinned. Same-pattern stamps elsewhere in scripts/coord are open. #7558 CLOSED: -Clear and single-root -Status refuse a missing root; added items 1 and 2 fixed (directory marker refused by -Clear and -Mark).
The installer overwrote the machine-global worktree gate unconditionally, so an unexplained write to it was replaced in silence and the .bak was the only evidence left. It now refuses, before the allowlist write, when the installed gate's content hash differs from its receipt's, when the receipt cannot be read or records no hash, or when a gate has no receipt at all (the receipt is unprotected, so deleting it must not silence the check). The refusal names the file and both hashes. -OverwriteUnexplained proceeds and records the overwritten hash in the new receipt, which now also carries replacedSha256. A box with no installed gate installs as before. BACKLOG #1247
Refusal detail goes to Write-Host so the error view cannot re-wrap the two hashes; an unreadable receipt prints (unreadable). The copy refuses if the gate changed between the guard and the backup. An overridden gate's bytes are kept as worktree_gate.ps1.unexplained-<sha12>, which no later install reuses. -Status reports the same receipt check. The refusal notes when the installed gate matches this checkout's (an interrupted earlier install). Tests: typed fixture states, receipt unchanged on refusal, one hash helper. Doc and comments point to one statement of the rule. BACKLOG #1247 Proposed PR title: install-gate refuses to overwrite a gate that does not match its receipt (BACKLOG #1247) Proposed ledger banner, #1247: CLOSED. The last limb shipped: install-gate.ps1 refuses to overwrite an installed gate that does not match its own receipt, has an unreadable receipt, or has none, behind -OverwriteUnexplained, which records the overwritten hash and keeps its bytes. Open findings (receipt not covered by gate rule 1a, -Uninstall and the pinned dispatcher unguarded, partial-install false refusal) are listed in the PR.
…ix test docstring count Text repair for BACKLOG #1247. The receipt-mismatch refusal runs before any write; the changed-during-install refusal throws after the allowlist write, and the text now says so. The refusal prints (no receipt) when the receipt is absent, (no hash) only when it lacks a hash. The test docstring no longer carries a stale test count. Tests pin the new printed strings. Text-only: no review round run. Proposed PR title: Install gate: scope the refusal claim to the refusals it holds for (BACKLOG #1247)
-Send -To <path> hashed the resolved path as given, so a path inside a worktree minted a box beside the real one that no drain reads, and was reported Queued; -Status from a subdirectory reported that shadow box, and -To all compared and hashed raw launch cwds. Every path is now raised to its worktree root with the drain's own Get-CcxWorktreeRoot (scripts/hooks/_hookinput.ps1), the root seat.ps1 keys a seat on. A -To path in no worktree is refused; -To all skips and counts a peer whose cwd is in none, and names a shared box once. -Status from no worktree keeps its cwd, the box an -AnchorRepo drain reads. Spelling variants (case, slashes, trailing separator, ..) already shared one key; pinned by test. BACKLOG #7581 (Argon S33-75). S33-76 (-Status NextDrainShowsAtLeast over-reports) is not built here. Proposed PR title: mail.ps1 keys every addressed path on its worktree root (BACKLOG #7581) Proposed banner: PARTIAL -- S33-75 built (path, -To all and -Status normalised to the worktree root; out-of-worktree -To refused). Remains: S33-76, -Status NextDrainShowsAtLeast counts expired, unparseable and unminted rows and omits the drain's frame and line-prefix bytes; and S33-75's second half, -To all reads only presence.ps1, so cross-PC and Codex seats are not broadcast to.
…ice is seen
New-NoticeShimCommand is wired only on Stop rows (seat-record.ps1,
wiki-write-prompt.ps1). It printed its missing-script notice as plain
exit-0 stdout, which a Stop hook shows to neither the user nor the model,
so the notice was as silent as the std shim it was built to replace. It
now prints {"systemMessage": "<notice>"}, the field every hook event
accepts and the user is shown; it does not block the Stop or add to
context. Tests drive the installed Stop shims from a temp settings file:
missing script gives a systemMessage (red before this change), a foreign
repo stays silent, and a resolved script runs with no notice.
BACKLOG #7575 (RC-S33-63).
Proposed PR title: Stop-hook notice shim emits a systemMessage (BACKLOG #7575)
Proposed ledger banner: CLOSED -- the notice shim on the Stop rows now
emits a systemMessage the user sees; failing test plus fix in
tests/test_announce_wiring.py.
Review round 1 (xhigh) falsified the first commit's premise: the drain keys a box on the cwd it runs in (mail-drain.ps1 $session.Dir), not on the worktree root, and Get-CcxWorktreeRoot raises a removed worktree's leftover directory under the primary to the primary's root. Raising paths therefore moved the shadow-box split to the drain end and could misdeliver to the primary session. So -Status and -To all go back to origin/main behaviour, and -Send -To <path> now REFUSES a path inside a worktree that is not its root, naming the root. A path in no worktree still sends: that is the box an -AnchorRepo drain reads. BACKLOG #7581 (Argon S33-75). Proposed PR title: mail.ps1 refuses a -To path below a worktree root (BACKLOG #7581) Proposed banner: PARTIAL -- S33-75's -To <path> half built: a path below a worktree root is refused, naming the root. Remains: the drain, mail-watch.ps1 and seat.ps1 key on different paths (cwd, raw hook cwd, show-toplevel), so a session launched below its root reads a box its seat id does not name -- one keyer for all of them is the fix; -To all reads only presence.ps1 (no cross-PC or Codex seats); S33-76 (-Status NextDrainShowsAtLeast counts expired, unparseable and unminted rows and omits the drain's frame and line-prefix bytes), confirmed by reading, unbuilt.
…o Stop Review round 1 repairs: the notice rows are parsed from $WIRING rather than hardcoded, and a test pins every notice row to the Stop event (the only event the systemMessage form is right for) and to an ASCII notice (the shim sets no output encoding). Adds the not-a-git-repo silence case and drops a restated premise from the test comment. The builder keeps its input parameter and names the escaped JSON separately. BACKLOG #7575 (RC-S33-63). Proposed PR title: Stop-hook notice shim emits a systemMessage (BACKLOG #7575) Proposed ledger banner: CLOSED -- the notice shim on the Stop rows now emits a systemMessage the user sees; failing test plus fix in tests/test_announce_wiring.py. Not live-measured in the app.
Review round 2 (xhigh) showed the below-root refusal also regresses: a session launched in a subdirectory has its drain key that subdirectory (Resolve-CcxHookSession Dir), so refusing that path, or raising it, cuts it off, and announce-session.ps1 would retry a refused peer on every prompt. The defect is a split between keyers (drain: session cwd; mail-watch.ps1: raw hook cwd; seat.ps1: show-toplevel), not a sender bug, so mail.ps1 and SESSION-MAIL.md return to origin/main. Kept: a pin that case, slash, trailing separator and .. spellings share one key. BACKLOG #7581 (Argon S33-75, S33-76). Proposed PR title: Pin mail.ps1 path-spelling box keys (BACKLOG #7581) Proposed banner: PARTIAL -- re-measured. Spelling half of S33-75 is not-a-bug (pinned). Subdirectory half reproduces but needs one keyer shared by mail-drain.ps1, mail-watch.ps1, seat.ps1 and mail.ps1 (drain keys on $session.Root, -AnchorRepo falls back to Dir); a sender-only fix was built, reviewed and withdrawn. Remains: that keyer; -To all reads only presence.ps1; S33-76 (-Status NextDrainShowsAtLeast over-reports), confirmed by reading, unbuilt.
It tests scripts/coord/mail.ps1, a harness subject; test_every_non_engine_test_is_classified failed without it. BACKLOG #7581.
|
Lander hold at 65ddef2.
Holding on:
Ordinary findings, queued for filing:
|
… comments made true The guard now hashes the installed gate once and hands that hash to Get-UnexplainedGate (-InstalledSha), so $guardSha is the reading the guard judged rather than a second read. Restores "a refusal leaves the box exactly as it was" on the stale-source check, and corrects the header: editing the receipt silences the check, deleting it does not. Repairs the Lander's hold on PR 3249. BACKLOG #1247.
…al's order Review round 1 findings that made a claim false: the new test's name said it covered the re-check before the copy, which it never runs; its "exactly once" assertion was a substring match; and with the guard anchor moved to the hash read, the ordering test no longer pinned the refusal itself ahead of the writes. Renamed, matched the whole line, and anchored the order on the throw. BACKLOG #1247.
|
Repair of the Lander hold at 65ddef2. New head:
Checks: ruff, ruff format --check, mypy (linux, explicit-package-bases) on the test file, pwsh parse clean, QA: xhigh, tag Open findings from the unrepaired round (R2: named here, filed after merge), on #1247: |
|
Lander: the independent xhigh review round-3f0acb8608 (exit 0) covers hold head 65ddef2 through 2a6235c. Hold items :1181, :1142 and the header are satisfied, so hold 7129757732 is cleared. No finding changes behaviour or weakens a control. New findings, all ORDINARY and queued for filing under R2, beside the author's 18-21: (a) the self-read branch of Get-UnexplainedGate that -Status uses has no test, and mutating its ContainsKey check to $false leaves all 14 tests green; (b) an explicitly bound $null -InstalledSha skips the check without Test-Path, so a future unset variable at a call site would fail open; (i) the one-read rationale is stated twice, at :306-308 and :1188-1189 (SDS-3.5). I will enqueue once every required context is green on this head. |
|
Lander: enqueuing at pinned head 2a6235c; all required contexts are green. |
Batch 681 (fleet-coordination), wave 1: five of the batch's 25 rows. This account's weekly usage is limited, so the owner asked for two items in flight at a time. This PR carries what finished, and the batch's other rows stay claimed or open for a later wave.
The row branches were merged onto
origin/main(322b5ec) in git's object store,merge-treethencommit-tree, with no conflicts. The changes are tooling only:scripts/coord/,scripts/worktree/, their docs and tests. No engine package changes.BACKLOG #7557 -- account-availability.ps1 writes and reads its stamps in the invariant culture
b681/account-availability@5399ad3d33a40140e7f2d19db6ae63da123996fd, shared with #7558.marked_atwas written in year 2569, so an account marked dead now read PENDING;.for:;-EffectiveFrom 2026-10-01.-Markformats in InvariantCulture, and parses-EffectiveFromagainst ISO forms only. A form with no offset still means local time.-EffectiveFromis refused.<marker>.<pid>.tmpbehind.Get-RootUnavailabilityinconfig-roots.ps1formats in the invariant culture. Before,-Statusunder ar-SA threw on years past 2077.New-Itemwildcard sub-claim is not a bug, and a test pins it.BACKLOG #7558 -- -Clear and -Status refuse a root that does not exist
-Clearand-Statuson a missing root printed NOTHING TO CLEAR / AVAILABLE and exited 0. Both now refuse with exit 1, throughAssert-ConfigRoot, the check-Markuses.-Clearprint NOTHING TO CLEAR, and made-Markdie in File.Move. Both now refuse by name.-Clearand single-root-Statusrefuse a missing root, and added items 1 and 2 are fixed.tests/test_coord_usage.py; pytest -n auto on test_coord_usage and test_usage_headroom_inject, 341 passed.xhigh effort -> 10 inline angles -> dedup (no verify) -> sweep -> <=15 findings, review_tag.py exit 0; the second round's nonce isround-2af7e96d. Rounds: 1 + 1 unrepaired.BACKLOG #1247 -- install-gate.ps1 refuses to overwrite a gate that does not match its receipt
b681/1247-fix@5002ebf5f5fe27f00350f0b4ee99976c8d521b28. The build is onb681/1247-gate-receipt@ c63f1a79409, plus a wording fix.install-gate.ps1refuses in any of these cases, and prints the file, both hashes and how to proceed:gateSha256;-OverwriteUnexplainedproceeds. It keeps the overridden bytes asworktree_gate.ps1.unexplained-<sha12>, and records them in the receipt along withreplacedSha256.-OverwriteUnexplainedonce.-Statusprints a receipt line.docs/WORKTREE-GATE.md.tests/test_install_gate_records_the_install.py, against a temp home only. The file passes 13 of 13.BACKLOG #7575 -- the Stop-hook notice shim emits a systemMessage
b681/7575-notice-shim@dcc787d233a78355773237000d2eeff820fe28e5.New-NoticeShimCommandis wired only on the two Stop rows, and printed its missing-script notice as plain exit-0 stdout, which on Stop reaches neither the user nor the model. It now prints{"systemMessage":"<notice>"}, the forminstall-gate.ps1andafk-kill.ps1already use.tests/test_announce_wiring.py, driven through temp settings and temp repos:BACKLOG #7581 -- mail.ps1 box keys: pinned, and the keyer needs re-briefing
b681/7581-fix@2296372d8c9f83e2450192bed2452c737b273cc8. That isb681/7581-mail-toplevel@ c6920f7 plus its manifest line. Its net diff is one new test file,tests/test_session_mail_toplevel.py;mail.ps1anddocs/SESSION-MAIL.mdend up identical to main...already share one box key. The new test pins this.mail-drain.ps1,_hookinput.ps1,mail-watch.ps1). Onlyseat.ps1keys on show-toplevel.mail-drain.ps1,mail-watch.ps1,seat.ps1andmail.ps1, which is outside this row's files.-Statuscounts rows the drain would not show. It is not built.announce_hooktimeouts under load against an intermediate head; those suites were not re-run on the final head.round-44a3bc95andround-648137e9. review_tag.py was not run for these, so there is no verbatim tag. No review ran on the final head, whose only addition is the test file.-To all, and S33-76.Combined-tree checks (wave head)
The wave was first built on
b681/7581-mail-toplevel, at 3314c995fc9:test_every_non_engine_test_is_classified: the new mail test file was missing from the manifest.That is fixed on
b681/7581-fix, and the wave was rebuilt at 65ddef2:Open findings (ledger ruling R2: named here, filed after merge)
#7557 and #7558:
ConvertTo-UtcDateTime(config-roots.ps1about line 238) still parses strings in the current culture, so a hand-edited date-onlyeffective_fromreads wrongly under th-TH or ar-SA. Fixing it changesusage.ps1and the precompact hook.-ConfigDir ''falls back to the current session's root, so-Markor-Clearcould act on the live account.Assert-ConfigRootchecks only that a directory exists, not that it is a config root.usage.ps1,seat.ps1,handoff.ps1,fleet.ps1,lane.ps1,wait-pr.ps1anddigest.ps1.#1247:
6.
$guardShais a second read, not the hash the guard judged, so a TOCTOU window remains.7. The receipt is written non-atomically, and its hash is re-read after the copy.
8. The pinned dispatcher has no receipt check or
.bak.-Uninstalldeletes the gate with neither a check nor a backup.9. Gate rule 1a does not cover the receipt or the
.unexplainedfiles.10. An interrupted install gives a false refusal, with only a hint.
11. Open question: should a gate whose content equals this checkout's gate install despite a receipt mismatch? No bytes would be lost. It is kept strict for now.
#7575:
12.
seat-record.ps1prints its own[seat]failure notices as plain stdout on Stop, the same silent class. Its header says Stop output is shown to the model.13. Existing config roots keep the old shim until the installer is re-run, and
-Statusreports INSTALLED for the stale shim.14. A typographic apostrophe in a notice would break the shim's single-quoted literal. The row regex depends on key order.
#7581:
15. One keyer for
mail-drain.ps1,mail-watch.ps1,seat.ps1andmail.ps1: re-brief with those files, and_hookinput.ps1, in scope._hookinput.ps1is shared byte for byte with korus.16.
-To allreads onlypresence.ps1, so cross-PC and Codex seats get no broadcast.17. S33-76:
-Status NextDrainShowsAtLeastcounts expired, unparseable and unminted rows.