Files

6.1 KiB

Row 114 — Discord connector unit on a pinned copy (#1608)

Rocko, GPT-6.1-Sol. Reviewer Filbert. Base 72c9ac36c, after row108's landing (base.txt). Detached /mnt/storage/src/mosaic-stack-rocko-114. Started rev1185; Sage assigned sage-0228 and granted slot sage-0229. No candidate code commit, push or live Discord action.

Implementation and choices

Service render/install --copy selects a full 40-character lowercase id under the shared XDG_DATA_HOME/mosaic-stack/copies location or --copies. A missing CLI or pi refuses exit1 before unit-directory/temp creation. Explicit empty id is distinct from an omitted flag and also refuses. Copy directory/node paths use the same plain path alphabet as the other service scripts. Without --copy, renderer produces the original checkout bytes; install names the checkout and recommends --copy.

The template is deliberately untouched. Rendering first substitutes the same original README/PATH/checkout placeholders, then changes only WorkingDirectory and ExecStart when --copy is given. ExecStart calls Node on the copy's CLI directly, --supervised --repo copy. Copies have neither the discord.sh wrapper nor the systemd template, and require neither at runtime. Every other rendered line, including docs, restart/brake/stop, PATH and NoNewPrivileges, remains byte-identical. Test compares all such lines; out/checkout-render-before/after.txt also compare exactly.

Status reads actual WorkingDirectory from the user manager, prints its tree and copy id or checkout path, including effective drop-ins. It does not infer the tree from an install flag. Tests use a stub manager and isolated HOME/config paths; no real unit/binding/token is read by this build.

CLI accepts --offline only for check. It executes the original prepare, readToken and local reporting paths, returns before constructing REST and gateway, and ends with an explicit no-network line. The existing local checks include binding, context against --repo, tool roots, pi/token file and journal/STOP reporting. It retains the normal check's diagnostic STOP behavior: reports presence, does not clear STOP/create a journal/claim a run or launch pi. Online check and the run body are unchanged. Run with --offline refuses usage before reading config.

Evidence and correction

New focused tests initially refused the unrecognized flags/missing status. After implementation, the positive offline test's overly plain synthetic token failed the existing token-format check. Changed only fixture content to the existing helper's non-live dummy value; no validation weakening. Five focused tests pass (out/green-final.txt). The offline fixture traps fetch/WebSocket, marks attempted network calls, and proves offline passes without attempts while normal check still reaches REST and is trapped. Bad0644 token mode, missing context under selected repo and run flag misuse are pinned. Copy tests pin identical legacy bytes, unchanged other lines, empty/short/missing id, missing CLI/pi without any unit, and effective cwd. Shell cases also cover temporary --dir --no-reload installs, all required refusals, status and wrapper offline/run misuse.

The three prescribed mutants run independently in own process groups; timeouts kill the whole group, and source restores in finally. They reintroduce checkout ExecStart, remove pi existence refusal and make offline call getMe. Final gate/count/mutation and process/network receipts follow. DOCKER_HOST=unix:///nonexistent.sock; Docker-dependent cases explicitly skip.

Protected live plan — unexecuted

This patch touches packages/discord; Sage must notify Mos before and after landing, and every intervening Discord landing stays flagged while the live connector runs the checkout. Live switching waits for the SetSpark freeze to lift and Mos's separate window. Sage prepares a pushed copy; Mos's operator runs Node on that copy's cli.mjs check binding --repo copy --offline (the copy has no discord.sh), preserves the prior unit, installs --copy and reloads/restarts only on Mos's go. Binding context.files resolve inside the copy, so uncopied files refuse. Rollback restores the saved unit, daemon-reloads/restarts on Mos's go and keeps both copies. No live check, REST call, unit install/enable/reload/restart or private binding/token access performed; fixtures only. stack-copy.sh/check/COPY_PATHS remain untouched; connector pin is independent. Decision137 doc-only review fixes ship in a separate packet after landing.

Final gate

Suite Passed Failure / coverage
Discord node 183 0 failed, skipped or cancelled
test-auth.sh 15 0
test-conductor.sh 17 0
test-config.sh 24 0
test-discord.sh 78 0; includes Discord183
test-extension-package.sh 18 0
test-foundation.sh 44 0; includes foundation node80
test-land-work.sh 84 0
test-queue.sh 28 0; includes queue node156; canonical-root verify/render skipped
test-release.sh 4 0; Docker state machine skipped
test-task.sh 26 0; four Docker blocks skipped

Gate ran20:30:20-20:31:48 UTC, all11 steps exit0. Dead Docker socket for all commands; no Docker/provider coverage claimed. Task skips adapter/ mission/retry/skills/roles/seat/policy/user injection, workspace/capability, live task/fork and live user recall blocks. No observed recurrence of the reported gate faults. Source hashes and diff/patch checks pass after mutants.

Mutant Exit Result
checkout-execstart 1 killed
missing-pi-accepted 1 killed
offline-calls-getMe 1 killed

3/3 prescribed mutants killed, no timeout. All runners exited; process sweep exit0 busy[]. Docker inspect explicitly reported the named network mosaic-stack-rocko-114_default not found. No removal needed. Slot returned 20:32:57 UTC; no subsequent tests. Final manifest7/7 verified: 68c60a79914692f3f6d4923f7bcff41de109ccca33bf6fba687fb88efa24bcac.

Claimant in-review move rev1186, round1; expected missing-token request failure rev1187, command exit1 (out/queue-in-review.txt). Sage requests as jarvis, Filbert reviews. No protected live step executed.

Own logs-only commit: 618d71ebbb. No candidate source commit.