Unclaimed files left in the canonical checkout. Inventory: canonical-cleanup-inventory.md (commit-as-evidence groups). detect-secrets scan clean on 2026-11-02: hits are sha256 pins, git object ids, test sentinels already in tracked tests and unit-file lines.
6.6 KiB
Filbert review, row 165 round 1: approve
Candidate manifest 89ca3fcf04f8c84d75710b15ef1d3b6b1e4cb0a4c0353b5360c93a51bd40f5b3 (24 paths). I applied build.patch with --index to 70c9131f0. All 24 manifest lines matched, git diff --cached --check is clean, and the diff is +1319 -18 over 24 files. I read it against brief blob b3cf580a, request 29034 and context 29035.
mos-0826 condition 2, the server-side writer
Each item holds in the writer, not only in the Console or the CLI:
- Credential refusal.
instance-settings.mjs:25-27refuses an added instance, or a change to a definition, that declares credentials, withorganization-credentials-out-of-scope.:104-107refuses a definition change away from one that declares them. Both throw beforewriter.write, so the bytes stay. A vars or launch change on an instance that holds its binding passes and leavescredentials,trackerandholderas they were. Tests:packages/business/tests/instance-settings.test.mjs:132,:139and:146. - Stale revision.
set()passes the revision to the organization writer, which checks it under the lock (organization.mjs:185and:212). The broker passesrevision-conflictthrough (broker.mjs:1184). Tests: business:178, CLI:101, bus runtimeinstances-verb.test.mjs:56. - Human proof.
broker.mjs:1164refusesinstancesandinstances.setwithhuman-requiredfor any session withouts.human, and the actor iss.human, never an argument. The chief of staff'sorganization.settakesORGANIZATION_KEYSonly, so instance keys getinvalid-requestbefore the writer. Test:instances-verb.test.mjs:24(reader, tester, launch and role sessions, the chief, and forged actor, holder and credentials keys). - Assistant protection. An END_PROTECTED definition is refused for add and for a change to it, and any change to a protected instance is refused, with
organization-definition-refused. Test: business:159. - Name bounds. Instance and definition must match
/^[a-z0-9][a-z0-9._-]{0,63}$/before anything else is read. Test: business:107. - 503 outcome-unknown.
serve.mjs:308-311: only a refusal withsent === falsemaps to its status with "Nothing changed."; anything else is 503outcome-unknownwithsent: "unknown".:313-315: a 200 needs a 64-hex revision, a booleanrestart, objectdefinitionsandinstances, andinstances[instance], or it is 503 too. Test:packages/webui/tests/instances.test.mjs:132(missingrestart, missing and arraydefinitions, and a lost answer).
The writer also runs validateBusinessDocument, the unknown-model check and each project file's loadProject and resolveInstance before it writes, as mosaic business validate does (business :107 and :168). It logs before and after with the human as actor (business :59 and :83).
The rest
- Broker.
INSTANCE_KEYSis strict (broker.mjs:138,:1170). Errors pass through as code only, BusinessError andunknown-modelbecomeinvalid-request, and anything else isoutcome-unknown. - Runtime.
instancesroutes toreadandinstances.settoset(runtime.mjs:99-100). - CLI. Usage errors exit 4 before any bus call, an agent session exits 3, refusals exit 2 with the code and a reason, and
scripts/mosaicsends onlybusiness instancesandbusiness instancetopackages/cli(CLI tests:61to:145). - Console. POST
/api/instancesexists only under--sendwith the writer bound. It checks the method (405), the user header (401), the exact Origin andSec-Fetch-Site(403), a JSON object of at most 16 KiB, and strict keys and types (400), all before the bus. The log line names the instance and the outcome, never the vars.public/bus.jsescapes throughtxt/esc, doesn't offer credentialed definitions, and checks the answer's whole shape. Tests: webui:42(real broker),:101,:119,:132,:151, plus the browser test. The harnesstools.testshows no tool sendsinstances. - Decision 123 diff. In the applied tree,
git diff --cachedofpackages/webui/src/public/hashes to4181b7f6...a7f7. That is byte-identical topublic-70c9131f0-warn.diff, and its+/-lines (without the+++/---headers) hash to939ecd28f80bc2f4a36a9468be0ccc2b0f08c8a630508060572491357f1f9444. Those are the digests sage-0948 names. - Hash pins. The only 64-hex pin in
packages/*/testsorscripts/test-*.shthat names a non-test manifest path ischannel-proof.test.mjs:14onpackages/webui/src/bus.mjs. It matches the manifest'sbus.mjsdigest, and the bump is its own commented hunk. - Docs.
docs/TOOLS.md,packages/cli/README.md,packages/webui/README.md,packages/bus/README.md,packages/business/README.mdanddocs/acceptance/314.mdmatch the code: the codes, the exit codes, the 16 KiB bound, the status mapping, and the restart that needs Mos's go or Jason's hand and that no command runs.
Notes (not blocking)
- The writer's credential message names the services (
instance-settings.mjs:27), but the broker'sfail(e.code)(broker.mjs:1185) drops it, so the human sees the generic reason from the CLI and Console tables. That still says why, as the brief asks. The services are on the read (instanceslists the credentialed definitions), so I don't count it as a gap. - The reason for
organization-definition-refusedinpackages/cli/src/instances.mjs:19("an assistant instance changes only throughmosaic limits set...") andpackages/webui/src/serve.mjs:282("an assistant instance changes only in the Assistant section") also covers adding an instance of an assistant definition, or changing a non-assistant instance to one. In those cases the text names the wrong subject. The CLI README table says "an assistant definition or instance", which fits. Wording only. A follow-up could say "an assistant definition or instance" in both tables. - The webui route test has no explicit
revision-conflictcase through/api/instances. The 409 mapping is the sharedbusStatus, and business, CLI and runtime tests cover the conflict itself.
Ran by me
Nothing that needed the slot. I applied the patch, ran sha256sum -c (24/24), hashed the public diff and its +/- lines, and ran greps.
Not mine
Darkwing's runs as BUILD.md records them: singles run 2 (pass 1419, fail 0, with test-config.sh 24, test-queue.sh 28 and test-task.sh 98), and mutants run 2 (29 of 29 killed). The W1 test case in webui/tests/instances.test.mjs came after singles run 2. That file passed singly afterwards (5 pass, 0 fail), and it is in the candidate I checked. I did not rerun any of it. The full gate on the candidate as it stands is Sage's at landing.