Files

6.9 KiB

Row 108 — Bus unit drop-in guard, usage and wrapper (#1602)

Rocko, GPT-6.1-Sol. Reviewer Filbert. Base 234121b30 (base.txt). Sage assignment sage-0223 and slot grant sage-0224, 2026-10-14. Detached worktree /mnt/storage/src/mosaic-stack-rocko-108. No candidate code commit or live action; Sage moves in-review and requests as jarvis.

Scope and implementation

Same existing guard scans each systemd-analyze lookup directory for the bus instance/template drop-ins plus mosaic-.service.d and service.d. Overriding ExecStart/WorkingDirectory, unreadable directory/file or discovery failure refuses before writing. Tests pin both inherited directory types, both overriding fields, unchanged prior unit, allowed Environment-only files, and unreadable dangling directory/file symlinks. All systemd reads and writes in tests hit fakes, install --dir temporary --no-reload only.

Header render/install comments now include --copy, --copies and --pm. Dead show replies were removed from both host install fakes and all stack install fakes. The systemd261 template-show rejection remains deliberately exercised by a fixture-only probe; the status fake's show arm is reached by status. Thus every retained show arm has a test and no successful template show is reintroduced.

Wrapper writes copy-root and Q81 mosaic-old lease comments after the marker. Marker stays line 2, exact lease stays unchanged, copy exec stays last. Tests assert both comments, lease execution, same-copy check success and a foreign marker refusal with all effective roots and the exec path matching. No wrapper preservation beyond these defined lines or copy-path change.

Install-script audit — recorded finding, no policy change

Read-only audit-install-scripts.py reads package-lock and installed package metadata (versions verified); out/install-scripts-audit.json records hashes, lifecycle commands, copied-source mentions and external bundle imports. No npm lifecycle is executed by the audit, and it reads no config/token.

Package Pinned version / blocked lifecycle Runtime relevance
@google/genai 1.52.0; preinstall echoes preinstall: no-op No copied source reference or external bundled Pi import; script creates no runtime artifact.
esbuild 0.28.1; postinstall node install.js installs/checks the build binary No copied source reference or external bundled Pi import; copy runs published code and does not build Pi.
protobufjs 7.6.6; postinstall node scripts/postinstall No copied source reference or external bundled Pi import; inspected script reads package versions and warns about dependency version schemes, creates no runtime artifact.

The dependency edge is not sufficient to declare an installed entrypoint active: unbundled pi-ai providers do import @google/genai when selected, but Mosaic's paths launch the published bundled CLI, not those SDK modules. Controller imports PI_BIN from conversation/src/pi-pin.mjs:34, which selects node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js; adapters/pi/adapter.sh execs pi, whose package.json bin selects the same entry. The audit scans every bundle chunk, including dynamic literal imports and require, and finds no external load of these three entrypoints. Installed unbundled SDK/extension paths or future runtime loaders would need a new audit; this finding does not authorize allowScripts. README states why the present copy warnings are expected. No blocked script is needed by the observed current copy paths; no allowScripts change is proposed.

Verification and honest correction

Focused red: four expected assertion failures against unchanged product code (out/red.txt). Focused green: four pass after the minimal changes. The first full gate passed; first mutants killed 6/7. The foreign marker mutant survived because the foreign fixture also had a mismatched exec. The final fixture matches its exec and all effective roots, isolating the marker; its normal test passes, and the full mutation/gate runs are repeated. First receipts remain out/full-first and out/mutants-first.

Mutants use their own process groups and kill the group on timeout, restore source in finally and run serially. DOCKER_HOST=unix:///nonexistent.sock for all node/script/mutant runs. Docker-dependent script checks are explicitly skipped, not passing claims. CLI includes the real pinned npm-ci integration fixture; no live bus, Console, binding or token is read. Final counts, mutation table and process/network-clear receipts follow below.

Protected boundary and review

No real systemd read/write, install/enable/reload/restart or ~/.npm-global/bin access. No source commit, push or live re-pin. This row takes effect only in a future copy/re-pin separately approved in Mos's window. Row114 starts only after this row's landing, on a base including it. Decision137: any review doc-only follow-ups ship in a separate packet after landing.

Final gate and mutation evidence

Suite Passed Failures / coverage
CLI node 187 0 failed, skipped or cancelled
test-auth.sh 15 0
test-conductor.sh 17 0
test-config.sh 24 0
test-discord.sh 66 0; also Discord node 178
test-extension-package.sh 18 0
test-foundation.sh 44 0; also foundation node 80
test-land-work.sh 84 0
test-queue.sh 28 0; also queue node 156; two canonical-root checks skipped
test-release.sh 4 0; Docker state-machine cases skipped
test-task.sh 26 0; four Docker-dependent blocks skipped

DOCKER_HOST=unix:///nonexistent.sock. Task skips the adapter/mission/retry/ skills/roles/seat/policy/user-injection block, workspace/capability block, live task/session-fork block and live recall pair. It does not establish Docker/provider coverage. No observed #258/#261/#262/#263 gate recurrence.

Mutant Exit Result
miss-prefix 1 killed
miss-all-services 1 killed
ignore-unreadable-directory 1 killed
ignore-unreadable-file 1 killed
omit-copy-comment 1 killed
omit-lease-comment 1 killed
accept-foreign-check-wrapper 1 killed

Final 7/7 killed, no timeout. Final full gate 20:08:16-20:09:52 UTC. Own process-group timeout cleanup is in mutants.py. Runner completions were confirmed before process-sweep.py exited 0 with busy []. Docker's read-only network inspect explicitly reported mosaic-stack-rocko-108_default not found, so no network removal was needed. Slot returned to Sage at 20:09:59 UTC. No subsequent tests.

Candidate manifest SHA256: 19ef7133db592787c24fa473357687a5741ccd7823627b970624c930a7611dbc. 6/6 candidate hashes match after all fault injections. build.patch applies to canonical HEAD and diff --check is clean; no candidate-path drift. No source commit or protected action performed. Sage owns the in-review move/request; row remains in-progress at builder rev1178 until that move.

Own append-only log commit: d743048362. Candidate source remains uncommitted.