Files

101 KiB

Row 286 / C2-03b / Gitea #1791 — Rockerduck r3

2026-10-24. Base b19ffa04f; transplanted tip 7842700fb. Status: UNTESTED, awaiting Sage CLEAR.

Authority and boundaries

Sage-4040 authorizes transplant, conflict resolution and push only rockerduck/row286-r3 through the configured repository credential helper. No force push. No tests, npm, mutants or setup before CLEAR; rows 296 and 217 precede this gate. Ludwig BUILD.md and sage-2922/2925/2928/2947/2951, dewey-0860/0864/0869 remain binding. Evidence here is plain text.

Overlaps and resolution

  • broker.mjs: automatic merge. Keep newer addressed project rooms (row 215), grant-scope (298), revoke-under-writer-lock (239), and add libraryFetchCredential near GRANT_EVIDENCE/reconcileGrants. The added method uses existing grant-event and firing checks; no scope or lifecycle authority changes.
  • runtime.mjs: automatic merge. Keep newer grantScope wiring and revocation-under-lock comments; add chief credential selection to both verb and timer syncOptions and the refusal fix text.
  • library/README.md: automatic merge. Preserve newer supporting/editor.user mapping and query/index documentation; add push/credential section.
  • library/src/index.mjs: sole content conflict in 61ef385e4. Keep supportingPath and query/index exports from base, replace only the sync export with the expanded push/credential export.
  • Rows 222/215: mirror.mjs and sync.mjs unchanged between 45dca69f6 and b19ffa04f; the transplant adds optional credential state without renaming keys and keeps all mirror locking/read behavior. The newer index/query layer remains exported.

Test preservation

The complete pre-existing test declaration block in library/tests/sync.test.mjs is byte-identical to b19ffa04f. No other old test file changed. Ludwig adds fs/API imports and extends shared world() to pass users to fakeGitea; default remains the original user/token pair. These are inherited setup edits, not assertion edits; their ruling context is Ludwig BUILD.md (sage-2947/dewey-0864) and the appended C2-03b block. No additional test edit made during transplant.

Range-diff

Command: git range-diff --no-color 45dca69f6..573fa0be0 b19ffa04f..7842700fb

