BUILD.md gains the final suite and mutant results (747 passed, 54/54 killed); rebuild-manifest.txt gains its last entries. The packet inventory is rebuilt to cover all 99 packet files (sha256 1a536101...b6ef, sage-0490). Candidate digest unchanged: 75e07b65...47d1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
16 KiB
Row 138 / #1632: file-backed north-star specs
Final candidate on 26a0b0fab4: 42 paths;
747 package tests passed, 0 failed/skipped; 54/54 acceptance mutants killed.
Candidate manifest SHA-256:
75e07b65b7d1427314b50f81b2b7438aaa708fffd8db01779df18900e0a747d1.
The final source uses the runtime-injected adapter (sage-0488), no new broker
imports, and no sandbox/client/seat/launcher change. The detailed build history
below includes superseded prepared counts; final evidence is in the last section.
Sage's shell landing gate and Dewey's review remain pending. Nothing is live.
This is the revised r3 brief's first build candidate, not the superseded
spec-table candidate in ../r1. Base 26a0b0fab4, detached worktree:
/mnt/storage/src/mosaic-stack-rocko-138-r3b. Reviewer Dewey, gate owner Sage.
Old worktree and PAUSED.md are preserved. Completed row 153's worktree was
verified against its packet and removed as Sage authorized in sage-0478.
Behavior and boundaries
The spec is spec/north-star.md in row 147's separate project repository. The shared project reader returns exact committed UTF-8 (BOM/trailing bytes kept), the last reachable commit changing the file, author and bounded path log. Historical full SHA-1 commits must be reachable from a captured HEAD; dirty working bytes are ignored. A docs-only commit never stales a citation. The committed project.json identity, paths, Git metadata/remotes, regular blob mode, 1 MiB content bound, UTF-8 and NUL constraints are checked. Log output is bounded to 256 KiB and 100 entries, with truncation explicit. Blob reads use a bounded raw-byte Git runner sharing sanitized Git options/environment and group timeout cleanup, because the existing text runner trims output and replaces invalid UTF-8, which cannot preserve this contract.
readSpec.confirmed is true exactly when the file commit's author.name equals business.human. A latest agent-authored file stays unconfirmed; no fallback. This is local provenance, not a cryptographic identity proof. Exported APIs and refusal codes match ../DESIGN-r3.md and are documented in the package README; row 148 uses the same reader and adds its own locked stale-base human writer.
A cited decision.raise requires project and paired exact spec_path/spec_commit. The broker reads the current snapshot, refuses invalid/stale/unconfirmed citations and stores both fields. Existing uncited raises retain their sync path and existing validity/routing/resolution rules. No new spec commit changes old decisions or resolution events. No spec table or propose/confirm verb ships.
record.write author is derived only from the bound session's definition and instance. Caller identity keys refuse. Authority is checked before the filesystem effect; package validation and exclusive repository writer lock apply. spec/ refuses through package, broker and typed tool. Concurrent requests to one repo return one commit and one project-busy, not a Git index race. Commit/receipt are two effects; a commit whose SQL authority receipt cannot be recorded refuses outcome-unknown for inspection, never automatic retry. This row adds no human writer, shell escape, config edit, Console route or spec confirmation action. The existing wire request limit remains 64 KiB; package file bound is 1 MiB.
read_spec is offered to every role. write_record follows the record.write grant. raise_decision's strict schema accepts optional project and paired citations; the broker enforces pairing and freshness. Eleven current roleVersion 2 files have the within-role grant; legacy researcher v1 and conductor-policy do not change (Sage count correction sage-0482).
Scope additions and rulings
- sage-0419, at Rocko's request with Sage's agreement: packages/project shared reader and fixture tests, beside row 147's writer, sharing repository checks. The names, arguments, return shapes and refusal codes were written before code in ../DESIGN-r3.md for Researcher's row 148.
- sage-0480, at Rocko's request: packages/bus/src/server.mjs, only awaiting spec.read, record.write and spec-citing decision.raise. All other sync paths are unchanged byte for byte. Async rejections preserve their refusal envelope and code; transient proofs live until completion. Late replies/refusals after disconnect do not write a dead socket. Real socket tests cover all three verbs, own refusal codes/transient cleanup, late success/failure, continued server usability and two concurrent writes with project-busy.
- sage-0480 and sage-0482: record.write belongs within-role for all eleven v2 definitions. The earlier count of twelve was mistaken; researcher is v1.
Schema and migration
3e to 3f adds only decisions.spec_path and decisions.spec_commit, nullable, using an appended named step. Fresh and migrated schema digests match. The 3e fixture is copied from the tree at this base, never from a live store. The test seeds every evidence table and compares every old column/row, plus an untouched copy. Older chain tests follow the current version and retain their pinned old DDL; the future-version fixture still chains, now to 3g. MIGRATION.md contains exact DDL, hashes and Mos's approved stopped-bus backup/migrate/re-pin/rollback plan. No seat reads/migrates the live store or controls any unit.
Focused evidence and planned gate
Only singly invoked node --test FILE checks have run. No suite, browser, Docker, sandbox, shell suite or mutant batch. Reader 7; spec migration 1; broker spec 4; real socket 5; harness spec tools 2; grant contract 1. Existing focused files: comment migration 5, thread migration 3, bus chief 13, harness tools 18, business chief 10, business core 16, resolve 10. All pass, no skips. Red logs capture absent reader/migration/broker/tools/server and BOM normalization before their implementations. Existing tool-name lists and chief authority contract were updated to preserve their prior intent while including the approved tools.
51 mutants are prepared and exact-once sites preflighted only. They cover the reader, citation rules, bound authors, spec refusal, authority/receipts, async socket behavior, concurrent writer lock, typed tools, migration preservation and chaining, and each of the eleven grants. Timeout/syntax/import failure is not a kill. Whole groups and detached Git descendants are killed on timeout; every original file restores in finally. Run only after Sage's explicit grant.
Required package gate: project, bus, business, harness and cli. The revised brief requires every scripts/test-*.sh: auth, conductor, config, discord, extension-package, foundation, land-work, queue, release and task. Their current list was obtained with rg --files scripts, not inferred from prior gate counts. Sage owns the landing gate. DOCKER_HOST is a dead socket by default; any Docker run requires the shared slot and the task/release Docker cases must not be silently skipped. One recurrence of #258/#261/#262/#263 is a note; two of the same flake in a gate stop and are reported. Slot request and final results are pending. No review-ready, gate or mutant success claim yet.
Slot boundary — sage-0485
Sage is gating/pushing row 152 first. Wait for the explicit clock-stamped grant;
a CLEAR process probe alone does not authorize a run. Authorized future batch:
51 mutants plus project, bus, business, harness and cli suites only. No Docker,
browser or shell suite; Sage's landing gate runs every shell suite. Check base
drift after row 152 is pushed before the granted runs. Clean base+patch
reconstruction already verifies all 37 current candidate paths on 56639c99b.
Rebase after row 152 — sage-0486
The incoming row overlaps only packages/bus/README.md and src/broker.mjs among
this candidate's 37 paths. Applied the original candidate cleanly onto the
pushed 26a0b0fab. Broker waiting/notice launchability behavior and its README
paragraph remain intact, beside the new async project paths. No manual conflict
resolution or new product edit was required. Prior packet preserved separately
at ../r3-before-152/. Candidate manifest regenerated before any granted suite.
The grant covers 51 mutants and the five package suites only: no Docker, browser,
shell suite or live step. DOCKER_HOST=unix:///nonexistent.sock throughout.
Package files run serially with node --test --test-concurrency=1.
Package-run corrections
The first business run exposed four stale authority-snapshot assertions in assistant.test.mjs and csuite.test.mjs; they still allowed only message.send. Updated their exact approved authority lists/classification expectations for record.write while retaining the narrowed-limit tests unchanged. The first harness run exposed two stale bundle tool-list assertions; updated those exact lists for read_spec/write_record. These add three test paths to the manifest. No product code changed. Both original failure logs are preserved as suite-business-old-snapshots.log and suite-harness-old-snapshots.log. Their complete package reruns passed. These were expectation corrections, not flakes.
Runtime injection and sandbox closure — sage-0488
The first CLI run exposed a real candidate import dependency: Client imports broker.mjs for BusError; a static project import would make sandboxed runners load host Git modules outside RUNNER_FILES. Stopped the owned CLI test runner and descendants, preserving suite-cli-import-closure-failure.log. This was not a known flake. A lazy project import was considered and rejected because the sandbox's explicit import-closure contract includes lazy imports too; none remains in the final broker.
At Rocko's request Sage approved packages/bus/src/runtime.mjs and its real integration test in sage-0488. Runtime imports the project module, binds its dataRoot in readSpec/writeRecord functions and passes the trusted adapter plus ProjectError type into Broker. The constructor's adapter defaults to null; all three new async paths refuse project-not-configured without it. Broker has exactly its two original imports and no dynamic import. No sandbox policy, mount, client, seat or launcher change was made.
packages/bus/tests/project-runtime.test.mjs holds this boundary explicitly: exact original broker imports/no lazy import; all three no-adapter refusals; real startBroker plus socket read and record write through the injected adapter. The integration test fails with the runtime adapter omitted, and passes with it. A new mutant each removes the no-adapter refusal, runtime injection and import closure requirement. Total now 54; all sites re-preflighted after the fix.
The three snapshot files changed only for this candidate's approved behavior:
- business/tests/assistant.test.mjs: exact approved role/resolved authority gains record.write beside message.send, because roles/assistant.json gains it. Its narrowed-limit assertions remain unchanged.
- business/tests/csuite.test.mjs: exact C-suite role/resolved authority and full classification gain record.write, because those five role files gain it. Narrowed limits and all tool, credential and messaging restrictions remain.
- harness/tests/bundle.test.mjs: chief's exact prompt/manifest tool lists gain read_spec/write_record, because typedTools now offers the read and the grant's writer. Existing launch/end/organization tools stay in the same order. The base passed these tests; their initial failures were caused by this candidate's additions, not independent drift. Initial failure logs are kept.
The refreshed candidate has 42 paths. No product code changed outside the approved adapter fix. All five package suites will be run on this final source; CLI launcher failures after injection would stop and be reported, never patched by changing launcher tests. No Docker, browser, shell suite or live step.
Final verification — sage-0486 and sage-0488
Completed 2026-10-16 01:11:18 UTC, after the runtime injection and snapshot fixes.
All package files were run sequentially using:
DOCKER_HOST=unix:///nonexistent.sock node --test --test-concurrency=1 packages/NAME/tests/*.test.mjs.
| Package | Passed | Failed | Skipped |
|---|---|---|---|
| project | 29 | 0 | 0 |
| bus | 289 | 0 | 0 |
| business | 109 | 0 | 0 |
| harness | 105 | 0 | 0 |
| cli | 215 | 0 | 0 |
| Total | 747 | 0 | 0 |
The CLI run passed every launcher test unchanged after the injection. No known flake occurred. Initial business/harness snapshot failures and the failed/ interrupted CLI import-closure run are retained and explained above; final passing logs are suite-NAME.log. No failing run is counted as success.
All 54 mutants killed, no survivor/timeout/invalid syntax or module import failure. Each fault is one exact-once source edit; the package schema-version faults are runtime migration faults, not import-time digest edits. See per-case logs and machine-readable mutants/results.json. The preserve-old-evidence fault removes a decision event while restoring its trigger, so final schema digest alone cannot catch the loss; the old-row snapshot does.
| Mutant | Result | Exit |
|---|---|---|
| 01-content-trailing-bytes | KILLED | 1 |
| 02-file-commit-not-head | KILLED | 1 |
| 03-historical-revision | KILLED | 1 |
| 04-reachable-history | KILLED | 1 |
| 05-full-commit-id | KILLED | 1 |
| 06-read-path-confinement | KILLED | 1 |
| 07-strict-utf8 | KILLED | 1 |
| 08-no-nul | KILLED | 1 |
| 09-blob-size | KILLED | 1 |
| 10-regular-blob-mode | KILLED | 1 |
| 11-project-identity | KILLED | 1 |
| 12-repository-validation | KILLED | 1 |
| 13-log-page-bound | KILLED | 1 |
| 14-log-truncation | KILLED | 1 |
| 15-human-confirmation | KILLED | 1 |
| 16-preserve-bom | KILLED | 1 |
| 17-read-argument-keys | KILLED | 1 |
| 18-invalid-revision-refusal-code | KILLED | 1 |
| 19-stale-citation | KILLED | 1 |
| 20-unconfirmed-citation | KILLED | 1 |
| 21-partial-citation | KILLED | 1 |
| 22-persist-spec-commit | KILLED | 1 |
| 23-persist-spec-path | KILLED | 1 |
| 24-uncited-raises-still-valid | KILLED | 1 |
| 25-session-author | KILLED | 1 |
| 26-record-spec-refusal | KILLED | 1 |
| 27-writer-cannot-accept-author | KILLED | 1 |
| 28-write-authority-before-effect | KILLED | 1 |
| 29-write-commit-receipt | KILLED | 1 |
| 30-await-only-project-effects | KILLED | 1 |
| 31-async-own-refusal-code | KILLED | 1 |
| 32-live-transient-proof | KILLED | 1 |
| 33-concurrent-write-refusal | KILLED | 1 |
| 34-read-for-every-role | KILLED | 1 |
| 35-writer-follows-grant | KILLED | 1 |
| 36-typed-spec-path | KILLED | 1 |
| 37-typed-writer-path | KILLED | 1 |
| 38-migration-runs-new-step | KILLED | 1 |
| 39-preserve-old-evidence | KILLED | 1 |
| 40-future-step-chaining | KILLED | 1 |
| 41-record-grant-assistant | KILLED | 1 |
| 42-record-grant-chief-executive-officer | KILLED | 1 |
| 43-record-grant-chief-financial-officer | KILLED | 1 |
| 44-record-grant-chief-information-officer | KILLED | 1 |
| 45-record-grant-chief-information-security-officer | KILLED | 1 |
| 46-record-grant-chief-marketing-officer | KILLED | 1 |
| 47-record-grant-chief-of-staff | KILLED | 1 |
| 48-record-grant-coder | KILLED | 1 |
| 49-record-grant-cto | KILLED | 1 |
| 50-record-grant-pm | KILLED | 1 |
| 51-record-grant-reviewer | KILLED | 1 |
| 52-no-adapter-refusal | KILLED | 1 |
| 53-runtime-passes-adapter | KILLED | 1 |
| 54-broker-import-closure | KILLED | 1 |
All 42 candidate hashes restored after the batch; the staged-index diff hash is unchanged from index-before.sha256. The worktree cwd/argv /proc sweep found no node, chromium, Git, bwrap or Python test processes under either r3 worktree. Every runner exited. Sent Sage clear at the observed completion stamp. No Docker used/network created, browser, shell suite or live step. Final counts and restoration/process proof are in verification.json and suite-counts.json. Sage runs the required shell landing gate; review/request remains with Sage.