1: 4faa3f6e9 = 1: 3326d9487 Row 286 C2-03b: build plan and four scope questions (BUILD.md only) 2: b3cf04b37 = 2: e155e3245 Row 286 C2-03b: sage-2922 files-owned extension; Q4 back to Sage (user is the bot fetch identity) 3: dd3e3c096 = 3: 6ce15eddd Row 286 C2-03b: sage-2925 Q4 ruling (humanCredential takes her login; editor.user is row 283's) 4: edec640d2 = 4: c2c4ac679 Row 286 C2-03b: fold dewey-0860 (Q1 sh fd/inode check, Q2 chief by roles definition, N1-N3) 5: d46b6d6ef = 5: 8ca442959 Row 286 C2-03b: sage-2928 rulings (sh helper, chief by roles definition, departure noted) 6: 61ef385e4 ! 6: cca76fa95 Row 286 C2-03b: library push, per-seat credentials, the chief's fetch credential, askpass fd check (#1791, sage-2922/2925/2928, dewey-0860); unrun @@ packages/library/src/index.mjs: export { readLibrary, listTree, readTexts, parse export { SYNC_STATE_FILE, mirrorPath, ensureMirror, withLibraryLock, servedCommit, readSyncState, libraryStatus, readLibraryFile } from './mirror.mjs'; -export { syncCommand, sync, ASKPASS, SLOT, SYNC_INTERVAL_MS } from './sync.mjs'; +export { syncCommand, sync, push, humanCredential, ASKPASS, SLOT, HUMAN_SLOT, CREDENTIAL_KINDS, SYNC_INTERVAL_MS } from './sync.mjs'; + export { buildIndex, indexFor, clearIndexCache, indexCacheSize } from './index-build.mjs'; + export { sees, find, get, search, manuscript, universeInfo, QUERY_REPLY_CAP, LOOKUP_LIMIT, MANUSCRIPT_LINES } from './query.mjs';

  ## packages/library/src/mirror.mjs ##
 @@ packages/library/src/mirror.mjs: async function readStateHeld(mirror, { branch } = {}) {

7: b0d21c41a = 7: bb29ee2d9 Row 286: library.status shows the credential (webby-0151 R3); fired chief revokes its row as row 281 does; unrun 8: 44edead6d = 8: 90b70a6a6 Row 286 C2-03b: fold dewey-0864 (T7/T9 through grants.revoke and instance.fire, race fetch takes the sync guard, two-chief code, id -u shim note) 9: ae48662af = 9: d037e98d4 Row 286 C2-03b: cite sage-2947 (T7 real verbs, R1 in this row, 285/286 rebase rule) 10: a1876928f = 10: f2a43d69d Row 286 C2-03b: fold dewey-0869 and sage-2951 (marker-gated busy test, T9 scratch roles with a chief gitea credential, fired-chief path cited) 11: 4d6c8234f = 11: 888548607 Row 286 C2-03b: BUILD.md notes for dewey-0869 and sage-2951 (fired-chief path :4308, marker-gated busy test, T9 scratch roles) 12: 573fa0be0 = 12: 7842700fb Row 286 C2-03b r2: rebase onto 45dca69f6 (sage-3579). The range-diff is all =. Drift check of the paths the tests read is in BUILD.md. Unrun.

Stable patch IDs

Original commit | transplanted commit | original patch-id | transplanted patch-id

4faa3f6e9a | 3326d9487b | 020d56ada6149af45293d28d288baeaae8cacd3f | 020d56ada6149af45293d28d288baeaae8cacd3f b3cf04b371 | e155e3245b | 9ad37bcea2d6a6d2758ff7deb90a561e544c910d | 9ad37bcea2d6a6d2758ff7deb90a561e544c910d dd3e3c0963 | 6ce15eddd5 | 7cb2e6caab1d9caa7c0f618770bde86c00dfd425 | 7cb2e6caab1d9caa7c0f618770bde86c00dfd425 edec640d29 | c2c4ac6793 | 198983987d198ff0b28f12fb5071e683f597edd7 | 198983987d198ff0b28f12fb5071e683f597edd7 d46b6d6ef6 | 8ca4429594 | 8666bced0fb4fc3b65c2cedcfd68a563cdf9ecdc | 8666bced0fb4fc3b65c2cedcfd68a563cdf9ecdc 61ef385e4a | cca76fa95f | 30f610a11c1a65ae4529e69a9f4c99b1834fb7e4 | a62594f0f33721ddb48ae09df8f42b8889122bfd b0d21c41a9 | bb29ee2d95 | 6d37b5dc2589652b8046de34b74de52ccde98dd6 | 6d37b5dc2589652b8046de34b74de52ccde98dd6 44edead6d8 | 90b70a6a6c | a99a4af887430d7e42b2874c0c51f9e6b47dcb74 | a99a4af887430d7e42b2874c0c51f9e6b47dcb74 ae48662afa | d037e98d4c | b8eb3b7f746daee6d4827069be5fbd71cf05f360 | b8eb3b7f746daee6d4827069be5fbd71cf05f360 a1876928f4 | f2a43d69d9 | fa21b69573c0c18c413e5b6d5ce73d714b27d406 | fa21b69573c0c18c413e5b6d5ce73d714b27d406 4d6c8234fa | 888548607e | e7ec71e368888b24693534cc16ed01229d882974 | e7ec71e368888b24693534cc16ed01229d882974 573fa0be06 | 7842700fb6 | b0e9ed4fb8c866be49b1bc6e66dd618dde07cf99 | b0e9ed4fb8c866be49b1bc6e66dd618dde07cf99

Drift inventory: test readers

Static scan of tracked test files and scripts: literal relative imports/paths resolved from each reader, changed-path suffixes, basename references, and joined quoted path components. The conservative basename pass includes join() readers and computed-path candidates. Entries list file and matching line numbers only; no source values or fixture tokens are printed. Direct imports count as readers. Transitive importers are listed separately.

packages/bus/src/broker.mjs

agents/darkwing/work/slice1-s2-review/probes-r2.test.mjs: 10 agents/darkwing/work/slice1-s2-review/probes.test.mjs: 10 agents/darkwing/work/slice1-s2b-review/probes-r2.test.mjs: 7 agents/darkwing/work/slice1-s2b-review/probes-s2b.test.mjs: 7 agents/darkwing/work/slice1-s2c-review/probes-s2c.test.mjs: 7 agents/dewey/work/queue-139/mutants/m1-no-spec-check.txt: 318, 319, 320, 321, 323, 334, 335, 336, 337, 339, 350, 351, 352, 353, 355, 387, 388, 389, 390, 392, 470, 471, 472, 473, 475, 486, 487, 488, 489, 491, 502, 503, 504, 505, 507, 518, 519, 520, 522, 534, 535, 536, 538, 550, 551, 552, 553, 555 agents/dewey/work/queue-139/r2/mutants/m1-no-spec-check.txt: 323, 324, 325, 326, 328, 339, 340, 341, 342, 344, 355, 356, 357, 358, 360, 392, 393, 394, 395, 397, 473, 474, 475, 476, 478, 489, 490, 491, 492, 494, 505, 506, 507, 508, 510, 521, 522, 523, 525, 537, 538, 539, 541 agents/herb/work/queue-215/granted-t34/library.test-baseline-focused.log: 31, 32, 33, 35, 49, 50, 51, 53 agents/herb/work/queue-215/granted-t34/library.test-baseline-r2.log: 39, 40, 41, 43, 57, 58, 59, 61 agents/herb/work/queue-215/granted-t34/library.test-baseline.log: 21, 22, 35, 36, 51, 52, 96, 97 agents/rocko/work/queue-138/r3/mutants/26-record-spec-refusal.log: 32 agents/rocko/work/queue-138/r4/mutants/26-record-spec-refusal.log: 33 docs/plans/2026-10-12_pm-test-fixes.md: 21, 37, 101, 103, 113 docs/plans/2026-10-13_retest-faults.md: 85, 107 packages/bus/tests/access-revoke.test.mjs: 14 packages/bus/tests/agents.test.mjs: 9 packages/bus/tests/approval-binding.test.mjs: 7 packages/bus/tests/broker.test.mjs: 10 packages/bus/tests/chief-of-staff.test.mjs: 10 packages/bus/tests/comment-cursors.test.mjs: 7 packages/bus/tests/console-decide.test.mjs: 14 packages/bus/tests/creative.test.mjs: 8 packages/bus/tests/credential-status.test.mjs: 12 packages/bus/tests/credential-verbs.test.mjs: 11 packages/bus/tests/csuite-messaging.test.mjs: 12 packages/bus/tests/daily-quota-runtime.test.mjs: 10 packages/bus/tests/decision-close.test.mjs: 9 packages/bus/tests/decision-route.test.mjs: 12 packages/bus/tests/decisions.test.mjs: 9 packages/bus/tests/end-launch.test.mjs: 9 packages/bus/tests/fire-revokes-grants.test.mjs: 15 packages/bus/tests/gitea-grant-docker.test.mjs: 15 packages/bus/tests/gitea-grant.test.mjs: 12 packages/bus/tests/grant-enroll.test.mjs: 10 packages/bus/tests/grant-executor.test.mjs: 15 packages/bus/tests/grant-host.test.mjs: 10 packages/bus/tests/grant-migration.test.mjs: 10 packages/bus/tests/grant-scope.test.mjs: 14 packages/bus/tests/hard-waits.test.mjs: 7 packages/bus/tests/host-fixtures.mjs: 6 packages/bus/tests/host-run.test.mjs: 16, 181 packages/bus/tests/instances-verb.test.mjs: 11 packages/bus/tests/land.test.mjs: 18 packages/bus/tests/launch-notice.test.mjs: 8 packages/bus/tests/launcher-released.test.mjs: 8 packages/bus/tests/library-credential.test.mjs: 18 packages/bus/tests/library-sync.test.mjs: 11 packages/bus/tests/library.test.mjs: 8 packages/bus/tests/lifecycle-verbs.test.mjs: 11 packages/bus/tests/limit-checks.test.mjs: 323 packages/bus/tests/limit-stop.test.mjs: 12 packages/bus/tests/limits.test.mjs: 7 packages/bus/tests/message-citation.test.mjs: 6 packages/bus/tests/message-filter.test.mjs: 12 packages/bus/tests/messages.test.mjs: 3 packages/bus/tests/messaging.test.mjs: 8 packages/bus/tests/names.test.mjs: 8 packages/bus/tests/peer-transport.test.mjs: 9, 47 packages/bus/tests/plugins-verb.test.mjs: 9 packages/bus/tests/processing.test.mjs: 6 packages/bus/tests/project-await.test.mjs: 7 packages/bus/tests/project-files.test.mjs: 8 packages/bus/tests/project-runtime.test.mjs: 13 packages/bus/tests/publish.test.mjs: 14, 221 packages/bus/tests/reload.test.mjs: 9 packages/bus/tests/replies.test.mjs: 11 packages/bus/tests/requirements.test.mjs: 10 packages/bus/tests/review.test.mjs: 14 packages/bus/tests/revoke-window.test.mjs: 13 packages/bus/tests/rooms.test.mjs: 8 packages/bus/tests/routes-verb.test.mjs: 13 packages/bus/tests/session-clear.test.mjs: 10 packages/bus/tests/session-compactions.test.mjs: 9 packages/bus/tests/sessions.test.mjs: 10 packages/bus/tests/single-use.test.mjs: 7 packages/bus/tests/spec-fixtures.mjs: 6 packages/bus/tests/staff-request.test.mjs: 8 packages/bus/tests/state.test.mjs: 7 packages/bus/tests/task-page.test.mjs: 7 packages/bus/tests/task-read.test.mjs: 7 packages/bus/tests/tasks.test.mjs: 9 packages/bus/tests/tester-threads.test.mjs: 11, 284 packages/bus/tests/tester-writes.test.mjs: 10 packages/bus/tests/tester.test.mjs: 10 packages/bus/tests/thread-claims.test.mjs: 11 packages/bus/tests/thread-migration.test.mjs: 11 packages/bus/tests/thread-shares.test.mjs: 14 packages/bus/tests/threads.test.mjs: 9 packages/bus/tests/transport.test.mjs: 8 packages/bus/tests/usage-broker.test.mjs: 7 packages/bus/tests/user-principal.test.mjs: 16 packages/bus/tests/viewer.test.mjs: 14 packages/bus/tests/web.test.mjs: 8 packages/bus/tests/workflow-roles.test.mjs: 11 packages/business/tests/workflow-roles.test.mjs: 115, 136 packages/cli/tests/compactions-launch.test.mjs: 24 packages/cli/tests/helpers.mjs: 10 packages/cli/tests/idle-stop-race.test.mjs: 17 packages/cli/tests/instances.test.mjs: 13 packages/cli/tests/lifecycle.test.mjs: 19 packages/cli/tests/processing-cli.test.mjs: 7 packages/cli/tests/revoke-window.test.mjs: 19 packages/cli/tests/session-clear.test.mjs: 18 packages/cli/tests/session-cli.test.mjs: 94 packages/cli/tests/session-launch.test.mjs: 21 packages/cli/tests/stack-release.test.mjs: 1993 packages/cli/tests/tester-reads.test.mjs: 12 packages/cli/tests/tester-threads.test.mjs: 14 packages/cli/tests/tester.test.mjs: 7 packages/cli/tests/thread-cli.test.mjs: 14 packages/cli/tests/thread-launch.test.mjs: 19 packages/cli/tests/thread-revoke.test.mjs: 18 packages/harness/tests/runner.test.mjs: 14 packages/harness/tests/tools.test.mjs: 4 packages/seat/tests/sandbox.test.mjs: 15 packages/seat/tests/session.test.mjs: 11 packages/tasks/tests/fields.test.mjs: 10, 226 packages/tasks/tests/world.mjs: 5 packages/webui/tests/board-held.test.mjs: 20 packages/webui/tests/bus-browser.test.mjs: 11 packages/webui/tests/bus.test.mjs: 13 packages/webui/tests/chat-sessions-access.test.mjs: 10 packages/webui/tests/chat.test.mjs: 191 packages/webui/tests/decide-browser.test.mjs: 14 packages/webui/tests/granted-user.test.mjs: 16 packages/webui/tests/instances.test.mjs: 15 packages/webui/tests/routes-browser.test.mjs: 15 packages/webui/tests/routes.test.mjs: 12 packages/webui/tests/send-browser.test.mjs: 13 packages/webui/tests/sso-browser.test.mjs: 14 packages/webui/tests/tester-fixture.mjs: 12 packages/webui/tests/thread-sharing-fixture.mjs: 6 packages/webui/tests/user-option-swap.test.mjs: 14

Transitive import readers: packages/bus/tests/access-revoke.test.mjs, packages/bus/tests/agents.test.mjs, packages/bus/tests/approval-binding.test.mjs, packages/bus/tests/broker.test.mjs, packages/bus/tests/business.test.mjs, packages/bus/tests/channel-proof.test.mjs, packages/bus/tests/chief-of-staff.test.mjs, packages/bus/tests/comment-cursors.test.mjs, packages/bus/tests/console-decide.test.mjs, packages/bus/tests/creative.test.mjs, packages/bus/tests/credential-claim.test.mjs, packages/bus/tests/credential-status.test.mjs, packages/bus/tests/credential-store.test.mjs, packages/bus/tests/credential-verbs.test.mjs, packages/bus/tests/credentials.test.mjs, packages/bus/tests/csuite-messaging.test.mjs, packages/bus/tests/daily-quota-runtime.test.mjs, packages/bus/tests/decision-close.test.mjs, packages/bus/tests/decision-route.test.mjs, packages/bus/tests/decisions.test.mjs, packages/bus/tests/end-launch.test.mjs, packages/bus/tests/fire-revokes-grants.test.mjs, packages/bus/tests/gitea-grant-docker.test.mjs, packages/bus/tests/gitea-grant.test.mjs, packages/bus/tests/grant-enroll.test.mjs, packages/bus/tests/grant-executor.test.mjs, packages/bus/tests/grant-host.test.mjs, packages/bus/tests/grant-migration.test.mjs, packages/bus/tests/grant-scope-runtime.test.mjs, packages/bus/tests/grant-scope.test.mjs, packages/bus/tests/hard-waits.test.mjs, packages/bus/tests/host-fixtures.mjs, packages/bus/tests/host-run.test.mjs, packages/bus/tests/human.test.mjs, packages/bus/tests/instances-verb.test.mjs, packages/bus/tests/land.test.mjs, packages/bus/tests/launch-notice.test.mjs, packages/bus/tests/launcher-released.test.mjs, packages/bus/tests/library-credential.test.mjs, packages/bus/tests/library-sync.test.mjs, packages/bus/tests/library.test.mjs, packages/bus/tests/lifecycle-revoke.test.mjs, packages/bus/tests/lifecycle-verbs.test.mjs, packages/bus/tests/limit-stop.test.mjs, packages/bus/tests/limits-runtime.test.mjs, packages/bus/tests/limits.test.mjs, packages/bus/tests/message-citation.test.mjs, packages/bus/tests/message-filter.test.mjs, packages/bus/tests/messages.test.mjs, packages/bus/tests/messaging.test.mjs, packages/bus/tests/names.test.mjs, packages/bus/tests/peer-transport.test.mjs, packages/bus/tests/peercred.test.mjs, packages/bus/tests/plugins-verb.test.mjs, packages/bus/tests/principal.test.mjs, packages/bus/tests/process.test.mjs, packages/bus/tests/processing-runtime.test.mjs, packages/bus/tests/processing-timeout.test.mjs, packages/bus/tests/processing.test.mjs, packages/bus/tests/project-await.test.mjs, packages/bus/tests/project-files.test.mjs, packages/bus/tests/project-runtime.test.mjs, packages/bus/tests/publish.test.mjs, packages/bus/tests/reload.test.mjs, packages/bus/tests/replies.test.mjs, packages/bus/tests/requirements.test.mjs, packages/bus/tests/review.test.mjs, packages/bus/tests/revoke-window.test.mjs, packages/bus/tests/rooms.test.mjs, packages/bus/tests/routes-verb.test.mjs, packages/bus/tests/session-clear.test.mjs, packages/bus/tests/session-compactions.test.mjs, packages/bus/tests/sessions.test.mjs, packages/bus/tests/single-use.test.mjs, packages/bus/tests/spec-fixtures.mjs, packages/bus/tests/spec-review.test.mjs, packages/bus/tests/spec-socket.test.mjs, packages/bus/tests/spec.test.mjs, packages/bus/tests/staff-request.test.mjs, packages/bus/tests/state.test.mjs, packages/bus/tests/task-page.test.mjs, packages/bus/tests/task-read.test.mjs, packages/bus/tests/tasks.test.mjs, packages/bus/tests/tester-threads.test.mjs, packages/bus/tests/tester-writes.test.mjs, packages/bus/tests/tester.test.mjs, packages/bus/tests/thread-claims.test.mjs, packages/bus/tests/thread-migration.test.mjs, packages/bus/tests/thread-shares.test.mjs, packages/bus/tests/threads.test.mjs, packages/bus/tests/transport.test.mjs, packages/bus/tests/usage-broker.test.mjs, packages/bus/tests/usage-runtime.test.mjs, packages/bus/tests/user-principal.test.mjs, packages/bus/tests/viewer.test.mjs, packages/bus/tests/web.test.mjs, packages/bus/tests/workflow-roles.test.mjs, packages/business/tests/case1-business-file.test.mjs, packages/cli/tests/access-boot.test.mjs, packages/cli/tests/access.test.mjs, packages/cli/tests/app.test.mjs, packages/cli/tests/boot-status.test.mjs, packages/cli/tests/case1-accept.test.mjs, packages/cli/tests/case1-hostcheck.test.mjs, packages/cli/tests/case2-install.test.mjs, packages/cli/tests/case2-persona-import.test.mjs, packages/cli/tests/case2-unit.test.mjs, packages/cli/tests/channel-cli.test.mjs, packages/cli/tests/channel-fixture.mjs, packages/cli/tests/channel-recovery.test.mjs, packages/cli/tests/cli.test.mjs, packages/cli/tests/compactions-launch.test.mjs, packages/cli/tests/config.test.mjs, packages/cli/tests/credentials.test.mjs, packages/cli/tests/fixtures/launch-host.mjs, packages/cli/tests/follow.test.mjs, packages/cli/tests/git-socket.test.mjs, packages/cli/tests/grants-scope.test.mjs, packages/cli/tests/grants.test.mjs, packages/cli/tests/helpers.mjs, packages/cli/tests/host.test.mjs, packages/cli/tests/hosts.test.mjs, packages/cli/tests/idle-stop-race.test.mjs, packages/cli/tests/instances.test.mjs, packages/cli/tests/launch-account.test.mjs, packages/cli/tests/launch-limit-checks.test.mjs, packages/cli/tests/launch-limits.test.mjs, packages/cli/tests/launch-routes.test.mjs, packages/cli/tests/launcher.test.mjs, packages/cli/tests/lifecycle.test.mjs, packages/cli/tests/limits-tokens.test.mjs, packages/cli/tests/limits.test.mjs, packages/cli/tests/mark-read.test.mjs, packages/cli/tests/names.test.mjs, packages/cli/tests/notifier.test.mjs, packages/cli/tests/optional-tracker.test.mjs, packages/cli/tests/other-tree.test.mjs, packages/cli/tests/processing-cli.test.mjs, packages/cli/tests/project-name-repo.test.mjs, packages/cli/tests/project.test.mjs, packages/cli/tests/publish-socket.test.mjs, packages/cli/tests/revoke-window.test.mjs, packages/cli/tests/session-clear.test.mjs, packages/cli/tests/session-cli.test.mjs, packages/cli/tests/session-launch.test.mjs, packages/cli/tests/stack-copy.test.mjs, packages/cli/tests/stack-instances.test.mjs, packages/cli/tests/tester-http.test.mjs, packages/cli/tests/tester-reads.test.mjs, packages/cli/tests/tester-threads.test.mjs, packages/cli/tests/tester.test.mjs, packages/cli/tests/thread-cli.test.mjs, packages/cli/tests/thread-launch.test.mjs, packages/cli/tests/thread-revoke.test.mjs, packages/cli/tests/trackers-boot.test.mjs, packages/cli/tests/transport.test.mjs, packages/cli/tests/usage.test.mjs, packages/cli/tests/verbs.test.mjs, packages/harness/tests/claude-session.test.mjs, packages/harness/tests/creative.test.mjs, packages/harness/tests/pi-session.test.mjs, packages/harness/tests/raise-domain.test.mjs, packages/harness/tests/runner.test.mjs, packages/harness/tests/skills.test.mjs, packages/harness/tests/spec-tools.test.mjs, packages/harness/tests/tools.test.mjs, packages/processing-control/tests/task.test.mjs, packages/seat/tests/sandbox.test.mjs, packages/seat/tests/session.test.mjs, packages/tasks/tests/adapter.test.mjs, packages/tasks/tests/comment-restart.test.mjs, packages/tasks/tests/fields.test.mjs, packages/tasks/tests/processing.test.mjs, packages/tasks/tests/shapes.test.mjs, packages/tasks/tests/startup.test.mjs, packages/tasks/tests/sync.test.mjs, packages/tasks/tests/tree.test.mjs, packages/tasks/tests/verbs.test.mjs, packages/tasks/tests/world.mjs, packages/webui/tests/agents-browser.test.mjs, packages/webui/tests/agents.test.mjs, packages/webui/tests/assistant.test.mjs, packages/webui/tests/board-held.test.mjs, packages/webui/tests/browser-edge.test.mjs, packages/webui/tests/browser.test.mjs, packages/webui/tests/bus-browser.test.mjs, packages/webui/tests/bus.test.mjs, packages/webui/tests/channel-chat.test.mjs, packages/webui/tests/chat-browser.test.mjs, packages/webui/tests/chat-instances.test.mjs, packages/webui/tests/chat-sessions-access.test.mjs, packages/webui/tests/chat.test.mjs, packages/webui/tests/conversation.test.mjs, packages/webui/tests/decide-browser.test.mjs, packages/webui/tests/decide-sso.test.mjs, packages/webui/tests/decision-http.test.mjs, packages/webui/tests/discord.test.mjs, packages/webui/tests/docs-browser.test.mjs, packages/webui/tests/editor-browser.test.mjs, packages/webui/tests/editor.test.mjs, packages/webui/tests/fixture.mjs, packages/webui/tests/granted-user.test.mjs, packages/webui/tests/history-fixture.mjs, packages/webui/tests/history-return-flow.test.mjs, packages/webui/tests/instances-browser.test.mjs, packages/webui/tests/instances.test.mjs, packages/webui/tests/library-cli.test.mjs, packages/webui/tests/library-status.test.mjs, packages/webui/tests/limits-browser.test.mjs, packages/webui/tests/limits-route.test.mjs, packages/webui/tests/messages.test.mjs, packages/webui/tests/pinned-copy.test.mjs, packages/webui/tests/preview.test.mjs, packages/webui/tests/processing-browser.test.mjs, packages/webui/tests/processing.test.mjs, packages/webui/tests/project-file.test.mjs, packages/webui/tests/project-name-repo.test.mjs, packages/webui/tests/proof-cli.test.mjs, packages/webui/tests/proof.test.mjs, packages/webui/tests/reads.test.mjs, packages/webui/tests/relaunch.test.mjs, packages/webui/tests/return-flow.test.mjs, packages/webui/tests/routes-browser.test.mjs, packages/webui/tests/routes.test.mjs, packages/webui/tests/send-browser.test.mjs, packages/webui/tests/send.test.mjs, packages/webui/tests/serve.test.mjs, packages/webui/tests/settings-form.test.mjs, packages/webui/tests/settings-write.test.mjs, packages/webui/tests/shell.test.mjs, packages/webui/tests/sso-browser.test.mjs, packages/webui/tests/sso.test.mjs, packages/webui/tests/tester-browser-fixture.mjs, packages/webui/tests/tester-browser.test.mjs, packages/webui/tests/tester-cli.test.mjs, packages/webui/tests/tester-fixture.mjs, packages/webui/tests/tester-listener.test.mjs, packages/webui/tests/tester-socket.test.mjs, packages/webui/tests/thread-claims-browser.test.mjs, packages/webui/tests/thread-claims.test.mjs, packages/webui/tests/thread-sharing-fixture.mjs, packages/webui/tests/thread-sharing.test.mjs, packages/webui/tests/usage-browser.test.mjs, packages/webui/tests/usage.test.mjs, packages/webui/tests/user-option-swap.test.mjs, packages/webui/tests/views.test.mjs

packages/bus/src/runtime.mjs

agents/herb/work/queue-215/granted-t34/library.test-baseline.log: 71, 98, 114 agents/herb/work/queue-215/granted-t34/library.test-green-r2.log: 37, 51 agents/rocko/work/vikunja-502/tests/test_timeout_cause.py: 20 packages/bus/tests/access-revoke.test.mjs: 15 packages/bus/tests/chief-of-staff.test.mjs: 12 packages/bus/tests/creative.test.mjs: 9 packages/bus/tests/credential-verbs.test.mjs: 10 packages/bus/tests/daily-quota-runtime.test.mjs: 17 packages/bus/tests/gitea-grant.test.mjs: 188 packages/bus/tests/grant-executor.test.mjs: 200 packages/bus/tests/grant-scope-runtime.test.mjs: 8 packages/bus/tests/host-run.test.mjs: 19, 429 packages/bus/tests/instances-verb.test.mjs: 62 packages/bus/tests/library-credential.test.mjs: 21, 98 packages/bus/tests/library-sync.test.mjs: 12 packages/bus/tests/library.test.mjs: 11 packages/bus/tests/lifecycle-revoke.test.mjs: 11 packages/bus/tests/lifecycle-verbs.test.mjs: 368 packages/bus/tests/limit-checks.test.mjs: 323 packages/bus/tests/limits-runtime.test.mjs: 15 packages/bus/tests/limits.test.mjs: 20, 27 packages/bus/tests/plugins-verb.test.mjs: 34, 69 packages/bus/tests/processing-runtime.test.mjs: 8 packages/bus/tests/project-runtime.test.mjs: 6 packages/bus/tests/publish.test.mjs: 234 packages/bus/tests/reload.test.mjs: 11 packages/bus/tests/routes-verb.test.mjs: 93, 103 packages/bus/tests/session-compactions.test.mjs: 12 packages/bus/tests/tasks.test.mjs: 11 packages/bus/tests/tester-writes.test.mjs: 11 packages/bus/tests/tester.test.mjs: 13 packages/bus/tests/usage-runtime.test.mjs: 6 packages/bus/tests/web.test.mjs: 283 packages/business/tests/case1-business-file.test.mjs: 10 packages/cli/tests/access-boot.test.mjs: 11 packages/cli/tests/access.test.mjs: 11 packages/cli/tests/case2-install.test.mjs: 340 packages/cli/tests/channel-fixture.mjs: 38, 49 packages/cli/tests/compactions-launch.test.mjs: 25 packages/cli/tests/idle-stop-race.test.mjs: 18 packages/cli/tests/instances.test.mjs: 14 packages/cli/tests/lifecycle.test.mjs: 20 packages/cli/tests/optional-tracker.test.mjs: 7 packages/cli/tests/publish-socket.test.mjs: 13 packages/cli/tests/revoke-window.test.mjs: 20 packages/cli/tests/session-clear.test.mjs: 19 packages/cli/tests/session-launch.test.mjs: 22, 393 packages/cli/tests/stack-copy.test.mjs: 152, 158 packages/cli/tests/tester-reads.test.mjs: 13 packages/cli/tests/tester-threads.test.mjs: 15 packages/cli/tests/thread-launch.test.mjs: 21 packages/cli/tests/thread-revoke.test.mjs: 19 packages/webui/tests/instances.test.mjs: 16 packages/webui/tests/routes-browser.test.mjs: 16 packages/webui/tests/routes.test.mjs: 13 packages/webui/tests/tester-fixture.mjs: 11

Transitive import readers: packages/bus/tests/access-revoke.test.mjs, packages/bus/tests/chief-of-staff.test.mjs, packages/bus/tests/creative.test.mjs, packages/bus/tests/credential-verbs.test.mjs, packages/bus/tests/daily-quota-runtime.test.mjs, packages/bus/tests/grant-scope-runtime.test.mjs, packages/bus/tests/host-run.test.mjs, packages/bus/tests/instances-verb.test.mjs, packages/bus/tests/library-credential.test.mjs, packages/bus/tests/library-sync.test.mjs, packages/bus/tests/library.test.mjs, packages/bus/tests/lifecycle-revoke.test.mjs, packages/bus/tests/lifecycle-verbs.test.mjs, packages/bus/tests/limits-runtime.test.mjs, packages/bus/tests/limits.test.mjs, packages/bus/tests/plugins-verb.test.mjs, packages/bus/tests/processing-runtime.test.mjs, packages/bus/tests/project-runtime.test.mjs, packages/bus/tests/publish.test.mjs, packages/bus/tests/reload.test.mjs, packages/bus/tests/routes-verb.test.mjs, packages/bus/tests/tasks.test.mjs, packages/bus/tests/tester-writes.test.mjs, packages/bus/tests/tester.test.mjs, packages/bus/tests/usage-runtime.test.mjs, packages/bus/tests/web.test.mjs, packages/business/tests/case1-business-file.test.mjs, packages/cli/tests/access-boot.test.mjs, packages/cli/tests/access.test.mjs, packages/cli/tests/compactions-launch.test.mjs, packages/cli/tests/idle-stop-race.test.mjs, packages/cli/tests/instances.test.mjs, packages/cli/tests/lifecycle.test.mjs, packages/cli/tests/optional-tracker.test.mjs, packages/cli/tests/publish-socket.test.mjs, packages/cli/tests/revoke-window.test.mjs, packages/cli/tests/session-clear.test.mjs, packages/cli/tests/session-launch.test.mjs, packages/cli/tests/tester-reads.test.mjs, packages/cli/tests/tester-threads.test.mjs, packages/cli/tests/thread-launch.test.mjs, packages/cli/tests/thread-revoke.test.mjs, packages/webui/tests/instances.test.mjs, packages/webui/tests/proof-cli.test.mjs, packages/webui/tests/routes-browser.test.mjs, packages/webui/tests/routes.test.mjs, packages/webui/tests/tester-browser.test.mjs, packages/webui/tests/tester-cli.test.mjs, packages/webui/tests/tester-fixture.mjs, packages/webui/tests/tester-listener.test.mjs

packages/library/README.md

docs/plans/2026-10-12_pm-test-fixes.md: 43, 44, 117, 118, 209, 273, 387, 389 docs/plans/2026-10-13_post-retest-follow-ups.md: 33, 152, 161, 165 docs/plans/2026-10-13_retest-faults.md: 48, 111 docs/plans/act-1-tests/2026-09-07_act-04-darkwing-test-readiness-review.md: 7, 10 packages/bus/tests/project-files.test.mjs: 17, 68, 97, 101, 103, 104, 121, 124 packages/bus/tests/spec-review.test.mjs: 61, 62 packages/bus/tests/tester-writes.test.mjs: 152 packages/cli/tests/host.test.mjs: 855 packages/discord/tests/git.test.mjs: 99, 176, 179, 226, 235, 242, 251, 253, 256, 258 packages/discord/tests/tools.test.mjs: 27, 37, 53, 68, 81, 85, 105, 107, 108, 113, 131, 132, 133, 137, 142, 189, 287 packages/project/tests/human-file.test.mjs: 36, 58, 59, 72, 74, 112, 114 packages/project/tests/read.test.mjs: 77, 85 packages/queue/tests/fixtures/genesis-render.md: 12 packages/queue/tests/fixtures/mosaic-pre-a2.sh: 3 packages/queue/tests/fixtures/queue-marked.md: 6, 50 packages/seat/tests/landing.test.mjs: 59, 60 packages/webui/tests/bus-browser.test.mjs: 77 packages/webui/tests/conversation.test.mjs: 23, 50 packages/webui/tests/pinned-copy.test.mjs: 77, 78, 151, 222 packages/webui/tests/project-file.test.mjs: 17, 111 scripts/test-conductor.sh: 69, 77, 88, 110, 117, 128 scripts/test-discord.sh: 269 scripts/test-extension-package.sh: 31, 34, 44, 47, 50, 61 scripts/test-land-work.sh: 46, 56, 89, 301, 304, 305, 306, 313, 321 v1/packages/mosaic/tests/platform/file-ops.test.ts: 48, 58, 81, 86 v1/packages/mosaic/framework/tools/qa/test-deps-preflight.sh: 104, 105 v1/packages/mosaic/src/config/file-adapter.test.ts: 33, 69, 113, 118 v1/packages/mosaic/src/fleet/fleet-documentation.spec.ts: 13 v1/packages/mosaic/src/framework/manifest-parity.spec.ts: 96, 295 v1/packages/mosaic/src/installation-documentation.spec.ts: 40

Transitive import readers: none

packages/library/bin/askpass

packages/library/tests/sync.test.mjs: 106, 498

Transitive import readers: none

packages/library/src/index.mjs

agents/dewey/work/queue-125/r3/singles/packages%plugins%tests%loader.test.mjs.log: 3, 4, 7 agents/dewey/work/queue-131/r1/mutants/11-symlink-test.log: 3, 4, 7, 27 agents/dewey/work/queue-131/r2/mutants/11-symlink-test.log: 3, 4, 7, 29 packages/bus/tests/broker.test.mjs: 8 packages/bus/tests/channel-proof.test.mjs: 43 packages/bus/tests/library-credential.test.mjs: 24 packages/bus/tests/library-sync.test.mjs: 15 packages/bus/tests/library.test.mjs: 13 packages/bus/tests/project-runtime.test.mjs: 9 packages/bus/tests/spec-fixtures.mjs: 7 packages/bus/tests/workflow-roles.test.mjs: 13 packages/business/tests/agent-identity.test.mjs: 6 packages/business/tests/assistant.test.mjs: 9 packages/business/tests/business.test.mjs: 7, 225 packages/business/tests/case1-business-file.test.mjs: 7 packages/business/tests/chief-of-staff.test.mjs: 11 packages/business/tests/cli.test.mjs: 6 packages/business/tests/credentials.test.mjs: 5 packages/business/tests/csuite.test.mjs: 9 packages/business/tests/hard-waits.test.mjs: 8 packages/business/tests/hosts.test.mjs: 7 packages/business/tests/library-seats.test.mjs: 12 packages/business/tests/optional-tracker.test.mjs: 7 packages/business/tests/project-repo.test.mjs: 6 packages/business/tests/project.test.mjs: 4 packages/business/tests/record-grants.test.mjs: 4 packages/business/tests/resolve.test.mjs: 6 packages/business/tests/role.test.mjs: 5 packages/business/tests/vars.test.mjs: 3 packages/business/tests/workflow-roles.test.mjs: 9 packages/cli/tests/access-boot.test.mjs: 12 packages/cli/tests/case2-install.test.mjs: 16 packages/cli/tests/compactions-launch.test.mjs: 31 packages/cli/tests/git-socket.test.mjs: 19 packages/cli/tests/helpers.mjs: 136 packages/cli/tests/launch-routes.test.mjs: 14 packages/cli/tests/launcher.test.mjs: 695 packages/cli/tests/optional-tracker.test.mjs: 9 packages/cli/tests/stack-copy.test.mjs: 41, 52 packages/harness/tests/helpers.mjs: 11 packages/library/tests/links.test.mjs: 3 packages/library/tests/mapping.test.mjs: 7 packages/library/tests/reader.test.mjs: 5 packages/library/tests/render.test.mjs: 3 packages/library/tests/scope.test.mjs: 3 packages/library/tests/supporting.test.mjs: 4 packages/library/tests/survey.test.mjs: 7 packages/plugins/tests/channel.test.mjs: 74, 100, 101, 105, 198, 199 packages/plugins/tests/daily-quota.test.mjs: 7 packages/plugins/tests/harness-compactions.test.mjs: 15, 16, 67 packages/plugins/tests/helpers.mjs: 33 packages/plugins/tests/loader.test.mjs: 73, 78, 82, 88, 89, 121, 126, 128, 151 packages/plugins/tests/token-limit.test.mjs: 5 packages/plugins/tests/transcript.test.mjs: 8 packages/project/tests/human-file.test.mjs: 7 packages/project/tests/init-failure.test.mjs: 7 packages/project/tests/project.test.mjs: 7 packages/project/tests/read.test.mjs: 7 packages/project/tests/tester-init.test.mjs: 9 packages/runs/tests/runs.test.mjs: 7 packages/runs/tests/state.test.mjs: 5 packages/seat/tests/compactions-budget.test.mjs: 15 packages/seat/tests/compactions-ledger.test.mjs: 19 packages/seat/tests/compactions.test.mjs: 14, 15 packages/tasks/tests/adapter.test.mjs: 7 packages/tasks/tests/fields.test.mjs: 11 packages/tasks/tests/tree.test.mjs: 5 packages/webui/tests/tester-fixture.mjs: 8, 10

Transitive import readers: packages/bus/tests/access-revoke.test.mjs, packages/bus/tests/chief-of-staff.test.mjs, packages/bus/tests/creative.test.mjs, packages/bus/tests/credential-verbs.test.mjs, packages/bus/tests/daily-quota-runtime.test.mjs, packages/bus/tests/grant-scope-runtime.test.mjs, packages/bus/tests/host-run.test.mjs, packages/bus/tests/instances-verb.test.mjs, packages/bus/tests/library-credential.test.mjs, packages/bus/tests/library-sync.test.mjs, packages/bus/tests/library.test.mjs, packages/bus/tests/lifecycle-revoke.test.mjs, packages/bus/tests/lifecycle-verbs.test.mjs, packages/bus/tests/limits-runtime.test.mjs, packages/bus/tests/limits.test.mjs, packages/bus/tests/plugins-verb.test.mjs, packages/bus/tests/processing-runtime.test.mjs, packages/bus/tests/project-runtime.test.mjs, packages/bus/tests/publish.test.mjs, packages/bus/tests/reload.test.mjs, packages/bus/tests/routes-verb.test.mjs, packages/bus/tests/tasks.test.mjs, packages/bus/tests/tester-writes.test.mjs, packages/bus/tests/tester.test.mjs, packages/bus/tests/usage-runtime.test.mjs, packages/bus/tests/web.test.mjs, packages/business/tests/case1-business-file.test.mjs, packages/cli/tests/access-boot.test.mjs, packages/cli/tests/access.test.mjs, packages/cli/tests/case2-install.test.mjs, packages/cli/tests/compactions-launch.test.mjs, packages/cli/tests/idle-stop-race.test.mjs, packages/cli/tests/instances.test.mjs, packages/cli/tests/lifecycle.test.mjs, packages/cli/tests/optional-tracker.test.mjs, packages/cli/tests/publish-socket.test.mjs, packages/cli/tests/revoke-window.test.mjs, packages/cli/tests/session-clear.test.mjs, packages/cli/tests/session-launch.test.mjs, packages/cli/tests/tester-reads.test.mjs, packages/cli/tests/tester-threads.test.mjs, packages/cli/tests/thread-launch.test.mjs, packages/cli/tests/thread-revoke.test.mjs, packages/library/tests/links.test.mjs, packages/library/tests/mapping.test.mjs, packages/library/tests/reader.test.mjs, packages/library/tests/render.test.mjs, packages/library/tests/scope.test.mjs, packages/library/tests/supporting.test.mjs, packages/library/tests/survey.test.mjs, packages/webui/tests/instances.test.mjs, packages/webui/tests/proof-cli.test.mjs, packages/webui/tests/routes-browser.test.mjs, packages/webui/tests/routes.test.mjs, packages/webui/tests/tester-browser.test.mjs, packages/webui/tests/tester-cli.test.mjs, packages/webui/tests/tester-fixture.mjs, packages/webui/tests/tester-listener.test.mjs

packages/library/src/mirror.mjs

agents/herb/work/queue-215/granted-t34/mirror.test-baseline-r2.log: 5, 17 agents/herb/work/queue-215/granted-t34/mirror.test-baseline.log: 5, 17 agents/herb/work/queue-215/granted-t34/mirror.test-green.log: 40 packages/library/tests/mirror.test.mjs: 9, 12 packages/library/tests/sync.test.mjs: 14

Transitive import readers: packages/bus/tests/access-revoke.test.mjs, packages/bus/tests/chief-of-staff.test.mjs, packages/bus/tests/creative.test.mjs, packages/bus/tests/credential-verbs.test.mjs, packages/bus/tests/daily-quota-runtime.test.mjs, packages/bus/tests/grant-scope-runtime.test.mjs, packages/bus/tests/host-run.test.mjs, packages/bus/tests/instances-verb.test.mjs, packages/bus/tests/library-credential.test.mjs, packages/bus/tests/library-sync.test.mjs, packages/bus/tests/library.test.mjs, packages/bus/tests/lifecycle-revoke.test.mjs, packages/bus/tests/lifecycle-verbs.test.mjs, packages/bus/tests/limits-runtime.test.mjs, packages/bus/tests/limits.test.mjs, packages/bus/tests/plugins-verb.test.mjs, packages/bus/tests/processing-runtime.test.mjs, packages/bus/tests/project-runtime.test.mjs, packages/bus/tests/publish.test.mjs, packages/bus/tests/reload.test.mjs, packages/bus/tests/routes-verb.test.mjs, packages/bus/tests/tasks.test.mjs, packages/bus/tests/tester-writes.test.mjs, packages/bus/tests/tester.test.mjs, packages/bus/tests/usage-runtime.test.mjs, packages/bus/tests/web.test.mjs, packages/business/tests/case1-business-file.test.mjs, packages/cli/tests/access-boot.test.mjs, packages/cli/tests/access.test.mjs, packages/cli/tests/case2-install.test.mjs, packages/cli/tests/compactions-launch.test.mjs, packages/cli/tests/idle-stop-race.test.mjs, packages/cli/tests/instances.test.mjs, packages/cli/tests/lifecycle.test.mjs, packages/cli/tests/optional-tracker.test.mjs, packages/cli/tests/publish-socket.test.mjs, packages/cli/tests/revoke-window.test.mjs, packages/cli/tests/session-clear.test.mjs, packages/cli/tests/session-launch.test.mjs, packages/cli/tests/tester-reads.test.mjs, packages/cli/tests/tester-threads.test.mjs, packages/cli/tests/thread-launch.test.mjs, packages/cli/tests/thread-revoke.test.mjs, packages/library/tests/links.test.mjs, packages/library/tests/mapping.test.mjs, packages/library/tests/mirror.test.mjs, packages/library/tests/reader.test.mjs, packages/library/tests/render.test.mjs, packages/library/tests/scope.test.mjs, packages/library/tests/supporting.test.mjs, packages/library/tests/survey.test.mjs, packages/library/tests/sync.test.mjs, packages/webui/tests/instances.test.mjs, packages/webui/tests/proof-cli.test.mjs, packages/webui/tests/routes-browser.test.mjs, packages/webui/tests/routes.test.mjs, packages/webui/tests/tester-browser.test.mjs, packages/webui/tests/tester-cli.test.mjs, packages/webui/tests/tester-fixture.mjs, packages/webui/tests/tester-listener.test.mjs

packages/library/src/sync.mjs

packages/library/tests/sync.test.mjs: 13 packages/tasks/tests/tree.test.mjs: 6, 385, 421

Transitive import readers: packages/bus/tests/access-revoke.test.mjs, packages/bus/tests/chief-of-staff.test.mjs, packages/bus/tests/creative.test.mjs, packages/bus/tests/credential-verbs.test.mjs, packages/bus/tests/daily-quota-runtime.test.mjs, packages/bus/tests/grant-scope-runtime.test.mjs, packages/bus/tests/host-run.test.mjs, packages/bus/tests/instances-verb.test.mjs, packages/bus/tests/library-credential.test.mjs, packages/bus/tests/library-sync.test.mjs, packages/bus/tests/library.test.mjs, packages/bus/tests/lifecycle-revoke.test.mjs, packages/bus/tests/lifecycle-verbs.test.mjs, packages/bus/tests/limits-runtime.test.mjs, packages/bus/tests/limits.test.mjs, packages/bus/tests/plugins-verb.test.mjs, packages/bus/tests/processing-runtime.test.mjs, packages/bus/tests/project-runtime.test.mjs, packages/bus/tests/publish.test.mjs, packages/bus/tests/reload.test.mjs, packages/bus/tests/routes-verb.test.mjs, packages/bus/tests/tasks.test.mjs, packages/bus/tests/tester-writes.test.mjs, packages/bus/tests/tester.test.mjs, packages/bus/tests/usage-runtime.test.mjs, packages/bus/tests/web.test.mjs, packages/business/tests/case1-business-file.test.mjs, packages/cli/tests/access-boot.test.mjs, packages/cli/tests/access.test.mjs, packages/cli/tests/case2-install.test.mjs, packages/cli/tests/compactions-launch.test.mjs, packages/cli/tests/idle-stop-race.test.mjs, packages/cli/tests/instances.test.mjs, packages/cli/tests/lifecycle.test.mjs, packages/cli/tests/optional-tracker.test.mjs, packages/cli/tests/publish-socket.test.mjs, packages/cli/tests/revoke-window.test.mjs, packages/cli/tests/session-clear.test.mjs, packages/cli/tests/session-launch.test.mjs, packages/cli/tests/tester-reads.test.mjs, packages/cli/tests/tester-threads.test.mjs, packages/cli/tests/thread-launch.test.mjs, packages/cli/tests/thread-revoke.test.mjs, packages/library/tests/links.test.mjs, packages/library/tests/mapping.test.mjs, packages/library/tests/reader.test.mjs, packages/library/tests/render.test.mjs, packages/library/tests/scope.test.mjs, packages/library/tests/supporting.test.mjs, packages/library/tests/survey.test.mjs, packages/library/tests/sync.test.mjs, packages/webui/tests/instances.test.mjs, packages/webui/tests/proof-cli.test.mjs, packages/webui/tests/routes-browser.test.mjs, packages/webui/tests/routes.test.mjs, packages/webui/tests/tester-browser.test.mjs, packages/webui/tests/tester-cli.test.mjs, packages/webui/tests/tester-fixture.mjs, packages/webui/tests/tester-listener.test.mjs

64-hex pin scan

Scanned every tracked test/script containing a literal 64-hex value; candidate reader intersections listed below. Hash values are deliberately omitted. A pin elsewhere in a candidate file is included conservatively.

packages/bus/tests/channel-proof.test.mjs: literal 64-hex at lines 21, 22, 24, 35 packages/bus/tests/grant-migration.test.mjs: literal 64-hex at lines 31 packages/bus/tests/session-clear.test.mjs: literal 64-hex at lines 496 packages/bus/tests/sessions.test.mjs: literal 64-hex at lines 326 packages/bus/tests/thread-migration.test.mjs: literal 64-hex at lines 46 packages/bus/tests/thread-shares.test.mjs: literal 64-hex at lines 370 packages/plugins/tests/harness-compactions.test.mjs: literal 64-hex at lines 21, 22, 23, 24, 25 packages/queue/tests/fixtures/queue-marked.md: literal 64-hex at lines 119 packages/seat/tests/compactions-ledger.test.mjs: literal 64-hex at lines 28, 38, 48, 58, 88, 181

No pin was changed. Any old-test failure will be reported to Sage before remediation.

Operational record

  • queue next from worktree refused as expected; rerun from canonical named row 286 (also warned view unknown).
  • first queue move refused with lock held by magica-285-start; same operation retried, no lock bypass.
  • No npm, test script, test runner or mutant executed. No canonical npm/rm/node_modules linking.
  • Static source listing accidentally printed a made-up fixture literal in tool output; reported to Sage (rockerduck-0001). No real credential accessed. Subsequent source output redacts fixtures. Gate output search must report counts only.
  • The rockerduck-0001 message header mistakenly used 09:57:30Z; actual date -u receipt was 09:55:50Z. This append corrects the timestamp without rewriting the message.

Multiline join reader scan

The join() scan below also joins quoted components across line breaks (up to the next closing parenthesis); file:line only.

Dependency drift of the two row-286 tests

packages/library/tests/sync.test.mjs packages/seat/tests/fake-gitea.mjs: unchanged in newer base packages/project/src/git.mjs: unchanged in newer base packages/library/tests/helpers.mjs: unchanged in newer base packages/library/src/sync.mjs: unchanged in newer base packages/library/src/mirror.mjs: unchanged in newer base packages/library/src/reader.mjs: unchanged in newer base packages/library/src/mapping.mjs: changed in newer base packages/library/src/survey.mjs: changed in newer base

packages/bus/tests/library-credential.test.mjs packages/bus/src/store.mjs: unchanged in newer base packages/bus/src/broker.mjs: changed in newer base packages/bus/src/credentials.mjs: unchanged in newer base packages/bus/src/gitea-grant.mjs: unchanged in newer base packages/bus/src/runtime.mjs: changed in newer base packages/seat/src/checkout.mjs: unchanged in newer base packages/library/tests/helpers.mjs: unchanged in newer base packages/library/src/index.mjs: changed in newer base packages/bus/tests/fake-gitea-api.mjs: unchanged in newer base packages/bus/tests/host-fixtures.mjs: unchanged in newer base packages/business/tests/helpers.mjs: unchanged in newer base

The changed reader/mapping/survey interfaces add supporting scope and editor.user; the tests continue to use checkMapping/mappingEntry rather than hand-coded validated objects. Store schema additions are exercised with fresh scratch stores. Row 285 has not landed in b19ffa04f; retain the ruled scratch chief definition. No test execution implied by this static check.

Pre-CLEAR handoff receipt

  • Third same-op canonical queue retry succeeded: ok rockerduck-286-start rev 3890 row 286 briefed→in-progress. No lock alteration.
  • First push succeeded through the repository helper; remote ls-remote confirms 29e830cac8 on rockerduck/row286-r3. Ready-for-CLEAR sent to Sage as rockerduck-0002.
  • git diff --check passed. Both changed test files compare byte-identically to Ludwig 573fa0be0; pre-existing sync test bodies compare byte-identically to b19ffa04f. These are static checks only.
  • No setup, npm, tests or mutants run. Remain at the explicit CLEAR boundary.

CLEAR gate (sage-4054, 2026-10-24)

Sage released the slot at 10:33:37Z for 4b8261f41. Dependencies installed only in this worktree:

  • Root: npm ci --ignore-scripts --no-audit --no-fund -> 0 (128 packages).
  • packages/webui: same command -> 0 (2 packages).
  • Short TMPDIR created using export TMPDIR=$(mktemp -d /mnt/storage/scratch/tmp/XXXXXX).
  • Commands: timeout -k 10 900 node --test packages/library/tests/.test.mjs; timeout -k 10 1800 node --test packages/bus/tests/.test.mjs.
  • No scripts/test-*.sh run by this seat: Sage runs every shell suite at landing; CLI counts from that landing gate (mos-1561).
  • Queue commands are no longer wrapped in timeout (sage-4054); no lock edits.

First-run results: library 140/140; bus 959 passed, four failed, all in the NEW packages/bus/tests/library-credential.test.mjs. No old-test red. New-test setup fixes, placed under sage-4054 / mos-1272 without changing production policy:

  1. T7/T9 grant-chief-only at original line 150: boss is definition pm, and grant raises require chief-of-staff. Bind/claim the existing chief and let it raise its own grant; boss retains the separately ruled fire role. No SQL staging for grants/revokes/fire.
  2. T7 rehire at original line 215 and T8 two-chief at original line 234: Broker clones its input. Explicitly reloadBusiness after changing each fixture organization.
  3. Next T9 run reached runtime and exposed its app project's missing checkout root (project-path). Give verbDoc an explicit scratch root and app-checkout path.
  4. Next T9 assertion read credential before the initial timer published: command construction only marks the start of the fetch. Wait for the completed sync log. Also register runtime.close with t.after so assertion failure cannot retain its timer.
  5. Reopen of the shared T9 store found the fixture runs still claimed (role-already-held). Release those runs through role.release before closing/reopening the fixture broker.

Focused credential reruns exposed each newly reached setup path; final focused result 6/6. The intermediate fixture run with a failed assertion retained a timer; its own 180-second timeout process was terminated and the next run registered runtime cleanup. No other seat/process or canonical state was changed.

Final complete suites after fixes and restored mutants:

  • library: 140 tests, 140 pass, 0 fail/cancelled/skipped/todo; exit 0.
  • bus: 963 tests, 963 pass, 0 fail/cancelled/skipped/todo; exit 0.
  • Both production trees match pre-gate 4b8261f41 byte-for-byte (git diff --quiet).
  • The pre-existing sync test declaration block still matches b19ffa04f byte-for-byte.

Mutants (sequential, restored in finally before final suites):

  • M1 adds + only to syncCommand's push refspec. timeout -k 10 180 node --test, pattern 'C2-03b argv|C2-03b T2', sync.test.mjs: exit 1, 2/2 semantic failures at argv assertion line 331 and race result assertion line 365.
  • M2 removes only askpass's inode comparison. Same timeout, pattern 'C2-03b T5 helper': exit 1, swapped-file refusal assertion at lines 510/526 fails.
  • A scratch Node reporter prints failed test names, assertion locations and counts only; it excludes assertion values so the deliberately broken helper cannot print a fixture token in diagnostics. Both mutants' output searches found zero matches.

Evidence: gate-library.txt and gate-bus.txt contain final full text output; mutant-M1.txt and mutant-M2.txt contain mutant failure locations/counts. token-search.txt records exact fixture-string and general-pattern match counts for every captured run. Six exact fixture values were checked in memory; every count is zero. T1/T9 also cover argv, mirror config, data-root files and runtime log non-disclosure as specified in Ludwig's T11 map. No fixture values are printed by the search.

The static-output slip reported before CLEAR remains in the earlier operational record; it is not represented as a clean source-inspection history. The gate-run outputs are clean.

Candidate manifest covers all nine changed packages paths, inherited Ludwig rulings, this BUILD and gate receipts. Shared append-only BUILD-LOG/SESSIONS are excluded from candidate hashes so unrelated later appends do not invalidate the review.

Scratch run directory retained for landing audit: /mnt/storage/scratch/tmp/FcfQ9q

r4 transplant — sage-4079 (2026-10-24)

Base d0a6a87cd includes rows 296 and 217; new branch rockerduck/row286-r4. R3 branch is unchanged. All 15 commits b19ffa04f..2e3a5ddd4 cherry-picked in order; transplanted implementation tip 02f1c2df6. No setup, npm, Node, tests or mutants run. R3 gate receipts above are historical evidence only, not a claim about the new base. Magica's row285 gate runs first; r4 library and bus reruns wait for Sage CLEAR.

Only conflicts: BUILD-LOG.md and docs/SESSIONS.md during 29e830cac. For each, retained the current-base bytes and appended exactly the additions from that commit. The later r3 gate-log append auto-merged. Both complete log histories remain; no entry removed. All product files auto-merged, without manual changes. No test file edited.

Range command: git range-diff b19ffa04f..2e3a5ddd4 d0a6a87cd..02f1c2df6 The endpoint is the transplanted implementation tip, before this r4 evidence/manifest commit. Full command output in range-diff-r4.txt and below. The final bookkeeping commit adds only evidence, manifest and append-only session/build entries. 12 commits are =, three are !: sync export context now includes row217's REPLY_LIMITS, and the two append-log commits have the newer retained log context. No changed test patch.

1: 3326d9487 = 1: e6b7abf9b Row 286 C2-03b: build plan and four scope questions (BUILD.md only) 2: e155e3245 = 2: 764debfe1 Row 286 C2-03b: sage-2922 files-owned extension; Q4 back to Sage (user is the bot fetch identity) 3: 6ce15eddd = 3: d0d25b04b Row 286 C2-03b: sage-2925 Q4 ruling (humanCredential takes her login; editor.user is row 283's) 4: c2c4ac679 = 4: 6c99ccc7b Row 286 C2-03b: fold dewey-0860 (Q1 sh fd/inode check, Q2 chief by roles definition, N1-N3) 5: 8ca442959 = 5: 299d7f50f Row 286 C2-03b: sage-2928 rulings (sh helper, chief by roles definition, departure noted) 6: cca76fa95 ! 6: a7f274b00 Row 286 C2-03b: library push, per-seat credentials, the chief's fetch credential, askpass fd check (#1791, sage-2922/2925/2928, dewey-0860); unrun @@ packages/library/src/index.mjs: export { readLibrary, listTree, readTexts, parse +export { syncCommand, sync, push, humanCredential, ASKPASS, SLOT, HUMAN_SLOT, CREDENTIAL_KINDS, SYNC_INTERVAL_MS } from './sync.mjs'; export { buildIndex, indexFor, clearIndexCache, indexCacheSize } from './index-build.mjs'; export { sees, find, get, search, manuscript, universeInfo, QUERY_REPLY_CAP, LOOKUP_LIMIT, MANUSCRIPT_LINES } from './query.mjs'; + export { REPLY_LIMITS, resolveReplyLimits, checkReplyLimits } from './limits.mjs';

  ## packages/library/src/mirror.mjs ##
 @@ packages/library/src/mirror.mjs: async function readStateHeld(mirror, { branch } = {}) {

7: bb29ee2d9 = 7: 4488f8ab0 Row 286: library.status shows the credential (webby-0151 R3); fired chief revokes its row as row 281 does; unrun 8: 90b70a6a6 = 8: 6b731a305 Row 286 C2-03b: fold dewey-0864 (T7/T9 through grants.revoke and instance.fire, race fetch takes the sync guard, two-chief code, id -u shim note) 9: d037e98d4 = 9: 0d1d99714 Row 286 C2-03b: cite sage-2947 (T7 real verbs, R1 in this row, 285/286 rebase rule) 10: f2a43d69d = 10: 2e2f71e6f Row 286 C2-03b: fold dewey-0869 and sage-2951 (marker-gated busy test, T9 scratch roles with a chief gitea credential, fired-chief path cited) 11: 888548607 = 11: 674f3d638 Row 286 C2-03b: BUILD.md notes for dewey-0869 and sage-2951 (fired-chief path :4308, marker-gated busy test, T9 scratch roles) 12: 7842700fb = 12: fd04dba8b Row 286 C2-03b r2: rebase onto 45dca69f6 (sage-3579). The range-diff is all =. Drift check of the paths the tests read is in BUILD.md. Unrun. 13: 29e830cac ! 13: ed94e24de Row 286 r3: transplant evidence, conflict resolution and static reader drift; untested pending CLEAR @@ Commit message Row 286 r3: transplant evidence, conflict resolution and static reader drift; untested pending CLEAR

  ## BUILD-LOG.md ##
-@@ BUILD-LOG.md: remain; no live state, schema or bus policy change.
+@@ BUILD-LOG.md: claim. Receipts and limitations in agents/lena/work/queue-296/BUILD.md and run-r
+ 2026-10-24 | Beakley (88b97f65) | Row 217 round 2, sage-4037 | Rebased published dde5b8496 onto e0c6142f3 on new beakley/row217-r2; both append-log histories retained. Conflicts preserve landed grant dispatch, revocation hook and lookup exports. Added E4 citation-unavailable product path and real supporting-scope/index comparison tests after row283 8d2856ee3. Untested: no Node/npm/tests/mutants/build; ready for Sage CLEAR after Lena296. Full range-diff and honest discarded local rebase correction in agents/beakley/work/queue-217/BUILD.md.

- 2026-10-24 | Goldie | Row265 / #1770 verified (mos-1567, sage-3942) | Approved correction adds solely address import pin + Row265 comment to project-runtime.test and one pure-source RUNNER_FILES mount; new block checks parser has no imports. Serialized fresh-short-TMP timeout-k10: unchanged sandbox10/10, parser15/15, rooms18/18, full bus957/957, twelve named refusal mutants killed (each Node1, driver0), restored parser15/15 + rooms18/18. All positives zero fail/skip/cancel; every mutation restored full broker SHA71b32ee4. Old first-red evidence retained, no other old-test change. Slot returned goldie-0034; Boyd packet explicitly includes mount-list review, candidate push next.
- 2026-10-24T07:18:53Z | Sage | Row 327 (#1825, Bradford, Poe and Dewey) LANDED 68c08b4e7. Before: refactor at 94d9e90a6; the push guard was a scratch script with no reviewed-binary check. After: scripts/push-check.sh and scripts/test-push-check.sh on refactor, 3 commits cherry-picked onto 6a5e12511 with blobs equal to the round 3 tip d858c9f8b, plus doc commits 76f84465f and 68c08b4e7. Binaries are found by numstat or a NUL in the first 8000 committed bytes, regardless of attributes; each needs its sha256 and path in an approved latest-round candidate; an unconfirmed queue tail exits 2. Reviews: Poe c31525 rev 3882, Dewey c31526 rev 3883. Gate: 1st run 06:57Z RED, not the candidate: canonical node_modules was empty from 05:45:15Z (sage-4023). Rerun with its own root npm ci GREEN 07:15:49Z: 17 package suites 0 failures (cli 986, plugins 119, webui 418), 11 scripts exit 0, push-check 6 mutants KILLED; skips are the queue canonical-root check and the row 244 live provider cases. The landed push-check.sh passed its own push (NO_BINARY, NO_ATTRIBUTION, PUSH_READY). mos-1575: gates install their own node_modules; canonical restored with npm ci (128 packages).
+ 2026-10-24T10:21Z | Beakley (88b97f65) | Row 217 round2 slot verified, sage-4042/4043 | Source 2d274a5b6: touched57/57, whole library142/142 business270/270 bus974/974 cli988/988 harness172/172 seat218/218, all zero fail/skip/cancel. M1-M5 killed, controls/restored controls green, product hashes restored after each; E4 RED stand-in observed. Only first-red was new runtime fixture invalid-authority, corrected and retained in receipts; no old test failed/edited. Local root/webui npm ci, short TMPDIR, timeout-k10; no canonical npm/rm or module link. Full evidence agents/beakley/work/queue-217/run-r2; Sage owns scripts landing gate and formal review.
 +
 +- 2026-10-24 (rockerduck, row 286 / #1791, r3 before gate): transplanted Ludwig 45dca69f6..573fa0be0 onto b19ffa04f, preserved newer exports in sole index.mjs conflict; plain-text range-diff, patch IDs and reader/pin drift inventory in agents/rockerduck/work/queue-286/BUILD.md. UNTESTED by sage-4040: no setup or tests until CLEAR.

@@ agents/rockerduck/work/queue-286/BUILD.md (new)

  ## docs/SESSIONS.md ##
 @@ docs/SESSIONS.md: are never rewritten or removed; corrections are new entries.
- 2026-10-24T04:27Z | Goldie (a13dd6d5-5e73-4b7d-8318-02abeff24940) | Row265 / #1770 C2-09b rooms | Goldie owns build, Boyd reviews under sage-3915. New goldie/row265 worktree at ec86f2c84, claim rev3814; room verbs/parser/new tests prepared, no old tests changed. Sage-3932 slot: new parser14/14 and rooms18/18 passed; whole bus in progress before refusal mutants, stop rule active.
- 2026-10-24T04:35Z | Goldie (a13dd6d5-5e73-4b7d-8318-02abeff24940) | Row265 / #1770 verified | First slot stopped at project-runtime import pin. mos-1567 narrowly authorizes pin and pure-source mount correction. sage-3942 rerun: sandbox10/10, parser15/15, rooms18/18, bus957/957, twelve refusal mutants killed/restored SHA71b32ee4, parser15/15 + rooms18/18 again. Slot returned goldie-0034; no further test runs. Boyd reviews RUNNER_FILES alongside rooms; own-branch push/claimant in-review next.
- 2026-10-24T07:18:53Z | Sage (1ef1e4f8) | Row 327 / #1825 push guard landed (mos-1572 option A, mos-1575) | Gate went red 06:57Z on an empty canonical node_modules (Glomgold's webui npm ci through a link to canonical, glomgold-0011); rerun with its own npm ci GREEN 07:15:49Z on 1bd214e38; pushed 68c08b4e7 07:18:03Z; #1825 closed c31530; canonical restored (128 packages); brief template rule 4db23a51f | landed
+ 2026-10-24 | Beakley (88b97f65) | Row 217 round 2 under sage-4037 | New beakley/row217-r2 rebased onto e0c6142f3, retained both log histories, E4 product fix and supporting/index tests drafted. No Node/npm/tests/mutants run; ready for CLEAR; local-only dependency installs required on CLEAR, old-test red goes to Sage.
+
+ 2026-10-24T10:21Z | Beakley (88b97f65) | Row217 #1718 round2 slot | All touched57 and six whole suites2764 pass, zero skips/cancels; M1-M5 killed/restored, E4 RED stand-in observed. First-new runtime fixture red recorded and corrected; no old-test change/failure. Evidence in agents/beakley/work/queue-217/run-r2. Verified for review on beakley/row217-r2; Sage landing scripts/review remain.
 +
 +- 2026-10-24 — rockerduck (Codex, a403aa78-b550-4bab-a613-7ea3fd75ec79), row 286 C2-03b / #1791 r3: twelve-commit transplant and static drift evidence prepared; UNTESTED, awaiting Sage CLEAR after own-branch push; no npm/tests run.

14: 4b8261f41 = 14: b7d394928 Row 286 r3: record successful canonical queue start and pre-CLEAR push receipt 15: 2e3a5ddd4 ! 15: 02f1c2df6 Row 286 r3: fix new credential fixtures and record green CLEAR gate with killed mutants @@ Commit message Row 286 r3: fix new credential fixtures and record green CLEAR gate with killed mutants

  ## BUILD-LOG.md ##
-@@ BUILD-LOG.md: remain; no live state, schema or bus policy change.
- 2026-10-24T07:18:53Z | Sage | Row 327 (#1825, Bradford, Poe and Dewey) LANDED 68c08b4e7. Before: refactor at 94d9e90a6; the push guard was a scratch script with no reviewed-binary check. After: scripts/push-check.sh and scripts/test-push-check.sh on refactor, 3 commits cherry-picked onto 6a5e12511 with blobs equal to the round 3 tip d858c9f8b, plus doc commits 76f84465f and 68c08b4e7. Binaries are found by numstat or a NUL in the first 8000 committed bytes, regardless of attributes; each needs its sha256 and path in an approved latest-round candidate; an unconfirmed queue tail exits 2. Reviews: Poe c31525 rev 3882, Dewey c31526 rev 3883. Gate: 1st run 06:57Z RED, not the candidate: canonical node_modules was empty from 05:45:15Z (sage-4023). Rerun with its own root npm ci GREEN 07:15:49Z: 17 package suites 0 failures (cli 986, plugins 119, webui 418), 11 scripts exit 0, push-check 6 mutants KILLED; skips are the queue canonical-root check and the row 244 live provider cases. The landed push-check.sh passed its own push (NO_BINARY, NO_ATTRIBUTION, PUSH_READY). mos-1575: gates install their own node_modules; canonical restored with npm ci (128 packages).
+@@ BUILD-LOG.md: claim. Receipts and limitations in agents/lena/work/queue-296/BUILD.md and run-r
+ 2026-10-24T10:21Z | Beakley (88b97f65) | Row 217 round2 slot verified, sage-4042/4043 | Source 2d274a5b6: touched57/57, whole library142/142 business270/270 bus974/974 cli988/988 harness172/172 seat218/218, all zero fail/skip/cancel. M1-M5 killed, controls/restored controls green, product hashes restored after each; E4 RED stand-in observed. Only first-red was new runtime fixture invalid-authority, corrected and retained in receipts; no old test failed/edited. Local root/webui npm ci, short TMPDIR, timeout-k10; no canonical npm/rm or module link. Full evidence agents/beakley/work/queue-217/run-r2; Sage owns scripts landing gate and formal review.

  - 2026-10-24 (rockerduck, row 286 / #1791, r3 before gate): transplanted Ludwig 45dca69f6..573fa0be0 onto b19ffa04f, preserved newer exports in sole index.mjs conflict; plain-text range-diff, patch IDs and reader/pin drift inventory in agents/rockerduck/work/queue-286/BUILD.md. UNTESTED by sage-4040: no setup or tests until CLEAR.
 +
@@ agents/rockerduck/work/queue-286/token-search.txt (new)

  ## docs/SESSIONS.md ##
 @@ docs/SESSIONS.md: are never rewritten or removed; corrections are new entries.
- 2026-10-24T07:18:53Z | Sage (1ef1e4f8) | Row 327 / #1825 push guard landed (mos-1572 option A, mos-1575) | Gate went red 06:57Z on an empty canonical node_modules (Glomgold's webui npm ci through a link to canonical, glomgold-0011); rerun with its own npm ci GREEN 07:15:49Z on 1bd214e38; pushed 68c08b4e7 07:18:03Z; #1825 closed c31530; canonical restored (128 packages); brief template rule 4db23a51f | landed
+ 2026-10-24T10:21Z | Beakley (88b97f65) | Row217 #1718 round2 slot | All touched57 and six whole suites2764 pass, zero skips/cancels; M1-M5 killed/restored, E4 RED stand-in observed. First-new runtime fixture red recorded and corrected; no old-test change/failure. Evidence in agents/beakley/work/queue-217/run-r2. Verified for review on beakley/row217-r2; Sage landing scripts/review remain.

  - 2026-10-24 — rockerduck (Codex, a403aa78-b550-4bab-a613-7ea3fd75ec79), row 286 C2-03b / #1791 r3: twelve-commit transplant and static drift evidence prepared; UNTESTED, awaiting Sage CLEAR after own-branch push; no npm/tests run.
 +

Static append-prefix check: both logs begin with every byte at d0a6a87cd.

packages/bus/src/broker.mjs — row217 hunks next to the transplanted row286 hunks

Row217 / newer base (b19ffa04f..d0a6a87cd):

diff --git a/packages/bus/src/broker.mjs b/packages/bus/src/broker.mjs index 163a7ec65..35e62ab27 100644 --- a/packages/bus/src/broker.mjs +++ b/packages/bus/src/broker.mjs @@ -204,15 +204,26 @@ const canonical = (x) => Number.isFinite(Date.parse(x)) && new Date(x).toISOString() === x; export class BusError extends Error {

  • constructor(code) {
  • // C2-06 (sage-3599): only the citation guard's refusals carry a reason, and the envelope passes it on.
  • constructor(code, reason) { super(code); this.code = code;
  • if (reason !== undefined) this.reason = reason; } } const fail = (code) => { throw new BusError(code); }; const object = (x) => x !== null && typeof x === 'object' && !Array.isArray(x); +// C2-06 (design 5.2, B7): the page store keeps a session's last 20 broker fetches, 200 KB of text each. +const PAGE_COUNT = 20; +const PAGE_BYTES = 200 * 1024; +// C2-06: the guard's check event takes an id derived from the message's, so a thread read finds it +// through the unique index on events.id (there is none on subject). +const checkEventId = (mid) => {
  • const h = createHash('sha256').update('message.checked:' + mid).digest('hex');
  • return ${h.slice(0, 8)}-${h.slice(8, 12)}-${h.slice(12, 16)}-${h.slice(16, 20)}-${h.slice(20, 32)}; +}; const text = (x, max = 4096) => typeof x === 'string' && x.length > 0 && x.length <= max && !x.includes('\0'); const id = (x) => text(x, 160) && /^[a-zA-Z0-9][a-zA-Z0-9_.:/-]*$/.test(x); function keys(x, allowed, required = []) { @@ -393,6 +404,11 @@ export class Broker { #credentialVerbs; #project; #library;
  • // C2-06 (design 5.2, B7): cap -> the session's kept web.fetch pages, in a library business only.
  • // In memory, dropped with the session.
  • #pages = new Map();
  • // C2-06: { s, check } while a guarded message.send or a thread.messages re-enters request().
  • #guardPass = null; #usage; #limits; #harnessOn; @@ -1412,7 +1428,10 @@ export class Broker { this.#launcherReleased.delete(key); this.#accessRevoked.delete(key); for (const [cap, s] of this.#sessions)
  •  if (!s.human && !s.reader && s.business === record.business && s.run === record.run) this.#sessions.delete(cap);
    
  •  if (!s.human && !s.reader && s.business === record.business && s.run === record.run) {
    
  •    this.#sessions.delete(cap);
    
  •    this.#pages.delete(cap);
    
  •  }
    
    return this.#store.transaction(() => { const h = this.#own(session); const released = h?.op === 'claim' && h.holder_run === session.run; @@ -1494,6 +1513,7 @@ export class Broker { } disconnect(cap) { this.#sessions.delete(cap);
  • this.#pages.delete(cap); } identity(cap) { const s = this.#session(cap); @@ -4758,12 +4778,21 @@ export class Broker { return this.#requestProjectFile(s, { verb: request.verb, args: structuredClone(args) }); if (LIBRARY_VERBS.includes(request.verb)) return this.#requestLibrary(s, { verb: request.verb, args: structuredClone(args) });
  •  // C2-06 (design 5.2): an agent's message to the human in a library business passes the citation
    
  •  // guard first, outside any transaction, and thread.messages adds each path cite's `last`. Both
    
  •  // then re-enter request() for the synchronous path below.
    
  •  if (this.#guardPass?.s !== s) {
    
  •    if (request.verb === 'message.send' && this.#guarded(s, args.to))
    
  •      return this.#guardedSend(cap, s, request, structuredClone(args));
    
  •    if (request.verb === 'thread.messages' && this.#libraryProject(s.business) && this.#library?.last)
    
  •      return this.#withLast(cap, s, request);
    
  •  }
     if (CREDENTIAL_VERBS.includes(request.verb)) return this.#requestCredential(s, request.verb, structuredClone(args));
     if (request.verb === 'instance.hire' || request.verb === 'instance.fire')
       return this.#chiefLifecycle(s, request.verb, structuredClone(args));
     if (request.verb === 'grants.scope' || request.verb === 'grants.scope.set')
       return this.#grantScopeVerb(s, request.verb, structuredClone(args));
    
  •  if (["limits", "limits.set", "organization.set", "organization.revision", "plugins", "plugins.set", "instances", "instances.set", "routes", "routes.set", "veto.set"].includes(request.verb)) {
    
  •  if (["limits", "limits.set", "organization.set", "organization.revision", "plugins", "plugins.set", "instances", "instances.set", "routes", "routes.set", "veto.set", "library.limits.set"].includes(request.verb)) {
       // Row 123 (#1617, REQ-COS-1, REQ-LIMIT-1): organization.set is limits.set for a role whose
       // file lists organization.change. It takes the same keys, runs the same write path and
       // logs the same receipt; only the actor differs: the role definition and instance.
    

@@ -4809,6 +4838,12 @@ export class Broker { keys(args, VETO_KEYS, VETO_KEYS); this.#human(s); this.#mayHuman(s, "veto.set", args.name);

  •    }
    
  •    // C2-06 M11: the human's replyLimits verb. The tester is refused by the gate above and an agent
    
  •    // session by human-required; the writer's fence refuses any other actor.
    
  •    else if (request.verb === "library.limits.set") {
    
  •      keys(args, ["revision", "replyLimits"], ["revision", "replyLimits"]);
    
  •      this.#human(s);
       } else {
         keys(args, ORGANIZATION_KEYS, ["revision"]);
         // Row 194 (D2.4, B7): the chief can't change a kept instance's model, as that replaces it at
    

@@ -5263,7 +5298,14 @@ export class Broker { const context = { business: this.#business(s.business), project: args.project }; let result; if (verb === 'library.file') result = await this.#library.readFile({ ...context, path: args.path });

  •  else if (verb === 'library.status') result = await this.#library.status(context);
    
  •  else if (verb === 'library.status') {
    
  •    result = await this.#library.status(context);
    
  •    // C2-06: the reply limits in force, read from the file now, and the keys that fell back.
    
  •    if (this.#library.replyLimits) {
    
  •      const { requireCitation, citationsPerReply, fallback, unreadable } = this.#library.replyLimits(s.business);
    
  •      result = { ...result, replyLimits: { requireCitation, citationsPerReply, fallback, problem: unreadable ? 'reply-limits-unreadable' : null } };
    
  •    }
    
  •  }
     else {
       // A fetch that did not move served still answers with the code, so the refusal is recorded.
       const { state, code } = await this.#library.sync(context, { accept: args.accept ?? null });
    

@@ -5277,6 +5319,78 @@ export class Broker { throw this.#refused(s, Failure && error instanceof Failure ? new BusError(error.code) : error, request); } }

  • // C2-06: the business's library project, the first in file order, or null.
  • #libraryProject(business) {
  • return Object.entries(this.#business(business).projects ?? {}).find(([, p]) => p.kind === 'library')?.[0] ?? null;
  • }
  • // C2-06 (design 5.2): every agent session's message to the human in a business with a library project
  • // is guarded, whatever the sender's definition.
  • #guarded(s, to) {
  • return to === 'human' && !s.human && !s.tester && !s.user && !s.reader && !s.console && this.#libraryProject(s.business) !== null;
  • }
  • #reenter(cap, s, request, check) {
  • this.#guardPass = { s, check };
  • try {
  •  return this.request(cap, request);
    
  • } finally {
  •  this.#guardPass = null;
    
  • }
  • }
  • // As #requestProject: the git reads run outside any SQL transaction. A guard refusal is recorded with
  • // its code and reaches the caller with the guard's reason; the send then runs, and stores the check
  • // result in its own transaction.
  • async #guardedSend(cap, s, request, args) {
  • let check;
  • try {
  •  this.#store.transaction(() => this.#agent(s));
    
  •  if (!this.#library?.guard || !this.#library?.replyLimits) fail('project-not-configured');
    
  •  if (typeof args.body !== 'string') fail('invalid-request');
    
  •  const business = this.#business(s.business);
    
  •  check = await this.#library.guard({ business, project: this.#libraryProject(s.business) }, args.body, {
    
  •    limits: this.#library.replyLimits(s.business),
    
  •    definition: business.roles[s.role]?.definition ?? null,
    
  •    pages: this.#pages.get(cap) ?? [],
    
  •  });
    
  • } catch (e) {
  •  const Guard = this.#library?.GuardError;
    
  •  throw this.#refused(s, Guard && e instanceof Guard ? new BusError(e.code, e.reason) : e, request);
    
  • }
  • return this.#reenter(cap, s, { verb: 'message.send', args }, check);
  • }
  • // C2-06 (sage-3595, morgana-0200): each path cite of a checked row gains last, the file's last commit
  • // at the served tip, one git call per distinct path. Rows without check are unchanged.
  • async #withLast(cap, s, request) {
  • const rows = this.#reenter(cap, s, request, null);
  • if (!rows.some((m) => m.check)) return rows;
  • const cites = (m) => {
  •  try {
    
  •    const c = JSON.parse(m.body).citations;
    
  •    return Array.isArray(c) ? c : [];
    
  •  } catch {
    
  •    return [];
    
  •  }
    
  • };
  • let last = new Map();
  • try {
  •  const paths = rows.filter((m) => m.check).flatMap((m) => cites(m).filter((c) => typeof c?.path === 'string').map((c) => c.path));
    
  •  last = await this.#library.last({ business: this.#business(s.business), project: this.#libraryProject(s.business) }, paths);
    
  • } catch {
  •  last = new Map();
    
  • }
  • return rows.map((m) => {
  •  if (!m.check) return m;
    
  •  const body = cites(m);
    
  •  return { ...m, check: { ...m.check, citations: m.check.citations.map((c, i) =>
    
  •    c.scope === 'web' ? c : { ...c, last: last.get(body[i]?.path) ?? null }) } };
    
  • });
  • }
  • // C2-06 (B7): a fetch's text, kept for url cites in a library business only.
  • #keepPage(cap, s, url, page) {
  • if (!this.#sessions.has(cap) || !this.#libraryProject(s.business) || typeof page?.text !== 'string') return;
  • const text = Buffer.from(page.text).subarray(0, PAGE_BYTES).toString();
  • const kept = { url, finalUrl: typeof page.finalUrl === 'string' ? page.finalUrl : null, text };
  • this.#pages.set(cap, [...(this.#pages.get(cap) ?? []), kept].slice(-PAGE_COUNT));
  • } // The eight task verbs reach the trusted S3 handler here. It runs outside any transaction, gets the // cap to authorize and record through authorize() and recordTask(); refusals are recorded as in request(). async requestTask(cap, request, handler) { @@ -5360,6 +5474,7 @@ export class Broker { throw refuse(new BusError('web-failed')); } complete(out.summary);
  • if (verb === 'web.fetch') this.#keepPage(cap, s, args.url, out.result); return { ...out.result, untrusted: true, notice: WEB_UNTRUSTED, source: verb }; } // Row 210 (#1707, design D5): host.run, one sudo command on a registered host over ssh, for a @@ -5486,7 +5601,7 @@ export class Broker { by, ); this.#routeSession(s.session);
  •      return { role: s.role, run: s.run, thread: s.thread };
    
  •      return { role: s.role, run: s.run, thread: s.thread, ...(this.#libraryProject(s.business) ? { library: true } : {}) };
       }
       if (
         this.#store.get(
    

@@ -5510,7 +5625,8 @@ export class Broker { by, ); this.#routeWaiting(s.business, s.role);

  •    return { role: s.role, run: s.run };
    
  •    // C2-06 (C2-07): the runner's switch to the library texts and retry. Absent elsewhere.
    
  •    return { role: s.role, run: s.run, ...(this.#libraryProject(s.business) ? { library: true } : {}) };
     }
     case 'role.release': {
       keys(a, []);
    

@@ -5874,6 +5990,10 @@ export class Broker { if (this.#userThread(s) && to === 'human') fail('user-thread-human'); this.#checkMessaging(s.business, this.#sender(s), testerThread && to === 'tester' ? 'human' : to); string(a.body, 32768);

  •    // C2-06: a guarded send is stored only through #guardedSend's pass, with its check result.
    
  •    const guarded = this.#guarded(s, to);
    
  •    if (guarded && this.#guardPass?.s !== s) fail('storage-refused');
    
  •    const check = guarded ? this.#guardPass.check : null;
       if (
         a.class !== undefined &&
         ![
    

@@ -5920,6 +6040,9 @@ export class Broker { a.corrects ?? null, a.body, );

  •    // C2-06: the stored check result shares the message's transaction (sage-3595 item 3). No new
    
  •    // event kind, which would be a schema step: the events kind CHECK is migrations/3b.sql:9.
    
  •    if (check) this.#event(s, 'action.allowed', { action: 'message.checked', message: mid, check }, mid, checkEventId(mid));
       const cancelled = this.#route(s.business, mid, to, thread);
       const request = s.human
         ? this.#event(s, 'human.input', { kind: 'instruction', message: mid }, mid)
    

@@ -6632,11 +6755,15 @@ export class Broker { )?.seq; if (after === undefined) fail('message-not-found'); }

  •    // C2-06 (row 225, morgana-0198): a row the citation guard checked carries the stored result.
       return this.#store.all(
         `SELECT m.* FROM messages m JOIN message_threads mt ON mt.message=m.id WHERE mt.session=? AND m.seq>? ORDER BY m.seq LIMIT ${limit}`,
         session,
         after,
    
  •    );
    
  •    ).map((m) => {
    
  •      const e = this.#store.get("SELECT body FROM events WHERE id=? AND kind='action.allowed' AND subject=?", checkEventId(m.id), m.id);
    
  •      return e ? { ...m, check: JSON.parse(e.body).check } : m;
    
  •    });
     }
     // Row 206 (193b2, #1704, design 5.3): the owner of a thread shares it read-only, or ends a share.
     // A user's collaborator grant must still cover the thread, and a user target needs a live grant
    

Merged row286 contribution (d0a6a87cd..02f1c2df6):

diff --git a/packages/bus/src/broker.mjs b/packages/bus/src/broker.mjs index 35e62ab27..699bde561 100644 --- a/packages/bus/src/broker.mjs +++ b/packages/bus/src/broker.mjs @@ -271,6 +271,9 @@ const grantName = (body) => [body?.action, body?.operation].some(n => typeof n = // Every grant-evidence read filters on this (duckworth-0067 N1): a look-alike under another kind or // actor is not evidence. export const GRANT_EVIDENCE = "kind='action.allowed' AND actor_role IS NULL AND actor_run='grant'"; +// C2-03b: what a library-fetch-no-grant refusal tells the human (sage-2928). A BusError carries only its +// code, so the timer's log line and the library README carry this text. +export const LIBRARY_FETCH_FIX = 'add the chief of staff, or grant the library through C2-21'; // r6 R4: the host record's identity, hashed at raise and at each later check. export const registrySha256 = ({ address, port, user, sudo, hostKeys }) => createHash('sha256').update(JSON.stringify({ address, port, user, sudo: !!sudo, hostKeys })).digest('hex'); @@ -2047,6 +2050,33 @@ export class Broker { // grant.host.enrolled or grant.failed died after its registry step: the key file and the record // go, and it ends grant.failed interrupted. A resolved, unspent one is spent and ends the same way. // Neither runs late.

  • // C2-03b (#1791, design 7.2): the credential the library fetch runs with, the bus's choice and not a
  • // pure one: it reads the store. The chief is any roles entry of definition STAFF_TO; a fire keeps it
  • // there (dewey-0860 Q2). Gitea grant evidence for a chief ends the slot fallback, and only the one
  • // listed chief's live, unheld gitea_grants row answers. With no chief entry, any gitea grant evidence
  • // refuses: a departure from the brief's pre-C2-21 fallback, accepted in sage-2928.
  • libraryFetchCredential(business) {
  • const b = this.#business(business);
  • const chiefs = Object.entries(b.roles ?? {}).filter(([, r]) => r?.definition === STAFF_TO).map(([name]) => name);
  • const evidence = (agent) =>
  •  this.#store.get(
    
  •    `SELECT 1 FROM events WHERE business=? AND ${GRANT_EVIDENCE} AND json_extract(body,'$.method')='gitea' AND (? IS NULL OR json_extract(body,'$.agent')=?) LIMIT 1`,
    
  •    business,
    
  •    agent,
    
  •    agent,
    
  •  );
    
  • const refused = { refused: 'library-fetch-no-grant', fix: LIBRARY_FETCH_FIX };
  • if (!chiefs.length) return evidence(null) ? refused : { kind: 'slot' };
  • if (!chiefs.some((agent) => evidence(agent))) return { kind: 'slot' };
  • const listed = chiefs.filter(
  •  (agent) => !this.#firing(business, agent) && (!Array.isArray(b.launch?.instances) || b.launch.instances.includes(agent) || b.launch.by === agent),
    
  • );
  • if (listed.length !== 1) return refused;
  • const [agent] = listed;
  • const live = this.#store.get('SELECT user FROM gitea_grants WHERE business=? AND agent=?', business, agent);
  • if (!live || !this.#giteaKeys || this.#giteaKeys.held(business, agent)) return refused;
  • return { kind: 'chief', agent, user: live.user };
  • } reconcileGrants() { const ended = []; for (const business of Object.keys(this.#businesses)) {

packages/bus/src/runtime.mjs — row217 hunks next to the transplanted row286 hunks

Row217 / newer base (b19ffa04f..d0a6a87cd):

diff --git a/packages/bus/src/runtime.mjs b/packages/bus/src/runtime.mjs index 366fd8520..57e64055f 100644 --- a/packages/bus/src/runtime.mjs +++ b/packages/bus/src/runtime.mjs @@ -14,7 +14,7 @@ import { publishRemote, workingRepo, WorkingError } from '../../seat/src/working import { createLoader, hasModule } from '../../plugins/src/loader.mjs'; import { pluginSettings } from '../../business/src/plugin-settings.mjs'; import { instanceSettings } from '../../business/src/instance-settings.mjs'; -import { organizationWriter, OrganizationError } from '../../business/src/organization.mjs'; +import { organizationWriter, OrganizationError, setReplyLimits } from '../../business/src/organization.mjs'; import { credentialVerbs } from './credential-verbs.mjs'; import { loadBusiness } from '../../business/src/business.mjs'; import { loadRole } from '../../business/src/role.mjs'; @@ -305,6 +305,13 @@ export async function startBroker({ status: context => libraryModule.libraryStatus({ ...context, dataRoot }), sync: (context, { accept }) => processing.work(() => libraryModule.sync({ ...context, dataRoot }, { ...syncOptions(context.business), accept })), LibraryError: libraryModule.LibraryError,

  •    // C2-06: the citation guard, the reply limits read from the business file at each check (none
    
  •    // configured reads as unreadable, so requireCitation is true), and thread.messages' `last`.
    
  •    guard: (context, body, options) => libraryModule.guardReply({ ...context, dataRoot }, body, options),
    
  •    replyLimits: id => libraryModule.resolveReplyLimits(organization
    
  •      ? organizationWriter({ dir: organization.dir, rolesDir: organization.rolesDir }).readRaw(id) : { readable: false }),
    
  •    last: (context, paths) => libraryModule.lastCommits({ ...context, dataRoot }, paths),
    
  •    GuardError: libraryModule.GuardError,
     },
     project: {
       readSpec: context => projectModule.readSpec({ ...context, dataRoot }),
    

@@ -338,6 +345,8 @@ export async function startBroker({ else if(verb==='veto.set')result=instances.veto(id,args,actor); // Row 298: the human's grant scope, through the instance writer. else if(verb==='grants.scope.set')result=instances.grantScope(id,args,actor);

  •    // C2-06 M11: the human's replyLimits, through the organization writer's fence.
    
  •    else if(verb==='library.limits.set')result=setReplyLimits(organizationWriter({dir:organization.dir,rolesDir:organization.rolesDir}),id,args,actor);
       // Row 194 (D2.1, D2.2): the chief's hire and fire, with the reason in the change context.
       else if(verb==='instance.hire')result=instances.hire(id,args,{actor,context});
       else if(verb==='instance.fire')result=instances.fire(id,{name:args.name},{actor,context});
    

Merged row286 contribution (d0a6a87cd..02f1c2df6):

diff --git a/packages/bus/src/runtime.mjs b/packages/bus/src/runtime.mjs index 57e64055f..48e0e61e3 100644 --- a/packages/bus/src/runtime.mjs +++ b/packages/bus/src/runtime.mjs @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url'; import { Store } from './store.mjs'; import * as projectModule from '../../project/src/index.mjs'; import * as libraryModule from '../../library/src/index.mjs'; -import { Broker, BusError } from './broker.mjs'; +import { Broker, BusError, LIBRARY_FETCH_FIX } from './broker.mjs'; import { Credentials } from './credentials.mjs'; import { serve } from './server.mjs'; import { launchSettings } from '../../business/src/launch-settings.mjs'; @@ -24,7 +24,7 @@ import { busBusiness } from './business.mjs'; import { webService } from './web.mjs'; import { hostExecutor, sweepRunDir } from './host-run.mjs'; import { grantKeys, hostGrant, hostReference, sweepHostKeys } from './host-grant.mjs'; -import { giteaGrant, giteaKeys, giteaStart } from './gitea-grant.mjs'; +import { giteaGrant, giteaKeys, giteaStart, giteaReference } from './gitea-grant.mjs'; import { verifyPrincipal } from './principal.mjs'; import { loadAccess } from '../../business/src/access.mjs'; import { inspectInterpreter, recordInterpreterStart } from './interpreter.mjs'; @@ -223,9 +223,18 @@ export async function startBroker({ } // C2-03a: the slot is /secrets//library-gitea (design 10 step 4). Sync only // checks that it is there; the askpass helper reads it.

  • // C2-03b: the broker chooses. The chief's grant store file once a chief has Gitea grant evidence,
  • // the slot before that, or a refusal sync records. The answer carries no file to sync but this one. const slotDir = librarySync?.configDir ?? organization?.dir ?? null;
  • const fetchCredential = business => {
  •  const choice = broker.libraryFetchCredential(business.id);
    
  •  if (choice.kind === 'chief')
    
  •    return { kind: 'chief', user: choice.user, file: storeRoot ? giteaReference(storeRoot, business.id, choice.agent).file : null };
    
  •  if (choice.kind === 'slot') return { kind: 'slot', file: slotDir ? join(slotDir, 'secrets', business.id, libraryModule.SLOT) : null };
    
  •  return { refused: choice.refused };
    
  • }; const syncOptions = business => ({
  •  slot: slotDir ? join(slotDir, 'secrets', business.id, libraryModule.SLOT) : null,
    
  •  credential: fetchCredential(business),
     ...(librarySync ? { command: librarySync.command } : {}),
    
    }); // Row 194 (#1692, D3): after every write that commits, the broker takes the business as a restart @@ -585,7 +594,8 @@ export async function startBroker({ for (const { business, project } of timed) { try { const { code } = await libraryModule.sync({ business, project, dataRoot }, syncOptions(business));
  •      if (code !== null) syncLog({ event: 'library-sync-held', business: business.id, project, code });
    
  •      if (code !== null) syncLog({ event: 'library-sync-held', business: business.id, project, code,
    
  •        ...(code === 'library-fetch-no-grant' ? { fix: LIBRARY_FETCH_FIX } : {}) });
       } catch (e) {
         if (e?.code === 'library-sync-busy') continue;
         syncLog({ event: 'library-sync-refused', business: business.id, project,
    

packages/library/src/index.mjs — row217 hunks next to the transplanted row286 hunks

Row217 / newer base (b19ffa04f..d0a6a87cd):

diff --git a/packages/library/src/index.mjs b/packages/library/src/index.mjs index 65bb898bd..e9f8c8cae 100644 --- a/packages/library/src/index.mjs +++ b/packages/library/src/index.mjs @@ -11,3 +11,5 @@ export { SYNC_STATE_FILE, mirrorPath, ensureMirror, withLibraryLock, servedCommi export { syncCommand, sync, ASKPASS, SLOT, SYNC_INTERVAL_MS } from './sync.mjs'; export { buildIndex, indexFor, clearIndexCache, indexCacheSize } from './index-build.mjs'; export { sees, find, get, search, manuscript, universeInfo, QUERY_REPLY_CAP, LOOKUP_LIMIT, MANUSCRIPT_LINES } from './query.mjs'; +export { REPLY_LIMITS, resolveReplyLimits, checkReplyLimits } from './limits.mjs'; +export { GUARD_CODES, FIXED_TEXTS, WEB_CITE_DEFINITIONS, REASON_MAX, GuardError, parseReply, checkReply, libraryReader, guardReply, lastCommits } from './guard.mjs';

Merged row286 contribution (d0a6a87cd..02f1c2df6):

diff --git a/packages/library/src/index.mjs b/packages/library/src/index.mjs index e9f8c8cae..367cb0d9c 100644 --- a/packages/library/src/index.mjs +++ b/packages/library/src/index.mjs @@ -8,7 +8,7 @@ export { readLibrary, listTree, readTexts, parseFile, parseFrontMatter, headComm export { renderItems, KINDS, NOTICES, UNREADABLE } from './render.mjs'; export { survey, formatSurvey, surveyMain } from './survey.mjs'; export { SYNC_STATE_FILE, mirrorPath, ensureMirror, withLibraryLock, servedCommit, readSyncState, libraryStatus, readLibraryFile } from './mirror.mjs'; -export { syncCommand, sync, ASKPASS, SLOT, SYNC_INTERVAL_MS } from './sync.mjs'; +export { syncCommand, sync, push, humanCredential, ASKPASS, SLOT, HUMAN_SLOT, CREDENTIAL_KINDS, SYNC_INTERVAL_MS } from './sync.mjs'; export { buildIndex, indexFor, clearIndexCache, indexCacheSize } from './index-build.mjs'; export { sees, find, get, search, manuscript, universeInfo, QUERY_REPLY_CAP, LOOKUP_LIMIT, MANUSCRIPT_LINES } from './query.mjs'; export { REPLY_LIMITS, resolveReplyLimits, checkReplyLimits } from './limits.mjs';

Overlap conclusions:

  • broker.mjs: preserve row217's citation guard/page store, message checks, optional BusError.reason, role-claim library flag and replyLimits status field. Row286 adds only LIBRARY_FETCH_FIX and libraryFetchCredential. Its status reads the mirror's credential through the existing status result, alongside row217's replyLimits. Row286's inherited comment that BusError carries only a code is now globally stale; row217 permits reason only for the citation guard. No code/comment rewritten in this Git-only transplant; fetch refusal behavior is unchanged and its fix stays in timer/README.
  • runtime.mjs: preserve guard/replyLimits/last/GuardError wiring and library.limits.set; retain row286's broker credential choice for verb/timer and refusal fix log. Imports combine LIBRARY_FETCH_FIX/giteaReference with row217's setReplyLimits.
  • library/src/index.mjs: keep row217's limits/guard exports and the earlier query/index exports; keep row286's expanded sync/push/humanCredential export on its existing line.

The row286 added/removed product lines compare identically between r3 and r4 for all nine changed package paths after removing diff metadata/context; only base context moved. Both row286 test files are byte-identical to the approved r3 files. Other six package paths in the old manifest have the same blobs; only the three named overlap blobs differ. The old 16-file candidate is preserved as candidate-r3.sha256; candidate-manifest.sha256 is regenerated for r4, including this evidence and the range-diff. Shared append logs and the manifest itself remain excluded as in r3. In-review round 2 waits for CLEAR and reruns.

r5 rebase and ruling correction — sage-4097 / sage-4100 (2026-10-24)

Base 1f3d0350f31a93e9868f5242795e9bff1890add2; branch rockerduck/row286-r5. All 16 r4 commits transplanted; implementation transplant tip 0663e8724. R4 remote is unchanged. Only conflicts were the two append logs, each resolved by retaining all current bytes then appending the picked entry; both histories preserved.

Range-diff: git range-diff d0a6a87cd..67e084406 1f3d0350f..0663e8724 Full plain text in range-diff-r5.txt. This precedes the new, separately recorded fixture setup and evidence commit. Product auto-merged. No row286 production hunk was rewritten. Row285's library.write ACTIONS/ROUTED entries and its chief refusal in #giteaRole remain unchanged; this row changes no grant path or executor policy.

Drift check from d0a6a87cd to 1f3d0350f:

  • broker.mjs adds routed library.write and refuses STAFF_TO in the write-scoped Gitea executor. Row286's credential chooser is at a separate hunk; both preserved.
  • business.mjs requires a chief gitea ref for a library; vocabulary, role and instance-settings change creative/chief credential rules. Our raw Broker fixtures use authority projections rather than validateBusinessDocument, but now explicitly carry the chief's own giteaReference. The no-chief negative fixture remains absent.
  • roles/chief-of-staff.json now declares the real read credential. T9 uses shipped roles directly; the scratch roles copy and credential-declaration mutation are gone.
  • Other changed role files are copied/read by upstream runtime/roles helpers. The new source/role contracts are exercised by the full bus suite on this base.
  • No library source or sync/mirror helper changed between those bases. The sync.test world() at lines 28-41 uses a minimal library-module context. sync() and mirrorPath() call checkMapping on the project; neither calls validateBusinessDocument/loadBusiness. It therefore does not need a chief ref. File remains byte-identical to approved r4.
  • T7 revoke/fire helper blocks and every assertion in them remain byte-identical to r4. T7/T9 existing revoked/fired/status assertions are unchanged; only mint setup changes.

Correction to the earlier sage-2947 no-SQL-mint ruling (and dewey-0864 real-mint setup), explicitly superseded by sage-4100 to preserve sage-2921: The chief's legitimate read executor belongs to C2-21 and has not landed. T7/T9 now first assert the real decision.raise write-grant path refuses gitea-not-declared. They then seed a fixture read grant using the fake API's actual account/token IDs and only read:repository/read:user scopes. No exported grant-record insert helper exists; records use direct Store inserts. The physical token file uses the same exported giteaKeys.issue -> Credentials.issue writer as the executor, with record inserts in its commit callback. grant.applied evidence names the chief and permission read. The seed comment cites sage-4100/C2-21 and explicitly requires replacement by the real read executor. Real grants.revoke and instance.fire by boss still delete the row before the fetch refusal; no SQL stages their outcomes. Dewey and Boyd must confirm this corrected fixture path at round 2.

Fixture changes only in packages/bus/tests/library-credential.test.mjs:

  • makeBusiness gets root and gives an existing chief its own store Gitea ref; world passes its scratch root. The deliberate departure/no-chief case stays absent.
  • verbDoc carries the chief's store ref, shared by T7 and T9's runtime projection.
  • approveChief setup becomes seedChiefReadGrant as ruled; existing real revoke/fire bodies remain byte-identical. New setup assertions pin refusal and read-only scopes.
  • T9 removes the scratch rolesCopy and uses the shipped roles directory read-only. No production, schema, role-policy or old-test assertion change.

The withdrawn r4 CLEAR (sage-4083/4084) ran only the two own-worktree npm ci installs successfully; no tests/mutants/build began. This historical fact corrects no code. For r5, sage-4097/4100 grants CLEAR after the own-branch push: every touched test file whole, full library/bus and affected broker mutant. Gate results follow as new entries; historical r3 logs above are not r5 results.

r5 CLEAR gate complete — sage-4097 / sage-4100 (2026-10-24)

Source under test: pushed pre-gate 045eec61a. Own-worktree root npm ci --ignore-scripts --no-audit --no-fund: exit0,128 packages; packages/webui same: exit0,2 packages. No canonical npm/rm or module linking. Fresh TMPDIR created with mktemp -d /mnt/storage/scratch/tmp/XXXXXX. Every test command used timeout -k 10 (180 seconds focused,900 library,1800 bus).

Every touched file whole, then package suites:

  • node --test --test-reporter=tap packages/bus/tests/library-credential.test.mjs: 6 tests,6 pass,0 fail/skip/cancel/todo; exit0.
  • node --test packages/library/tests/sync.test.mjs: 24 tests,24 pass,0 fail/skip/cancel/todo; exit0.
  • node --test packages/library/tests/*.test.mjs: 151 tests,151 pass,0 fail/skip/cancel/todo; exit0.
  • node --test packages/bus/tests/*.test.mjs: 981 tests,981 pass,0 fail/skip/cancel/todo; exit0. No first-run red, no second red, no normal-run old-test red. No test/source edit after these runs. T7/T9 passed on the ruled read seed; real grant raise refused, real revoke/fire deleted the rows, and fetch/status refusals remained intact.

Mutants, serially applied/restored in this worktree, with fresh green controls before and after each. Custom scratch reporter emits only test name, assertion code/location and counts, suppressing assertion values so a deliberately broken askpass cannot print a fixture token in diagnostics:

  • P1-force-push: add + only before syncCommand's push refspec. Control2/2, mutant0/2 exit1 with ERR_ASSERTION at sync.test.mjs:331 and :365, restored2/2. Target full SHA256 restored: 784af63a417b547b195ca835878daeba5b696b42a83a4c95de6728a0efa75e38.
  • P2-drop-inode: remove only askpass's inode compare. Control1/1, mutant0/1 exit1 with ERR_ASSERTION at swapped-file refusal sync.test.mjs:510/:526, restored1/1. Target full SHA256 restored: 5c9b528fd69a2493f04933fc84f352b1101d276d69d9982806975def614fd740.
  • B285-M1-chief-write: row285's affected broker mutant, remove only || role.definition === STAFF_TO from #giteaRole. Control1/1, mutant0/1 exit1 with ERR_ASSERTION at gitea-grant.test.mjs:270, restored1/1. Target full SHA256 restored: 9e16ff6225cf5e438b0694e2f2b5831c2750f2d0dfc43c7f2f257d8cdacf9ffd. This repeats Magica's M1 for the rebase's newly inherited chief refusal. Runtime.mjs and library/index.mjs match r4 byte-for-byte; no new hunk there.

Whole package suites ran on the restored candidate source before mutations; all package bytes afterward match 045eec61a (git diff --quiet -- packages), and each mutant's restored positive control passed. No product or old assertion edit was made during the gate. Existing T7/T9 revoke/fire helpers still byte-identical to r4. No shell suites here: Sage's full landing gate remains authoritative.

All captured gate and control/mutant/restored outputs have zero exact matches for six fixture-token values and zero generic fixture-token pattern matches. Full plain text outputs and count-only search receipts are under gate-r5/. T9 also checks every issued fake token against captured runtime lines. No fixture values are printed in the search receipts. Prior pre-CLEAR static-output slip remains honestly recorded earlier and is separate from these clean gate outputs.

Gate complete; final bookkeeping commit updates only evidence, append-only logs and manifest. The candidate manifest covers the nine package paths and plain text receipts, excluding shared append logs and itself. Round2 reviews must examine sage-4100's reversal of mint setup as well as the base delta.

Scratch gate directory retained: /mnt/storage/scratch/tmp/ZMiVek

r6 correction and CLEAR gate — sage-4112 / #1825 (2026-10-24)

R5 passed Boyd/Dewey and Sage's landing gate, but the landing push was correctly refused by #1825's added-line secrets detector. Two newly added fixture constants had 31-character literal values matching its secret shape. No waiver, no guard change. The refused landing was not pushed; this is a correction to that candidate.

New branch rockerduck/row286-r6 starts at approved r5 ec8cb10c0. Exactly two package lines differ: SLOT_TOKEN in bus/tests/library-credential.test.mjs and SEAT_TOKEN in library/tests/sync.test.mjs each now have a unique 19-character made-up value. Constant names, every assertion, helper, production byte and all other package bytes remain identical. Exact repository search finds each new value once, at its source definition. Values are omitted from this evidence to preserve uniqueness.

The requested pipeline was executed using subprocess argument arrays to preserve its regex literally: git diff -U0 1f3d0350f -- packages, grep ^+, then grep -i -E with sage-4112's exact (token|secret|password) literal detector. Result: no output, 0 matches, final grep rc1 (no match). Plain receipt in gate-r6/secrets-pattern-scan.txt. No scripts/push-check.sh edit or bypass.

Fresh short TMPDIR created with mktemp -d /mnt/storage/scratch/tmp/XXXXXX. Existing node_modules remains the own-worktree install made for r5, with no canonical link. All runs used timeout -k 10, focused180s/library900s/bus1800s:

  • node --test packages/bus/tests/library-credential.test.mjs: 6/6, exit0.
  • node --test packages/library/tests/sync.test.mjs: 24/24, exit0.
  • node --test packages/library/tests/*.test.mjs: 151/151, exit0.
  • node --test packages/bus/tests/*.test.mjs: 981/981, exit0. All four: zero fail/cancel/skip/todo; no normal red and no assertion edits. Mutants not rerun, explicitly waived by sage-4112 for the value-only correction; production code and assertions are unchanged, and the r5 mutant receipts remain.

Each captured output was searched for both exact new values in memory: every count is zero. Legacy fixture-prefix search also zero. Counts only are recorded in gate-r6/token-search.txt; full text outputs are alongside it. The existing appears-nowhere-but-file assertions still run unchanged, so the shorter values retain the original leak-check meaning. Source definitions alone are not counted as runtime leakage.

The initial static edit helper had a Python syntax error before making any edit; it was corrected before the two replacements. No test/setup failure resulted.

R5 manifest preserved as candidate-r5.sha256. Regenerated candidate includes this correction and r6 plain-text gate receipts; package scope remains the same nine paths inherited from the row, with only the two value replacements since r5. No source edits after the green runs. Round3 Boyd/Dewey review and Sage's fresh landing gate precede any refactor push.

R6 scratch gate directory retained: /mnt/storage/scratch/tmp/iGjm8u