agents: Darkwing row 121 round 2 packet (#1615), rebased on 20d2b5788

Candidate manifest sha256 710d50866e77055b7231a53e3601bd2bab7686b722160f81ddda030875f67e9b,
30 files. Targeted gate green, 77 of 77 mutants killed, repro DIGESTS_OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-15 13:54:02 -05:00
co-authored by Claude Opus 5.5
parent a921aeb010
commit 58e85d0fa1
102 changed files with 11081 additions and 0 deletions
+156
View File
@@ -0,0 +1,156 @@
# Row 121 (#1615) round 2: projects and threads in the bus
Brief: docs/plans/2026-10-14_prd-1.2-build.md, section "Projects and threads in the bus". Round 1 is agents/darkwing/work/queue-121/r1 (packet ef8c3fe71). Dewey's verdict is changes, comment 28591. Sage's rulings are in sage-0347, sage-0348, sage-0360 and sage-0362.
Requirements: REQ-ORG-2, REQ-THREAD-1, REQ-THREAD-2, REQ-USER-2, REQ-ROLE-2, REQ-MSG-1, REQ-LAUNCH-1, and REQ-ASSIST-2 for F1. Test names carry the ids.
BASE: 20d2b578814df1a2e24c7cb27b1dadba3702b3a8 (row 132's landing). The candidate is build.patch against BASE, and candidate-manifest.sha256 lists its 30 files (sha256 of the manifest: 710d50866e77055b7231a53e3601bd2bab7686b722160f81ddda030875f67e9b). `repro.sh` exports BASE with `git archive`, applies build.patch and checks every manifest digest: DIGESTS_OK (repro-run.log).
Round 2 is a delta review (sage-0347). This file covers what changed since round 1. r1/BUILD.md still describes the design, the schema, the broker verbs and the round 1 tests, and none of that is repeated here.
## What changed since round 1
1. The rebase onto rows 49, 123, 133 and 132.
2. Dewey's F1, F2, F3 and F5.
3. The 3d→3e migration, its tests on a copy of a 3d database, and its mutants.
4. Setup changes in two bus tests from rows 123 and 133, which a thread instance now needs. Sage accepted them in sage-0362, and they're listed below so Filbert can check them.
5. land-work green on the rebased tree, with no borrowed hunk.
## Dewey's findings (28591)
### F1: thread.send runs the messaging check
`thread.send` now calls `this.#checkMessaging(s.business, this.#sender(s), t.instance)` before its insert, the same call `message.send` makes since row 133. A definition whose `receiveFrom` leaves out the human refuses `message-sender-refused`, and nothing is stored.
Test: messaging.test.mjs "REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing". It gives the assistant `receiveFrom: ['chief-of-staff']` and checks the refusal, the logged refusal, and that no message, no `message_threads` row and no `human.input` event was written. Mutant b-thread-send-unchecked removes the call.
### F2: role.revoke on a thread run, documented
I documented it and didn't add a thread argument to revoke. A thread run already has three ways to stop: the idle stop, `mosaic stop <run>`, and the run's own end. A revoke verb for threads would mean a new decision context and a new claim path, which the row doesn't need.
What happens now, checked against the code:
- At `decision.raise` the context's `holderRun` comes from the role claim. A thread instance has no `role_claims` row, so it is null.
- Using the approved decision refuses `decision-mismatch`. #consumeAuthority compares that null with the current holder lookup, which is `undefined`, and they don't match.
- The chief of staff's reason path refuses `role-end-refused`, because the assistant is protected (row 123's `END_PROTECTED`).
- `thread_revoke_needs_decision` still guards `thread_claims` against a direct write.
The bus README's "Projects and threads" section says this. Test: threads.test.mjs "REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held". It raises and resolves the decision, checks the `decision-mismatch` refusal, and checks that `role_claims` has no assistant row and the thread's last claim is still a-run's.
One edge I didn't test, recorded as a follow-up: a bus migrated from 3d could still hold a pre-3e `role_claims` claim for the assistant. A decision to revoke it would revoke that old role claim and touch no thread. Whether it can happen depends on whether the live bus has an open assistant claim at the window. Mos can check `role_claims` for one before the re-pin.
### F3: no message strands at an idle stop
I took Dewey's first suggestion and made it atomic. The broker has a new launch op, `threadIdle({business, thread, run})`, reached through process.mjs and runtime.mjs like `threadsState`.
- In one synchronous call it rereads the thread's `pending` and `unread`.
- If either is nonzero it returns `{released:false, pending, unread}`.
- Otherwise it releases the thread's claim and returns `{released:true}`.
- It refuses `unknown-run`, `run-ended`, and `not-holder` for any run that isn't the thread's current holder, including another thread's holder and a non-thread run.
The launcher sends SIGTERM only after `released:true`. A message sent after that call has no holder, so it waits as `pending` and starts the next session. The released run can't take it: `message.receive` refuses `not-holder`.
Dewey's second suggestion, a new holder picking up messages delivered to a dead run, isn't in this round. A run that crashes mid-turn strands its delivered message, as row 80 does for any role. What I did fix is the count: `unread` now counts only deliveries to the current holder, so a dead run's message no longer keeps every later holder from idling out.
Tests:
- threads.test.mjs "REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder": pending, then unread, each block the release; all four refusals; a refusal releases nothing; after the release the run can't receive the thread's next message, and the next holder gets it.
- threads.test.mjs "REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder".
- thread-launch.test.mjs "REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it". The test wraps the `threadsState` op so a `thread.send` lands between the snapshot and the `threadIdle` call. No `thread-idle` event is logged, the same run answers, and the next tick past the idle time stops it.
Mutants: b-idle-no-recheck, b-idle-ignores-pending, b-idle-ignores-unread, b-idle-no-holder-check, b-idle-no-ended-check, b-unread-any-holder, b-unread-no-claim-scope, p-thread-idle-op, l-idle-ignores-released, and l-never-idle-stop re-pinned to the new code.
Two launcher changes follow from this:
- The tick's own `pending === 0 && unread === 0` check is gone. The broker decides, and a copy of the check in the launcher would only hide a broker mutant. r1's l-idle-ignores-pending mutant targeted that check, so it's dropped.
- A `threadIdle` refusal is logged on every tick it happens, not once per code. It means the launcher's registry and the bus disagree about a holder, which shouldn't last. If Dewey would rather have it deduplicated like `refusedThreads`, that's a small change.
### F4: no action
An observation for when there's more than one user. Nothing changed.
### F5: old unthreaded messages are kept and reported
The 3d→3e step changes no row. Messages from before 3e have no `message_threads` row, so a thread run never receives an undelivered one, and `threadsState` doesn't count it. I chose to keep them as written over dropping them or attaching them to a made-up default thread: messages are evidence, and a default thread would invent a conversation the user never started.
The step has a `report`. Store collects it in `migrationReport`, and `migrate-schema.mjs` prints one line per business and recipient role before "bus schema 3e ready":
```
kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send
```
The store doesn't read business files, so it can't tell which roles are thread instances. It reports every role, and the line says the loss applies only to a thread instance. A message to the chief or the human still delivers as before. My first wording said "a thread instance never receives them" on every line, which was wrong for the chief's and the human's lines. I fixed it before the gate.
Store's `#verifyTimes` now skips a timed table that doesn't exist yet, because the check runs on a 3d database before the step creates the thread tables.
Tests, thread-migration.test.mjs on a copy of a 3d database built from fixtures/schema-3d.sql:
1. "REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written": a 3d bus refuses without the step; with it, the version is 3e, the five tables are empty, the report matches, every message and delivery row is unchanged in both the bus and the copy, a second open reports nothing, and a thread run on the migrated bus receives none of the old messages and `threadsState` counts none.
2. "REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables".
3. "REQ-THREAD-1: the offline command prints the kept-message counts before the ready line".
The fixture covers waiting, delivered, read and failed deliveries, two businesses, and three recipient roles.
Mutants: m-report-counts-delivered, m-report-counts-all, m-report-by-role-only, m-report-dropped, m-cli-no-report and m-times-missing-table. A mutant that drops `'read'` from the report's `d.op IN ('delivered','read')` is equivalent, because a read message always has a delivered row first, so it isn't in the set.
### F6: the READMEs stay
Sage's ruling at landing, sage-0362: "Leave them in for now." The bus, cli and seat README edits stay in the candidate.
## Changed tests outside this row's new files
Sage accepted these in sage-0362. Filbert, please check them on purpose.
- **packages/bus/tests/decision-route.test.mjs (row 133).** The setup binds every role in a loop. The assistant now needs a thread, so the setup creates project `demo` and thread `main` as the human and binds the assistant with that thread. The business gains `projects: { stack: { root: '/nonexistent' } }`, which `project.create` needs. No assertion changed.
- **packages/bus/tests/chief-of-staff.test.mjs (row 123).** The same setup change. In "REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end", the assert on the assistant's last `role_claims` row is replaced by one on `thread_claims`: `{ op: 'claim', holder_run: 'assistant-run', by: 'assistant-run' }`. A thread run's claim is in `thread_claims`, so the old query returned no row. The test still checks the refusal and that the claim is still held.
- **packages/bus/tests/comment-migration.test.mjs.** The version pins move from 3d to 3e, the registry test's fixture-only future version goes from 3e to 3f, and `3d-3e.sql` is copied with the other steps (Sage's note 28559).
- **packages/bus/tests/schema.test.mjs.** 14 tables and 63 triggers: row 123's 9 and 39 plus this row's 5 and 24.
## Other changes since round 1
- The bus README said `schema.sql` is v3c, which was stale after row 123. It now says v3e.
- thread-launch.test.mjs has 8 tests. The snapshot race test (F3) is the new one, after the long-turn test.
## The rebase
Two steps. First onto 73fa83a08, which has rows 49, 123, 133 and 70. Then onto 20d2b5788 after row 132 landed (sage-0365).
On 73fa83a08:
- store.mjs: `SCHEMA_VERSION` is `3e`, and the 3d→3e step follows rows 49 and 123's steps in the same registry. r1's "provisional" comment is gone.
- schema.sql: row 49's cursor table, row 123's revoke trigger, then this row's 3e block. migrations/3d-3e.sql is the 3e block alone, written against 3d.
- broker.mjs: the F1 call uses row 133's `#checkMessaging(business, from, to, refused)` with `#sender(s)`, as `message.send` does.
- The decision-route and chief-of-staff test setups, listed above.
- land-work: read.mjs imports the store's `SCHEMA_VERSION` since row 49, so the r1 failure at BASE is gone with no borrowed hunk.
On 20d2b5788: row 132 changed only broker.mjs line 99 (`export const ORGANIZATION_KEYS`) and one business README paragraph. I applied this round's diff with `git apply --3way` and both applied with no conflict. Line 99 and the row 132 paragraph are as landed. The six new files carried over unchanged.
## Mutants
77 mutants ran from 18:31:50Z to 18:50:38Z on 20d2b5788 (mutants-run.log, one log per mutant in mutants/). All 77 were killed and none survived or failed to load. By target: SCHEMA 25, BUS 24, CLI 14, MIGRATION 6, SEAT 6, BUSINESS 2. The six control runs passed first with 0 fail: BUS 48, BUSINESS 26, CLI 26, MIGRATION 21, SCHEMA 28, SEAT 20. The run ends with `restored: True`. `mutants.py --check` gives 77 patterns. Every SCHEMA edit is mirrored on migrations/3d-3e.sql, because the store checks the step's target against schema.sql and an unmirrored edit loads as `migration-target-mismatch` instead of testing the trigger.
## Gate
A targeted builder gate under decision 136 (gate.sh, logs in gate/). Sage's landing gate runs every suite. It ran on 20d2b5788 from 18:29:34Z to 18:31:35Z (gate-run.log). The four owned packages run in full, plus every package and script whose code or tests import a changed module. land-work is green from the rebase alone, and its run removed the worktree's Docker network.
| Step | Result |
|---|---|
| bus | 214 pass, 0 fail, 0 skip |
| seat | 135 pass, 0 fail, 0 skip |
| cli | 203 pass, 0 fail, 0 skip |
| business | 95 pass, 0 fail, 0 skip |
| harness | 90 pass, 0 fail, 0 skip |
| plugins | 21 pass, 0 fail, 0 skip |
| tasks | 97 pass, 0 fail, 0 skip |
| webui | 112 pass, 0 fail, 0 skip |
| scripts/test-land-work.sh | 84 pass, 0 fail |
## How the round went
**My land-work run overlapped Sage's row 132 gate.** I had queued a land-work run behind a busy check. It started at 2026-10-15T18:19:39Z and finished at 18:19:52Z with 84 pass and 0 fail, while Sage held the slot. My busy check matched Sage's `sage-g*` gate directories but not `/mnt/storage/scratch/sage-r132`. I told Sage straight away, widened the check to every `scratch/sage-*` directory, and ran nothing else until Sage said clear. That run was on 73fa83a08, so it isn't part of this gate. The land-work row above is from the rebased tree.
**Temp dirs.** The gate and the mutant run left 529 dirs in my TMPDIR. 201 of the gate's 205 are `mosaic-business-*`, from packages/business/tests/helpers.mjs `tmp()`, which never removes what it makes. This row doesn't change that helper, so it stays as is, and I recorded it as a follow-up. The rest are `mosaic-launch-*` and `mosaic-thread-*` dirs, which `t.after` should remove. I didn't find out why some stayed. I deleted all of them after the run.
## Going live
Unchanged from r1/BUILD.md, plus the migration. The re-pin needs bus downtime for 3d→3e (after 3b→3c→3d from rows 49 and 123) and Mos's go (decision 109). Read the kept-message lines the command prints: any undelivered message to the assistant from before the window has to be re-sent with `thread.send`, which needs row 128's CLI or row 11's chat.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,30 @@
5d9c73c43c9020bd79018c7266b3ffa28839f3109e0682d8065a0bc4cce72c24 packages/business/README.md
51de1f5dcd77796abba0519aa92e16eb4b95edbee49e92e1650101f234498b49 packages/business/src/business.mjs
ff73fc891a50e1ab6b0235b9e8584c92d828b53f38f483d4a86e5d6c3f5b0d09 packages/business/tests/business.test.mjs
dd253efbee85708d66cd900c426c1c58d7b864ee2bd79224ece77a4a2c228e3d packages/business/tests/chief-of-staff.test.mjs
51e52a70d972bcfeb767a26f20e6b693e9f901a18c51778d9f6613ddf2277f78 packages/bus/README.md
21e6c091f14f818396f4d7836f381cc1389d45b2680ecaa1a00646b652c45050 packages/bus/schema.sql
94ff6ff0b89fa4e6cb3b6dadc00ab8e443cf9993b9d6864c3fc0934da3f3cc26 packages/bus/src/broker.mjs
f48b1adeb0ea1bf1b1f290e5bb39dedf115c4b41b6da9c777f7ce749253da6a2 packages/bus/src/migrate-schema.mjs
d9aacc974d5047790e65c30a90068259bb9396dc92d4904eae3b9c5dbbb2f077 packages/bus/src/migrations/3d-3e.sql
86f6fcfde4176fb80ad7a43adf805621216b257e62b1f120cb588d15e8b7af05 packages/bus/src/process.mjs
01fb90e1fe58915827b90f5175dec7903d3e52524b787b401d816240cb45c51d packages/bus/src/runtime.mjs
1264861ddfd684f845160afb0adb7533a38525595b48f81a6c465ffeac739e9e packages/bus/src/store.mjs
1c2ad65664943cfa0fb67fcd27ab69cb5bdb84d8059a56e78d1deb17f691a5a3 packages/bus/tests/chief-of-staff.test.mjs
c9cec9d0a07416bd8dfa6df3c38ba0eeff810d2d3f843eae004fb72542ebc2c2 packages/bus/tests/comment-migration.test.mjs
8704e64881e56f1d6657438b5d4313fa9d338f9834e4f7903a7822607f10657d packages/bus/tests/decision-route.test.mjs
70de87c083cad055bedd0de99b279f602ad7965f2018d1d17c1ac5cf1698112e packages/bus/tests/end-launch.test.mjs
e4f1de9e16d2fab5e051fd3810189b28cc76a670cfe573b752d9f53bf9ca39b5 packages/bus/tests/fixtures/schema-3d.sql
bd96294a2a9085dde881958eafde4c205b9a2e5606273ba3f6fef4c4a13321cd packages/bus/tests/messaging.test.mjs
91befefec88f78c0bec30cd80f8a10aa5b520cb6ff00e01a1e939c44c75312cd packages/bus/tests/schema.test.mjs
d89aa78af6359b92d4aed4f2f17a9c6683d3a3ff2891483cb1c43f2625c3b99a packages/bus/tests/thread-migration.test.mjs
c5adace50feaafaa56ace9e8a5f7a6be1d192a2a4061ac00b9f739804d3afb40 packages/bus/tests/threads.test.mjs
e13bdd143d0cda4550fafa41b7a3fef13a5bb73944a4a7587ccacdbf1a72690b packages/cli/README.md
b97e51d2fc6bf02debdcc645e4b7d99412046f15d4cdc3766006c0e76a28da6b packages/cli/src/launcher.mjs
dc857a55ea53a87505073dac428282b66ab9d9e0bb3a1bca5632769682a9da43 packages/cli/tests/fixtures/thread-adapter.mjs
d0a2dd11ebdfbdeff20776566686db8120ab03f155a74df032a7ca0eb5975051 packages/cli/tests/thread-launch.test.mjs
e8b1ffc1153794d09fadc9e641846cc9ccd0b238c7e7fff02e46d48a4b42c39c packages/seat/README.md
7c5158c95517c244ff5e41ec5cdb431734ae77b7f90add6d21302d10277c3656 packages/seat/src/sandbox.mjs
46349aa3be84f5ab4123ed81718fb729eeff084f8579cdf1ab4a23cf7f99a3ee packages/seat/src/session.mjs
c9659c0e1512d832126f76058bb9023b4acf79d7fb21b18223d37497325c0fdc packages/seat/tests/sandbox.test.mjs
1fdfee178adebc3e83ed6de638d338f27e1afbce8831e89108d70cb5d7584b25 packages/seat/tests/session.test.mjs
@@ -0,0 +1,11 @@
base 20d2b5788 start 18:29:34
pkg-bus rc=0 ℹ pass 214 ℹ fail 0 ℹ skipped 0
pkg-seat rc=0 ℹ pass 135 ℹ fail 0 ℹ skipped 0
pkg-cli rc=0 ℹ pass 203 ℹ fail 0 ℹ skipped 0
pkg-business rc=0 ℹ pass 95 ℹ fail 0 ℹ skipped 0
pkg-harness rc=0 ℹ pass 90 ℹ fail 0 ℹ skipped 0
pkg-plugins rc=0 ℹ pass 21 ℹ fail 0 ℹ skipped 0
pkg-tasks rc=0 ℹ pass 97 ℹ fail 0 ℹ skipped 0
pkg-webui rc=0 ℹ pass 112 ℹ fail 0 ℹ skipped 0
land-work rc=0
GATE_PASSED 18:31:35
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
# Row 121 (#1615) round 2 targeted builder gate (decision 136). The four owned
# packages in full, plus every package and script whose source or tests
# import a changed module: harness (runner, tools, gate), plugins (loader
# test), tasks, webui (bus, cli, reads) and scripts/land-work (read.mjs opens
# the bus schema). cli/tests/stack-copy.test.mjs covers scripts/stack-copy.sh.
set -o pipefail
G=~/darkwing-scratch/r121/r2wt
OUT=~/darkwing-scratch/r121/pkt2/gate
mkdir -p "$OUT"
cd "$G" || exit 9
[ -d "$G/node_modules" ] || { echo "STOP no node_modules in $G"; exit 8; }
for f in packages/bus/tests/threads.test.mjs packages/bus/tests/thread-migration.test.mjs packages/bus/tests/fixtures/schema-3d.sql packages/bus/src/migrations/3d-3e.sql packages/cli/tests/thread-launch.test.mjs packages/cli/tests/fixtures/thread-adapter.mjs scripts/test-land-work.sh; do
[ -f "$f" ] || { echo "STOP missing $f"; exit 7; }
done
echo "base $(git rev-parse --short HEAD) start $(date -u +%H:%M:%S)"
run() { local name="$1" dir="$2" cmd="$3"
(cd "$G/$dir" && TMPDIR=~/darkwing-scratch/r121/tmp bash -c "$cmd") > "$OUT/$name.log" 2>&1; local rc=$?
echo "$name rc=$rc $(grep -E '^ℹ (pass|fail|skipped) [0-9]+' "$OUT/$name.log" | tr '\n' ' ')"
[ $rc -eq 0 ] || { echo "STOP $name"; exit $rc; }; }
run pkg-bus packages/bus 'node --test tests/*.test.mjs'
run pkg-seat packages/seat 'node --test tests/'
run pkg-cli packages/cli 'node --test tests/*.test.mjs'
run pkg-business packages/business 'node --test tests/'
run pkg-harness packages/harness 'node --test tests/*.test.mjs'
run pkg-plugins packages/plugins 'node --test tests/'
run pkg-tasks packages/tasks 'node --test tests/*.test.mjs'
run pkg-webui packages/webui 'node --test tests/'
run land-work . 'bash scripts/test-land-work.sh'
echo "GATE_PASSED $(date -u +%H:%M:%S)"
@@ -0,0 +1,86 @@
OK args: exit 2, target-branch
OK args: exit 2, target-branch
OK args: exit 4
OK args: exit 4
OK args: exit 4
OK --base next refuses before the config is read (got 2)
OK a missing system config exits 3 (got 3)
OK nobus: exit 3
OK schema-table: exit 2, bus-schema
OK schema-meta: exit 2, bus-schema
OK openBus opens the database read-only
OK other-business: exit 2, decision-not-found
OK no-raise: exit 2, decision-not-found
OK not-a-merge: exit 2, not-a-merge
OK open: exit 2, not-resolved
OK withdrawn: exit 2, not-resolved
OK by-agent: exit 2, not-human
OK via-webui: exit 2, not-human
OK no-answer: exit 2, not-human
OK answer-role: exit 2, not-human
OK answer-run: exit 2, not-human
OK answer-choice: exit 2, not-human
OK two-answers: exit 2, not-human
OK chose-no: exit 2, not-merge-option
OK two-refs: exit 2, work-ref
OK bad-ref: exit 2, work-ref
OK task-ref-disagrees: exit 2, work-ref
OK raise-task-disagrees: exit 2, work-ref
OK target-main: exit 2, target-branch
OK superseded-question: exit 2, superseded
OK superseded-task: exit 2, superseded
OK superseded-by: exit 2, superseded
OK no-verdict: exit 2, no-verdict
OK changes-later: exit 2, not-approved
OK short-commit: exit 2, not-approved
OK wrong-task-body: exit 2, not-approved
OK args: exit 2, decision-not-found
OK earlier-merge: exit 0
OK ref-moved: exit 2, ref-moved
OK root-top: exit 2, root-file
OK root-newdir: exit 2, root-file
OK root-src: exit 2, root-file
OK unrelated: exit 2, base-conflict
OK empty: exit 2, base-conflict
OK an empty reviewed diff says so
OK dirty-changed: exit 2, checkout-dirty
OK dirty-staged: exit 2, checkout-dirty
OK dirty-untracked: exit 2, checkout-dirty
OK conflict: exit 2, base-conflict
OK a refusal after the worktree is added leaves no worktree or scratch
OK cleanup looks for the worktree's Docker network
OK dirty-during: exit 2, checkout-dirty
OK a reviewed path dirtied during the gate moves no ref
OK drift: exit 2, patch-drift
OK patch-drift leaves no worktree or scratch
OK gate-pkg: exit 2, gate-failed
OK gate-failed names the failing step's log, and it exists
OK gate-failed leaves no worktree or scratch
OK gate-script: exit 2, gate-failed
OK a failing scripts/test-*.sh fails the gate
OK a failed gate moves no ref
OK nomods: exit 4
OK a target without node_modules leaves no worktree or scratch
OK moved: exit 2, base-moved
OK base-moved keeps the base where it moved to
OK dry: exit 0
OK --dry-run writes no ref
OK --dry-run prints the commit with --subject and --attribution
OK --dry-run runs the gate
OK --dry-run leaves no worktree or scratch
OK land: exit 0
OK the landing is one commit on the old base
OK its diff is the reviewed diff by patch-id
OK its tree is the dry run's
OK the message has the option's subject, the citations and the attribution last
OK it prints the line for the PM
OK the checked-out base has the reviewed paths and keeps the unrelated edit
OK only refs/heads/refactor exists in the target
OK the work ref is unchanged
OK the bus database is unchanged
OK the gate ran each package suite but queue, and each scripts/test-*.sh
OK the landing leaves no worktree or scratch
OK the target's node_modules is still there, with its contents
OK the worktree's Docker network is removed
---
land-work selftests: 84 passed, 0 failed
@@ -0,0 +1,222 @@
✔ agents: a held role with nothing on the bus is idle; a role session gets the claim rows unchanged (153.699243ms)
✔ agents: working counts what the holder received and has not read; routed alone is not working (229.827968ms)
✔ agents: input needed is the role's open decisions routed to the human, gated first, then oldest (341.356151ms)
✔ agents: working wins over waiting, and Input needed still shows (168.961636ms)
✔ agents: a new holder doesn't inherit what the last one left unread; decisions stay with the role (195.279545ms)
✔ agents: state reads only its own business, even for a run name both use (175.255358ms)
✔ agents: a message the holder released unread is stranded; the next holder gets nothing and cannot read it (201.908584ms)
✔ agents: a message the holder read is not stranded; one the current holder has not read is not listed (231.446356ms)
✔ agents: stranded is oldest first and capped at 50 for a role (851.791411ms)
✔ agents: stranded is per role and per business (350.931409ms)
✔ agents: a message routed to a held role and not yet received is not stranded (138.933501ms)
✔ launch identity is stamped, payload identity is refused and stale holder cannot send (163.60871ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (278.627925ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (267.190481ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (178.038269ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (173.097804ms)
✔ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (266.152047ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (170.529144ms)
✔ task action subjects and linked decision trail are complete and ordered (211.168554ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (128.832232ms)
✔ business isolation includes inherited object names and cross-business message references (205.844863ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (248.145532ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (145.408216ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (236.491794ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (147.355713ms)
✔ both arbiters require human resolution when their cross-role route is themselves (249.101355ms)
✔ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (197.263685ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (3.392526ms)
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (248.683136ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (358.279502ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (236.492404ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (242.058757ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (251.551342ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (290.255674ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (283.426707ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (228.530659ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (305.018003ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (306.091213ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (399.584046ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (486.902178ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (775.921922ms)
✔ comment cursors isolate businesses, move only forward and remain append-only (138.292861ms)
✔ only trusted sync writes validated cursors; events and cursor share rollback (124.446357ms)
✔ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (858.742554ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1484.984022ms)
✔ named migration registry chains 3b through 3e to a fixture-only future version in order (820.145004ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (725.043254ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (773.331649ms)
✔ credentials gives human and reader sessions service, account, role, date and state, and nothing else (106.605675ms)
✔ credentials refuses a role session and any argument (168.029384ms)
✔ credentials reads the status on each request, and a broker without one lists none (248.975137ms)
✔ the broker process answers credentials without a token, path or variable in its output, log or store (219.949233ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (4.038281ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (11.025056ms)
✔ expiry refuses use and env references never become client data (0.734965ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.376493ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.337724ms)
✔ a human resolve sends the raising role one message from the human, and its request is the answer (224.094326ms)
✔ a cross-role decision resolved by its arbiter comes from that role and run, with no request (274.702729ms)
✔ a human withdraw sends one message with the note (228.481859ms)
✔ a human seen before the close leaves the request on the close's answer, not the seen (273.780532ms)
✔ the raising run's withdraw, a supersede, a within-role raise and seen send nothing (264.549049ms)
✔ refused closes send nothing: invalid-choice, decision-closed, not-resolver (280.427035ms)
✔ a raising role nobody holds at the close gets the message on the next claim (287.222085ms)
✔ a human DECISION send keeps its own instruction as the request, not a close's answer (245.864642ms)
✔ a cross-role raise whose arbiter the raiser does not hear from is refused and stores nothing (292.381317ms)
✔ a gated raise by a role that does not hear from the human is refused and stores nothing (309.158603ms)
✔ a route the raiser hears from is allowed, checked from the route to the raiser (336.401942ms)
✔ a refused supersede withdraws nothing (275.187726ms)
✔ the assistant's within-role and gated raises still work (296.324738ms)
✔ roles lists open decisions routed to a role, and never the human inbox (206.108813ms)
✔ recent lists closed decisions of every route, newest close first, with how each closed (330.341092ms)
✔ recent gives the closing event as closed when the decision was seen first (285.855501ms)
✔ recent stops at RECENT rows (796.398309ms)
✔ every row is what trail already gives the same session for that id (283.159588ms)
✔ a role session can't list decisions, so it can't read another role's open decisions (383.233516ms)
✔ decisions is a read: one business, strict arguments, nothing written (389.667131ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (128.809578ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (137.1012ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (170.955875ms)
✔ endLaunch leaves a claim another run took alone (184.074403ms)
✔ refuse records action.refused against the caller with the code only (140.507998ms)
✔ launches off refuses role.launch with launch-revoked until launches on (190.142885ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (294.793427ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (1.785499ms)
✔ process reader gets own kernel identity without exposing environment values (0.541362ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.70026ms)
✔ real pid 1 remains inspectable when its environment is protected (0.274873ms)
✔ limits binds actor from human proof and rejects role, reader, tester and forged actor (178.299144ms)
✔ runtime wires verified human settings to the actual shared file writer and actor receipt (311.685088ms)
✔ uncertain organization receipts leave bus startup and reads alone but refuse writes until reconciled (415.381236ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (191.334696ms)
✔ missing and foreign-business citations refuse and roll back message and grant (210.002464ms)
✔ cross-role sends still need a matching resolved decision and consume it once (250.141836ms)
✔ messages pages all human messages newest first without writes; read state is history (2588.035232ms)
✔ messages refuses role callers, invalid paging and cursors outside this human feed (260.640998ms)
✔ views messages passes only its paging arguments through (0.245633ms)
✔ messages isolates businesses even with a valid foreign cursor (175.891447ms)
✔ the assistant sends to the user and to the chief of staff only (336.126087ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (364.631711ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (367.54967ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (283.826176ms)
✔ a sender-side list alone refuses a send to a role that has no list (334.112214ms)
✔ a target-side list alone refuses a send from a role that has no list (346.286947ms)
✔ the sender list is checked before the target list (286.802315ms)
✔ roles without the field behave exactly as before (419.335901ms)
✔ a business with no role definitions at all is unlimited (340.157788ms)
✔ a malformed messaging field refuses at boot (129.218842ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (320.680184ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (337.817561ms)
✔ review requests and verdicts between roles without the field are unchanged (287.759179ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (204.850077ms)
✔ startup token refusal returns safe code without value or partial listening broker (49.961194ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (207.537935ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (185.704314ms)
✔ trusted host registers later launches; socket clients never have a registration verb (198.379885ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (46.600349ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (180.898186ms)
✔ a reply is listed for human and reader sessions, and its delivery rows are unchanged (266.189296ms)
✔ the reply still reaches the human message.receive (mosaic talk) after the Console showed it (209.052953ms)
✔ a message with no reply gives an empty list (161.855029ms)
✔ replies come oldest first and stop at REPLIES (753.585731ms)
✔ an id that names no message in the business refuses message-not-found, and the refusal is recorded (304.848994ms)
✔ strict arguments; a role session gets human-required (357.950038ms)
✔ views passes replies through as one call with the id (0.391061ms)
✔ requirements returns the committed list to a holding role session, and no one else (215.187029ms)
✔ the PM's prd.approve with no task, when no id fits, reaches the human's Inbox (149.137339ms)
✔ the PM's non-blocking role.revoke with no task reaches the human's Inbox (161.920145ms)
✔ a push is recorded as the action.allowed for git.push.working on the task, and only the host records one (234.096824ms)
✔ review.request names the latest pushed commit and sends the reviewer a REVIEW-REQUEST (237.184474ms)
✔ review.request says which run holds the reviewer role, or null, and a null request waits for a claim (283.737856ms)
✔ review.request refuses a commit that isn't the latest push, a non-reviewer and a role without the action (393.262093ms)
✔ reviewFetch answers only the addressed reviewer, for the request it cites (239.834633ms)
✔ review.verdict answers one request once, to the role that asked (288.219314ms)
✔ task.close on a pushed task needs an approve verdict for the latest push (372.424164ms)
✔ a refusal the host decided is filed on the task it names, and only a task ref counts (255.528338ms)
✔ v3b prototype refusals, views and append-only mutations (1455.043133ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (242.829252ms)
✔ another run cannot consume an approval; a failed check leaves it usable (228.24592ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (177.762603ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (318.536908ms)
✔ class drift gated to cross-role refuses before consumption (211.304887ms)
✔ class drift cross-role to gated refuses before consumption (265.034899ms)
✔ class drift gated to within-role refuses before consumption (219.374338ms)
✔ class drift cross-role to within-role refuses before consumption (250.897278ms)
✔ class drift within-role to gated refuses before consumption (229.222792ms)
✔ class drift within-role to cross-role refuses before consumption (193.165973ms)
✔ message.send consumes approval and prevents a later send or authorize (207.657143ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (246.048627ms)
✔ a business that never switched launches reads allowed with no time and no event (132.737745ms)
✔ launches revoked and then restored read allowed, with the restore time and event id (156.424182ms)
✔ a task closed on the tracker leaves the open list, and total counts the open ones (159.660859ms)
✔ a tombstone is not open (138.722083ms)
✔ the open list stops at the cap and says so; total still counts every open task (152.006771ms)
✔ a role and a reader session read state; arguments, and an unbound cap, refuse (138.801717ms)
✔ a human session reads the same state, with the same cap (137.176693ms)
✔ reading state writes nothing: every table keeps its row count (162.719034ms)
✔ creates private WAL store and excludes a second writer until explicit close (131.671302ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (170.325062ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (190.832741ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (172.92479ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (114.296175ms)
✔ async transactions refuse before invoking their function (86.234791ms)
✔ the session default fits under the reply cap and pages to the end with next (301.629918ms)
✔ the short form: no description, assignees by role, every listed key (244.237388ms)
✔ each filter, alone and together, and total counts every match (327.209787ms)
✔ task_ref reads one task in full, as the whole board has it (284.518362ms)
✔ no arguments is the read the Console and mosaic make, unchanged (253.103932ms)
✔ an unknown argument or a bad value refuses invalid-request (907.384015ms)
✔ tasks rows carry priority and requirement for every session that reads tasks (303.905155ms)
✔ the read model rebuilds from the ledger: a reopened bus and each trail give the same values (317.338299ms)
✔ an empty business and one with snapshots but no task.created read cleanly (118.270699ms)
✔ recordTask keeps sync reads and a role write apart (165.172894ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (115.94974ms)
✔ a bad entry refuses the whole record (104.699739ms)
✔ taskView reads the projection for one business (119.567114ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (247.708657ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (409.701154ms)
✔ without an adapter the server refuses every task verb (199.502617ms)
✔ the runtime refuses an invalid adapter and closes a valid one (201.339903ms)
✔ the process loads the S3 adapter from plain-data trackers (264.66692ms)
✔ the tester binds only when the business sets bus.tester to exactly true (779.049664ms)
✔ a business may not name a role tester, so the tester address is never a role (238.571844ms)
✔ every verb outside the tester list refuses tester-refused and is recorded against the tester (520.599727ms)
✔ a tester message is from tester, starts [mos test], and writes no human.input or authority (201.997275ms)
✔ a role answers a tester only in reply to a tester message, and the answer never reaches the human (243.194114ms)
✔ the tester reads the human views a reader reads (164.5203ms)
✔ tester proof binds its own CLI, start time and nonce, refuses a managed run and allows an agent (1.182779ms)
✔ neither CLI's nonce proves the other: each proof is bound to its own CLI and nonce variable (0.330254ms)
✔ testerNonce reads only the tester's variable and gives null on any read error (0.208544ms)
✔ an envelope carries exactly one of cap, human and tester; no tester authenticator refuses (122.394147ms)
✔ tester-cli.mjs binds through the runtime when the switch is on, and refuses off or under a run marker (824.261941ms)
✔ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (955.684174ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (732.464281ms)
✔ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (750.145897ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (314.082655ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1109.003438ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (315.68945ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3078.304374ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (113.017441ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (177.587495ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (184.759923ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (219.041341ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (161.719891ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (175.523575ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (161.225384ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (115.606981ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (151.712139ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (492.731667ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (159.814758ms)
✔ two wire claims serialize; a lost reply never automatically retries (169.899237ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (120.098738ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.513057ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (150.778843ms)
ℹ tests 214
ℹ suites 0
ℹ pass 214
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 9386.159124
@@ -0,0 +1,103 @@
✔ the role file loads and resolves through loadBusiness (7.210529ms)
✔ the shipped file is exactly the approved list (0.997354ms)
✔ the assistant's authority is message.send within role and nothing else (2.797165ms)
✔ the assistant talks to the user and the chief of staff only, and no other shipped role is limited (0.921494ms)
✔ a business grant through limits does not widen the role (2.020977ms)
✔ a launch block whose by is the assistant is refused (2.113662ms)
✔ the instance takes no credential references and no tracker (2.995707ms)
✔ an arbiter whose role definition declares messaging lists is refused, for each kind (12.354981ms)
✔ an arbiter without messaging lists is accepted beside the limited assistant (1.794345ms)
✔ the contract passes work to the chief of staff and directs no one (0.570745ms)
✔ config directory and file path follow MOSAIC_CONFIG (1.382322ms)
✔ the fixture business validates and comes back frozen (4.321231ms)
✔ two instances may share a definition (1.655369ms)
✔ top-level refusals (5.877603ms)
✔ arbiters and projects (8.08437ms)
✔ role instances (4.11319ms)
✔ Vikunja bots (15.626329ms)
✔ a role without Vikunja takes no tracker block (2.159346ms)
✔ credential references match the definition's services (2.905961ms)
✔ launch (7.855484ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (4.181426ms)
✔ loadBusiness: file checks (2.088052ms)
✔ loadBusiness: not a regular file (35.612542ms)
✔ loading writes nothing (0.950226ms)
✔ names that are Object.prototype properties don't count as declared (2.475049ms)
✔ the shipped example refuses as written and validates once filled in (1.009418ms)
✔ the role file loads and resolves through loadBusiness (6.957607ms)
✔ the shipped file is exactly the approved list (0.284368ms)
✔ the resolved record matches the approved list, so a widened file fails (2.156438ms)
✔ the chief of staff holds role.launch, message.send, role.end and organization.change; every other action is gated (1.876737ms)
✔ the pm does not hold role.launch (1.918297ms)
✔ a business grant of a gated action through limits does not widen the role (2.686195ms)
✔ a limit that drops role.launch leaves the chief of staff with no launch block (1.652263ms)
✔ a launch block whose by is the pm instance is refused (2.027121ms)
✔ the contract names no duty to talk to the human and the pm contract no launch (0.452426ms)
✔ the instance takes no credential references and no tracker (2.826253ms)
✔ usage errors exit 4 (284.867299ms)
✔ validate: a good business exits 0 and prints instance digests (66.864231ms)
✔ validate: project files (311.381354ms)
✔ validate: missing files and a broken system config (234.781758ms)
✔ validate: credential reference problems exit 2 and name each one (66.389679ms)
✔ validate: a token file inside the repository is refused (65.189828ms)
✔ validate: role definitions come from MOSAIC_ROLES_DIR (184.180347ms)
✔ resolve: prints one instance's record (255.064763ms)
✔ resolve: refusals (362.16787ms)
✔ parse: exactly one of file or env, plus the service's date (3.06151ms)
✔ check: a good file has no problems (0.972159ms)
✔ check never opens the file: a write-only token passes (0.429383ms)
✔ check: file problems (1.119737ms)
✔ check: token files can't live in the repository or dataRoot, even through a linked directory (1.126183ms)
✔ check: dates and environment references (0.480068ms)
✔ REQ-LIMIT-1 schema: every scope unset or zero, adjustable above four, bad values and unknown models refuse (14.872413ms)
✔ REQ-LIMIT-1 counts each exact scope at/over limit, unlimited and old tuple after model reassignment (0.810319ms)
✔ REQ-ROLE-3 writer: atomic validated revision, immutable previous bytes and authenticated actor/old/new receipt (197.943192ms)
✔ REQ-ROLE-3 writer: pre-rename fault leaves old file, post-rename recovery records commit, conflicting recovery refuses (167.556078ms)
✔ REQ-LIMIT-1 / decision145 migration prints only, preserves values, rejects ambiguity, and is idempotent (2.869435ms)
✔ REQ-LIMIT-1 shared settings validates the complete proposed selection and logs exact actor (99.278667ms)
✔ REQ-LIMIT-1 provider is table data: another provider routes separately and aliases share exact counts (1.786284ms)
✔ REQ-ROLE-3 refuses live writer locks, symlink targets and uncertain recovery without changing bytes (64.919925ms)
✔ REQ-PLUG-1 schema: plugins is optional, names known kinds and checked module names (15.300205ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the setter writes plugins through the organization writer and logs old and new names (255.301675ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the writer checks the bytes it writes: a Date in plugins is refused there too (38.841947ms)
✔ REQ-PLUG-1 REQ-ROLE-3 a refused setter write throws a code, changes nothing and logs nothing (1.438786ms)
✔ path and load (2.683038ms)
✔ refusals (1.886366ms)
✔ systemVars flattens the validated config (2.224648ms)
✔ precedence: system, business, project, project role, agent (5.982927ms)
✔ limits narrow the definition and never widen it (10.068349ms)
✔ role.launch stays within-role only for the instance the launch block names (5.439835ms)
✔ limits.authority without role.launch leaves the launcher with no launch block (2.748722ms)
✔ limits.authority narrows cross-role actions too (1.091267ms)
✔ classify (1.031402ms)
✔ the record carries what the broker and launcher need (1.095178ms)
✔ digest: key order doesn't matter, any value change does (7.298075ms)
✔ refusals (1.731446ms)
✔ the four shipped version 2 roles load (4.159984ms)
✔ shipped role scopes match addendum B section 2 and the SR runbook (1.423669ms)
✔ shipped authority follows the note's table (1.017526ms)
✔ every role file in roles/ loads through the validator, and a v2 contract exists (1.081695ms)
✔ version 1 files keep loading with no authority (6.638739ms)
✔ the conductor policy isn't a role (0.287336ms)
✔ a missing role file is exit 4, a symbolic link too (0.357471ms)
✔ version 2 refusals (1.168789ms)
✔ authority: closed vocabulary, no gated-only action, no overlap (1.854533ms)
✔ messaging: optional, role definitions and human, never the tester (2.220448ms)
✔ credentials: Gitea scopes (1.161654ms)
✔ credentials: Vikunja scopes are a group-to-verbs map from the grantable list (1.016553ms)
✔ credentials: services (0.425301ms)
✔ contract: a non-empty regular Markdown file beside the role file (0.571769ms)
✔ every key names known layers and a merge rule (1.26062ms)
✔ unknown keys and wrong layers refuse (0.915488ms)
✔ types (2.612126ms)
✔ merge: defaults, then the most specific layer wins (0.384919ms)
✔ merge: limits only narrow, and provenance lists each source (0.465692ms)
✔ merge doesn't change its inputs (0.207851ms)
ℹ tests 95
ℹ suites 0
ℹ pass 95
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1907.782693
@@ -0,0 +1,213 @@
✔ every screen and overlay fits 120x36, 80x24 and the narrow layout, row for row (1275.585914ms)
✔ width counts terminal cells: wide CJK and emoji 2, U+FE0F after a one-cell base 1, marks 0 (67.459637ms)
✔ broker text is shown, never interpreted: no raw control character or bidi override reaches the terminal (151.413045ms)
✔ NO_COLOR: no escape codes, except reverse video on the selected row (240.417906ms)
✔ 1-9 shows the decide flow's own lines and question; only y resolves (239.565801ms)
✔ the app shows the same decide text as mosaic decide (115.854079ms)
✔ any key but y or Y at the question answers No; nothing is sent (2468.415737ms)
✔ below 40x10 the question is hidden, so every key answers it No, y included (Filbert R3) (522.124194ms)
✔ under 40 columns a tall terminal shows the too-small screen even where the decide box would fit; y sends nothing (Filbert N10) (1987.614504ms)
✔ a hidden decide box names the way out, and the status line under it does not promise y (Filbert N12) (239.669341ms)
✔ a throw while answering the question goes to crash, sends nothing and leaves no job pending (149.91837ms)
✔ type-ahead never answers the question: a paste, keys typed before it is drawn, keys inside askMs (934.106757ms)
✔ quitting at the question answers No and sends nothing, armed or not (209.668737ms)
✔ a timer tick reads nothing under an overlay, never answers the question, and keeps a resolved status (136.449008ms)
✔ a long question is cut inside the question; the action, target, choice and prompt stay (Dewey B1) (110.37792ms)
✔ a decide box too big for the terminal says so, and every key answers it No, y included (Dewey B1, round 3) (884.035997ms)
✔ at every size the decide box shows each line y depends on, or says it is hidden (8840.448124ms)
✔ outcome unknown: the CLI's sentence, no retry, then the trail or a re-read (154.192396ms)
✔ refused and failed reads keep the last list, marked stale; a refused decide says refused (118.044682ms)
✔ help or a detail box cut to fit keeps its last line, Esc included (Dewey) (53.830834ms)
✔ keys: views, moving, trail of a selection, the command line, help and quit (238.929674ms)
✔ one option: the status line says Press 1, not 1-1 (98.221146ms)
✔ no business: the app says so and :business picks one (52.627658ms)
✔ mosaic with no argument: exit 3 in an agent run, exit 4 with the usage off a terminal, the app on one (1.606791ms)
✔ scripts/mosaic with no argument reaches the app entry; the seat usage it printed before has not drifted (162.664547ms)
✔ strings to keep exactly live once, in the decide flow and the transport; the app does not restate them (0.446389ms)
✔ decide with --note still asks; a No sends nothing (60.615124ms)
✔ the app's business comes from a live bus host only (0.914395ms)
✔ runApp leaves the terminal as it found it on q, end of input, SIGTERM, SIGINT, SIGHUP and an error, the first frame's included (6.485302ms)
✔ draw is pure: same state, same frame (0.67596ms)
✔ inbox lists only decisions routed to the human, with what approving authorizes and how to decide (231.984548ms)
✔ decide resolves by id prefix with --yes, and the trail shows it in broker order with the task to follow (146.903191ms)
✔ decide refuses without a terminal or --yes, on an unknown option and on a short reference (123.782466ms)
✔ decide prints a declining choice as declining (214.228985ms)
✔ an unknown outcome is reported once and never resent (122.645641ms)
✔ a decision closed before the answer arrives exits 2 and points at its trail (115.247319ms)
✔ a prefix that matches two open decisions exits 2 and resolves neither (118.713243ms)
✔ without --business a command uses the live host's business, and a stale host.json is not a host (193.146002ms)
✔ every human command refuses inside an agent run before it touches the bus (102.56406ms)
✔ usage errors exit 4; no business and no host is a usage error (115.298568ms)
✔ agents and tasks print through the broker (148.098842ms)
✔ notify.json: missing, loose, malformed and extra keys refuse; a binding or null passes (1.216269ms)
✔ bootConfig builds the broker's boot message for one business, with no trackers key when no project names one (69.780005ms)
✔ trackers come from the tracker.* variables of the one project that names a tracker project (76.720174ms)
✔ with two projects, the one that sets tracker.project supplies the tracker and the other is no conflict (47.687744ms)
✔ two projects that each name a tracker project refuse, since the boot shape holds one (45.777797ms)
✔ a business without tracker.baseUrl gets no trackers entry (34.159457ms)
✔ an unknown business and a broken system config refuse with exit 3 (60.33782ms)
✔ follow prints an unsolicited message after plain talk returned (288.044464ms)
✔ talk --follow continues after reply and prints a later unsolicited message (195.702017ms)
✔ inbox lists all unread human messages under decisions, does not deliver or read them (3659.747845ms)
✔ follow refuses agent context and bad arguments (349.546592ms)
✔ follow Ctrl-C wakes the poll sleep and removes its handler; transport errors also clean up (107.959445ms)
✔ plain talk leaves the process SIGINT handlers unchanged (202.958372ms)
✔ empty views say so (1.075273ms)
✔ the trail keeps the broker's order and names a decision's task without its rows (1.312926ms)
✔ tasks print the tracker fields the snapshot carries (0.210864ms)
✔ the review loop: the coder pushes and asks, the reviewer fetches and approves, and the task's trail holds each step (820.967973ms)
✔ refusals: no action, non-fast-forward, an unknown commit or request, and a push for another task moves only that task's ref (704.916067ms)
✔ the size cap refuses a push before any byte (331.025251ms)
✔ a fetch over the cap refuses before any byte reaches the reviewer (559.46765ms)
✔ the socket refuses a request with no capability, an unknown one, and a bad request line (609.417911ms)
✔ a rigged clone runs nothing: hooks, fsmonitor, a filter, a gitlink and a symlinked .git/config leave no marker (1445.467178ms)
✔ an identity with no role, or of another business, refuses not-a-role and moves no ref (444.14488ms)
✔ a review of a project the business no longer has refuses unknown-project (394.716354ms)
✔ past maxActive connections the socket refuses git-busy, and a hung-up connection frees its slot (439.129664ms)
✔ close() answers host-closing to a connection still sending its request line (544.41969ms)
✔ a bundle that trickles in refuses body-timeout at its deadline and frees its slot (1095.405411ms)
✔ a reviewer gone before its bundle was sent is filed fetch-aborted, not as the host's fault (736.583527ms)
✔ a reviewer that hangs up the moment it has the whole bundle was served, not aborted (640.916906ms)
✔ send: a close after every byte left is served; one that fails a queued write is fetch-aborted (41.504939ms)
✔ a bundle with no bytes for bodyIdle refuses body-timeout long before its deadline (595.845426ms)
✔ send: a close once the loop is past its last chunk is served, and a failed write there is fetch-aborted (22.972798ms)
✔ letGo waits for an answer to leave for at most its cap, then destroys the socket (300.842414ms)
✔ a record that fails and can't be undone refuses rollback-failed, which the host logs (459.946628ms)
✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (964.512359ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (343.82282ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (215.129026ms)
✔ two bus starts racing for one data root leave one host running; the other refuses that a host already runs (568.461946ms)
✔ a host takes over a host.lock its dead host left, and puts back a live claim that replaced it meanwhile (1.780385ms)
✔ a host.lock that goes between the check and the read is tried again; one that can't be parsed still refuses as unreadable (0.726535ms)
✔ a live host's lock stays, however old the file is (0.513102ms)
✔ a host.lock left by a host killed with SIGKILL doesn't stop the next bus start (810.396489ms)
✔ while a host boots, a reader sees no host: the human commands still ask for --business, stop and status find none (221.289975ms)
✔ a host started before host.lock existed, holding only host.json, still refuses a second start, which leaves no lock (30.955071ms)
✔ a broker fork that throws leaves no host.lock and no host.json (60.619387ms)
✔ a broker send that throws leaves no host.lock and no host.json (29.809941ms)
✔ a broker that misses its boot wait leaves no host.lock and no host.json (29.889002ms)
✔ a notifier fork that throws stops the broker and leaves no host.lock and no host.json (471.383758ms)
✔ a notifier send that throws stops the broker and leaves no host.lock and no host.json (356.526105ms)
✔ a boot reply with no reader for the business refuses with exit 3 naming it, before the notifier starts, and leaves no host.lock and no live broker (393.294867ms)
✔ a boot reply with no reader for the business refuses with exit 3 naming it, with no notifier, and leaves no host.lock and no live broker (176.86385ms)
✔ a host.json that can't be written stops both children and leaves no host.lock (316.491561ms)
✔ an error event on the broker before it replies fails the start at once, and leaves no host.lock and no live child (30.469796ms)
✔ an error event on the notifier before it replies fails the start at once, and leaves no host.lock and no live child (171.966034ms)
✔ an error event on the broker while the notifier starts fails the start once the notifier replies (252.049582ms)
✔ an error event on the broker once the host is up stops the host with exit 1, and leaves no host.lock and no host.json (521.283069ms)
✔ an error event on the notifier once the host is up stops the host with exit 1, and leaves no host.lock and no host.json (356.734657ms)
✔ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (1497.004898ms)
✔ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (372.593778ms)
✔ a broker reply with no request waiting breaks the channel and the host exits 1 (176.884886ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (225.979674ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (199.125236ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (160.525042ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (188.704842ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (165.852008ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (191.60062ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (22.21477ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.232956ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (257.788793ms)
✔ bus start refuses with exit 3 without a notifier config (119.626512ms)
✔ bus start runs until bus stop; status reports it while it runs (744.488108ms)
✔ bus-service.sh renders the unit and installs it into a given directory (52.951785ms)
✔ bus-service.sh pins the claude binary, refuses one the unit can't carry, and renders without one (70.783301ms)
✔ bus-service.sh refuses a directory pin and keeps a symlink default unresolved (13.259476ms)
✔ bus-service.sh refuses a default claude without the execute bit, or in a PATH dir with a space (8.794736ms)
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (43.567387ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1442.557036ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (940.014309ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (3600.123298ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (298.544134ms)
✔ a runner that stops at once ends its launch with the runner's reason (728.931705ms)
✔ a Claude Code launch with no session credential refuses before it starts (258.267692ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (325.662385ms)
✔ a runner killed from the host ends its launch as killed, not failed (389.170706ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (207.246194ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1360.150216ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (794.734242ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3819.823896ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (126.845515ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (132.976663ms)
✔ a launch client that never closes its side doesn't hold the host's close (143.762973ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1278.933296ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (5.793009ms)
✔ migration needs no bus/config, prints whole converted document, is idempotent and never writes (44.359152ms)
✔ limits view/set use the human bus transport and pass only the explicit patch (1.898338ms)
✔ post-119 example and Jason fixture migrate with checked inherited models; wrong or absent config refuses (214.387007ms)
✔ zoned uses the IANA zone across DST (25.933144ms)
✔ each open blocking decision is DM'd once, across polls and a restart; non-blocking ones are not (222.60918ms)
✔ two blocking decisions get two DMs with different nonces (155.375949ms)
✔ the digest nonce differs per business and per day and fits Discord's 25 characters (0.337678ms)
✔ a failed DM is journaled, backs off, and is retried until it lands (113.684417ms)
✔ five definite refusals stop a DM: one gave-up line, one log line, and a restart keeps the count (128.470807ms)
✔ 429s, 5xx-style unknowns and refusals without a status never count toward the limit (218.555346ms)
✔ a crash between the fifth refusal and its gave-up line: the next poll appends it and sends nothing (105.036283ms)
✔ polled every POLL_MS against a permanent 403, a DM is sent at 0, 30, 60, 90 and 120 min and gives up only then (208.11418ms)
✔ a restart after the second refusal does not send before that refusal's 30 min are up (207.157741ms)
✔ the digest goes at 08:00 Chicago once a day, with blocking ones marked as DM'd (124.768047ms)
✔ a late start with no digest for the day sends one at once; an empty inbox gets one line (162.962458ms)
✔ an inbox read failure is logged and the next poll retries (0.725856ms)
✔ no Discord id reaches the journal or the log (116.368542ms)
✔ the journal: a torn tail is copied out and truncated, so an append after it reopens cleanly (26.028826ms)
✔ the journal: a crash between the copy and the truncate leaves a tail the next open repairs (101.557742ms)
✔ the journal: a whole file that is one torn line truncates to empty (36.700419ms)
✔ the journal: a malformed complete line refuses and leaves the file and any torn tail alone (4.071435ms)
✔ the journal: a loose file mode, a loose directory or a symlinked journal refuses (0.616477ms)
✔ the journal: a line with a wrong type refuses with exit 3 and names the field (1.737342ms)
✔ the journal: a symlinked directory refuses and says it is a link (0.752684ms)
✔ the journal: a dangling directory link, a parent that is a file and a journal that is a directory each refuse with exit 3 (0.499819ms)
✔ the journal: an append after the file was swapped for a symlink refuses and writes nothing through it (1.596046ms)
✔ the journal: a directory it cannot write or create refuses with exit 3 and names the path (0.474958ms)
✔ digest content stays within Discord's 2000 characters (0.250585ms)
✔ runLoop never overlaps ticks and stops after the one in flight (109.898564ms)
✔ a human command refused with human-required prints the other-tree line and exits 3 (10.226169ms)
✔ a --tester command refused with tester-required prints the other-tree line and exits 3 (1.379402ms)
✔ other exit-3 refusals print no other-tree line (1.889733ms)
✔ the line names no path (0.160759ms)
✔ shared copy: npm ci, pushed reachability, readonly/existing copy, webui delegation (651.127154ms)
✔ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (458.583912ms)
✔ bus unit copy/pm pins, install refuses all busy states and failed reads, drop-in refusal (426.64508ms)
✔ missing package manifest refuses before npm; npm failure removes the unpublished temp copy (315.437163ms)
✔ real pinned install loads bus and Console; same-copy mosaic talk passes proof, other trees refuse (4202.379739ms)
✔ bus status reads effective copy/pm/drop-ins without writes; check refuses an overridden ExecStart (503.990797ms)
✔ drop-ins in either override field and malformed metadata refuse; uninstall also checks --no-reload (305.09108ms)
✔ install never shows a template name on systemd 261; template drop-ins still refuse (208.154898ms)
✔ unlisted instance drop-in is found in another unit lookup directory; path discovery errors refuse (168.729094ms)
✔ inherited mosaic-.service.d override refuses without changing the unit (196.162851ms)
✔ inherited service.d override refuses without changing the unit (207.746379ms)
✔ inherited drop-in unreadable directory or file refuses before writing (199.998877ms)
✔ talk --tester sends a [mos test] message as tester from inside an agent and prints the role's reply (248.767704ms)
✔ talk --tester refuses text without the [mos test] prefix before any call (112.415326ms)
✔ the read verbs take --tester inside an agent, and the trail shows the tester as the sender (120.186166ms)
✔ decide, stop and launches take no --tester (202.328486ms)
✔ the tester transport runs tester-cli.mjs, and the tester's refusals exit 3 (0.332101ms)
✔ with no stand-in transport, --tester runs tester-cli.mjs on the data root's socket (0.467464ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (6155.016128ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1877.142846ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4449.664366ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2881.116917ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (121.924473ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (244.140077ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (285.019014ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (115.60157ms)
task.close {} answered: invalid-request; fake saw 18 requests, first GET /info 200, GET /projects/1 200, GET /projects/1/views 200
task.close on a missing task answered: task-not-found; it made GET /tasks/999 404
✔ bootConfig trackers reach the S3 adapter in the real broker child, which goes ready against a fake Vikunja (447.152367ms)
✔ the transport writes {business, verb, args} to the child and reads its JSON (37.818875ms)
✔ a bus code on stderr becomes the exit code; garbage and timeouts are outcome problems (2160.286084ms)
✔ busExit and refuseInsideAgent (0.471217ms)
✔ talk sends a REQUEST, prints and reads everything that arrives, and stops at the reply (263.354119ms)
✔ talk --wait 0 only sends; no reply within --wait exits 1 and says where it will show (1139.013287ms)
✔ a late reply the Console has listed still reaches the next talk (2177.083337ms)
✔ talk, stop and launches off/on refuse inside an agent run; bad arguments are usage errors (254.682482ms)
✔ launches off and on go to the broker and change the business's launch state (380.437417ms)
✔ launches list reads sessions.json and marks a stale entry; stop reports it and refuses a non-runner (181.062795ms)
ℹ tests 203
ℹ suites 0
ℹ pass 203
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 19688.654838
@@ -0,0 +1,98 @@
✔ sessionModel: agent vars win, then the system's execution settings (15.071484ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (4.702614ms)
✔ a chief-of-staff bundle lists launch among the bus tools and the manifest's typed tools (3.42425ms)
✔ a chief-of-staff bundle lists end_run and change_organization as typed and nothing untyped, for either harness (4.420311ms)
✔ the stop line names end_run for a role.end holder, and every other role keeps today's text (7.625173ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (2.058729ms)
✔ the prompt's built-in tools line is the harness's own names, as the manifest lists them (8.831773ms)
✔ the prompt names the project clones in the workspace, and none when there are none (5.681984ms)
✔ the prompt explains the review loop to a role with push_working, and reviews to one with fetch_review (5.455545ms)
✔ a bundle is written once: an existing file refuses (1.593387ms)
✔ a path with a single quote can't go into the hook command (1.556315ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (130.107933ms)
✔ a missing or wrong policy, or a bad event, exits 2 (82.316236ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1090.252686ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (739.103324ms)
✔ claude: the hook alone blocks a path outside the workspace (434.769991ms)
✔ claude: a second turn resumes the first turn's session (729.319385ms)
✔ claude adapter: --restricted is always passed (5.024244ms)
✔ claude adapter: MOSAIC_CLAUDE_BIN wins over PATH and must be an absolute executable (15.738382ms)
✔ claude adapter: a directory pin exits 2 before it runs; a pin with a space runs (5.719471ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (723.817314ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.362201ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (4.24262ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.985612ms)
✔ file tool paths must resolve inside the workspace (1.597691ms)
✔ pi's own path normalisation can't be used to step out (0.900919ms)
✔ a symlink inside the workspace that points out is outside (0.802971ms)
✔ a dangling symlink is refused at any depth, in both harnesses (2.717461ms)
✔ read is checked under every spelling pi's read would open, in both harnesses (14.050884ms)
✔ other spellings cover directories, dangling links and pi's cwd (2.304323ms)
✔ a relative path climbs from the workspace's real path, in both harnesses (6.901009ms)
✔ claude path fields per tool (0.804117ms)
✔ glob patterns stay inside the workspace (0.696706ms)
✔ a path that can't be checked is blocked (0.402181ms)
✔ fetch_review's have lists the working refs before origin's, and no more than HAVE_MAX (211.488985ms)
✔ fetch_review's have orders the working refs newest first within each clone, one clone after another (134.735046ms)
✔ a runner git past its time: SIGTERM reaches its process group, and SIGKILL follows after the grace period (1809.637545ms)
✔ once a signalled runner git has closed, its group gets SIGKILL, so a process that ignored SIGTERM dies too (303.941413ms)
✔ initialize, ping and tools/list (42.930529ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (33.645613ms)
✔ replies are compact JSON; over the cap a tool error names the size and the cap (35.89632ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (30.031364ms)
✔ a missing argument is a usage error (26.161545ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (356.656124ms)
✔ pi: a reply over the cap is a tool error naming the size and the cap; list_tasks asks for open tasks (307.923138ms)
✔ pi: a write through a dangling symlink is blocked, and nothing appears outside (299.233526ms)
✔ pi: a read is refused when pi would open another spelling outside (313.192805ms)
✔ pi: a relative path climbs from the real path of a workspace behind a symlink (303.958691ms)
✔ pi: a relative path climbs from the real path of a dataRoot behind a symlink (309.869099ms)
✔ pi: a missing extension refuses before any model call (5.620109ms)
✔ pi: an extension without its configuration fails pi's start (247.357276ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.785408ms)
✔ turnRequest names the sender, class, reply and decision (0.302386ms)
✔ turnRequest says a tester's message is a test and never Jason's instruction (0.271857ms)
✔ turnRequest shows the message's own sent time, a day old as well as new (0.184337ms)
✔ stateBlock names the launch state with its time and event, and the open tasks with the cap (0.26359ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (266.394661ms)
✔ launches revoked and then restored: the turn's block reads allowed and gives the restore time (247.494639ms)
✔ a task closed on the tracker is missing from the next turn's open list (219.255713ms)
✔ a message read a day after it was sent shows the time it was sent (169.986685ms)
✔ a decision the human resolves becomes a turn citing the decision and the answer (207.525124ms)
✔ a failed state read fails the turn: no adapter runs, the sender hears why, the message is read (123.588329ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (119.158729ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (396.391687ms)
✔ end_run and change_organization reach the broker with the tool's arguments, and refusals keep their codes (469.362511ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1288.315914ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (149.543957ms)
✔ founder credentials stop before the claim (20) (159.751317ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (183.101955ms)
✔ the launch ending under a running session exits 22 (142.031359ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (242.529605ms)
✔ a broker that is down at the claim exits 23, not 21 (94.356119ms)
✔ no capability, or a malformed one, on stdin exits 2 (193.184282ms)
✔ a missing or malformed policy exits 2 before the claim (130.541434ms)
✔ the PM gets its task verbs and the reads, and no launch (7.269696ms)
✔ the chief of staff gets launch, send_message, end_run and change_organization, and no task verbs (2.370533ms)
✔ end_run sends role and reason, no decision; change_organization sends revision and the organization keys (2.650787ms)
✔ the organization keys change_organization takes are the broker's ORGANIZATION_KEYS (0.180088ms)
✔ a role without role.end or organization.change gets neither tool, and each tool follows its own grant (10.053174ms)
✔ the assistant gets send_message and the reads, no launch (1.631192ms)
✔ list_requirements reads the requirement ids, for a task.create holder with a tracker (2.169698ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (1.026766ms)
✔ a coder with a tracker gets its own task tools and no task_reassign (1.273896ms)
✔ launch only when the business's launch block names the instance as launcher (1.867198ms)
✔ an action outside the instance's authority has no tool (1.066824ms)
✔ the review loop: push_working and request_review for the coder, fetch_review and review_verdict for the reviewer, none for the PM (5.142215ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (13.20392ms)
✔ list_tasks takes the broker's filters and pages; get_task takes a task_ref (3.251887ms)
✔ callTool sends list_tasks done false unless the session names done; other tools as given (3.364973ms)
✔ replyText: compact JSON up to the cap, an error naming the size and the cap over it (0.87286ms)
ℹ tests 90
ℹ suites 0
ℹ pass 90
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 11789.303058
@@ -0,0 +1,29 @@
✔ REQ-PLUG-1 REQ-LIMIT-4 the registry: usage-source and limit-check at interface version 1, each a list (1.003744ms)
✔ REQ-PLUG-1 checkPlugins accepts one key per kind, each a list of names, empty included (0.210429ms)
✔ REQ-PLUG-1 checkPlugins refuses bad shapes, unknown kinds, bad names and duplicates (3.932487ms)
✔ REQ-PLUG-1 a kind that switches on one module takes one name, not a list (0.153217ms)
✔ REQ-PLUG-1 checkPlugins reports through the caller's fail callback (0.140879ms)
✔ REQ-PLUG-1 fixture modules of each kind switch on from a test organization file, no core file changed (7.161124ms)
✔ REQ-PLUG-1 a name not matching ^[a-z][a-z0-9-]*$ refuses and keeps the old setting (3.319283ms)
✔ REQ-PLUG-1 a missing module directory or index.mjs refuses and keeps the old setting (3.223077ms)
✔ REQ-PLUG-1 a symlinked module directory or index.mjs refuses and keeps the old setting (2.357639ms)
✔ REQ-PLUG-1 a symlinked kind directory refuses and keeps the old setting (1.94949ms)
✔ REQ-PLUG-1 a symlinked packages/plugins refuses (run with --preserve-symlinks so the path keeps it) (26.761471ms)
✔ REQ-PLUG-1 index.mjs swapped for a symlink after the lstat checks refuses at the realpath check (2.659426ms)
✔ REQ-PLUG-1 a path that can't be read refuses as unreadable, is logged and keeps the old setting (2.258816ms)
✔ REQ-PLUG-1 a path that becomes unreadable after the lstat checks refuses at either realpath (2.896983ms)
✔ REQ-PLUG-1 a module that fails to load refuses and keeps the old setting (2.598998ms)
✔ REQ-PLUG-1 a missing export refuses and keeps the old setting (3.260322ms)
✔ REQ-PLUG-1 a different interface version refuses and keeps the old setting (2.62551ms)
✔ REQ-PLUG-1 a kind refused on its first load has nothing switched on, and the log names kind and name (1.630516ms)
✔ REQ-PLUG-1 the setting's shape: unknown kinds refuse alone, a bad whole setting keeps everything (2.950183ms)
✔ REQ-PLUG-1 loads run one at a time, so the last requested setting wins (102.123592ms)
✔ REQ-PLUG-1 the loader needs a log callback (1.147584ms)
ℹ tests 21
ℹ suites 0
ℹ pass 21
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 225.947258
@@ -0,0 +1,148 @@
✔ a first launch clones the root at its branch, with the root's path as origin (38.130861ms)
✔ the clone is not at its place until git clone has finished (25.787938ms)
✔ a later launch fast-forwards a clean clone after a commit to the root, then finds it current (58.401882ms)
✔ a clone ahead of the root keeps its commits and counts as current (44.52091ms)
▶ a dirty clone and one on another branch are fetched, and nothing but refs/remotes moves
✔ a modified file (50.24384ms)
✔ an untracked file (47.343344ms)
✔ a staged file (43.748222ms)
✔ another branch (47.189067ms)
✔ a detached HEAD (44.237371ms)
✔ a dirty clone and one on another branch are fetched, and nothing but refs/remotes moves (233.91573ms)
✔ a diverged clone gets the fetch into refs/remotes and is kept, not-fast-forward (46.462602ms)
▶ a clone kept before the branch check, or for a failed status, gets no fetch
✔ not-a-clone (28.197482ms)
✔ hooks-present (26.116134ms)
✔ submodule (37.818466ms)
✔ config-changed (29.668437ms)
✔ root-unreadable (34.840563ms)
✔ root-detached (36.032559ms)
✔ status-failed, on the root's branch and clean (42.585744ms)
✔ status-failed, dirty (51.582393ms)
✔ a clone kept before the branch check, or for a failed status, gets no fetch (288.1918ms)
✔ a dirty clone whose fetch fails is kept, fetch-failed, exactly as it was (45.426549ms)
✔ every git call the host makes, for a new clone and an existing one, carries maintenance.auto=false and gc.auto=0 (45.468598ms)
✔ a clone with loose objects enough for gc --auto gets no maintenance or gc from the fetch and the merge (80.535967ms)
▶ a clone with user.name or user.email in its config is kept, and git runs nothing in it
✔ user.name (27.924994ms)
✔ user.email (28.749376ms)
✔ a clone with user.name or user.email in its config is kept, and git runs nothing in it (57.160677ms)
✔ a commit git can't read after the fast-forward is null (46.119833ms)
✔ a new clone whose commit can't be read refuses the launch and leaves nothing behind (20.938942ms)
▶ a clone the session rigged is kept, and git runs nothing and writes nothing outside it
✔ core.fsmonitor (38.010272ms)
✔ core.hooksPath (40.193136ms)
✔ a hook file (33.424636ms)
✔ include.path (38.52417ms)
✔ includeIf (36.191749ms)
✔ a filter driver (36.702728ms)
✔ origin moved (33.279665ms)
✔ a second origin url (36.068364ms)
✔ the origin url twice, both the root (36.448577ms)
✔ an ext:: origin (35.572816ms)
✔ a branch tracking another remote (37.240696ms)
✔ a branch merging a tag (34.302306ms)
✔ a fetch line onto local branches (37.997925ms)
✔ no origin (35.418347ms)
✔ a config file over the size cap (35.494986ms)
✔ config a symlink to /dev/zero (32.333304ms)
✔ the clone a symlink to the bait (34.202598ms)
✔ the clone a file (33.905723ms)
✔ the clone a plain directory (30.987143ms)
✔ .git a gitdir: file (31.079236ms)
✔ .git a symlink (32.077902ms)
✔ .git/logs a symlink (32.145718ms)
✔ .git/refs/heads a symlink (37.846794ms)
✔ .git/objects a symlink (32.103661ms)
✔ a reflog hard-linked to a file outside (33.55769ms)
✔ HEAD a fifo (39.777526ms)
✔ a commondir file (30.471385ms)
✔ an alternates file (32.141577ms)
✔ a gitlink staged, no .gitmodules (45.392445ms)
✔ a gitlink and .gitmodules staged (46.497722ms)
✔ a gitlink to a repository with its own gitlink (58.484878ms)
✔ a gitlink and .gitmodules committed (47.877826ms)
✔ a gitlink and submodule.active in config (50.580127ms)
✔ a .git/modules with no gitlink (37.204527ms)
✔ a clone the session rigged is kept, and git runs nothing and writes nothing outside it (1268.070218ms)
▶ a root that can't be cloned refuses with the project id and leaves nothing behind
✔ missing (10.274614ms)
✔ not a repository (10.093776ms)
✔ a plain directory inside another repository (17.477514ms)
✔ unreadable (10.681478ms)
✔ on no branch (14.485104ms)
✔ missing an object (17.136154ms)
✔ a root that can't be cloned refuses with the project id and leaves nothing behind (80.98981ms)
✔ a clone whose root is on no branch, or gone, is kept and named (30.579817ms)
✔ no credential or forge remote of the root reaches a clone (47.960709ms)
✔ every project in the business file gets its own clone at its own branch (39.044312ms)
✔ a clone past its time gets SIGTERM and refuses the launch, with nothing left in the workspace (513.170533ms)
✔ a clone that ignores SIGTERM gets SIGKILL once the grace period is over (1017.358013ms)
✔ a timeout signals git's process group, so a process git started dies with it (514.176689ms)
✔ once a signalled git has closed, its group gets SIGKILL, so a process that ignored SIGTERM dies too (513.354386ms)
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.637561ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (10.1185ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.799306ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (1.842133ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.67573ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.07385ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1779.839553ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2735.663395ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (270.527869ms)
✔ resolveSeat: by name under --repo resolves the repo layout (1.265352ms)
✔ resolveSeat: by path resolves the fleet layout (0.313879ms)
✔ resolveSeat: refusals for missing dir, missing launch.sh, non-executable launch.sh, invalid name, and unknown layout (0.730778ms)
✔ tmuxContext: outside tmux, default socket, custom socket, and exec failure (0.66269ms)
✔ makeRegistration produces a record that validates; each shape violation throws SeatError (0.791156ms)
✔ writeRegistration/readRegistration: round trip, permissions, absence, and malformed records (1.308286ms)
✔ updateTask: changes task, taskSetBy and updatedAt only, and refuses appropriately (1.13722ms)
✔ CLI launch: registers, execs the fake launch script, and passes args through (28.894247ms)
✔ CLI launch: --harness lands in the record (28.48138ms)
✔ CLI launch: the launch script's own exit code passes through (28.431867ms)
✔ CLI launch: relaunching a seat rewrites the one registration record (55.553488ms)
✔ CLI launch: omitting --task records an empty string, not null (27.944297ms)
✔ CLI seat task: updates only the task after a launch, and refuses on an unlaunched seat (85.385706ms)
✔ CLI refusals: no args, unknown flag, missing config, already-registered env, and exec failure (131.117025ms)
✔ samePath: equal paths, symlinked dirs, distinct dirs, and non-strings (0.422676ms)
✔ resolveSetBy: explicit --by wins over the environment; absent or empty environment gives unknown; invalid explicit or environment values refuse with exit 4 (0.55694ms)
✔ validateRegistration/readRegistration: taskSetBy is optional; a record without it (written before #1511) still loads unchanged; an invalid one is refused; the version does not change (0.684988ms)
✔ updateTask: records setBy, preserves startedAt and every unrelated field, upgrades an old record in place only when the task is set, and replaces a previous attribution (1.220805ms)
✔ CLI seat task: --by beats MOSAIC_AGENT_NAME, the environment beats nothing, empty environment is unknown, invalid --by or environment refuses with exit 4 and leaves the record byte for byte (273.743666ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.79676ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.692757ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.251349ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.616711ms)
✔ session file and launch log: 0600, the session file written once (1.01775ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.120492ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.202138ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.585844ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.653629ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (1.516708ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (366.868764ms)
✔ workRef and validBranch take only what a ref name can hold (1.115637ms)
✔ a push lands as the task's work ref, a fast-forward lands after it, and main is the root's (163.186462ms)
✔ a rewritten branch refuses non-fast-forward and the work ref stays (134.341964ms)
✔ a branch with no history in common with main refuses unrelated-history (78.060885ms)
✔ a bundle that needs commits the working repository lacks refuses missing-prerequisite (44.28704ms)
✔ main is fetched from the root again before each push, so a clone of a newer root pushes (152.571252ms)
✔ a root moved back after the clone leaves the push's base unknown: missing-prerequisite (109.839506ms)
✔ a commit with a broken object refuses invalid-bundle, and only because fsck is on (103.293744ms)
✔ only a v2 bundle with the named branch is read (51.209775ms)
✔ a branch named main, or named for another task, moves only this task's work ref (112.024929ms)
✔ a record that throws moves the work ref back, or removes a new one (155.280169ms)
✔ a work ref that can't go back refuses rollback-failed, naming the ref and the commit (366.085334ms)
✔ a root that can't be read refuses root-unreadable (31.421117ms)
✔ a git past its time gets SIGTERM, leaves no ref lock, and the next push lands (2178.923341ms)
✔ a git that ignores SIGTERM gets SIGKILL once the grace period is over (1034.758884ms)
✔ a working repository path that isn't a directory refuses (24.837675ms)
✔ review bundles a pushed commit as refs/mosaic/review, leaving out what the reviewer has (112.572315ms)
✔ review of a project with no working repository refuses unknown-commit (12.895626ms)
✔ the runner's git tools hold the host's limits and branch rule (1.096078ms)
ℹ tests 135
ℹ suites 0
ℹ pass 135
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 5108.239166
@@ -0,0 +1,105 @@
✔ the boot config is checked before anything starts (110.526094ms)
✔ a business with no tracker entry refuses task verbs (122.294932ms)
✔ credential.expiring and .expired are recorded once per instance (224.709026ms)
✔ a token file that changes on disk records credential.changed (112.252348ms)
✔ autostart polls, reconciles and retries a startup the tracker was down for (140.220548ms)
✔ a refusal a restart must clear is not retried by the poll (109.946922ms)
✔ a poll that fires while two are queued is dropped (94.69201ms)
✔ close waits for a running verb and refuses one that has not started (205.302016ms)
✔ stopped bus resumes an empty task cursor after a long outage, exactly once (187.246713ms)
✔ persisted IDs avoid replay, exclude bots and bound rows to observed new comments (200.390053ms)
✔ commit followed by crash before cache advance neither loses nor duplicates a comment (145.807899ms)
✔ failed event insert rolls back cursor and a retry still emits the comment once (140.270996ms)
✔ initial cursor accepts a comment within the stated one-minute clock skew margin (112.595085ms)
✔ the bundled Vikunja is the pinned upstream image the runbook names (0.747636ms)
✔ every published port is on 127.0.0.1, and no secret is in the file (0.31336ms)
✔ the committed table loads frozen; its verbs are the broker task verbs (1.249967ms)
✔ a write names a verb the table has as its own key, not one it inherits (0.430896ms)
✔ the schema refuses any other shape (1.8514ms)
✔ the Field table in the slice 1 plan names the verbs each field is written by (0.537571ms)
✔ each verb refuses, asks for a decision and writes as the table and the role files say (1160.786876ms)
✔ the list holds the PRD's requirement ids, in its order, at its version (1.261206ms)
✔ the committed list loads frozen (0.593252ms)
✔ the schema refuses any other shape (2.659433ms)
✔ the fake answers each route with the statuses and shapes Vikunja v2.7.0 sent (376.954758ms)
✔ the project list holds recorded project objects in the recorded list envelope (98.492274ms)
✔ the recorded task bodies pass the checks S3 applies to every read (0.496628ms)
✔ the client works against the fake over real HTTP with the platform fetch (235.717467ms)
✔ a correct install starts, and the first reconcile records tasks that already exist (119.377769ms)
✔ verbs refuse while a business is starting and after startup refused it (140.499639ms)
✔ startup refuses a token that can do more than its role needs (411.001476ms)
✔ startup refuses an unsupported version and flags an untested one (300.5264ms)
✔ startup refuses a board that the runbook did not install (352.943828ms)
✔ startup refuses a project the sync bot cannot read (78.520278ms)
✔ startup refuses a configured label the pm bot cannot see (77.281765ms)
✔ startup refuses an expired credential and a missing sync credential (171.075241ms)
✔ an unreachable tracker refuses with tracker-unavailable (68.071629ms)
✔ an edit in the UI is recorded once, with the fields that changed (217.469319ms)
✔ a move between open buckets is seen on the board, though updated does not change (178.748962ms)
✔ a person's comment is counted and a bot's is not (259.989406ms)
✔ the hourly reconcile catches a comment through comment_count (214.448567ms)
✔ a task closed in the UI leaves the open view with its done bucket (394.465372ms)
✔ a task that leaves the board is recorded as deleted, moved or out of reach (255.998796ms)
✔ a poll that read before a verb wrote does not overwrite the verb (167.622794ms)
✔ a tracker fault during a tick is reported and the next tick catches up (160.31454ms)
✔ a malformed answer refuses the tick with tracker-shape (127.653194ms)
✔ no token value reaches the database, the log or a refusal (261.84232ms)
✔ the first look at a task counts only comments inside the window (155.586318ms)
✔ with descendants off the adapter reads no project list and no child, as in v0 (127.13929ms)
✔ a three-level tree is read per project, and a project outside it is not (109.294485ms)
✔ a watch-only child keeps the business ready, and a failed child read refuses as transient (221.534428ms)
✔ a root without the installed buckets refuses with descendants on (97.020777ms)
✔ the project list refuses without read_all, and skips archived projects and saved filters (197.683708ms)
✔ descendants must be true or false (85.506268ms)
✔ a move inside the tree is a moved tombstone plus a snapshot under the new ref (161.240621ms)
✔ a child made after startup joins the tree at the next reconcile (146.56754ms)
✔ a child that leaves the tree has its tasks recorded missing, and the ledger keeps their history (164.64331ms)
✔ a child deleted or hidden between reconciles drops out at the next tick, and the root still refuses (198.874553ms)
✔ a reconcile that fails keeps the previous tree (128.092283ms)
✔ a closed task the cursor missed takes its own project's done bucket (110.430444ms)
✔ closed tasks read at startup take their own project's done bucket (89.302549ms)
✔ a closed task the cursor returns takes its own project's done bucket (132.424061ms)
✔ a task moved out of a child that leaves the tree at the same time is moved, not no-access (97.743729ms)
✔ a task in a bucket outside the five keeps its raw bucket id (96.74132ms)
✔ bucket 0 on a watch-only task never becomes a bucket or a state (207.522022ms)
✔ a child whose kanban view is deleted still refuses the tick, and the reconcile reads it watch-only (153.130295ms)
✔ a child dropped at a tick comes back at the next reconcile once the bot reads it again (135.785175ms)
✔ task.create needs a recorded human request and a requirement id (199.763882ms)
✔ task.create takes only an approved requirement id (205.606343ms)
✔ task.create cites the request a received message carries, not the message's id (170.474553ms)
✔ only labels named in the business file can be written (225.658381ms)
✔ task.schedule sets and clears a due date and relations (272.897153ms)
✔ assign and reassign move the role bots and record task.assigned (307.017257ms)
✔ task.update.assigned is for the assignee and records task.state (299.830216ms)
✔ a wrong expected digest records task.conflict and writes nothing (175.930567ms)
✔ a cross-role verb needs a resolved decision, used once (209.720528ms)
✔ task.close needs a verdict; after it every verb refuses with task-done (230.066882ms)
✔ a task with pushed work closes only citing an approve verdict for its latest push, and a refusal writes nothing (278.570079ms)
✔ a lost answer is settled by a re-read and never retried (184.092744ms)
✔ a create whose answer is lost is reported uncertain, and the poll finds the task (113.488058ms)
✔ a task the sync bot cannot read refuses and records nothing (96.005786ms)
✔ verbs and polls for one business run one at a time (159.46732ms)
✔ a due date with milliseconds is written to the second (171.611574ms)
✔ every write landed and the final read failed: the verb succeeds and records what it wrote (111.830863ms)
✔ some writes landed and the final read failed: write-uncertain, and nothing is recorded (77.777888ms)
✔ a create whose final read fails succeeds and records task.created (86.342479ms)
✔ an edit between the last write and the final read shows as external on the next poll (110.606589ms)
✔ task.created is recorded when a later label write fails (69.382077ms)
✔ every verb acts in an installed child, on the child's own board (267.503649ms)
✔ task.create refuses a project outside the tree, a watch-only one and one that is not an id (165.583483ms)
✔ with descendants off, task.create takes only the root project (94.90118ms)
✔ a verb on a watch-only task, or a relation to one, refuses with project-not-installed (110.357412ms)
✔ a related task is read before authority: in another project than its ref names, task-moved; missing, task-not-found (146.273215ms)
✔ a task moved to another project of the tree refuses its old ref with task-moved and takes its new one (100.065199ms)
✔ a verb and a create in the child record the final read of the child's board (87.773323ms)
✔ a create in the child whose final read fails records the child's todo bucket (100.758575ms)
✔ a lost answer in the child is settled by a re-read of the child's board (128.140426ms)
✔ every related task is read before authority, not only the first (96.511817ms)
ℹ tests 97
ℹ suites 0
ℹ pass 97
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 5157.793566
@@ -0,0 +1,122 @@
✔ the Board: held roles with no machine sessions, a claim with no address, the toggle kept across a reload, and Message addressed to the role (8746.324533ms)
✔ a redirect answer on a Board read, a bus read, a conversation read, a board POST, a module read and a send signs the page out: one line, nothing stale, no further reads (6765.800342ms)
✔ browser edge states: loading, empty, malformed, stale, hostile/long values, in-flight reply and appearance fallback (5594.153145ms)
Rendered contrast: {"failures":[],"count":330,"lowest":4.504658476260286}
✔ served Console browser: real board fixtures, keyboard, drafts, receipts, themes, 320px and failures (4950.20535ms)
✔ the README says a refused field table names the file or the key at fault, never a path (1.404673ms)
✔ S5 pages in a browser: real broker rows, inert text, Copy, routes, failures, layout and no writes (8820.298892ms)
✔ bus routes serve the four reads from the reader view, unescaped JSON for the page to escape (395.113502ms)
✔ decisions route serves the roles and recent lists from the reader view (681.580149ms)
✔ credentials route serves the broker credential status from the reader view (1792.772768ms)
✔ replies route serves the replies to one message from the reader view (2109.557287ms)
✔ bus routes are GET-only, have no write verb, and keep the same-origin checks (73.756081ms)
✔ bus refusals map to statuses and never carry a path or a stack (41.565505ms)
✔ humanCall speaks the human transport protocol without blocking the server (1679.703229ms)
✔ busReader takes --business, else the live bus host, else refuses (348.605533ms)
✔ humanCall kills a transport that runs past its timeout (528.739942ms)
✔ serve refuses a --business value that is not a business id (248.785496ms)
✔ conversation view: full history, collapsed tools, hidden thinking, inert hostile content, malformed and reconcile markers (5566.938864ms)
✔ conversation view: a fork keeps the open branch, says so, and opens the new one on request (3448.787034ms)
✔ conversation view: a newer session with no readable history keeps the marker (2858.133848ms)
✔ conversation view: seats without history say so and offer no reply (2064.809214ms)
✔ Discord row through real board/WebUI: independent brake/liveness, no Reply, literal content (6010.427983ms)
✔ return flow through the conversation view: send, tool call, delayed result, peer message, exact long answers, relaunch (56081.734759ms)
✔ messages HTTP read pages and preserves metadata; bad arguments refuse before a read; other reads unchanged (721.755162ms)
✔ Console Messages lists late unsolicited messages on polling with sender class time read state and trail; nav count includes beyond the page; reads never deliver (12589.759995ms)
✔ Messages nav count polls on Tasks and Board and clears on a Board refusal; messages 403 refuses local pages (2361.161698ms)
✔ copy writes the Console paths at the full id, read-only, and leaves an existing copy alone (3504.173432ms)
✔ copy refuses a commit off refactor, an unknown one, a worktree and a bad copies directory (1792.348383ms)
✔ copy writes nothing when an archived path is missing at the commit (1519.609102ms)
✔ a copy that loses the rename race leaves no read-only temp directory behind (2424.710833ms)
✔ a copy whose rename fails with no target refuses, writes no copy and leaves no temp directory (886.042071ms)
✔ a copy that meets a target holding files says exists: and moves nothing into it (1009.751209ms)
✔ a copy that meets an empty target directory replaces it by rename, not by moving into it (1163.016686ms)
✔ serve runs from a copy: /healthz 200, the config check, roles and RELEASE from the copy, the queue from --checkout (1552.166343ms)
✔ serve refuses a --checkout that is not an absolute directory path (275.937382ms)
✔ consoleReads runs the queue read under queueRoot and reads RELEASE under root (55.845859ms)
✔ preview options are all three or none, and each is checked (11.441587ms)
✔ the CLI refuses a partial or invalid preview flag set at start (1973.82305ms)
✔ the CLI with all three flags serves the preview mode (377.969598ms)
✔ a request for the public name needs the header equal to the user id, else 401 and nothing read (62.437418ms)
✔ the header name matches without regard to case, and the value compare is exact (15.962591ms)
✔ the public name with the header reads the bus views, and the Host and Origin are checked first (50.914164ms)
✔ in preview mode every write answers 403 read-only, from the public name and loopback, and reaches nothing (18.784231ms)
✔ loopback requests are unchanged in preview mode, and the bus views work with the board down (5.145565ms)
✔ a proxy that rewrites Host to the loopback port gets 403 on its first request, whatever the user (16.270048ms)
✔ a repeated Host is 400 before any other check, in preview mode and without it (6.549175ms)
✔ without the preview flags the public name is refused and writes still reach the board (4.247053ms)
✔ redactor: config, dataRoot, any absolute path, Discord ids and the JSON parser quote (2.217467ms)
✔ credential state from the date alone, as the bus states it (0.261509ms)
✔ queue: rows, one row, ids and methods, notes; no path or id from a row (1637.97299ms)
✔ queue: a refused read fails closed with the store's text, redacted (2920.106107ms)
✔ queue: a store that fails to load, or a child that dies, gives a fixed message with no path or stack (4242.532466ms)
✔ business: names, vars on the allowlist, authority, credential metadata only (16.219016ms)
✔ business: missing or invalid file refuses with the module's text, redacted (16.126068ms)
✔ business without --business: the live bus host, else no-bus-host; no system config: not-configured (13.708392ms)
✔ settings: release, board, loopback address, notifier binding name only (236.012159ms)
✔ task fields: the committed table with no reads configured, GET only; a bad table refuses with no path (27.69005ms)
✔ both presentations replace old activity with relaunch notice, label retained history, then resume after new activity (5590.655547ms)
✔ reported return flow and relative Age: reply sent from the inspector, then the new answer appears there without manual refresh (22106.912143ms)
✔ the send box: held roles, the draft and caret across a refresh, each receipt, one POST per Send, and the trail link; the board Reply on a 4xx and a 5xx (8802.793251ms)
✔ a sent receipt lists its replies as the page refreshes, oldest first and capped, and marks none delivered or read (13326.318445ms)
✔ startServer takes send only as a function and only with the preview mode (6.509462ms)
✔ the CLI refuses --send without the preview flags, and without a configured bus (402.889344ms)
✔ the CLI with --send and a configured bus sends through the human transport and logs one line (217.330298ms)
✔ without --send the route is read-only like every other write, and config says no send (6.183479ms)
✔ with --send every other write is still 403 read-only, and nothing reaches the board or bus (5.027132ms)
✔ config says send only on the public name with --send on (1.639611ms)
✔ a send without the signed-in user is 401 and is neither sent nor logged, loopback included (3.260914ms)
✔ each request check refuses before anything is sent, and logs the refusal without the body (10.870945ms)
✔ a send passes exactly to, body and in_reply_to, answers the id, and logs it (2.317036ms)
✔ a crafted role name cannot forge a log line (1.689005ms)
✔ a bus refusal is not sent, with its status; an outcome the bus could not confirm is unknown and never retried (5.383467ms)
✔ through the human transport the request is exactly the business, message.send and the keys (76.001005ms)
✔ against a real broker: the message is written once as a human send, and its refusals map (2492.401469ms)
✔ loopback host and board origin fail closed (8.574369ms)
✔ real board fixture passes through WebUI; assets and isolated seen/reply work (406.991788ms)
✔ proxy preserves exact request bytes, status and receipt, rejects forms and malformed JSON, never follows redirect (42.20101ms)
✔ unreachable board reports URL; CLI rejects unsupported options (419.385576ms)
✔ render prints the unit without the preview flags (10.528962ms)
✔ render carries every serve flag, the preview set included (7.846583ms)
✔ a partial preview set is refused (17.197314ms)
✔ a value the unit cannot carry is refused, for every flag (321.78979ms)
✔ the rendered unit names none of the human proof agent markers and sets no agent variable (35.04085ms)
✔ install into --dir with --no-reload writes the file whole, then reports unchanged (220.963257ms)
✔ install without --no-reload runs daemon-reload and nothing that starts the unit (84.974569ms)
✔ uninstall refuses while the unit is running, with or without --no-reload, and removes it once it is not (448.907091ms)
✔ status prints the unit state and GET /healthz on the installed port (307.105341ms)
✔ usage: an unknown verb or flag, and start or enable, exit 4 (64.719316ms)
✔ without --send, render is the template with its placeholders filled, byte for byte (34.47406ms)
✔ render --send with the preview set ends ExecStart with --send and changes nothing else (62.196506ms)
✔ --send without the whole preview set is refused and writes nothing (264.455494ms)
✔ install --send into --dir with --no-reload writes the sending unit, and status says whether it sends (321.1332ms)
✔ uninstall and status take no --send (163.587376ms)
✔ install refuses while the unit is running, in any state but inactive or failed, and changes nothing (547.654789ms)
✔ when the state read fails, install and uninstall refuse with one line and change nothing (113.893693ms)
✔ install needs --copy naming a copy that exists, and refuses outside the canonical checkout without --allow-worktree (62.14726ms)
✔ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (274.611771ms)
✔ render --copy runs the copy and reads the queue in the checkout; without --copy the unit is unchanged (27.263594ms)
✔ the uid header takes only an Authentik uid; the username header still takes a username (606.141957ms)
✔ a preview value cannot start with - or . (48.086259ms)
✔ status names the copy and whether refactor has moved past it, and says when the unit runs from no copy (689.798583ms)
✔ Settings form shows every scope and held role; gated save, exact payload, retained draft and no automatic retry (3434.704111ms)
2026-10-15T18:30:33.840Z settings user="jason" changed
✔ REQ-WEB-1 signed-in same-origin Settings write reaches exactly one human operation (32.473917ms)
✔ REQ-WEB-1 Settings writes require enabled send, named Host, identity, exact Origin and same-origin Fetch Metadata (12.629136ms)
✔ REQ-WEB-1 Settings validates JSON, size, revision and strict writable keys before broker call (11.580206ms)
✔ tokens.css and icons.svg are byte copies of docs/design (1.435475ms)
✔ JetBrains Mono files match the digests in their sources file, with the OFL text (2.690916ms)
✔ shipped strings are unchanged, and the web keeps its write boundary (3.316076ms)
✔ shell in a browser: System default, seeded states, 400px, focus and the Ctrl+K palette (8093.509292ms)
✔ five states on Board, Inbox, Tasks, Agents and Trail (2600.354726ms)
✔ Queue, Business and Settings in their five states, with no move button (6493.497122ms)
✔ seeded secrets, Discord ids and paths reach no response and no page; business refusals in the module's words (2384.117605ms)
✔ the server log names no config path when the system config refuses (262.539671ms)
ℹ tests 112
ℹ suites 0
ℹ pass 112
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 56586.605482
@@ -0,0 +1,208 @@
== control 18:31:50 base 20d2b5788
control BUS: rc 0 {'tests': '48', 'pass': '48', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control BUSINESS: rc 0 {'tests': '26', 'pass': '26', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control CLI: rc 0 {'tests': '26', 'pass': '26', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control MIGRATION: rc 0 {'tests': '21', 'pass': '21', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control SCHEMA: rc 0 {'tests': '28', 'pass': '28', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control SEAT: rc 0 {'tests': '20', 'pass': '20', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
t-threads_project_business [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (949.29811ms)
t-thread_one_holder [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (227.218454ms)
t-thread_one_per_run [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (243.487229ms)
t-thread_release_by_holder [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (996.894579ms)
t-thread_release_same_run [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (976.674682ms)
t-thread_revoke_needs_decision [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (936.980795ms)
t-thread_claims_business [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (999.762827ms)
t-message_threads_match [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (289.004218ms)
t-delivery_same_thread [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.353793ms)
t-projects_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1056.581403ms)
t-projects_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1002.799378ms)
t-projects_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (992.267429ms)
t-threads_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1028.237827ms)
t-threads_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (998.374721ms)
t-threads_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1015.757314ms)
t-thread_claims_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1030.760411ms)
t-thread_claims_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1027.465621ms)
t-thread_claims_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1000.220651ms)
t-message_threads_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1152.409304ms)
t-message_threads_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (947.571592ms)
t-message_threads_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1009.305092ms)
t-thread_opens_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1004.372025ms)
t-thread_opens_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (994.336743ms)
t-thread_opens_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (966.585798ms)
b-human-must-use-thread-send [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (223.993336ms)
b-instance-mismatch [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (94.376133ms)
b-chain-one-step [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (296.739099ms)
b-chain-depth-constant [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3509.783455ms)
b-no-thread-returns-null [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (206.105009ms)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3544.934537ms)
b-thread-not-owned [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-USER-2: the human verbs refuse another owner's thread (117.533054ms)
b-bind-thread-required [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (218.859856ms)
b-bind-thread-not-found [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (231.238618ms)
b-bind-thread-not-allowed [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (228.209437ms)
b-thread-already-held [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (245.882856ms)
b-receive-any-thread [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (298.537185ms)
fail: REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (228.431159ms)
b-thread-instance-missing [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (48.868209ms)
b-thread-instance-ambiguous [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (108.270474ms)
b-state-pending-zero [CLI]: killed (rc 1, pass 21, fail 5)
fail: REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20132.859913ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20147.511839ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20138.468307ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20149.644246ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30105.603168ms)
b-state-last-open-null [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (135.220795ms)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (214.251585ms)
b-state-holder-null [CLI]: killed (rc 1, pass 21, fail 5)
fail: REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (92.519513ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20396.156723ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22819.351175ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30336.498129ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23381.123676ms)
p-threads-state-op [BUS]: killed (rc 1, pass 47, fail 1)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (231.300839ms)
s-delivery-unscoped [SCHEMA]: killed (rc 1, pass 21, fail 7)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (240.813631ms)
fail: REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (149.790926ms)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (202.211901ms)
fail: a business with no role definitions at all is unlimited (249.315144ms)
fail: a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (268.325906ms)
fail: only the user and the chief of staff may send to the assistant; the tester is refused by default (292.587624ms)
fail: the assistant sends to the user and to the chief of staff only (281.78485ms)
seat-segment-dotdot [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.100647ms)
seat-segment-pattern [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.401995ms)
seat-store-dir-check [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.50931ms)
seat-store-mode-check [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.586446ms)
seat-registry-thread-key [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (1.347674ms)
seat-no-thread-binds [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (1.404303ms)
l-check-thread-required [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (144.95075ms)
l-check-thread-not-allowed [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (276.530503ms)
l-no-thread-store [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (368.195445ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (265.840523ms)
l-session-in-run-dir [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (347.571432ms)
l-idle-fixed-900 [CLI]: killed (rc 1, pass 22, fail 4)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20400.239243ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22863.61698ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30316.712628ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23395.007646ms)
l-open-never-starts [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (24312.210203ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20156.627506ms)
l-never-start [CLI]: killed (rc 1, pass 20, fail 6)
fail: REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20137.319955ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20155.033615ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20139.814977ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20129.702257ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20127.162334ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30097.30523ms)
l-start-while-held [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (189.301382ms)
l-no-signature-guard [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (297.339904ms)
l-refusal-every-tick [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1658.987616ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (230.288593ms)
biz-idle-not-checked [BUSINESS]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (1.68367ms)
biz-idle-default [BUSINESS]: killed (rc 1, pass 23, fail 3)
fail: REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (0.665538ms)
fail: the fixture business validates and comes back frozen (4.269509ms)
fail: the role file loads and resolves through loadBusiness (5.556096ms)
b-thread-send-unchecked [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (259.3545ms)
b-idle-no-recheck [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (129.527526ms)
b-idle-ignores-pending [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (122.540068ms)
b-idle-ignores-unread [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (140.956644ms)
b-idle-no-holder-check [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (146.481426ms)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (263.453476ms)
b-idle-no-ended-check [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (149.881148ms)
b-unread-any-holder [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (133.291046ms)
b-unread-no-claim-scope [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (125.60652ms)
p-thread-idle-op [BUS]: killed (rc 1, pass 47, fail 1)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (224.874654ms)
l-idle-ignores-released [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (1485.453879ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (1324.570675ms)
l-never-idle-stop [CLI]: killed (rc 1, pass 22, fail 4)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20377.230695ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22898.592909ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30327.121427ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23394.30645ms)
m-report-counts-delivered [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (702.236623ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (754.116216ms)
m-report-counts-all [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (738.286411ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (735.970735ms)
m-report-by-role-only [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (751.543972ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (805.392503ms)
m-report-dropped [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (703.375831ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (720.843789ms)
m-cli-no-report [MIGRATION]: killed (rc 1, pass 20, fail 1)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (835.362783ms)
m-times-missing-table [MIGRATION]: killed (rc 1, pass 13, fail 8)
fail: REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (758.025049ms)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (586.136839ms)
fail: REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (638.469133ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (602.975701ms)
fail: explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (600.12283ms)
fail: migration refuses active writers and drifted legacy schemas, with no partial upgrade (1322.202413ms)
fail: named migration registry chains 3b through 3e to a fixture-only future version in order (708.437996ms)
fail: offline command migrates only the supplied fixture root and reports usage errors (760.769239ms)
restored: True 18:50:38
@@ -0,0 +1,208 @@
== control 18:31:50 base 20d2b5788
control BUS: rc 0 {'tests': '48', 'pass': '48', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control BUSINESS: rc 0 {'tests': '26', 'pass': '26', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control CLI: rc 0 {'tests': '26', 'pass': '26', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control MIGRATION: rc 0 {'tests': '21', 'pass': '21', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control SCHEMA: rc 0 {'tests': '28', 'pass': '28', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
control SEAT: rc 0 {'tests': '20', 'pass': '20', 'fail': '0', 'cancelled': '0', 'skipped': '0'}
t-threads_project_business [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (949.29811ms)
t-thread_one_holder [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (227.218454ms)
t-thread_one_per_run [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (243.487229ms)
t-thread_release_by_holder [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (996.894579ms)
t-thread_release_same_run [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (976.674682ms)
t-thread_revoke_needs_decision [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (936.980795ms)
t-thread_claims_business [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (999.762827ms)
t-message_threads_match [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (289.004218ms)
t-delivery_same_thread [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.353793ms)
t-projects_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1056.581403ms)
t-projects_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1002.799378ms)
t-projects_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (992.267429ms)
t-threads_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1028.237827ms)
t-threads_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (998.374721ms)
t-threads_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1015.757314ms)
t-thread_claims_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1030.760411ms)
t-thread_claims_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1027.465621ms)
t-thread_claims_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1000.220651ms)
t-message_threads_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1152.409304ms)
t-message_threads_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (947.571592ms)
t-message_threads_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1009.305092ms)
t-thread_opens_no_update [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1004.372025ms)
t-thread_opens_no_delete [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (994.336743ms)
t-thread_opens_no_replace [SCHEMA]: killed (rc 1, pass 27, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (966.585798ms)
b-human-must-use-thread-send [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (223.993336ms)
b-instance-mismatch [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (94.376133ms)
b-chain-one-step [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (296.739099ms)
b-chain-depth-constant [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3509.783455ms)
b-no-thread-returns-null [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (206.105009ms)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3544.934537ms)
b-thread-not-owned [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-USER-2: the human verbs refuse another owner's thread (117.533054ms)
b-bind-thread-required [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (218.859856ms)
b-bind-thread-not-found [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (231.238618ms)
b-bind-thread-not-allowed [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (228.209437ms)
b-thread-already-held [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (245.882856ms)
b-receive-any-thread [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (298.537185ms)
fail: REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (228.431159ms)
b-thread-instance-missing [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (48.868209ms)
b-thread-instance-ambiguous [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (108.270474ms)
b-state-pending-zero [CLI]: killed (rc 1, pass 21, fail 5)
fail: REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20132.859913ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20147.511839ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20138.468307ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20149.644246ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30105.603168ms)
b-state-last-open-null [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (135.220795ms)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (214.251585ms)
b-state-holder-null [CLI]: killed (rc 1, pass 21, fail 5)
fail: REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (92.519513ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20396.156723ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22819.351175ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30336.498129ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23381.123676ms)
p-threads-state-op [BUS]: killed (rc 1, pass 47, fail 1)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (231.300839ms)
s-delivery-unscoped [SCHEMA]: killed (rc 1, pass 21, fail 7)
fail: REQ-MSG-1: a message to or from the assistant names its thread, or is refused (240.813631ms)
fail: REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (149.790926ms)
fail: REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (202.211901ms)
fail: a business with no role definitions at all is unlimited (249.315144ms)
fail: a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (268.325906ms)
fail: only the user and the chief of staff may send to the assistant; the tester is refused by default (292.587624ms)
fail: the assistant sends to the user and to the chief of staff only (281.78485ms)
seat-segment-dotdot [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.100647ms)
seat-segment-pattern [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.401995ms)
seat-store-dir-check [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.50931ms)
seat-store-mode-check [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.586446ms)
seat-registry-thread-key [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (1.347674ms)
seat-no-thread-binds [SEAT]: killed (rc 1, pass 19, fail 1)
fail: REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (1.404303ms)
l-check-thread-required [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (144.95075ms)
l-check-thread-not-allowed [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (276.530503ms)
l-no-thread-store [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (368.195445ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (265.840523ms)
l-session-in-run-dir [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (347.571432ms)
l-idle-fixed-900 [CLI]: killed (rc 1, pass 22, fail 4)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20400.239243ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22863.61698ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30316.712628ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23395.007646ms)
l-open-never-starts [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (24312.210203ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20156.627506ms)
l-never-start [CLI]: killed (rc 1, pass 20, fail 6)
fail: REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20137.319955ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20155.033615ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20139.814977ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20129.702257ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20127.162334ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30097.30523ms)
l-start-while-held [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (189.301382ms)
l-no-signature-guard [CLI]: killed (rc 1, pass 25, fail 1)
fail: REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (297.339904ms)
l-refusal-every-tick [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1658.987616ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (230.288593ms)
biz-idle-not-checked [BUSINESS]: killed (rc 1, pass 25, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (1.68367ms)
biz-idle-default [BUSINESS]: killed (rc 1, pass 23, fail 3)
fail: REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (0.665538ms)
fail: the fixture business validates and comes back frozen (4.269509ms)
fail: the role file loads and resolves through loadBusiness (5.556096ms)
b-thread-send-unchecked [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (259.3545ms)
b-idle-no-recheck [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (129.527526ms)
b-idle-ignores-pending [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (122.540068ms)
b-idle-ignores-unread [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (140.956644ms)
b-idle-no-holder-check [BUS]: killed (rc 1, pass 46, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (146.481426ms)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (263.453476ms)
b-idle-no-ended-check [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (149.881148ms)
b-unread-any-holder [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (133.291046ms)
b-unread-no-claim-scope [BUS]: killed (rc 1, pass 47, fail 1)
fail: REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (125.60652ms)
p-thread-idle-op [BUS]: killed (rc 1, pass 47, fail 1)
fail: broker process: launch ops authorize role.launch, record refusals and end runs (224.874654ms)
l-idle-ignores-released [CLI]: killed (rc 1, pass 24, fail 2)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (1485.453879ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (1324.570675ms)
l-never-idle-stop [CLI]: killed (rc 1, pass 22, fail 4)
fail: REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20377.230695ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22898.592909ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30327.121427ms)
fail: REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23394.30645ms)
m-report-counts-delivered [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (702.236623ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (754.116216ms)
m-report-counts-all [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (738.286411ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (735.970735ms)
m-report-by-role-only [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (751.543972ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (805.392503ms)
m-report-dropped [MIGRATION]: killed (rc 1, pass 19, fail 2)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (703.375831ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (720.843789ms)
m-cli-no-report [MIGRATION]: killed (rc 1, pass 20, fail 1)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (835.362783ms)
m-times-missing-table [MIGRATION]: killed (rc 1, pass 13, fail 8)
fail: REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (758.025049ms)
fail: REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (586.136839ms)
fail: REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (638.469133ms)
fail: REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (602.975701ms)
fail: explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (600.12283ms)
fail: migration refuses active writers and drifted legacy schemas, with no partial upgrade (1322.202413ms)
fail: named migration registry chains 3b through 3e to a fixture-only future version in order (708.437996ms)
fail: offline command migrates only the supplied fixture root and reports usage errors (760.769239ms)
restored: True 18:50:38
@@ -0,0 +1,239 @@
#!/usr/bin/env python3
"""Row 121 (#1615) mutants, round 2. Each mutant edits one or more source files, runs
the named test set, and restores every file from .orig with a sha256 check.
Rules (Sage, sage-0332):
- every test file a set names must exist, or the run stops before mutating:
node --test skips a missing path without failing;
- a control run of each set on the unmutated source must pass with 0 skipped
before any mutant runs, so a kill can't be a test that already failed;
- each edit's pattern must occur exactly once;
- a schema.sql mutant also rewrites SCHEMA_SHA256 in store.mjs to the mutated
file's digest, so the store loads and the kill is a test, not the load check;
- round 2: a schema.sql edit also makes the same replace, once, in
migrations/3d-3e.sql, or the import replay of the migration chain throws
migration-target-mismatch and the load, not a test, makes the kill.
"""
import hashlib, os, re, shutil, signal, subprocess, sys
WT = os.path.expanduser('~/darkwing-scratch/r121/r2wt')
PKT = os.path.expanduser('~/darkwing-scratch/r121/pkt2')
TMP = os.path.expanduser('~/darkwing-scratch/r121/tmp')
SETS = {
'SCHEMA': ('packages/bus', ['tests/threads.test.mjs', 'tests/schema.test.mjs', 'tests/messaging.test.mjs']),
'BUS': ('packages/bus', ['tests/threads.test.mjs', 'tests/messaging.test.mjs', 'tests/end-launch.test.mjs',
'tests/schema.test.mjs', 'tests/store.test.mjs', 'tests/process.test.mjs']),
'SEAT': ('packages/seat', ['tests/session.test.mjs', 'tests/sandbox.test.mjs']),
'CLI': ('packages/cli', ['tests/thread-launch.test.mjs', 'tests/launcher.test.mjs', 'tests/launch-limits.test.mjs']),
'BUSINESS': ('packages/business', ['tests/business.test.mjs', 'tests/chief-of-staff.test.mjs']),
'MIGRATION': ('packages/bus', ['tests/thread-migration.test.mjs', 'tests/comment-migration.test.mjs',
'tests/chief-of-staff.test.mjs']),
}
SCHEMA = 'packages/bus/schema.sql'
STORE = 'packages/bus/src/store.mjs'
MIG3E = 'packages/bus/src/migrations/3d-3e.sql'
MIGRATE_CLI = 'packages/bus/src/migrate-schema.mjs'
BROKER = 'packages/bus/src/broker.mjs'
PROCESS = 'packages/bus/src/process.mjs'
SESSION = 'packages/seat/src/session.mjs'
SANDBOX = 'packages/seat/src/sandbox.mjs'
LAUNCHER = 'packages/cli/src/launcher.mjs'
BUSINESS = 'packages/business/src/business.mjs'
TRIGGERS = [
'threads_project_business', 'thread_one_holder', 'thread_one_per_run', 'thread_release_by_holder',
'thread_release_same_run', 'thread_revoke_needs_decision', 'thread_claims_business',
'message_threads_match', 'delivery_same_thread',
] + [f'{t}_no_{op}' for t in ('projects', 'threads', 'thread_claims', 'message_threads', 'thread_opens')
for op in ('update', 'delete', 'replace')]
# (name, set, [(file, old, new), ...])
CODE = [
# broker.mjs: #threadFor, #thread, bindLaunch, role.claim, receive, thread.create, threadsState
('b-human-must-use-thread-send', 'BUS', [(BROKER, " if (s.human) fail('thread-required-use-thread-send');\n", '')]),
('b-instance-mismatch', 'BUS', [(BROKER, ".instance !== to) fail('thread-instance-mismatch');", ".instance !== to && false) fail('thread-instance-mismatch');")]),
('b-chain-one-step', 'BUS', [(BROKER, ' at = m?.in_reply_to ?? null;\n', ' at = null;\n')]),
('b-chain-depth-constant', 'BUS', [(BROKER, 'at !== null && !seen.has(at); )', 'at !== null && !seen.has(at) && seen.size < 3; )')]),
('b-no-thread-returns-null', 'BUS', [(BROKER, " fail('thread-required-reply-to-thread-message');\n", ' return null;\n')]),
('b-thread-not-owned', 'BUS', [(BROKER, " if (t.owner !== s.human) fail('thread-not-owned');\n", '')]),
('b-bind-thread-required', 'BUS', [(BROKER, " if (record.thread === undefined) fail('thread-required');\n", '')]),
('b-bind-thread-not-found', 'BUS', [(BROKER, " fail('thread-not-found');\n } else if (record.thread", " ;\n } else if (record.thread")]),
('b-bind-thread-not-allowed', 'BUS', [(BROKER, " } else if (record.thread !== undefined) fail('thread-not-allowed');\n", ' }\n')]),
('b-thread-already-held', 'BUS', [(BROKER, " if (this.#threadHolder(s.thread)?.op === 'claim') fail('thread-already-held');\n", '')]),
('b-receive-any-thread', 'BUS', [
(BROKER, " (s.thread ? ' AND EXISTS(SELECT 1 FROM message_threads mt WHERE mt.message=m.id AND mt.thread=?)' : '') +\n", ''),
(BROKER, ' ...(s.thread ? [s.thread] : []),\n', ''),
]),
('b-thread-instance-missing', 'BUS', [(BROKER, " if (!instances.length) fail('thread-instance-missing');\n", '')]),
('b-thread-instance-ambiguous', 'BUS', [(BROKER, " if (instances.length > 1) fail('thread-instance-ambiguous');\n", '')]),
('b-state-pending-zero', 'CLI', [(BROKER, ' pending: r.pending,\n', ' pending: 0,\n')]),
('b-state-last-open-null', 'BUS', [(BROKER, ' lastOpen: r.last_open,\n', ' lastOpen: null,\n')]),
('b-state-holder-null', 'CLI', [(BROKER, " holder: r.claim_op === 'claim' ? r.holder_run : null,\n", ' holder: null,\n')]),
('p-threads-state-op', 'BUS', [(PROCESS, " if (m.op === 'threadsState') return runtime.threadsState(m.business);\n", '')]),
# schema.sql: delivery_same_thread scoped to messages to the thread's instance (28556 change 1)
('s-delivery-unscoped', 'SCHEMA', [(SCHEMA, ' WHERE mt.message = NEW.message AND m.to_role = t.instance\n', ' WHERE mt.message = NEW.message\n')]),
# seat
('seat-segment-dotdot', 'SEAT', [(SESSION, ' && ID_PATTERN.test(x) && !x.includes("..");', ' && ID_PATTERN.test(x);')]),
('seat-segment-pattern', 'SEAT', [(SESSION, ' && ID_PATTERN.test(x) && !x.includes("..");', ' && !x.includes("..");')]),
('seat-store-dir-check', 'SEAT', [(SESSION, ' if (st.isSymbolicLink() || !st.isDirectory() || st.uid !== process.getuid() || st.mode & 0o077) throw', ' if (false) throw')]),
('seat-store-mode-check', 'SEAT', [(SESSION, ' || st.uid !== process.getuid() || st.mode & 0o077) throw', ' || st.uid !== process.getuid()) throw')]),
('seat-registry-thread-key', 'SEAT', [(SESSION, ' && s.instance === instance && (s.thread ?? null) === thread) ?? null;', ' && s.instance === instance) ?? null;')]),
('seat-no-thread-binds', 'SEAT', [(SANDBOX, ' if (threadStore) {\n', ' if (false) {\n')]),
# launcher
('l-check-thread-required', 'CLI', [(LAUNCHER, ' if (threaded && !thread) throw new Refusal("thread-required", `${instance} runs only for a thread`);\n', '')]),
('l-check-thread-not-allowed', 'CLI', [(LAUNCHER, ' if (!threaded && thread) throw new Refusal("thread-not-allowed", `${instance} isn\'t a thread instance`);\n', '')]),
('l-no-thread-store', 'CLI', [(LAUNCHER, ' store = threadStore(dataRoot, b.id, thread);\n', ' store = null;\n')]),
('l-session-in-run-dir', 'CLI', [(LAUNCHER, ' const sessionDir = store ? store.session : join(runDir, "session");\n if (!store) mkdirSync',
' const sessionDir = join(runDir, "session");\n if (true) mkdirSync')]),
('l-idle-fixed-900', 'CLI', [(LAUNCHER, ' >= b.launch.threadIdleSeconds * 1000', ' >= 900 * 1000')]),
('l-open-never-starts', 'CLI', [(LAUNCHER, ' const opened = ms(t.lastOpen) > ms(t.lastClaim);\n', ' const opened = false;\n')]),
('l-never-start', 'CLI', [(LAUNCHER, ' if (t.holder || !(t.pending > 0 || opened)) continue;\n', ' continue;\n')]),
('l-start-while-held', 'CLI', [(LAUNCHER, ' if (t.holder || !(t.pending > 0 || opened)) continue;\n', ' if (!(t.pending > 0 || opened)) continue;\n')]),
('l-no-signature-guard', 'CLI', [(LAUNCHER, ' if (startedFor.get(t.thread) === signature) continue;\n', '')]),
('l-refusal-every-tick', 'CLI', [(LAUNCHER, ' if (refusedThreads.get(t.thread) === code) return;\n', '')]),
# business
('biz-idle-not-checked', 'BUSINESS', [(BUSINESS, ': requirePositiveInt(launch.threadIdleSeconds, `${where}.threadIdleSeconds`);', ': launch.threadIdleSeconds;')]),
('biz-idle-default', 'BUSINESS', [(BUSINESS, 'launch.threadIdleSeconds === undefined ? THREAD_IDLE_SECONDS :', 'launch.threadIdleSeconds === undefined ? 60 :')]),
]
R2 = [
# F1: thread.send runs row 120's messaging check
('b-thread-send-unchecked', 'BUS', [(BROKER, " this.#checkMessaging(s.business, this.#sender(s), t.instance);\n", '')]),
# F3: threadIdle rechecks, scopes and refuses
('b-idle-no-recheck', 'BUS', [(BROKER, ' if (t.pending || t.unread) return', ' if (false) return')]),
('b-idle-ignores-pending', 'BUS', [(BROKER, ' if (t.pending || t.unread) return', ' if (t.unread) return')]),
('b-idle-ignores-unread', 'BUS', [(BROKER, ' if (t.pending || t.unread) return', ' if (t.pending) return')]),
('b-idle-no-holder-check', 'BUS', [(BROKER, " if (t?.holder !== record.run) fail('not-holder');\n", '')]),
('b-idle-no-ended-check', 'BUS', [(BROKER, " if (this.#ended.has(key)) fail('run-ended');\n // A run holds at most one thread", ' // A run holds at most one thread')]),
('b-unread-any-holder', 'BUS', [(BROKER, " AND d.op='delivered' AND d.holder_run=c.holder_run)", " AND d.op='delivered')")]),
('b-unread-no-claim-scope', 'BUS', [(BROKER, " AND c.op='claim' AND EXISTS(", ' AND EXISTS(')]),
('p-thread-idle-op', 'BUS', [(PROCESS, " if (m.op === 'threadIdle') return runtime.threadIdle(m.record);\n", '')]),
('l-idle-ignores-released', 'CLI', [(LAUNCHER, ' if (!idle.released) continue;\n', '')]),
('l-never-idle-stop', 'CLI', [(LAUNCHER, ' if (!stopping.has(s.run) && now - last', ' if (false && now - last')]),
]
# F5: the 3d→3e step parks pre-3e messages and reports them.
# No mutant for 'read' in the report's IN list: the broker marks read only after delivered, so it is equivalent.
R2_F5 = [
('m-report-counts-delivered', 'MIGRATION', [(STORE, "FROM messages m WHERE NOT EXISTS(SELECT 1 FROM deliveries d WHERE d.message=m.id AND d.op IN ('delivered','read'))", "FROM messages m WHERE NOT EXISTS(SELECT 1 FROM deliveries d WHERE d.message=m.id AND d.op IN ('read'))")]),
('m-report-counts-all', 'MIGRATION', [(STORE, 'FROM messages m WHERE NOT EXISTS(', 'FROM messages m WHERE 1 OR NOT EXISTS(')]),
('m-report-by-role-only', 'MIGRATION', [(STORE, 'GROUP BY business, to_role ORDER BY', 'GROUP BY to_role ORDER BY')]),
('m-report-dropped', 'MIGRATION', [(STORE, ' this.#report.push(...(step.report?.(this) ?? []));\n', '')]),
('m-cli-no-report', 'MIGRATION', [(MIGRATE_CLI, " for (const line of report) process.stdout.write(line + '\\n');\n", '')]),
('m-times-missing-table', 'MIGRATION', [(STORE, " if (!this.get(\"SELECT 1 FROM sqlite_master WHERE type='table' AND name=?\", table)) continue;\n", '')]),
]
CODE += R2 + R2_F5
def sha(p):
return hashlib.sha256(open(p, 'rb').read()).hexdigest()
def sweep():
left = []
for pid in filter(str.isdigit, os.listdir('/proc')):
try:
if os.readlink(f'/proc/{pid}/cwd').startswith(TMP + '/') or os.readlink(f'/proc/{pid}/cwd') == TMP:
left.append(int(pid)); os.kill(int(pid), signal.SIGKILL)
except OSError:
pass
return left
def run_set(key):
cwd, files = SETS[key]
missing = [f for f in files if not os.path.isfile(os.path.join(WT, cwd, f))]
if missing:
raise SystemExit(f'STOP {key}: missing test files {missing}')
p = subprocess.Popen(['node', '--test', *files], cwd=os.path.join(WT, cwd), stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, env=env, start_new_session=True, text=True)
try:
out, _ = p.communicate(timeout=900)
except subprocess.TimeoutExpired:
os.killpg(p.pid, signal.SIGKILL); out, _ = p.communicate(); out += '\nTIMEOUT\n'
tally = dict(re.findall(r'^ℹ (tests|pass|fail|skipped|cancelled) (\d+)$', out, re.M))
fails = sorted({l.strip()[2:] for l in out.splitlines() if l.strip().startswith('✖ ') and l.strip() != '✖ failing tests:'})
return p.returncode, tally, fails, out
def mirrored(edits):
out = []
for f, old, new in edits:
out.append((f, old, new))
if f == SCHEMA:
out.append((MIG3E, old, new))
return out
def schema_edit(name):
src = open(SCHEMA).read()
m = re.search(r'CREATE TRIGGER ' + re.escape(name) + r' .*?END;', src, re.S)
assert m and src.count(f'CREATE TRIGGER {name} ') == 1, name
body = m.group(0)
raises = re.findall(r"SELECT RAISE\(ABORT, '(?:[^']|'')*'\)", body)
assert len(raises) == 1, (name, raises)
return [(SCHEMA, body, body.replace(raises[0], 'SELECT NULL'))]
os.chdir(WT)
env = dict(os.environ, TMPDIR=TMP, NO_COLOR='1')
os.makedirs(os.path.join(PKT, 'mutants'), exist_ok=True)
log = open(os.path.join(PKT, 'mutants-run.log'), 'a')
def say(*a):
print(*a, file=log, flush=True); print(*a, flush=True)
check = '--check' in sys.argv
only = set(a for a in sys.argv[1:] if a != '--check')
mutants = [(n, k, mirrored(e)) for n, k, e in [(f't-{t}', 'SCHEMA', schema_edit(t)) for t in TRIGGERS] + CODE]
if only:
mutants = [m for m in mutants if m[0] in only]
assert len(mutants) == len(only), 'unknown mutant name'
# Patterns first, all of them, before anything runs.
for name, _, edits in mutants:
for f, old, _ in edits:
n = open(f).read().count(old)
if n != 1:
raise SystemExit(f'STOP {name}: pattern occurs {n} times in {f}')
if check:
raise SystemExit(f'patterns ok: {len(mutants)} mutants')
base = {f: sha(f) for _, _, edits in mutants for f, _, _ in edits}
base[STORE] = sha(STORE)
say(f'== control {os.popen("date -u +%H:%M:%S").read().strip()} base {os.popen("git rev-parse --short HEAD").read().strip()}')
for key in sorted({s for _, s, _ in mutants}):
rc, tally, fails, out = run_set(key)
open(os.path.join(PKT, 'mutants', f'control-{key}.log'), 'w').write(out)
say(f'control {key}: rc {rc} {tally}')
if rc != 0 or tally.get('skipped', '0') != '0' or tally.get('fail') != '0':
raise SystemExit(f'STOP control {key} not clean')
for name, key, edits in mutants:
files = sorted({f for f, _, _ in edits})
if SCHEMA in files:
files.append(STORE)
for f in files:
shutil.copy2(f, f + '.orig')
try:
for f, old, new in edits:
src = open(f).read()
open(f, 'w').write(src.replace(old, new))
if SCHEMA in files:
st = open(STORE).read()
old = re.search(r"export const SCHEMA_SHA256 = '[0-9a-f]{64}';", st).group(0)
assert st.count(old) == 1
open(STORE, 'w').write(st.replace(old, f"export const SCHEMA_SHA256 = '{sha(SCHEMA)}';"))
rc, tally, fails, out = run_set(key)
open(os.path.join(PKT, 'mutants', f'mutant-{name}.log'), 'w').write(out)
load = 'schema-source-mismatch' in out
verdict = 'SURVIVED' if rc == 0 else ('LOAD-FAIL' if load else 'killed')
say(f'{name} [{key}]: {verdict} (rc {rc}, pass {tally.get("pass", "?")}, fail {tally.get("fail", "?")})')
for l in fails:
say(f' fail: {l}')
left = sweep()
if left:
say(f' swept {len(left)} leftover process(es) under TMPDIR: {left}')
finally:
for f in files:
shutil.move(f + '.orig', f)
assert sha(f) == base[f], f'{f} not restored'
say('restored:', all(sha(f) == h for f, h in base.items()), os.popen('date -u +%H:%M:%S').read().strip())
@@ -0,0 +1,56 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (111.756599ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (123.016429ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (126.364809ms)
✔ endLaunch leaves a claim another run took alone (139.406214ms)
✔ refuse records action.refused against the caller with the code only (109.559113ms)
✔ launches off refuses role.launch with launch-revoked until launches on (156.805412ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (254.648961ms)
✔ the assistant sends to the user and to the chief of staff only (271.890805ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (291.120342ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (298.858051ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (254.925121ms)
✔ a sender-side list alone refuses a send to a role that has no list (262.125357ms)
✔ a target-side list alone refuses a send from a role that has no list (271.092442ms)
✔ the sender list is checked before the target list (229.02629ms)
✔ roles without the field behave exactly as before (347.939753ms)
✔ a business with no role definitions at all is unlimited (254.984019ms)
✔ a malformed messaging field refuses at boot (68.609159ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (274.780199ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (303.327281ms)
✔ review requests and verdicts between roles without the field are unchanged (246.451538ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (172.048224ms)
✔ startup token refusal returns safe code without value or partial listening broker (45.508601ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (163.036919ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (158.86667ms)
✔ trusted host registers later launches; socket clients never have a registration verb (168.985851ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (44.86898ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (153.178065ms)
✔ v3b prototype refusals, views and append-only mutations (1247.794141ms)
✔ creates private WAL store and excludes a second writer until explicit close (106.571324ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (140.941292ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (155.232397ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (156.778935ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (87.159288ms)
✔ async transactions refuse before invoking their function (79.327525ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (284.892304ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (986.900415ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (270.484144ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3410.986511ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (102.390637ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (146.84362ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (149.639011ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (166.035034ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (153.063171ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (138.904697ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (149.92341ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (99.168451ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (146.13636ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (466.430765ms)
ℹ tests 48
ℹ suites 0
ℹ pass 48
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6739.304011
@@ -0,0 +1,34 @@
✔ config directory and file path follow MOSAIC_CONFIG (1.116649ms)
✔ the fixture business validates and comes back frozen (3.418262ms)
✔ two instances may share a definition (1.037319ms)
✔ top-level refusals (2.976001ms)
✔ arbiters and projects (4.008396ms)
✔ role instances (2.869216ms)
✔ Vikunja bots (4.899332ms)
✔ a role without Vikunja takes no tracker block (1.737058ms)
✔ credential references match the definition's services (1.98803ms)
✔ launch (6.379766ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (3.363784ms)
✔ loadBusiness: file checks (1.568017ms)
✔ loadBusiness: not a regular file (36.561894ms)
✔ loading writes nothing (0.958199ms)
✔ names that are Object.prototype properties don't count as declared (2.564203ms)
✔ the shipped example refuses as written and validates once filled in (0.719972ms)
✔ the role file loads and resolves through loadBusiness (4.839725ms)
✔ the shipped file is exactly the approved list (0.164098ms)
✔ the resolved record matches the approved list, so a widened file fails (1.182291ms)
✔ the chief of staff holds role.launch, message.send, role.end and organization.change; every other action is gated (1.008207ms)
✔ the pm does not hold role.launch (1.112282ms)
✔ a business grant of a gated action through limits does not widen the role (1.247648ms)
✔ a limit that drops role.launch leaves the chief of staff with no launch block (0.860737ms)
✔ a launch block whose by is the pm instance is refused (1.00122ms)
✔ the contract names no duty to talk to the human and the pm contract no launch (0.258498ms)
✔ the instance takes no credential references and no tracker (1.44099ms)
ℹ tests 26
ℹ suites 0
ℹ pass 26
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 128.868826
@@ -0,0 +1,34 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (21.163086ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1266.922352ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (707.773207ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2676.564263ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (182.31605ms)
✔ a runner that stops at once ends its launch with the runner's reason (267.653847ms)
✔ a Claude Code launch with no session credential refuses before it starts (130.710472ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (220.812452ms)
✔ a runner killed from the host ends its launch as killed, not failed (309.783005ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (145.171144ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1099.368959ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (741.13213ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3691.139032ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (142.362094ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (182.12816ms)
✔ a launch client that never closes its side doesn't hold the host's close (166.070703ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1304.164656ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (5.815242ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (5522.112129ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1671.470436ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4427.488845ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2915.948296ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (95.391817ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (215.072142ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (252.408309ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (90.854541ms)
ℹ tests 26
ℹ suites 0
ℹ pass 26
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 15270.734053
@@ -0,0 +1,29 @@
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (224.964502ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (328.184209ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (176.988196ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (189.306113ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (208.55537ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (245.495615ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (221.826797ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (189.319904ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (258.088095ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (257.37418ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (291.662635ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (380.640173ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (665.913213ms)
✔ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (736.436804ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1223.706552ms)
✔ named migration registry chains 3b through 3e to a fixture-only future version in order (648.113346ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (550.66544ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (617.01615ms)
✔ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (843.815627ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (686.558143ms)
✔ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (712.053995ms)
ℹ tests 21
ℹ suites 0
ℹ pass 21
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3839.615066
@@ -0,0 +1,36 @@
✔ the assistant sends to the user and to the chief of staff only (254.490908ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (311.611981ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (305.909745ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (252.39648ms)
✔ a sender-side list alone refuses a send to a role that has no list (275.160765ms)
✔ a target-side list alone refuses a send from a role that has no list (286.61494ms)
✔ the sender list is checked before the target list (242.045731ms)
✔ roles without the field behave exactly as before (351.871167ms)
✔ a business with no role definitions at all is unlimited (257.25063ms)
✔ a malformed messaging field refuses at boot (66.943405ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (314.74029ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (321.205472ms)
✔ review requests and verdicts between roles without the field are unchanged (292.145487ms)
✔ v3b prototype refusals, views and append-only mutations (1245.710948ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (260.295737ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (983.636457ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (284.741467ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3528.136924ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (97.751312ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (148.8376ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (158.730378ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (190.43741ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (165.747834ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (146.466203ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (152.470294ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (115.153062ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (151.934904ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (569.046108ms)
ℹ tests 28
ℹ suites 0
ℹ pass 28
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7016.670292
@@ -0,0 +1,28 @@
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.615556ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (9.233196ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.213934ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (0.754455ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.608744ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.042221ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1740.002243ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2528.801255ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (271.065294ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.740952ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.645531ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.267242ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.374911ms)
✔ session file and launch log: 0600, the session file written once (1.038822ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.120145ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.538183ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.577313ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.365994ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (0.917204ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (277.621499ms)
ℹ tests 20
ℹ suites 0
ℹ pass 20
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4623.990503
@@ -0,0 +1,76 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (119.477684ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (104.140273ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (130.315201ms)
✔ endLaunch leaves a claim another run took alone (140.532142ms)
✔ refuse records action.refused against the caller with the code only (122.878108ms)
✔ launches off refuses role.launch with launch-revoked until launches on (164.701465ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (271.745168ms)
✔ the assistant sends to the user and to the chief of staff only (268.085955ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (319.130874ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (315.871376ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (273.931838ms)
✔ a sender-side list alone refuses a send to a role that has no list (270.767049ms)
✔ a target-side list alone refuses a send from a role that has no list (275.327214ms)
✔ the sender list is checked before the target list (244.780698ms)
✔ roles without the field behave exactly as before (356.691865ms)
✔ a business with no role definitions at all is unlimited (276.732536ms)
✔ a malformed messaging field refuses at boot (75.561718ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (295.896793ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (318.579576ms)
✔ review requests and verdicts between roles without the field are unchanged (272.882375ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (179.952943ms)
✔ startup token refusal returns safe code without value or partial listening broker (43.986504ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (173.827136ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (170.141989ms)
✔ trusted host registers later launches; socket clients never have a registration verb (169.793791ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (46.812732ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (181.18329ms)
✔ v3b prototype refusals, views and append-only mutations (1289.497093ms)
✔ creates private WAL store and excludes a second writer until explicit close (99.535927ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (139.41981ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (160.443944ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (152.396854ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (93.906505ms)
✔ async transactions refuse before invoking their function (78.902756ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (271.284796ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1022.956239ms)
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (228.209437ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3537.562461ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (92.026209ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (140.155802ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (146.220102ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (165.868532ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (146.035582ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (127.708371ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (146.919513ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (103.866087ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (137.59ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (443.782313ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6778.533222
✖ failing tests:
test at tests/threads.test.mjs:180:1
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (228.209437ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:195:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'thread-not-allowed' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,76 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (121.106639ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (115.726158ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (134.28788ms)
✔ endLaunch leaves a claim another run took alone (136.238494ms)
✔ refuse records action.refused against the caller with the code only (112.23084ms)
✔ launches off refuses role.launch with launch-revoked until launches on (161.365416ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (262.865907ms)
✔ the assistant sends to the user and to the chief of staff only (278.735692ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (317.740978ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (321.39028ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (260.010583ms)
✔ a sender-side list alone refuses a send to a role that has no list (271.708788ms)
✔ a target-side list alone refuses a send from a role that has no list (278.643172ms)
✔ the sender list is checked before the target list (236.585646ms)
✔ roles without the field behave exactly as before (348.459224ms)
✔ a business with no role definitions at all is unlimited (272.569852ms)
✔ a malformed messaging field refuses at boot (70.715374ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (276.727682ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (318.944158ms)
✔ review requests and verdicts between roles without the field are unchanged (276.49549ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (176.759796ms)
✔ startup token refusal returns safe code without value or partial listening broker (43.960762ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (171.99057ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (167.094066ms)
✔ trusted host registers later launches; socket clients never have a registration verb (168.531006ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (40.320394ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (153.830263ms)
✔ v3b prototype refusals, views and append-only mutations (1287.248977ms)
✔ creates private WAL store and excludes a second writer until explicit close (123.462123ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (156.842219ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (155.057903ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (152.301547ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (97.188967ms)
✔ async transactions refuse before invoking their function (93.053161ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (304.629758ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1005.274645ms)
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (231.238618ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3440.394626ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (101.027368ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (150.411505ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (136.134171ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (162.829717ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (160.359954ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (132.906975ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (144.848384ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (104.324935ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (136.72589ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (464.819199ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6748.777778
✖ failing tests:
test at tests/threads.test.mjs:180:1
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (231.238618ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:194:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'thread-not-found' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,93 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (133.837675ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (120.159944ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (147.405216ms)
✔ endLaunch leaves a claim another run took alone (145.851212ms)
✔ refuse records action.refused against the caller with the code only (107.242932ms)
✔ launches off refuses role.launch with launch-revoked until launches on (162.935817ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (274.448965ms)
✔ the assistant sends to the user and to the chief of staff only (299.931519ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (313.697568ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (308.284844ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (261.690333ms)
✔ a sender-side list alone refuses a send to a role that has no list (265.493211ms)
✔ a target-side list alone refuses a send from a role that has no list (304.088762ms)
✔ the sender list is checked before the target list (248.822301ms)
✔ roles without the field behave exactly as before (357.8313ms)
✔ a business with no role definitions at all is unlimited (275.752837ms)
✔ a malformed messaging field refuses at boot (73.193618ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (290.589953ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (325.494002ms)
✔ review requests and verdicts between roles without the field are unchanged (267.189982ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (172.187757ms)
✔ startup token refusal returns safe code without value or partial listening broker (44.817286ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (187.640936ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (165.699845ms)
✔ trusted host registers later launches; socket clients never have a registration verb (158.922027ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.594503ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (149.083616ms)
✔ v3b prototype refusals, views and append-only mutations (1302.866051ms)
✔ creates private WAL store and excludes a second writer until explicit close (105.409028ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (157.856478ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (160.32093ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (151.112331ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (89.281042ms)
✔ async transactions refuse before invoking their function (78.939033ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (308.155454ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1004.951709ms)
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (218.859856ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3548.54224ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (98.077847ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.803408ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (160.619158ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (160.226472ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (140.436328ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (127.092144ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (143.140623ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (100.744826ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (140.907625ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (444.584872ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6806.7374
✖ failing tests:
test at tests/threads.test.mjs:180:1
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (218.859856ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
Comparison {
+ code: 'invalid-request'
- code: 'thread-required'
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:193:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: invalid-request
at fail (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:78:9)
at identifier (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:92:15)
at Broker.bindLaunch (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:337:94)
at launch (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:52:20)
at assert.throws.code (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:193:23)
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:193:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25),
expected: { code: 'thread-required' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,74 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (128.868908ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (128.432375ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (136.705797ms)
✔ endLaunch leaves a claim another run took alone (158.22512ms)
✔ refuse records action.refused against the caller with the code only (120.042639ms)
✔ launches off refuses role.launch with launch-revoked until launches on (168.177822ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (279.409934ms)
✔ the assistant sends to the user and to the chief of staff only (284.95042ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (331.735179ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (344.05298ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (260.90842ms)
✔ a sender-side list alone refuses a send to a role that has no list (271.567469ms)
✔ a target-side list alone refuses a send from a role that has no list (275.18681ms)
✔ the sender list is checked before the target list (245.123172ms)
✔ roles without the field behave exactly as before (371.720136ms)
✔ a business with no role definitions at all is unlimited (272.008604ms)
✔ a malformed messaging field refuses at boot (69.405022ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (291.732542ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (316.949397ms)
✔ review requests and verdicts between roles without the field are unchanged (269.262994ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (186.066302ms)
✔ startup token refusal returns safe code without value or partial listening broker (45.164663ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (183.978843ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (159.971634ms)
✔ trusted host registers later launches; socket clients never have a registration verb (172.952093ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (48.064365ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (167.707487ms)
✔ v3b prototype refusals, views and append-only mutations (1350.009546ms)
✔ creates private WAL store and excludes a second writer until explicit close (105.413824ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (151.387237ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (160.307755ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (149.508373ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (91.383304ms)
✔ async transactions refuse before invoking their function (91.334428ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (299.250881ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1053.3684ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (285.857174ms)
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3509.783455ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (102.306466ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (143.229199ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (163.480592ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (185.542686ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (158.603746ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (145.310918ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (169.615767ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (109.989882ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (171.683206ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (452.766286ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7016.107412
✖ failing tests:
test at tests/threads.test.mjs:234:1
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3509.783455ms)
Error: thread-required-reply-to-thread-message
at fail (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:78:9)
at #threadFor (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:243:5)
at #dispatch (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:1229:39)
at file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:891:38
at Store.transaction (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:238:22)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:885:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:264:15)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25) {
code: 'thread-required-reply-to-thread-message'
}
@@ -0,0 +1,74 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (122.681211ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (122.70968ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (140.449621ms)
✔ endLaunch leaves a claim another run took alone (159.20641ms)
✔ refuse records action.refused against the caller with the code only (112.403529ms)
✔ launches off refuses role.launch with launch-revoked until launches on (166.390514ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (289.819238ms)
✔ the assistant sends to the user and to the chief of staff only (283.519342ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (331.527293ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (342.321875ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (270.213178ms)
✔ a sender-side list alone refuses a send to a role that has no list (272.49622ms)
✔ a target-side list alone refuses a send from a role that has no list (333.657376ms)
✔ the sender list is checked before the target list (252.626003ms)
✔ roles without the field behave exactly as before (352.959491ms)
✔ a business with no role definitions at all is unlimited (258.904568ms)
✔ a malformed messaging field refuses at boot (69.639812ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (284.809395ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (313.835365ms)
✔ review requests and verdicts between roles without the field are unchanged (277.227975ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (167.791221ms)
✔ startup token refusal returns safe code without value or partial listening broker (46.574486ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (178.432425ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (173.308814ms)
✔ trusted host registers later launches; socket clients never have a registration verb (183.313104ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.364135ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (190.399243ms)
✔ v3b prototype refusals, views and append-only mutations (1344.81981ms)
✔ creates private WAL store and excludes a second writer until explicit close (110.737184ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (143.060664ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (173.436116ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (155.072382ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (97.949857ms)
✔ async transactions refuse before invoking their function (92.04609ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (287.10234ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1056.463965ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (288.43408ms)
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (296.739099ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (177.466438ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (258.154937ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (266.761245ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (294.499402ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (255.325595ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (233.171558ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (254.886854ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (105.458899ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (150.986188ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (454.890928ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4447.986209
✖ failing tests:
test at tests/threads.test.mjs:234:1
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (296.739099ms)
Error: thread-required-reply-to-thread-message
at fail (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:78:9)
at #threadFor (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:243:5)
at #dispatch (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:1229:39)
at file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:891:38
at Store.transaction (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:238:22)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:885:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:250:18)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25) {
code: 'thread-required-reply-to-thread-message'
}
@@ -0,0 +1,93 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (116.285648ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (112.862512ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (141.39896ms)
✔ endLaunch leaves a claim another run took alone (156.044336ms)
✔ refuse records action.refused against the caller with the code only (106.633428ms)
✔ launches off refuses role.launch with launch-revoked until launches on (174.185913ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (274.820087ms)
✔ the assistant sends to the user and to the chief of staff only (281.278755ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (324.898492ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (327.756329ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (262.686759ms)
✔ a sender-side list alone refuses a send to a role that has no list (279.004947ms)
✔ a target-side list alone refuses a send from a role that has no list (281.656447ms)
✔ the sender list is checked before the target list (241.465655ms)
✔ roles without the field behave exactly as before (357.349241ms)
✔ a business with no role definitions at all is unlimited (270.407705ms)
✔ a malformed messaging field refuses at boot (77.239552ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (292.389458ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (301.399764ms)
✔ review requests and verdicts between roles without the field are unchanged (258.600862ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (172.974911ms)
✔ startup token refusal returns safe code without value or partial listening broker (44.228566ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (172.537808ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (167.738785ms)
✔ trusted host registers later launches; socket clients never have a registration verb (181.189546ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.155383ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (169.092478ms)
✔ v3b prototype refusals, views and append-only mutations (1314.902735ms)
✔ creates private WAL store and excludes a second writer until explicit close (101.50329ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (157.136807ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (174.466457ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (149.72953ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (94.186219ms)
✔ async transactions refuse before invoking their function (84.612931ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (296.46802ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1027.721424ms)
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (223.993336ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3513.26301ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (93.870789ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (145.906823ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (153.277306ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (165.875819ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (151.722607ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (130.449393ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (130.213877ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (91.968357ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (129.896231ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (416.156984ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6736.879128
✖ failing tests:
test at tests/threads.test.mjs:180:1
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (223.993336ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
Comparison {
+ code: 'thread-required-reply-to-thread-message'
- code: 'thread-required-use-thread-send'
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:188:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: thread-required-reply-to-thread-message
at fail (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:78:9)
at #threadFor (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:242:5)
at #dispatch (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:1228:39)
at file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:890:38
at Store.transaction (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:238:22)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:884:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at assert.throws.code (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:188:23)
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24),
expected: { code: 'thread-required-use-thread-send' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,85 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (146.975971ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (115.757284ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (136.811942ms)
✔ endLaunch leaves a claim another run took alone (148.318084ms)
✔ refuse records action.refused against the caller with the code only (117.777795ms)
✔ launches off refuses role.launch with launch-revoked until launches on (171.592413ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (300.228377ms)
✔ the assistant sends to the user and to the chief of staff only (299.386855ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (331.92833ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (347.55996ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (299.867548ms)
✔ a sender-side list alone refuses a send to a role that has no list (291.209376ms)
✔ a target-side list alone refuses a send from a role that has no list (316.531809ms)
✔ the sender list is checked before the target list (239.354176ms)
✔ roles without the field behave exactly as before (358.592769ms)
✔ a business with no role definitions at all is unlimited (261.085864ms)
✔ a malformed messaging field refuses at boot (74.039887ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (302.65266ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (326.435012ms)
✔ review requests and verdicts between roles without the field are unchanged (259.036114ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (186.617093ms)
✔ startup token refusal returns safe code without value or partial listening broker (43.911828ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (173.310541ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (176.133535ms)
✔ trusted host registers later launches; socket clients never have a registration verb (181.716811ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.358261ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (167.279554ms)
✔ v3b prototype refusals, views and append-only mutations (1421.291417ms)
✔ creates private WAL store and excludes a second writer until explicit close (115.461341ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (162.658133ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (176.726259ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (157.639137ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (93.162374ms)
✔ async transactions refuse before invoking their function (69.753398ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (312.901372ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1112.182953ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (288.757663ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3517.080449ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (100.400218ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (153.970776ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (150.751847ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (122.540068ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (160.98564ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (144.027677ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (154.178831ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (103.686724ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (153.2683ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (432.758955ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6976.553374
✖ failing tests:
test at tests/threads.test.mjs:349:1
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (122.540068ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ released: true
- pending: 1,
- released: false,
- unread: 0
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:354:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { released: true },
expected: { released: false, pending: 1, unread: 0 },
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,85 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (112.54216ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (108.878616ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (146.980883ms)
✔ endLaunch leaves a claim another run took alone (158.240597ms)
✔ refuse records action.refused against the caller with the code only (193.784545ms)
✔ launches off refuses role.launch with launch-revoked until launches on (352.488214ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (331.689733ms)
✔ the assistant sends to the user and to the chief of staff only (280.560764ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (418.908798ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (524.087572ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (359.97109ms)
✔ a sender-side list alone refuses a send to a role that has no list (315.265851ms)
✔ a target-side list alone refuses a send from a role that has no list (278.501547ms)
✔ the sender list is checked before the target list (244.739162ms)
✔ roles without the field behave exactly as before (361.954582ms)
✔ a business with no role definitions at all is unlimited (280.493754ms)
✔ a malformed messaging field refuses at boot (71.278241ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (294.719631ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (319.928717ms)
✔ review requests and verdicts between roles without the field are unchanged (249.712935ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (192.856256ms)
✔ startup token refusal returns safe code without value or partial listening broker (45.123557ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (181.743503ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (183.928381ms)
✔ trusted host registers later launches; socket clients never have a registration verb (289.685034ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (44.016109ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (270.572174ms)
✔ v3b prototype refusals, views and append-only mutations (1734.935814ms)
✔ creates private WAL store and excludes a second writer until explicit close (103.767377ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (144.104318ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (176.525629ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (212.417694ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (175.312596ms)
✔ async transactions refuse before invoking their function (122.279076ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (293.104071ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1452.91098ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (274.509987ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3526.414144ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (104.952149ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (161.983204ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (166.790959ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (140.956644ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (151.055422ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (135.31984ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (142.491707ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (102.166399ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (161.258997ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (439.775365ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7325.67344
✖ failing tests:
test at tests/threads.test.mjs:349:1
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (140.956644ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ released: true
- pending: 0,
- released: false,
- unread: 1
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:356:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { released: true },
expected: { released: false, pending: 0, unread: 1 },
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,93 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (120.208807ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (116.553478ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (137.422367ms)
✔ endLaunch leaves a claim another run took alone (166.656676ms)
✔ refuse records action.refused against the caller with the code only (122.924152ms)
✔ launches off refuses role.launch with launch-revoked until launches on (184.266438ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (276.755266ms)
✔ the assistant sends to the user and to the chief of staff only (285.878717ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (348.242026ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (338.59727ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (266.184695ms)
✔ a sender-side list alone refuses a send to a role that has no list (295.406294ms)
✔ a target-side list alone refuses a send from a role that has no list (297.379945ms)
✔ the sender list is checked before the target list (249.046503ms)
✔ roles without the field behave exactly as before (387.704144ms)
✔ a business with no role definitions at all is unlimited (267.307957ms)
✔ a malformed messaging field refuses at boot (71.649743ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (312.314989ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (318.626497ms)
✔ review requests and verdicts between roles without the field are unchanged (257.882572ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (177.944066ms)
✔ startup token refusal returns safe code without value or partial listening broker (46.844408ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (182.553323ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (181.281204ms)
✔ trusted host registers later launches; socket clients never have a registration verb (181.818865ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (44.985709ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (166.727382ms)
✔ v3b prototype refusals, views and append-only mutations (1368.331541ms)
✔ creates private WAL store and excludes a second writer until explicit close (115.756098ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (154.811503ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (182.240384ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (145.39452ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (103.423009ms)
✔ async transactions refuse before invoking their function (89.211006ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (298.307986ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1073.395761ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (296.175459ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3550.840698ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (109.497728ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (158.204537ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (160.224736ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (149.881148ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (145.110846ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (118.705866ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (135.367387ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (106.144024ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (142.238382ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (457.335794ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6966.989584
✖ failing tests:
test at tests/threads.test.mjs:349:1
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (149.881148ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
Comparison {
+ code: 'not-holder'
- code: 'run-ended'
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:373:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: not-holder
at fail (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:78:9)
at Broker.threadIdle (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:290:35)
at idle (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:351:39)
at assert.throws.code (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:373:23)
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:373:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18),
expected: { code: 'run-ended' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,99 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (119.967615ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (117.346705ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (150.737465ms)
✔ endLaunch leaves a claim another run took alone (148.537386ms)
✔ refuse records action.refused against the caller with the code only (119.825531ms)
✔ launches off refuses role.launch with launch-revoked until launches on (177.998281ms)
✖ broker process: launch ops authorize role.launch, record refusals and end runs (263.453476ms)
✔ the assistant sends to the user and to the chief of staff only (281.979899ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (329.224456ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (353.817179ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (266.090581ms)
✔ a sender-side list alone refuses a send to a role that has no list (268.502669ms)
✔ a target-side list alone refuses a send from a role that has no list (292.732942ms)
✔ the sender list is checked before the target list (243.296436ms)
✔ roles without the field behave exactly as before (368.091545ms)
✔ a business with no role definitions at all is unlimited (274.578889ms)
✔ a malformed messaging field refuses at boot (72.588978ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (297.247454ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (332.385255ms)
✔ review requests and verdicts between roles without the field are unchanged (281.352261ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (179.503577ms)
✔ startup token refusal returns safe code without value or partial listening broker (46.753431ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (183.149746ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (179.248503ms)
✔ trusted host registers later launches; socket clients never have a registration verb (169.832243ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.161737ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (232.072148ms)
✔ v3b prototype refusals, views and append-only mutations (1316.139059ms)
✔ creates private WAL store and excludes a second writer until explicit close (109.289272ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (128.404949ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (161.442239ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (152.005126ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (86.011493ms)
✔ async transactions refuse before invoking their function (83.541219ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (307.024401ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1017.048043ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (285.732099ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3598.102021ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (98.728563ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (175.658687ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (163.836017ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (146.481426ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (143.767522ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (136.697571ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (150.283987ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (104.947518ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (134.196801ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (444.786984ms)
ℹ tests 48
ℹ suites 0
ℹ pass 46
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6981.77938
✖ failing tests:
test at tests/end-launch.test.mjs:135:1
✖ broker process: launch ops authorize role.launch, record refusals and end runs (263.453476ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ error: 'launch-op-refused',
- error: 'not-holder',
ok: false
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/end-launch.test.mjs:189:10)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { ok: false, error: 'launch-op-refused' },
expected: { ok: false, error: 'not-holder' },
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/threads.test.mjs:349:1
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (146.481426ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:359:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'not-holder' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,85 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (146.782109ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (131.55276ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (154.388799ms)
✔ endLaunch leaves a claim another run took alone (157.878895ms)
✔ refuse records action.refused against the caller with the code only (134.034076ms)
✔ launches off refuses role.launch with launch-revoked until launches on (168.053033ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (308.468652ms)
✔ the assistant sends to the user and to the chief of staff only (313.059443ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (353.040571ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (333.513353ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (298.73771ms)
✔ a sender-side list alone refuses a send to a role that has no list (290.276779ms)
✔ a target-side list alone refuses a send from a role that has no list (299.558571ms)
✔ the sender list is checked before the target list (251.816016ms)
✔ roles without the field behave exactly as before (357.227508ms)
✔ a business with no role definitions at all is unlimited (263.276364ms)
✔ a malformed messaging field refuses at boot (79.40552ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (296.200836ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (329.002804ms)
✔ review requests and verdicts between roles without the field are unchanged (271.137764ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (194.98475ms)
✔ startup token refusal returns safe code without value or partial listening broker (44.48324ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (187.064042ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (170.011645ms)
✔ trusted host registers later launches; socket clients never have a registration verb (186.421623ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (43.389407ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (174.786117ms)
✔ v3b prototype refusals, views and append-only mutations (1419.931507ms)
✔ creates private WAL store and excludes a second writer until explicit close (123.521735ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (177.732725ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (178.432926ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (167.585516ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (108.032712ms)
✔ async transactions refuse before invoking their function (76.63978ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (340.16123ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1094.570902ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (302.00348ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3550.715422ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (101.196788ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (149.094114ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (154.997161ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (129.527526ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (152.496324ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (137.92629ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (150.537254ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (109.202648ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (138.657097ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (453.798822ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7030.80306
✖ failing tests:
test at tests/threads.test.mjs:349:1
✖ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (129.527526ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ released: true
- pending: 1,
- released: false,
- unread: 0
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:354:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { released: true },
expected: { released: false, pending: 1, unread: 0 },
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,93 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (137.017171ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (112.171542ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (138.953537ms)
✔ endLaunch leaves a claim another run took alone (152.349409ms)
✔ refuse records action.refused against the caller with the code only (114.059914ms)
✔ launches off refuses role.launch with launch-revoked until launches on (170.411654ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (273.341267ms)
✔ the assistant sends to the user and to the chief of staff only (292.655265ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (340.255879ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (337.664375ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (270.356908ms)
✔ a sender-side list alone refuses a send to a role that has no list (284.013524ms)
✔ a target-side list alone refuses a send from a role that has no list (284.530204ms)
✔ the sender list is checked before the target list (250.55929ms)
✔ roles without the field behave exactly as before (365.892543ms)
✔ a business with no role definitions at all is unlimited (277.285789ms)
✔ a malformed messaging field refuses at boot (70.356991ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (297.097675ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (306.640273ms)
✔ review requests and verdicts between roles without the field are unchanged (271.598806ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (177.958379ms)
✔ startup token refusal returns safe code without value or partial listening broker (42.051944ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (184.014437ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (179.753909ms)
✔ trusted host registers later launches; socket clients never have a registration verb (175.289948ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (46.177728ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (167.361474ms)
✔ v3b prototype refusals, views and append-only mutations (1355.921137ms)
✔ creates private WAL store and excludes a second writer until explicit close (107.489448ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (153.56812ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (175.731026ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (162.458828ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (98.125215ms)
✔ async transactions refuse before invoking their function (91.446732ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (306.736449ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1049.799947ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (283.965578ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3466.427572ms)
✖ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (94.376133ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (152.872525ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (162.579426ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (174.165632ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (147.345642ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (119.621738ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (134.226011ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (96.534236ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (139.534293ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (437.649688ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6831.145376
✖ failing tests:
test at tests/threads.test.mjs:273:1
✖ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (94.376133ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
Comparison {
+ code: 'storage-refused'
- code: 'thread-instance-mismatch'
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:288:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at assert.throws.code (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:288:23)
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:288:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18),
expected: { code: 'thread-instance-mismatch' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,94 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (121.053625ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (114.468446ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (150.421924ms)
✔ endLaunch leaves a claim another run took alone (167.360207ms)
✔ refuse records action.refused against the caller with the code only (124.008145ms)
✔ launches off refuses role.launch with launch-revoked until launches on (201.978673ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (268.820152ms)
✔ the assistant sends to the user and to the chief of staff only (282.411068ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (352.565925ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (358.692376ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (256.731923ms)
✔ a sender-side list alone refuses a send to a role that has no list (269.942622ms)
✔ a target-side list alone refuses a send from a role that has no list (284.49907ms)
✔ the sender list is checked before the target list (250.124353ms)
✔ roles without the field behave exactly as before (350.848118ms)
✔ a business with no role definitions at all is unlimited (274.235824ms)
✔ a malformed messaging field refuses at boot (72.988815ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (294.374591ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (325.865247ms)
✔ review requests and verdicts between roles without the field are unchanged (262.110028ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (190.631336ms)
✔ startup token refusal returns safe code without value or partial listening broker (41.586904ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (199.688585ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (173.686796ms)
✔ trusted host registers later launches; socket clients never have a registration verb (211.251343ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.350046ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (159.761905ms)
✔ v3b prototype refusals, views and append-only mutations (1373.52797ms)
✔ creates private WAL store and excludes a second writer until explicit close (101.995604ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (166.159629ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (174.374838ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (155.693704ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (119.212594ms)
✔ async transactions refuse before invoking their function (95.138189ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (303.224255ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1088.384889ms)
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (206.105009ms)
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3544.934537ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (98.913607ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (150.866094ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (166.024655ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (182.564783ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (153.504572ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (137.529196ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (152.10788ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (95.964269ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (137.532701ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (534.310149ms)
ℹ tests 48
ℹ suites 0
ℹ pass 46
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7022.947367
✖ failing tests:
test at tests/threads.test.mjs:180:1
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (206.105009ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:184:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'thread-required-reply-to-thread-message' },
operator: 'throws',
diff: 'simple'
}
test at tests/threads.test.mjs:234:1
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3544.934537ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:268:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'thread-required-reply-to-thread-message' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,90 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (120.967444ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (105.867238ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (136.750714ms)
✔ endLaunch leaves a claim another run took alone (150.945689ms)
✔ refuse records action.refused against the caller with the code only (117.915738ms)
✔ launches off refuses role.launch with launch-revoked until launches on (165.055549ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (268.853695ms)
✔ the assistant sends to the user and to the chief of staff only (269.566632ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (329.24526ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (313.484949ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (261.951173ms)
✔ a sender-side list alone refuses a send to a role that has no list (276.156429ms)
✔ a target-side list alone refuses a send from a role that has no list (277.041234ms)
✔ the sender list is checked before the target list (237.041228ms)
✔ roles without the field behave exactly as before (351.361439ms)
✔ a business with no role definitions at all is unlimited (261.332819ms)
✔ a malformed messaging field refuses at boot (66.621912ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (297.987643ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (305.941763ms)
✔ review requests and verdicts between roles without the field are unchanged (259.575325ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (204.837685ms)
✔ startup token refusal returns safe code without value or partial listening broker (51.584967ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (176.923259ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (193.810327ms)
✔ trusted host registers later launches; socket clients never have a registration verb (181.299184ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (58.288737ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (158.778807ms)
✔ v3b prototype refusals, views and append-only mutations (1295.127004ms)
✔ creates private WAL store and excludes a second writer until explicit close (110.487892ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (139.117204ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (170.557123ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (155.499929ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (89.792671ms)
✔ async transactions refuse before invoking their function (80.003308ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (282.711529ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1015.019614ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (278.446201ms)
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (298.537185ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (169.159314ms)
✖ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (228.431159ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (274.001142ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (308.783744ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (254.441312ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (226.301257ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (220.744046ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (101.620831ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (132.223232ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (465.887397ms)
ℹ tests 48
ℹ suites 0
ℹ pass 46
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4350.357831
✖ failing tests:
test at tests/threads.test.mjs:234:1
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (298.537185ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:254:20)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'storage-refused'
}
test at tests/threads.test.mjs:296:1
✖ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (228.431159ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:300:20)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'storage-refused'
}
@@ -0,0 +1,91 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (20.498437ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1254.098193ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (614.117754ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2667.147516ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (175.514262ms)
✔ a runner that stops at once ends its launch with the runner's reason (250.075714ms)
✔ a Claude Code launch with no session credential refuses before it starts (132.07527ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (213.788442ms)
✔ a runner killed from the host ends its launch as killed, not failed (283.918468ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (139.427549ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1316.487888ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (713.226095ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3679.249429ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (121.74455ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (129.719943ms)
✔ a launch client that never closes its side doesn't hold the host's close (135.861601ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1262.717669ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.264053ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20396.156723ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30336.498129ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23381.123676ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22819.351175ms)
✖ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (92.519513ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (213.871995ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (246.110213ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (91.435896ms)
ℹ tests 26
ℹ suites 0
ℹ pass 21
ℹ fail 5
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 97651.79174
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20396.156723ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:177:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
test at tests/thread-launch.test.mjs:205:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30336.498129ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:218:18)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:230:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23381.123676ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:242:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:247:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22819.351175ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:282:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:287:1
✖ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (92.519513ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ null
- 'held-by-hand'
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:295:10)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: null,
expected: 'held-by-hand',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,110 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (116.401349ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (106.748581ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (124.56355ms)
✔ endLaunch leaves a claim another run took alone (146.320422ms)
✔ refuse records action.refused against the caller with the code only (111.421244ms)
✔ launches off refuses role.launch with launch-revoked until launches on (153.501591ms)
✖ broker process: launch ops authorize role.launch, record refusals and end runs (214.251585ms)
✔ the assistant sends to the user and to the chief of staff only (257.738874ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (307.236794ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (304.162427ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (254.509612ms)
✔ a sender-side list alone refuses a send to a role that has no list (265.13526ms)
✔ a target-side list alone refuses a send from a role that has no list (279.872373ms)
✔ the sender list is checked before the target list (245.666468ms)
✔ roles without the field behave exactly as before (349.086446ms)
✔ a business with no role definitions at all is unlimited (253.994579ms)
✔ a malformed messaging field refuses at boot (70.049817ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (276.266265ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (312.221728ms)
✔ review requests and verdicts between roles without the field are unchanged (247.873734ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (177.300802ms)
✔ startup token refusal returns safe code without value or partial listening broker (50.622704ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (171.465436ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (174.643197ms)
✔ trusted host registers later launches; socket clients never have a registration verb (160.477126ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (42.285872ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (152.558822ms)
✔ v3b prototype refusals, views and append-only mutations (1234.476971ms)
✔ creates private WAL store and excludes a second writer until explicit close (97.165637ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (134.450073ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (156.923408ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (148.397791ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (85.874626ms)
✔ async transactions refuse before invoking their function (69.912234ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (259.346447ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (978.602671ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (277.727086ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3346.972528ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (92.059603ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (128.910514ms)
✖ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (135.220795ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (153.997096ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (139.152898ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (119.769258ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (137.634844ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (102.663622ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (139.904022ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (429.271734ms)
ℹ tests 48
ℹ suites 0
ℹ pass 46
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6512.068077
✖ failing tests:
test at tests/end-launch.test.mjs:135:1
✖ broker process: launch ops authorize role.launch, record refusals and end runs (214.251585ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
[
{
holder: null,
instance: 'coder',
lastClaim: null,
lastMessage: null,
+ lastOpen: null,
- lastOpen: '2026-10-15T00:00:01.000Z',
pending: 0,
thread: 'th-1',
unread: 0
}
]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/end-launch.test.mjs:184:10)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ { thread: 'th-1', instance: 'coder', pending: 0, unread: 0, lastMessage: null, lastOpen: null, lastClaim: null, holder: null } ],
expected: [ { thread: 'th-1', instance: 'coder', pending: 0, unread: 0, lastMessage: null, lastOpen: '2026-10-15T00:00:01.000Z', lastClaim: null, holder: null } ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/threads.test.mjs:324:1
✖ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (135.220795ms)
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert.ok(state()[B].lastOpen)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:344:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: null,
expected: true,
operator: '==',
diff: 'simple'
}
@@ -0,0 +1,77 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (19.081323ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1254.425884ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (627.720458ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2672.580132ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (176.926569ms)
✔ a runner that stops at once ends its launch with the runner's reason (253.194253ms)
✔ a Claude Code launch with no session credential refuses before it starts (131.125939ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (218.797103ms)
✔ a runner killed from the host ends its launch as killed, not failed (281.435705ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (135.204222ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1138.868913ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (719.901453ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3658.885313ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (118.267727ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (127.476821ms)
✔ a launch client that never closes its side doesn't hold the host's close (136.282416ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1258.796086ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.302935ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20147.511839ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20149.644246ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30105.603168ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20138.468307ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (113.480111ms)
✖ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20132.859913ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (253.764301ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (92.212623ms)
ℹ tests 26
ℹ suites 0
ℹ pass 21
ℹ fail 5
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 111214.397247
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20147.511839ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async ask (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:143:17)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:169:17)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
test at tests/thread-launch.test.mjs:205:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20149.644246ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:215:19)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:230:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30105.603168ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:240:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:247:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20138.468307ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:268:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:305:1
✖ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20132.859913ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:319:15)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
@@ -0,0 +1,91 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (127.757692ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (108.66128ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (140.228321ms)
✔ endLaunch leaves a claim another run took alone (148.360034ms)
✔ refuse records action.refused against the caller with the code only (114.319116ms)
✔ launches off refuses role.launch with launch-revoked until launches on (175.278447ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (274.153483ms)
✔ the assistant sends to the user and to the chief of staff only (267.248694ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (321.137314ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (330.132293ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (259.344705ms)
✔ a sender-side list alone refuses a send to a role that has no list (272.669421ms)
✔ a target-side list alone refuses a send from a role that has no list (281.57991ms)
✔ the sender list is checked before the target list (244.398222ms)
✔ roles without the field behave exactly as before (353.97507ms)
✔ a business with no role definitions at all is unlimited (259.823779ms)
✔ a malformed messaging field refuses at boot (69.08089ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (281.60448ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (319.905291ms)
✔ review requests and verdicts between roles without the field are unchanged (241.067878ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (165.23293ms)
✔ startup token refusal returns safe code without value or partial listening broker (48.429765ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (174.929457ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (162.773132ms)
✔ trusted host registers later launches; socket clients never have a registration verb (177.920384ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (44.963293ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (161.505373ms)
✔ v3b prototype refusals, views and append-only mutations (1297.364723ms)
✔ creates private WAL store and excludes a second writer until explicit close (106.31296ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (142.922751ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (167.532363ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (152.405048ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (105.14295ms)
✔ async transactions refuse before invoking their function (78.239514ms)
✖ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (245.882856ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1025.412833ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (275.869586ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3397.269286ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (90.492922ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (140.943305ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (146.049761ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (227.314894ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (148.036512ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (133.224772ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (145.965003ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (106.101475ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (148.882144ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (418.608905ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6722.157879
✖ failing tests:
test at tests/threads.test.mjs:80:1
✖ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (245.882856ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
Comparison {
+ code: 'storage-refused'
- code: 'thread-already-held'
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:83:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.start (node:internal/test_runner/test:1262:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at claim (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:55:27)
at assert.throws.code (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:83:23)
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:83:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25),
expected: { code: 'thread-already-held' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,76 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (112.926297ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (105.208225ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (144.357608ms)
✔ endLaunch leaves a claim another run took alone (159.930255ms)
✔ refuse records action.refused against the caller with the code only (119.120736ms)
✔ launches off refuses role.launch with launch-revoked until launches on (168.254725ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (270.953448ms)
✔ the assistant sends to the user and to the chief of staff only (263.055596ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (337.890879ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (325.864646ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (261.226419ms)
✔ a sender-side list alone refuses a send to a role that has no list (270.180687ms)
✔ a target-side list alone refuses a send from a role that has no list (272.445838ms)
✔ the sender list is checked before the target list (243.124077ms)
✔ roles without the field behave exactly as before (367.565873ms)
✔ a business with no role definitions at all is unlimited (259.32052ms)
✔ a malformed messaging field refuses at boot (68.751616ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (293.358099ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (320.105184ms)
✔ review requests and verdicts between roles without the field are unchanged (271.493722ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (164.251904ms)
✔ startup token refusal returns safe code without value or partial listening broker (46.304915ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (181.608022ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (181.643802ms)
✔ trusted host registers later launches; socket clients never have a registration verb (172.456716ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.552551ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (161.145422ms)
✔ v3b prototype refusals, views and append-only mutations (1319.215319ms)
✔ creates private WAL store and excludes a second writer until explicit close (117.904705ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (142.245111ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (155.790621ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (154.452972ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (97.673445ms)
✔ async transactions refuse before invoking their function (92.269012ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (284.415396ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1053.488514ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (260.171367ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3509.84915ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (100.720346ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (154.199214ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (157.004775ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (185.729507ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (153.364571ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (125.594094ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (159.588918ms)
✖ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (108.270474ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (152.845328ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (451.960875ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6925.722295
✖ failing tests:
test at tests/threads.test.mjs:448:1
✖ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (108.270474ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:456:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'thread-instance-ambiguous' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,93 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (137.543464ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (120.021986ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (132.064669ms)
✔ endLaunch leaves a claim another run took alone (149.734298ms)
✔ refuse records action.refused against the caller with the code only (114.156207ms)
✔ launches off refuses role.launch with launch-revoked until launches on (168.024242ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (276.070988ms)
✔ the assistant sends to the user and to the chief of staff only (298.053177ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (323.194154ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (331.466225ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (263.555445ms)
✔ a sender-side list alone refuses a send to a role that has no list (273.697771ms)
✔ a target-side list alone refuses a send from a role that has no list (260.0868ms)
✔ the sender list is checked before the target list (233.488961ms)
✔ roles without the field behave exactly as before (337.103087ms)
✔ a business with no role definitions at all is unlimited (257.194553ms)
✔ a malformed messaging field refuses at boot (72.51818ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (272.815077ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (314.644543ms)
✔ review requests and verdicts between roles without the field are unchanged (254.089198ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (191.190101ms)
✔ startup token refusal returns safe code without value or partial listening broker (44.149945ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (183.344282ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (183.817244ms)
✔ trusted host registers later launches; socket clients never have a registration verb (179.835692ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.374223ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (175.407528ms)
✔ v3b prototype refusals, views and append-only mutations (1334.201835ms)
✔ creates private WAL store and excludes a second writer until explicit close (123.339327ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (154.425884ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (163.025591ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (157.316868ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (96.02537ms)
✔ async transactions refuse before invoking their function (84.013085ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (302.687573ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1027.154215ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (263.303041ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3369.40474ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (99.388113ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (151.976851ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (147.334952ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (176.886747ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (150.443584ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (131.384531ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (146.34654ms)
✖ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (48.868209ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (139.267115ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (460.451661ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6684.568044
✖ failing tests:
test at tests/threads.test.mjs:448:1
✖ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (48.868209ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
Comparison {
+ code: 'storage-refused'
- code: 'thread-instance-missing'
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:452:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at Object.call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at assert.throws.code (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:452:25)
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:452:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18),
expected: { code: 'thread-instance-missing' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,76 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (131.755638ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (122.024944ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (147.560696ms)
✔ endLaunch leaves a claim another run took alone (157.867991ms)
✔ refuse records action.refused against the caller with the code only (109.438753ms)
✔ launches off refuses role.launch with launch-revoked until launches on (172.85012ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (298.870681ms)
✔ the assistant sends to the user and to the chief of staff only (299.091822ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (335.191954ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (310.629319ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (273.957822ms)
✔ a sender-side list alone refuses a send to a role that has no list (281.030622ms)
✔ a target-side list alone refuses a send from a role that has no list (286.782914ms)
✔ the sender list is checked before the target list (243.379009ms)
✔ roles without the field behave exactly as before (352.890766ms)
✔ a business with no role definitions at all is unlimited (267.145775ms)
✔ a malformed messaging field refuses at boot (76.505208ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (288.757795ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (333.498646ms)
✔ review requests and verdicts between roles without the field are unchanged (278.243128ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (183.799294ms)
✔ startup token refusal returns safe code without value or partial listening broker (45.751734ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (188.844005ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (168.447625ms)
✔ trusted host registers later launches; socket clients never have a registration verb (171.401513ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (43.871584ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (166.098536ms)
✔ v3b prototype refusals, views and append-only mutations (1358.360152ms)
✔ creates private WAL store and excludes a second writer until explicit close (122.217689ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (156.968558ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (187.009234ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (156.671666ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (87.727744ms)
✔ async transactions refuse before invoking their function (81.053874ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (318.607498ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1058.405585ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (284.238905ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3538.978245ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (111.345053ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (169.222512ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (163.885435ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (179.517727ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (147.894009ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (120.915163ms)
✖ REQ-USER-2: the human verbs refuse another owner's thread (117.533054ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (105.108241ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (137.562518ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (447.363466ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6968.262371
✖ failing tests:
test at tests/threads.test.mjs:419:1
✖ REQ-USER-2: the human verbs refuse another owner's thread (117.533054ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: thread.open
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:437:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'thread-not-owned' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,76 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (113.980007ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (113.531634ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (131.351718ms)
✔ endLaunch leaves a claim another run took alone (155.697776ms)
✔ refuse records action.refused against the caller with the code only (110.772168ms)
✔ launches off refuses role.launch with launch-revoked until launches on (169.967578ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (274.073697ms)
✔ the assistant sends to the user and to the chief of staff only (272.78526ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (324.420683ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (327.82366ms)
✖ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (259.3545ms)
✔ a sender-side list alone refuses a send to a role that has no list (285.435859ms)
✔ a target-side list alone refuses a send from a role that has no list (303.886853ms)
✔ the sender list is checked before the target list (244.776735ms)
✔ roles without the field behave exactly as before (357.442815ms)
✔ a business with no role definitions at all is unlimited (249.555059ms)
✔ a malformed messaging field refuses at boot (73.722887ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (281.488862ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (306.779439ms)
✔ review requests and verdicts between roles without the field are unchanged (247.964914ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (178.095554ms)
✔ startup token refusal returns safe code without value or partial listening broker (43.780888ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (175.677207ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (168.77935ms)
✔ trusted host registers later launches; socket clients never have a registration verb (154.114226ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (44.318994ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (168.618636ms)
✔ v3b prototype refusals, views and append-only mutations (1317.818177ms)
✔ creates private WAL store and excludes a second writer until explicit close (96.032379ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (151.096059ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (158.76244ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (147.026972ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (93.850533ms)
✔ async transactions refuse before invoking their function (80.496835ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (276.056803ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1038.153735ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (279.758301ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3473.776572ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (101.312724ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (153.71855ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (156.114715ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (184.520389ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (156.181117ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (135.010064ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (152.820556ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (116.686299ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (148.075833ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (485.027594ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6923.744211
✖ failing tests:
test at tests/messaging.test.mjs:143:1
✖ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (259.3545ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:149:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: { code: 'message-sender-refused' },
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,84 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (130.232626ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (129.374833ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (137.79509ms)
✔ endLaunch leaves a claim another run took alone (215.053836ms)
✔ refuse records action.refused against the caller with the code only (143.287853ms)
✔ launches off refuses role.launch with launch-revoked until launches on (172.459123ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (355.644454ms)
✔ the assistant sends to the user and to the chief of staff only (299.856767ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (418.501468ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (391.542449ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (277.276879ms)
✔ a sender-side list alone refuses a send to a role that has no list (275.76414ms)
✔ a target-side list alone refuses a send from a role that has no list (288.772372ms)
✔ the sender list is checked before the target list (290.090815ms)
✔ roles without the field behave exactly as before (491.401381ms)
✔ a business with no role definitions at all is unlimited (348.42327ms)
✔ a malformed messaging field refuses at boot (72.389535ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (295.130796ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (313.944503ms)
✔ review requests and verdicts between roles without the field are unchanged (270.90695ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (182.916052ms)
✔ startup token refusal returns safe code without value or partial listening broker (46.666962ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (159.444565ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (200.583643ms)
✔ trusted host registers later launches; socket clients never have a registration verb (190.548964ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (49.574604ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (188.339913ms)
✔ v3b prototype refusals, views and append-only mutations (1502.165458ms)
✔ creates private WAL store and excludes a second writer until explicit close (112.373873ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (167.513103ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (168.874609ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (237.403105ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (102.945956ms)
✔ async transactions refuse before invoking their function (80.996278ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (319.908816ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1193.408392ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (278.138536ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3747.609441ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (99.266929ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (147.909665ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (146.484267ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (144.503134ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (133.291046ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (124.852608ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (143.179177ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (97.641133ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (141.330952ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (454.9267ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7240.508167
✖ failing tests:
test at tests/threads.test.mjs:381:1
✖ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (133.291046ms)
AssertionError [ERR_ASSERTION]: nor for the next holder
+ actual - expected
[
0,
+ 1
- 0
]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:390:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: [ 0, 1 ],
expected: [ 0, 0 ],
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,85 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (128.033258ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (117.695565ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (132.557212ms)
✔ endLaunch leaves a claim another run took alone (151.356136ms)
✔ refuse records action.refused against the caller with the code only (117.984405ms)
✔ launches off refuses role.launch with launch-revoked until launches on (166.812155ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (285.860523ms)
✔ the assistant sends to the user and to the chief of staff only (287.629203ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (332.698676ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (330.225416ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (259.532726ms)
✔ a sender-side list alone refuses a send to a role that has no list (278.006ms)
✔ a target-side list alone refuses a send from a role that has no list (288.974902ms)
✔ the sender list is checked before the target list (254.305506ms)
✔ roles without the field behave exactly as before (358.173293ms)
✔ a business with no role definitions at all is unlimited (271.675851ms)
✔ a malformed messaging field refuses at boot (75.214089ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (298.404829ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (321.986563ms)
✔ review requests and verdicts between roles without the field are unchanged (276.718308ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (183.495638ms)
✔ startup token refusal returns safe code without value or partial listening broker (44.361957ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (181.466451ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (180.578693ms)
✔ trusted host registers later launches; socket clients never have a registration verb (183.850446ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (44.016522ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (166.406737ms)
✔ v3b prototype refusals, views and append-only mutations (1331.277024ms)
✔ creates private WAL store and excludes a second writer until explicit close (108.573791ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (148.7767ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (162.209695ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (155.31313ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (97.102397ms)
✔ async transactions refuse before invoking their function (78.322776ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (298.982408ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1050.137402ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (273.646398ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3521.672674ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (92.46935ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (128.253421ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (140.971526ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (161.08653ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (125.60652ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (124.69317ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (147.912709ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (103.270595ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (142.155235ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (444.388118ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6823.189549
✖ failing tests:
test at tests/threads.test.mjs:381:1
✖ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (125.60652ms)
AssertionError [ERR_ASSERTION]: nothing counts with no holder
+ actual - expected
[
0,
+ 1,
- 0,
null
]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:387:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: [ 0, 1, null ],
expected: [ 0, 0, null ],
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,119 @@
✔ config directory and file path follow MOSAIC_CONFIG (1.056859ms)
✖ the fixture business validates and comes back frozen (4.269509ms)
✔ two instances may share a definition (1.105761ms)
✔ top-level refusals (2.980007ms)
✔ arbiters and projects (4.009256ms)
✔ role instances (2.202509ms)
✔ Vikunja bots (4.632262ms)
✔ a role without Vikunja takes no tracker block (1.780499ms)
✔ credential references match the definition's services (2.016034ms)
✔ launch (6.599262ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (0.665538ms)
✔ loadBusiness: file checks (1.506241ms)
✔ loadBusiness: not a regular file (35.844796ms)
✔ loading writes nothing (1.034054ms)
✔ names that are Object.prototype properties don't count as declared (2.826351ms)
✔ the shipped example refuses as written and validates once filled in (0.71711ms)
✖ the role file loads and resolves through loadBusiness (5.556096ms)
✔ the shipped file is exactly the approved list (0.197751ms)
✔ the resolved record matches the approved list, so a widened file fails (1.220695ms)
✔ the chief of staff holds role.launch, message.send, role.end and organization.change; every other action is gated (1.018961ms)
✔ the pm does not hold role.launch (1.130327ms)
✔ a business grant of a gated action through limits does not widen the role (1.246318ms)
✔ a limit that drops role.launch leaves the chief of staff with no launch block (0.840131ms)
✔ a launch block whose by is the pm instance is refused (0.946067ms)
✔ the contract names no duty to talk to the human and the pm contract no launch (0.307361ms)
✔ the instance takes no credential references and no tracker (1.402198ms)
ℹ tests 26
ℹ suites 0
ℹ pass 23
ℹ fail 3
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 121.890151
✖ failing tests:
test at tests/business.test.mjs:35:1
✖ the fixture business validates and comes back frozen (4.269509ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines
{
by: 'chief',
instances: [
'coder',
'reviewer'
...
},
+ threadIdleSeconds: 60
- threadIdleSeconds: 900
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/business/tests/business.test.mjs:43:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { by: 'chief', instances: [ 'coder', 'reviewer' ], models: { 'claude-opus-5-5': [Object], 'claude-sonnet-5-5': [Object], 'glm-5.3-flash': [Object] }, limits: { models: [Object] }, threadIdleSeconds: 60 },
expected: { by: 'chief', instances: [ 'coder', 'reviewer' ], models: { 'claude-opus-5-5': [Object], 'claude-sonnet-5-5': [Object], 'glm-5.3-flash': [Object] }, limits: { models: [Object] }, threadIdleSeconds: 900 },
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/business.test.mjs:141:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (0.665538ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
60 !== 900
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/business/tests/business.test.mjs:143:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 60,
expected: 900,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/chief-of-staff.test.mjs:50:1
✖ the role file loads and resolves through loadBusiness (5.556096ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines
{
by: 'chief',
instances: [
'coder',
'reviewer'
...
},
+ threadIdleSeconds: 60
- threadIdleSeconds: 900
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/business/tests/chief-of-staff.test.mjs:62:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.start (node:internal/test_runner/test:1262:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { by: 'chief', instances: [ 'coder', 'reviewer' ], models: { 'claude-opus-5-5': [Object], 'claude-sonnet-5-5': [Object], 'glm-5.3-flash': [Object] }, limits: { models: [Object] }, threadIdleSeconds: 60 },
expected: { by: 'chief', instances: [ 'coder', 'reviewer' ], models: { 'claude-opus-5-5': [Object], 'claude-sonnet-5-5': [Object], 'glm-5.3-flash': [Object] }, limits: { models: [Object] }, threadIdleSeconds: 900 },
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,54 @@
✔ config directory and file path follow MOSAIC_CONFIG (1.021614ms)
✔ the fixture business validates and comes back frozen (3.336622ms)
✔ two instances may share a definition (1.0953ms)
✔ top-level refusals (3.01535ms)
✔ arbiters and projects (3.937634ms)
✔ role instances (2.064038ms)
✔ Vikunja bots (4.760916ms)
✔ a role without Vikunja takes no tracker block (1.784048ms)
✔ credential references match the definition's services (2.011639ms)
✔ launch (6.58568ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (1.68367ms)
✔ loadBusiness: file checks (1.528729ms)
✔ loadBusiness: not a regular file (35.306458ms)
✔ loading writes nothing (1.009122ms)
✔ names that are Object.prototype properties don't count as declared (2.765573ms)
✔ the shipped example refuses as written and validates once filled in (0.720132ms)
✔ the role file loads and resolves through loadBusiness (4.656521ms)
✔ the shipped file is exactly the approved list (0.155185ms)
✔ the resolved record matches the approved list, so a widened file fails (1.235903ms)
✔ the chief of staff holds role.launch, message.send, role.end and organization.change; every other action is gated (0.974643ms)
✔ the pm does not hold role.launch (1.075994ms)
✔ a business grant of a gated action through limits does not widen the role (1.245778ms)
✔ a limit that drops role.launch leaves the chief of staff with no launch block (0.855423ms)
✔ a launch block whose by is the pm instance is refused (0.956984ms)
✔ the contract names no duty to talk to the human and the pm contract no launch (0.24658ms)
✔ the instance takes no credential references and no tracker (1.428638ms)
ℹ tests 26
ℹ suites 0
ℹ pass 25
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 125.702379
✖ failing tests:
test at tests/business.test.mjs:141:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 launch.threadIdleSeconds: absent is the default, a positive integer is used, anything else refuses (1.68367ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at refuses (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/business/tests/business.test.mjs:12:10)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/business/tests/business.test.mjs:146:5)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,65 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (17.884364ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1243.370237ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (546.322659ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2657.109036ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (177.759493ms)
✔ a runner that stops at once ends its launch with the runner's reason (249.653421ms)
✔ a Claude Code launch with no session credential refuses before it starts (133.328733ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (218.263567ms)
✔ a runner killed from the host ends its launch as killed, not failed (285.125349ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (177.07574ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1204.9342ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (723.24063ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3670.398795ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (127.617436ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (129.842022ms)
✔ a launch client that never closes its side doesn't hold the host's close (162.531501ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1290.870253ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.382202ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (5561.360073ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1687.041399ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4417.218677ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2889.446008ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (97.595301ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (206.864177ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (276.530503ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (95.728574ms)
ℹ tests 26
ℹ suites 0
ℹ pass 25
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 15309.530012
✖ failing tests:
test at tests/thread-launch.test.mjs:331:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (276.530503ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines
[
[
'../evil',
'assistant',
'thread-store-refused'
...
'coder',
+ 'launch-failed'
- 'thread-not-allowed'
]
]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:348:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ [ '../evil', 'assistant', 'thread-store-refused' ], [ 'coder-thread', 'coder', 'launch-failed' ] ],
expected: [ [ '../evil', 'assistant', 'thread-store-refused' ], [ 'coder-thread', 'coder', 'thread-not-allowed' ] ],
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,59 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (20.552143ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1245.04804ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (543.416239ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2653.92654ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (176.324003ms)
✔ a runner that stops at once ends its launch with the runner's reason (252.391683ms)
✔ a Claude Code launch with no session credential refuses before it starts (125.731888ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (219.235392ms)
✔ a runner killed from the host ends its launch as killed, not failed (283.880101ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (182.170734ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1127.20817ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (737.423677ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3659.321435ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (118.2841ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (133.372021ms)
✔ a launch client that never closes its side doesn't hold the host's close (173.736255ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1276.972234ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.080299ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (5533.568266ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1652.7081ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4323.226117ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2893.266938ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (98.868609ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (203.20439ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (246.175922ms)
✖ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (144.95075ms)
ℹ tests 26
ℹ suites 0
ℹ pass 25
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 15173.768286
✖ failing tests:
test at tests/thread-launch.test.mjs:360:1
✖ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (144.95075ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ error: 'launch-failed',
- error: 'thread-required',
ok: false
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:366:10)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { ok: false, error: 'launch-failed' },
expected: { ok: false, error: 'thread-required' },
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,71 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (19.542763ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1263.810766ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (540.67326ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2683.768297ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (174.60652ms)
✔ a runner that stops at once ends its launch with the runner's reason (254.758246ms)
✔ a Claude Code launch with no session credential refuses before it starts (135.255277ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (215.004947ms)
✔ a runner killed from the host ends its launch as killed, not failed (284.043387ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (138.923693ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1241.126021ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (726.715419ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3673.793017ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (123.800597ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (136.709209ms)
✔ a launch client that never closes its side doesn't hold the host's close (136.277384ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1266.8451ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.202111ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20400.239243ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30316.712628ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23395.007646ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22863.61698ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (110.294988ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (205.495009ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (239.357038ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (96.273503ms)
ℹ tests 26
ℹ suites 0
ℹ pass 22
ℹ fail 4
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 97709.004307
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20400.239243ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:177:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
test at tests/thread-launch.test.mjs:205:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30316.712628ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:218:18)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:230:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23395.007646ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:242:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:247:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22863.61698ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:282:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
@@ -0,0 +1,75 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (21.320517ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1254.028091ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (555.658882ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2650.136717ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (176.683929ms)
✔ a runner that stops at once ends its launch with the runner's reason (248.967744ms)
✔ a Claude Code launch with no session credential refuses before it starts (129.083751ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (213.965099ms)
✔ a runner killed from the host ends its launch as killed, not failed (280.766536ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (158.646894ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1115.426441ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (728.751401ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3678.630286ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (118.654895ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (134.56939ms)
✔ a launch client that never closes its side doesn't hold the host's close (135.991732ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1264.620193ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.377182ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (5523.451754ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1673.908001ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (1324.570675ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (1485.453879ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (94.63376ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (200.00109ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (234.456081ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (114.443185ms)
ℹ tests 26
ℹ suites 0
ℹ pass 24
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 12940.7183
✖ failing tests:
test at tests/thread-launch.test.mjs:230:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (1324.570675ms)
AssertionError [ERR_ASSERTION]: [{"at":"2026-10-15T18:48:30.146Z","event":"launch","instance":"assistant","thread":"2c632c47-0428-4c8f-a294-af07f397259d","run":"rfaf50c3e4362","launchedBy":"jason","harness":"pi","model":"claude-sonnet-5-5","provider":"zai","modelKey":"claude-sonnet-5-5","pid":3161776,"runnerPid":3161777,"manifest":"/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-thread-hxYhal/data/launches/acme/rfaf50c3e4362/bundle/manifest.json"},{"at":"2026-10-15T18:48:31.199Z","event":"thread-idle","instance":"assistant","thread":"2c632c47-0428-4c8f-a294-af07f397259d","run":"rfaf50c3e4362"},{"at":"2026-10-15T18:48:31.234Z","event":"end","instance":"assistant","thread":"2c632c47-0428-4c8f-a294-af07f397259d","run":"rfaf50c3e4362","reason":"stopped","exitCode":0,"signal":null}]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:241:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: true,
operator: '==',
diff: 'simple'
}
test at tests/thread-launch.test.mjs:247:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (1485.453879ms)
AssertionError [ERR_ASSERTION]: [{"at":"2026-10-15T18:48:31.372Z","event":"launch","instance":"assistant","thread":"f78479b7-3288-4257-ba2e-746996c0ac26","run":"r9debde4eff78","launchedBy":"jason","harness":"pi","model":"claude-sonnet-5-5","provider":"zai","modelKey":"claude-sonnet-5-5","pid":3161970,"runnerPid":3161971,"manifest":"/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-thread-xXoAJz/data/launches/acme/r9debde4eff78/bundle/manifest.json"},{"at":"2026-10-15T18:48:32.687Z","event":"thread-idle","instance":"assistant","thread":"f78479b7-3288-4257-ba2e-746996c0ac26","run":"r9debde4eff78"}]
+ actual - expected
+ {
+ at: '2026-10-15T18:48:32.687Z',
+ event: 'thread-idle',
+ instance: 'assistant',
+ run: 'r9debde4eff78',
+ thread: 'f78479b7-3288-4257-ba2e-746996c0ac26'
+ }
- undefined
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:276:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: { at: '2026-10-15T18:48:32.687Z', event: 'thread-idle', instance: 'assistant', thread: 'f78479b7-3288-4257-ba2e-746996c0ac26', run: 'r9debde4eff78' },
expected: undefined,
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,71 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (20.942664ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1258.675977ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (529.03319ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2671.907307ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (174.127347ms)
✔ a runner that stops at once ends its launch with the runner's reason (252.969804ms)
✔ a Claude Code launch with no session credential refuses before it starts (133.755144ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (220.687993ms)
✔ a runner killed from the host ends its launch as killed, not failed (280.190852ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (147.101282ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1082.674559ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (723.965034ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3728.760024ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (137.351167ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (153.882193ms)
✔ a launch client that never closes its side doesn't hold the host's close (172.169864ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1283.015629ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.273694ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20377.230695ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30327.121427ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23394.30645ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22898.592909ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (102.13865ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (198.655817ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (240.354883ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (84.249769ms)
ℹ tests 26
ℹ suites 0
ℹ pass 22
ℹ fail 4
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 97701.91556
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20377.230695ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:177:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
test at tests/thread-launch.test.mjs:205:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (30327.121427ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:218:18)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:230:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (23394.30645ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:242:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:247:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (22898.592909ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async idleStop (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:151:3)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:282:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
@@ -0,0 +1,85 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (20.572141ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1262.686552ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (538.77507ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2672.296471ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (165.954036ms)
✔ a runner that stops at once ends its launch with the runner's reason (249.283758ms)
✔ a Claude Code launch with no session credential refuses before it starts (133.698227ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (211.821899ms)
✔ a runner killed from the host ends its launch as killed, not failed (282.760527ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (138.589765ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1140.30167ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (728.216673ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3673.601366ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (121.85967ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (134.910924ms)
✔ a launch client that never closes its side doesn't hold the host's close (138.151894ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1271.839893ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.382017ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20155.033615ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20129.702257ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30097.30523ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20139.814977ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (104.189541ms)
✖ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20137.319955ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20127.162334ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (100.059656ms)
ℹ tests 26
ℹ suites 0
ℹ pass 20
ℹ fail 6
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 131068.011627
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (20155.033615ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async ask (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:143:17)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:169:17)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
test at tests/thread-launch.test.mjs:205:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (20129.702257ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:215:19)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:230:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (30097.30523ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:240:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:247:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (20139.814977ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:268:3)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:305:1
✖ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (20137.319955ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:319:15)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
test at tests/thread-launch.test.mjs:331:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20127.162334ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:344:20)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
@@ -0,0 +1,53 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (23.419126ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1260.217307ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (548.60319ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2656.545385ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (170.070931ms)
✔ a runner that stops at once ends its launch with the runner's reason (242.724947ms)
✔ a Claude Code launch with no session credential refuses before it starts (140.119999ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (215.728384ms)
✔ a runner killed from the host ends its launch as killed, not failed (279.994172ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (142.230492ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1153.405196ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (716.580434ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3665.738386ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (122.000669ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (131.306682ms)
✔ a launch client that never closes its side doesn't hold the host's close (148.918518ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1282.9246ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.279602ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (5509.203109ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1654.10209ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4418.750526ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2898.51534ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (95.698756ms)
✖ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (297.339904ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (239.978393ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (106.623824ms)
ℹ tests 26
ℹ suites 0
ℹ pass 25
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 15300.415637
✖ failing tests:
test at tests/thread-launch.test.mjs:305:1
✖ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (297.339904ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
2 !== 1
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:325:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 2,
expected: 1,
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,87 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (19.485438ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1257.396018ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (523.829495ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2688.309743ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (180.818774ms)
✔ a runner that stops at once ends its launch with the runner's reason (333.882104ms)
✔ a Claude Code launch with no session credential refuses before it starts (136.051316ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (219.993669ms)
✔ a runner killed from the host ends its launch as killed, not failed (284.009059ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (139.894443ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1271.540148ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (787.597401ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3706.446536ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (117.96067ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (126.009718ms)
✔ a launch client that never closes its side doesn't hold the host's close (135.59954ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1294.899596ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.444256ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (368.195445ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1652.305203ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4404.926017ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2896.089426ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (94.845117ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (202.051364ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (265.840523ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (86.740854ms)
ℹ tests 26
ℹ suites 0
ℹ pass 24
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 13302.213036
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (368.195445ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
before: [],
body: 'first for A',
+ transcripts: null
- transcripts: []
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:170:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { body: 'first for A', before: [], transcripts: null },
expected: { body: 'first for A', before: [], transcripts: [] },
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/thread-launch.test.mjs:331:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (265.840523ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
[
[
'../evil',
'assistant',
+ 'launch-failed'
- 'thread-store-refused'
],
[
'coder-thread',
'coder',
'thread-not-allowed'
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:348:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ [ '../evil', 'assistant', 'launch-failed' ], [ 'coder-thread', 'coder', 'thread-not-allowed' ] ],
expected: [ [ '../evil', 'assistant', 'thread-store-refused' ], [ 'coder-thread', 'coder', 'thread-not-allowed' ] ],
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,52 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (23.073689ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1259.857219ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (547.844685ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2650.38954ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (179.964441ms)
✔ a runner that stops at once ends its launch with the runner's reason (247.550545ms)
✔ a Claude Code launch with no session credential refuses before it starts (130.822694ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (219.733957ms)
✔ a runner killed from the host ends its launch as killed, not failed (280.31453ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (137.976201ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1225.230116ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (757.670451ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3695.308471ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (119.687862ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (132.034373ms)
✔ a launch client that never closes its side doesn't hold the host's close (133.978117ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1263.403511ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.309118ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (24312.210203ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1666.110429ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4331.681788ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2862.637858ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (97.158599ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (206.295351ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20156.627506ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (103.517285ms)
ℹ tests 26
ℹ suites 0
ℹ pass 24
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 53814.631079
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (24312.210203ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:201:18)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3)
test at tests/thread-launch.test.mjs:331:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (20156.627506ms)
Error: timed out waiting
at until (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:41:9)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:344:20)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
@@ -0,0 +1,70 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (19.276793ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1255.836414ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (631.360328ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2661.324178ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (175.111254ms)
✔ a runner that stops at once ends its launch with the runner's reason (252.162456ms)
✔ a Claude Code launch with no session credential refuses before it starts (135.996173ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (214.59986ms)
✔ a runner killed from the host ends its launch as killed, not failed (282.327545ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (151.189115ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1294.71887ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (724.542043ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3667.582822ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (151.437927ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (142.776918ms)
✔ a launch client that never closes its side doesn't hold the host's close (140.791033ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1270.253135ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.370228ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (5523.851313ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1658.987616ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4321.573601ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2915.876853ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (97.918614ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (205.622958ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (230.288593ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (89.745754ms)
ℹ tests 26
ℹ suites 0
ℹ pass 24
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 15120.173078
✖ failing tests:
test at tests/thread-launch.test.mjs:205:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1658.987616ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
13 !== 1
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:226:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 13,
expected: 1,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/thread-launch.test.mjs:331:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (230.288593ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
8 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:352:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 8,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,49 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (19.47374ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1254.209138ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (620.922979ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2703.370359ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (174.39038ms)
✔ a runner that stops at once ends its launch with the runner's reason (252.344662ms)
✔ a Claude Code launch with no session credential refuses before it starts (129.253276ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (217.515244ms)
✔ a runner killed from the host ends its launch as killed, not failed (282.31368ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (141.587816ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1113.41892ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (714.349852ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3682.747037ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (121.047583ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (134.803778ms)
✔ a launch client that never closes its side doesn't hold the host's close (137.315582ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1261.642205ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.307684ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (347.571432ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1655.672285ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4419.995044ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2866.501012ms)
✔ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (100.55791ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (218.216596ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (238.741546ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (94.130597ms)
ℹ tests 26
ℹ suites 0
ℹ pass 25
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 13036.045775
✖ failing tests:
test at tests/thread-launch.test.mjs:157:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (347.571432ms)
Error: ENOENT: no such file or directory, open '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-thread-xZBi6v/data/threads/acme/828847e4-693c-49e9-bdc6-e01648cd6506/session/history'
at readFileSync (node:fs:621:20)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:174:16)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-thread-xZBi6v/data/threads/acme/828847e4-693c-49e9-bdc6-e01648cd6506/session/history'
}
@@ -0,0 +1,74 @@
✔ each launch rereads limits and model selections; lowered limits keep sessions and log exact hit (19.555924ms)
✔ bus start --pm: the launcher instance (the chief of staff) runs under its own PID namespace, registered, with a manifest (1259.862431ms)
✔ the chief of staff launches a coder through its launch tool; the coder answers; refusals name their code (544.976378ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or fetched and logged (2747.072771ms)
✔ a project clone that can't be made refuses checkout-failed, from --chief and from a session, with no run and no clone left (170.832253ms)
✔ a runner that stops at once ends its launch with the runner's reason (250.896723ms)
✔ a Claude Code launch with no session credential refuses before it starts (135.491271ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (217.468808ms)
✔ a runner killed from the host ends its launch as killed, not failed (278.670567ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (145.715974ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1086.767265ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (706.776801ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3687.674146ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (122.392931ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (128.722183ms)
✔ a launch client that never closes its side doesn't hold the host's close (164.063309ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1275.169387ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.096329ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 REQ-MSG-1 a thread message starts the thread's session, which stops when idle; its history survives the stop and a restart and no other thread sees it (5539.709697ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a running thread counts against its model's limit and an idle-stopped one doesn't (1634.619225ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a turn longer than the idle time isn't stopped, and the thread idles out after it (4416.235557ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a message sent after the idle snapshot keeps the session, which answers it (2906.373886ms)
✖ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (189.301382ms)
✔ REQ-LAUNCH-1 a run that ends without taking its thread's message isn't started again for that message (203.591894ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 a thread id that isn't a safe segment, or a thread of a non-thread instance, launches nothing (239.394772ms)
✔ REQ-THREAD-1 REQ-LAUNCH-1 the chief can't launch the assistant outside a thread (101.042644ms)
ℹ tests 26
ℹ suites 0
ℹ pass 25
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 15309.655936
✖ failing tests:
test at tests/thread-launch.test.mjs:287:1
✖ REQ-ROLE-2 REQ-LAUNCH-1 a thread held by a run the launcher didn't start gets no second session (189.301382ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ [
+ {
+ business: 'acme',
+ harness: 'pi',
+ instance: 'assistant',
+ launchedBy: 'jason',
+ live: true,
+ model: 'claude-sonnet-5-5',
+ modelKey: 'claude-sonnet-5-5',
+ pid: 3146570,
+ provider: 'zai',
+ run: 'rb3ea26037e9b',
+ runDir: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-thread-kCYD9e/data/launches/acme/rb3ea26037e9b',
+ runnerPid: 3146571,
+ runnerStartTime: '19119781',
+ startTime: '19119781',
+ startedAt: '2026-10-15T18:46:47.621Z',
+ thread: '38f4fbe5-2fd3-49a2-be43-268f34375194'
+ }
+ ]
- []
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/cli/tests/thread-launch.test.mjs:298:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ { business: 'acme', instance: 'assistant', thread: '38f4fbe5-2fd3-49a2-be43-268f34375194', run: 'rb3ea26037e9b', launchedBy: 'jason', harness: 'pi', model: 'claude-sonnet-5-5', provider: 'zai', modelKey: 'claude-sonnet-5-5', pid: 3146570, startTime: '19119781', runnerPid: 3146571, runnerStartTime: '19119781', runDir: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-thread-kCYD9e/data/launches/acme/rb3ea26037e9b', startedAt: '2026-10-15T18:46:47.621Z', live: true } ],
expected: [],
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,54 @@
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (204.258376ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (302.32568ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (204.971539ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (209.085165ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (230.209141ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (266.841066ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (304.56567ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (219.371918ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (294.394219ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (291.581179ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (292.882067ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (394.628305ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (706.990986ms)
✔ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (726.848555ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1418.073592ms)
✔ named migration registry chains 3b through 3e to a fixture-only future version in order (696.290471ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (611.501639ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (641.24678ms)
✔ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (854.690649ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (751.222838ms)
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (835.362783ms)
ℹ tests 21
ℹ suites 0
ℹ pass 20
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4150.020861
✖ failing tests:
test at tests/thread-migration.test.mjs:153:1
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (835.362783ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'bus schema 3e ready\n'
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'bus schema 3e ready\n'
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:158:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'bus schema 3e ready\n',
expected: 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,78 @@
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (215.463803ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (292.424941ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (199.547256ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (186.385635ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (238.235308ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (259.866001ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (257.77188ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (211.03273ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (282.579257ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (286.940412ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (345.594156ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (415.499536ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (751.98378ms)
✔ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (729.972744ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1356.422638ms)
✔ named migration registry chains 3b through 3e to a fixture-only future version in order (736.175944ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (605.03527ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (675.937166ms)
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (751.543972ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (754.450007ms)
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (805.392503ms)
ℹ tests 21
ℹ suites 0
ℹ pass 19
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4158.230913
✖ failing tests:
test at tests/thread-migration.test.mjs:90:1
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (751.543972ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
[
+ 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
- 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send'
]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:102:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send' ],
expected: [ 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send' ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/thread-migration.test.mjs:153:1
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (805.392503ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'bus schema 3e ready\n'
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:158:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
expected: 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,78 @@
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (215.233376ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (272.102164ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (206.841535ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (207.638685ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (228.304905ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (267.538629ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (231.748679ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (201.126543ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (272.968923ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (263.883421ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (332.396783ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (412.690734ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (690.63716ms)
✔ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (709.273824ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1341.575992ms)
✔ named migration registry chains 3b through 3e to a fixture-only future version in order (685.146965ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (590.654914ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (632.030721ms)
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (738.286411ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (736.263313ms)
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (735.970735ms)
ℹ tests 21
ℹ suites 0
ℹ pass 19
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4008.934107
✖ failing tests:
test at tests/thread-migration.test.mjs:90:1
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (738.286411ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
[
+ 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send'
]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:102:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send' ],
expected: [ 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send' ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/thread-migration.test.mjs:153:1
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (735.970735ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'bus schema 3e ready\n'
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:158:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'kept 3 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
expected: 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,78 @@
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (219.921273ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (265.293978ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (179.606808ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (184.546164ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (205.622178ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (241.531363ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (215.944102ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (214.22693ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (261.606678ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (261.188684ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (293.57239ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (403.316987ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (694.225914ms)
✔ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (699.905707ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1234.487078ms)
✔ named migration registry chains 3b through 3e to a fixture-only future version in order (660.481104ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (591.608242ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (635.716557ms)
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (702.236623ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (675.515843ms)
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (754.116216ms)
ℹ tests 21
ℹ suites 0
ℹ pass 19
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3882.318861
✖ failing tests:
test at tests/thread-migration.test.mjs:90:1
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (702.236623ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
[
+ 'kept 2 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send'
]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:102:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ 'kept 2 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send' ],
expected: [ 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send' ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/thread-migration.test.mjs:153:1
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (754.116216ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'kept 2 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
'bus schema 3e ready\n'
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:158:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'kept 2 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
expected: 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,78 @@
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (199.24777ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (279.869455ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (196.397402ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (187.078513ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (238.604238ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (257.02773ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (225.493957ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (198.137295ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (274.856702ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (271.658485ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (331.286562ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (405.952285ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (769.005847ms)
✔ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (698.02262ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1301.912453ms)
✔ named migration registry chains 3b through 3e to a fixture-only future version in order (681.882248ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (622.660516ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (685.297406ms)
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (703.375831ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (710.223046ms)
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (720.843789ms)
ℹ tests 21
ℹ suites 0
ℹ pass 19
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4047.725713
✖ failing tests:
test at tests/thread-migration.test.mjs:90:1
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (703.375831ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ []
- [
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
- 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
- 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send',
- 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send'
- ]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:102:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [],
expected: [ 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send', 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send' ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/thread-migration.test.mjs:153:1
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (720.843789ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'bus schema 3e ready\n'
- 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'kept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\n' +
- 'bus schema 3e ready\n'
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:158:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'bus schema 3e ready\n',
expected: 'kept 1 undelivered message(s) for demo/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/chief without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 1 undelivered message(s) for demo/human without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nkept 2 undelivered message(s) for other/assistant without a thread; if that role is a thread instance, its thread runs never receive them, so the human re-sends them with thread.send\nbus schema 3e ready\n',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,164 @@
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (199.002382ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (294.399953ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (198.778734ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (223.942421ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (241.31084ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (255.338615ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (232.411653ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (210.979734ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (270.865037ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (312.447943ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (379.252474ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (453.693308ms)
✖ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (758.025049ms)
✖ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (600.12283ms)
✖ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1322.202413ms)
✖ named migration registry chains 3b through 3e to a fixture-only future version in order (708.437996ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (688.859335ms)
✖ offline command migrates only the supplied fixture root and reports usage errors (760.769239ms)
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (586.136839ms)
✖ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (638.469133ms)
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (602.975701ms)
ℹ tests 21
ℹ suites 0
ℹ pass 13
ℹ fail 8
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4140.467317
✖ failing tests:
test at tests/chief-of-staff.test.mjs:383:1
✖ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (758.025049ms)
Error: no such table: projects
at Store.get (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-chief-migrate-YohzqB/engine-3c/src/store.mjs:195:21)
at #verifyTimes (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-chief-migrate-YohzqB/engine-3c/src/store.mjs:213:16)
at #migrateSchema (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-chief-migrate-YohzqB/engine-3c/src/store.mjs:175:24)
at new Store (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-chief-migrate-YohzqB/engine-3c/src/store.mjs:143:55)
at database3c (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/chief-of-staff.test.mjs:379:3)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/chief-of-staff.test.mjs:384:26)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'ERR_SQLITE_ERROR',
errcode: 1,
errstr: 'SQL logic error'
}
test at tests/comment-migration.test.mjs:31:1
✖ explicit 3b copy migration preserves evidence and opens as 3e; normal startup never migrates (600.12283ms)
Error: no such table: projects
at Store.get (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:208:21)
at #verifyTimes (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:226:16)
at #migrateSchema (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:188:24)
at new Store (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:156:55)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/comment-migration.test.mjs:35:17)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.start (node:internal/test_runner/test:1262:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
code: 'ERR_SQLITE_ERROR',
errcode: 1,
errstr: 'SQL logic error'
}
test at tests/comment-migration.test.mjs:49:1
✖ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1322.202413ms)
Error: no such table: projects
at Store.get (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:208:21)
at #verifyTimes (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:226:16)
at #migrateSchema (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:188:24)
at new Store (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/store.mjs:156:55)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/comment-migration.test.mjs:60:19)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12) {
code: 'ERR_SQLITE_ERROR',
errcode: 1,
errstr: 'SQL logic error'
}
test at tests/comment-migration.test.mjs:65:1
✖ named migration registry chains 3b through 3e to a fixture-only future version in order (708.437996ms)
Error: no such table: projects
at Store.get (file:///home/jwoltje/darkwing-scratch/r121/tmp/comment-migration-qZzty9/future-bus/src/store.mjs:208:21)
at #verifyTimes (file:///home/jwoltje/darkwing-scratch/r121/tmp/comment-migration-qZzty9/future-bus/src/store.mjs:226:16)
at #migrateSchema (file:///home/jwoltje/darkwing-scratch/r121/tmp/comment-migration-qZzty9/future-bus/src/store.mjs:188:24)
at new Store (file:///home/jwoltje/darkwing-scratch/r121/tmp/comment-migration-qZzty9/future-bus/src/store.mjs:156:55)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/comment-migration.test.mjs:85:18)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'ERR_SQLITE_ERROR',
errcode: 1,
errstr: 'SQL logic error'
}
test at tests/comment-migration.test.mjs:106:1
✖ offline command migrates only the supplied fixture root and reports usage errors (760.769239ms)
AssertionError [ERR_ASSERTION]: migration refused: no such table: projects
1 !== 0
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/comment-migration.test.mjs:111:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 1,
expected: 0,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/thread-migration.test.mjs:90:1
✖ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (586.136839ms)
Error: no such table: projects
at Store.get (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-n3QafP/engine-3d/src/store.mjs:199:21)
at #verifyTimes (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-n3QafP/engine-3d/src/store.mjs:217:16)
at #migrateSchema (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-n3QafP/engine-3d/src/store.mjs:179:24)
at new Store (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-n3QafP/engine-3d/src/store.mjs:147:55)
at database3d (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:60:15)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:91:32)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
code: 'ERR_SQLITE_ERROR',
errcode: 1,
errstr: 'SQL logic error'
}
test at tests/thread-migration.test.mjs:141:1
✖ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (638.469133ms)
Error: no such table: projects
at Store.get (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-B4FaX3/engine-3d/src/store.mjs:199:21)
at #verifyTimes (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-B4FaX3/engine-3d/src/store.mjs:217:16)
at #migrateSchema (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-B4FaX3/engine-3d/src/store.mjs:179:24)
at new Store (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-B4FaX3/engine-3d/src/store.mjs:147:55)
at database3d (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:60:15)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:142:26)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'ERR_SQLITE_ERROR',
errcode: 1,
errstr: 'SQL logic error'
}
test at tests/thread-migration.test.mjs:153:1
✖ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (602.975701ms)
Error: no such table: projects
at Store.get (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-Qx93en/engine-3d/src/store.mjs:199:21)
at #verifyTimes (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-Qx93en/engine-3d/src/store.mjs:217:16)
at #migrateSchema (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-Qx93en/engine-3d/src/store.mjs:179:24)
at new Store (file:///home/jwoltje/darkwing-scratch/r121/tmp/bus-thread-migrate-Qx93en/engine-3d/src/store.mjs:147:55)
at database3d (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:60:15)
at async TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/thread-migration.test.mjs:154:20)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'ERR_SQLITE_ERROR',
errcode: 1,
errstr: 'SQL logic error'
}
@@ -0,0 +1,82 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (129.287483ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (111.173325ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (136.527859ms)
✔ endLaunch leaves a claim another run took alone (157.933492ms)
✔ refuse records action.refused against the caller with the code only (114.680491ms)
✔ launches off refuses role.launch with launch-revoked until launches on (170.894995ms)
✖ broker process: launch ops authorize role.launch, record refusals and end runs (224.874654ms)
✔ the assistant sends to the user and to the chief of staff only (287.694957ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (328.993153ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (329.956663ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (264.771947ms)
✔ a sender-side list alone refuses a send to a role that has no list (276.739865ms)
✔ a target-side list alone refuses a send from a role that has no list (278.160054ms)
✔ the sender list is checked before the target list (251.077443ms)
✔ roles without the field behave exactly as before (360.050256ms)
✔ a business with no role definitions at all is unlimited (264.259546ms)
✔ a malformed messaging field refuses at boot (71.315841ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (308.590061ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (322.209142ms)
✔ review requests and verdicts between roles without the field are unchanged (248.576366ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (182.055716ms)
✔ startup token refusal returns safe code without value or partial listening broker (40.828455ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (181.106915ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (184.013626ms)
✔ trusted host registers later launches; socket clients never have a registration verb (163.999037ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (45.145581ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (165.9251ms)
✔ v3b prototype refusals, views and append-only mutations (1333.623839ms)
✔ creates private WAL store and excludes a second writer until explicit close (112.741508ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (153.614552ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (167.401295ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (149.59464ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (93.675236ms)
✔ async transactions refuse before invoking their function (81.887295ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (309.821208ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1052.566618ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (278.471619ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3485.034317ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (87.616708ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (134.301011ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (143.909026ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (164.41524ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (145.549328ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (128.100936ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (140.27582ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (99.012149ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (142.237452ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (427.124756ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6805.071133
✖ failing tests:
test at tests/end-launch.test.mjs:135:1
✖ broker process: launch ops authorize role.launch, record refusals and end runs (224.874654ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ ok: true,
+ result: []
- error: 'not-holder',
- ok: false
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/end-launch.test.mjs:189:10)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { ok: true, result: [] },
expected: { ok: false, error: 'not-holder' },
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,89 @@
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (115.146699ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (126.020352ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (122.003662ms)
✔ endLaunch leaves a claim another run took alone (162.574649ms)
✔ refuse records action.refused against the caller with the code only (115.596354ms)
✔ launches off refuses role.launch with launch-revoked until launches on (176.702813ms)
✖ broker process: launch ops authorize role.launch, record refusals and end runs (231.300839ms)
✔ the assistant sends to the user and to the chief of staff only (274.596014ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (330.91034ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (319.933411ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (288.295969ms)
✔ a sender-side list alone refuses a send to a role that has no list (282.802558ms)
✔ a target-side list alone refuses a send from a role that has no list (270.977762ms)
✔ the sender list is checked before the target list (237.910457ms)
✔ roles without the field behave exactly as before (338.239689ms)
✔ a business with no role definitions at all is unlimited (245.631662ms)
✔ a malformed messaging field refuses at boot (69.088743ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (270.457355ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (306.276879ms)
✔ review requests and verdicts between roles without the field are unchanged (257.90215ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (181.099718ms)
✔ startup token refusal returns safe code without value or partial listening broker (45.160948ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (166.626053ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (180.578128ms)
✔ trusted host registers later launches; socket clients never have a registration verb (176.11251ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (44.251807ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (164.811491ms)
✔ v3b prototype refusals, views and append-only mutations (1331.294581ms)
✔ creates private WAL store and excludes a second writer until explicit close (98.160503ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (158.302867ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (158.638687ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (156.293101ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (92.916804ms)
✔ async transactions refuse before invoking their function (83.251131ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (280.602822ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1056.001436ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (288.006889ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3406.182539ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (125.585389ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (161.367735ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (155.093827ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (176.233493ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (148.677343ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (131.254431ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (157.503601ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (102.497519ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (139.141013ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (458.654681ms)
ℹ tests 48
ℹ suites 0
ℹ pass 47
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6858.029283
✖ failing tests:
test at tests/end-launch.test.mjs:135:1
✖ broker process: launch ops authorize role.launch, record refusals and end runs (231.300839ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ []
- [
- {
- holder: null,
- instance: 'coder',
- lastClaim: null,
- lastMessage: null,
- lastOpen: '2026-10-15T00:00:01.000Z',
- pending: 0,
- thread: 'th-1',
- unread: 0
- }
- ]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/end-launch.test.mjs:184:10)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [],
expected: [ { thread: 'th-1', instance: 'coder', pending: 0, unread: 0, lastMessage: null, lastOpen: '2026-10-15T00:00:01.000Z', lastClaim: null, holder: null } ],
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,149 @@
✖ the assistant sends to the user and to the chief of staff only (281.78485ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (300.472399ms)
✖ only the user and the chief of staff may send to the assistant; the tester is refused by default (292.587624ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (259.012985ms)
✔ a sender-side list alone refuses a send to a role that has no list (289.794985ms)
✔ a target-side list alone refuses a send from a role that has no list (258.011166ms)
✔ the sender list is checked before the target list (240.855332ms)
✔ roles without the field behave exactly as before (355.26468ms)
✖ a business with no role definitions at all is unlimited (249.315144ms)
✔ a malformed messaging field refuses at boot (71.425494ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (269.322535ms)
✖ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (268.325906ms)
✔ review requests and verdicts between roles without the field are unchanged (266.474118ms)
✔ v3b prototype refusals, views and append-only mutations (1309.669481ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (298.288271ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1023.050153ms)
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (240.813631ms)
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (202.211901ms)
✖ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (149.790926ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (264.439924ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (278.741726ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (296.455193ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (253.662559ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (230.000354ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (228.467162ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (105.007186ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (141.727754ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (465.088209ms)
ℹ tests 28
ℹ suites 0
ℹ pass 21
ℹ fail 7
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4241.714869
✖ failing tests:
test at tests/messaging.test.mjs:92:1
✖ the assistant sends to the user and to the chief of staff only (281.78485ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:76:44)
at send (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:80:9)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:96:18)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.start (node:internal/test_runner/test:1262:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
code: 'storage-refused'
}
test at tests/messaging.test.mjs:124:1
✖ only the user and the chief of staff may send to the assistant; the tester is refused by default (292.587624ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:76:44)
at send (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:80:9)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:127:18)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12) {
code: 'storage-refused'
}
test at tests/messaging.test.mjs:203:1
✖ a business with no role definitions at all is unlimited (249.315144ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:76:44)
at send (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:80:9)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:208:18)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12) {
code: 'storage-refused'
}
test at tests/messaging.test.mjs:280:1
✖ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (268.325906ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at Object.call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:76:44)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/messaging.test.mjs:285:23)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'storage-refused'
}
test at tests/threads.test.mjs:180:1
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (240.813631ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:199:19)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'storage-refused'
}
test at tests/threads.test.mjs:234:1
✖ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (202.211901ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at run (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:238:17)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:241:16)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12) {
code: 'storage-refused'
}
test at tests/threads.test.mjs:273:1
✖ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (149.790926ms)
Error: storage-refused
at #refused (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:825:47)
at Broker.request (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/src/broker.mjs:896:26)
at call (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:50:44)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:286:15)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
code: 'storage-refused'
}
@@ -0,0 +1,64 @@
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.571576ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (9.992638ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.142974ms)
✖ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (1.404303ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.617238ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.036203ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1732.880906ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2538.295444ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (261.10486ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.771473ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.651477ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.24925ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.406248ms)
✔ session file and launch log: 0600, the session file written once (0.952245ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.121602ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.393153ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.668653ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.353018ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (2.958548ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (276.287501ms)
ℹ tests 20
ℹ suites 0
ℹ pass 19
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4613.073695
✖ failing tests:
test at tests/sandbox.test.mjs:75:1
✖ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (1.404303ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ []
- [
- {
- dest: undefined,
- kind: 'rw',
- src: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-sandbox-d4qVPa/threads/acme/th/session'
- },
- {
- dest: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-sandbox-d4qVPa/run/home/.claude/projects',
- kind: 'rw',
- src: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-sandbox-d4qVPa/threads/acme/th/claude-projects'
- }
- ]
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/sandbox.test.mjs:83:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [],
expected: [ { kind: 'rw', src: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-sandbox-d4qVPa/threads/acme/th/session', dest: undefined }, { kind: 'rw', src: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-sandbox-d4qVPa/threads/acme/th/claude-projects', dest: '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-sandbox-d4qVPa/run/home/.claude/projects' } ],
operator: 'deepStrictEqual',
diff: 'simple'
}
@@ -0,0 +1,62 @@
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.568706ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (8.907694ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.193749ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (0.779341ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.632723ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.013281ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1681.361494ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2542.067202ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (264.475812ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.741795ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.681376ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.251708ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.431016ms)
✔ session file and launch log: 0600, the session file written once (1.006219ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.130013ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.178213ms)
✖ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (1.347674ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.439863ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (1.220496ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (284.865417ms)
ℹ tests 20
ℹ suites 0
ℹ pass 19
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4570.028349
✖ failing tests:
test at tests/session.test.mjs:138:1
✖ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (1.347674ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ {
+ business: 'acme',
+ instance: 'assistant',
+ model: 'm',
+ provider: 'zai',
+ run: 'r1',
+ runnerPid: 3086186,
+ runnerStartTime: '19083409',
+ thread: 'th-a'
+ }
- null
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/session.test.mjs:143:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { business: 'acme', instance: 'assistant', provider: 'zai', model: 'm', runnerPid: 3086186, runnerStartTime: '19083409', run: 'r1', thread: 'th-a' },
expected: null,
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,47 @@
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.571908ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (8.692697ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.561755ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (0.764819ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.621153ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (0.988518ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1750.946264ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2870.020866ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (278.787349ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.725543ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.628791ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.26589ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.42431ms)
✔ session file and launch log: 0600, the session file written once (1.012637ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.121552ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.222047ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.554785ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.100647ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (0.932072ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (290.449822ms)
ℹ tests 20
ℹ suites 0
ℹ pass 19
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4984.58002
✖ failing tests:
test at tests/session.test.mjs:152:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.100647ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: acme/a..b
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/session.test.mjs:155:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,57 @@
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (2.130875ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (16.60304ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (2.66167ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (1.495346ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (1.056044ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.374917ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1751.747272ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2581.368358ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (262.016241ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (1.140348ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.887725ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.306502ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.876711ms)
✔ session file and launch log: 0600, the session file written once (1.475779ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.163079ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (3.365095ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.780708ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.401995ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (1.605778ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (318.428628ms)
ℹ tests 20
ℹ suites 0
ℹ pass 19
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4705.128654
✖ failing tests:
test at tests/session.test.mjs:152:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.401995ms)
AssertionError [ERR_ASSERTION]: acme/a/b
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/session.test.mjs:155:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: Error: ENOENT: no such file or directory, mkdir '/home/jwoltje/darkwing-scratch/r121/tmp/mosaic-session-jHO3Wb/threads/acme/a/b'
at mkdirSync (node:fs:1734:26)
at threadStore (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/src/session.mjs:71:7)
at file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/session.test.mjs:155:25
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/session.test.mjs:155:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19),
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,47 @@
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.589071ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (9.298219ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.174304ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (0.74271ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.645574ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.012867ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1737.919775ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2685.698855ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (259.139363ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.760008ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.663825ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.243921ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.477447ms)
✔ session file and launch log: 0600, the session file written once (0.998394ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.118435ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.393911ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.599241ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.50931ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (1.313687ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (305.349271ms)
ℹ tests 20
ℹ suites 0
ℹ pass 19
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4766.341135
✖ failing tests:
test at tests/session.test.mjs:152:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.50931ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/session.test.mjs:167:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,47 @@
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.547918ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (9.483173ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.176498ms)
✔ REQ-THREAD-2 a thread store binds its session directory and Claude transcripts, and nothing more (0.725747ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.631638ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (0.977374ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1615.939214ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2543.313915ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (267.941914ms)
✔ REQ-LIMIT-1: family substring matching is no longer exported (0.741427ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.704423ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.258236ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.504821ms)
✔ session file and launch log: 0600, the session file written once (0.995989ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.144041ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.487556ms)
✔ REQ-THREAD-1 Registry.running keys a thread run by business, instance and thread (0.714203ms)
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.586446ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (4.376646ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (255.774979ms)
ℹ tests 20
ℹ suites 0
ℹ pass 19
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4504.133324
✖ failing tests:
test at tests/session.test.mjs:152:1
✖ REQ-THREAD-2 REQ-LAUNCH-1 threadStore checks both segments before the join and refuses an unsafe directory (1.586446ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/seat/tests/session.test.mjs:167:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (242.259889ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (335.045246ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (330.004742ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (261.442631ms)
✔ a sender-side list alone refuses a send to a role that has no list (280.113449ms)
✔ a target-side list alone refuses a send from a role that has no list (300.685003ms)
✔ the sender list is checked before the target list (265.668412ms)
✔ roles without the field behave exactly as before (361.39608ms)
✔ a business with no role definitions at all is unlimited (256.115515ms)
✔ a malformed messaging field refuses at boot (71.809848ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (265.491996ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (312.449587ms)
✔ review requests and verdicts between roles without the field are unchanged (262.261827ms)
✔ v3b prototype refusals, views and append-only mutations (1294.668429ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (256.382424ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1042.508681ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (303.245761ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3568.541138ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (99.460258ms)
✖ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.353793ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (154.463303ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (171.476589ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (151.852766ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (131.021546ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (144.740693ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (107.657651ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (145.622057ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (441.365447ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6926.364622
✖ failing tests:
test at tests/threads.test.mjs:296:1
✖ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.353793ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: routed
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:306:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /only to its thread's holder/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (228.08291ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (304.225377ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (343.117544ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (278.971978ms)
✔ a sender-side list alone refuses a send to a role that has no list (281.393633ms)
✔ a target-side list alone refuses a send from a role that has no list (281.874262ms)
✔ the sender list is checked before the target list (296.198415ms)
✔ roles without the field behave exactly as before (355.752741ms)
✔ a business with no role definitions at all is unlimited (263.587979ms)
✔ a malformed messaging field refuses at boot (68.611975ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (278.688847ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (324.070799ms)
✔ review requests and verdicts between roles without the field are unchanged (273.660375ms)
✔ v3b prototype refusals, views and append-only mutations (1278.576048ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (241.95576ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1046.384552ms)
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (289.004218ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3621.957967ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (106.555391ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (157.933493ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (158.520974ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (166.615528ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (141.36802ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (130.960109ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (179.462549ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (142.763212ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (155.052267ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (535.360859ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7137.253211
✖ failing tests:
test at tests/threads.test.mjs:180:1
✖ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (289.004218ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:227:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /to or from the thread's instance/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (264.67281ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (289.475502ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (287.570673ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (248.162701ms)
✔ a sender-side list alone refuses a send to a role that has no list (268.926328ms)
✔ a target-side list alone refuses a send from a role that has no list (256.586216ms)
✔ the sender list is checked before the target list (232.388432ms)
✔ roles without the field behave exactly as before (408.378535ms)
✔ a business with no role definitions at all is unlimited (272.199195ms)
✔ a malformed messaging field refuses at boot (69.221224ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (280.20759ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (315.113902ms)
✔ review requests and verdicts between roles without the field are unchanged (250.661337ms)
✔ v3b prototype refusals, views and append-only mutations (1209.425142ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (272.158073ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (947.571592ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (272.254912ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3477.251077ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (89.601124ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (139.434184ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (144.515786ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (173.38785ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (148.574521ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (133.624026ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (138.089203ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (101.75078ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (145.954188ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (446.765105ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6692.586954
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (947.571592ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: message_threads DELETE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /message_threads is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (262.434461ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (279.549225ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (309.804983ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (262.662815ms)
✔ a sender-side list alone refuses a send to a role that has no list (294.742852ms)
✔ a target-side list alone refuses a send from a role that has no list (302.337844ms)
✔ the sender list is checked before the target list (253.654741ms)
✔ roles without the field behave exactly as before (357.772576ms)
✔ a business with no role definitions at all is unlimited (271.20274ms)
✔ a malformed messaging field refuses at boot (77.028266ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (289.475946ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (318.234514ms)
✔ review requests and verdicts between roles without the field are unchanged (278.281892ms)
✔ v3b prototype refusals, views and append-only mutations (1252.524579ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (269.03978ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1009.305092ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (302.588568ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3572.139411ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (88.765338ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.924676ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (146.080954ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (167.722293ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (158.156804ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (130.96561ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (149.057236ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (116.994901ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (141.095022ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (449.151818ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6918.07699
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1009.305092ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: message_threads INSERT OR REPLACE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:176:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /message_threads is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (294.003921ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (390.154289ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (279.617265ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (369.180019ms)
✔ a sender-side list alone refuses a send to a role that has no list (268.970787ms)
✔ a target-side list alone refuses a send from a role that has no list (281.678077ms)
✔ the sender list is checked before the target list (236.150244ms)
✔ roles without the field behave exactly as before (345.752632ms)
✔ a business with no role definitions at all is unlimited (250.891533ms)
✔ a malformed messaging field refuses at boot (72.029596ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (280.943412ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (310.026924ms)
✔ review requests and verdicts between roles without the field are unchanged (259.377041ms)
✔ v3b prototype refusals, views and append-only mutations (1433.619513ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (287.481737ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1152.409304ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (281.334004ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3376.591428ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (153.373475ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (132.35736ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (150.018648ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (172.488262ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (175.735782ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (129.98128ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (144.591169ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (100.085817ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (140.780963ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (487.337614ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6949.923526
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1152.409304ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: message_threads UPDATE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:174:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /message_threads is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,66 @@
✔ the assistant sends to the user and to the chief of staff only (232.764739ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (316.238168ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (306.890017ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (251.32368ms)
✔ a sender-side list alone refuses a send to a role that has no list (274.268874ms)
✔ a target-side list alone refuses a send from a role that has no list (285.452407ms)
✔ the sender list is checked before the target list (244.098997ms)
✔ roles without the field behave exactly as before (362.284943ms)
✔ a business with no role definitions at all is unlimited (252.426132ms)
✔ a malformed messaging field refuses at boot (67.280846ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (273.279063ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (319.332405ms)
✔ review requests and verdicts between roles without the field are unchanged (263.656026ms)
✔ v3b prototype refusals, views and append-only mutations (1248.584801ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (264.296029ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1002.799378ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (282.462957ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3406.086981ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (93.762653ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (151.04196ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (153.058302ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (171.940688ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (152.723544ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (128.174783ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (143.872318ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (102.315877ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (141.989822ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (411.176742ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6663.814276
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1002.799378ms)
AssertionError [ERR_ASSERTION]: projects DELETE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: Error: FOREIGN KEY constraint failed
at file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:28
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3),
expected: /projects is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (257.071798ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (299.815464ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (309.588225ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (248.358895ms)
✔ a sender-side list alone refuses a send to a role that has no list (276.220446ms)
✔ a target-side list alone refuses a send from a role that has no list (265.447363ms)
✔ the sender list is checked before the target list (245.93216ms)
✔ roles without the field behave exactly as before (326.958013ms)
✔ a business with no role definitions at all is unlimited (250.089257ms)
✔ a malformed messaging field refuses at boot (69.529552ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (280.277629ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (306.659421ms)
✔ review requests and verdicts between roles without the field are unchanged (250.935995ms)
✔ v3b prototype refusals, views and append-only mutations (1244.625387ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (267.065363ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (992.267429ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (278.199861ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3306.72106ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (94.447069ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (147.172626ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (154.966037ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (170.197477ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (145.034676ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (127.251675ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (145.460754ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (99.869115ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (129.222827ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (425.406126ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6551.604451
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (992.267429ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: projects INSERT OR REPLACE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:176:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /projects is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (259.403039ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (317.178595ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (333.655036ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (261.134622ms)
✔ a sender-side list alone refuses a send to a role that has no list (273.733481ms)
✔ a target-side list alone refuses a send from a role that has no list (280.036623ms)
✔ the sender list is checked before the target list (236.899591ms)
✔ roles without the field behave exactly as before (351.96669ms)
✔ a business with no role definitions at all is unlimited (248.102935ms)
✔ a malformed messaging field refuses at boot (67.569801ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (287.528019ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (307.610771ms)
✔ review requests and verdicts between roles without the field are unchanged (269.870922ms)
✔ v3b prototype refusals, views and append-only mutations (1310.280484ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (271.81506ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1056.581403ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (277.936742ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3439.013839ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (100.839012ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (138.813807ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (154.106641ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (173.334512ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (154.600805ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (139.324213ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (153.363176ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (108.920051ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (152.207077ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (441.28671ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6824.343603
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1056.581403ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: projects UPDATE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:174:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /projects is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (274.86226ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (281.660751ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (314.341912ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (279.693949ms)
✔ a sender-side list alone refuses a send to a role that has no list (289.084636ms)
✔ a target-side list alone refuses a send from a role that has no list (288.93737ms)
✔ the sender list is checked before the target list (249.326268ms)
✔ roles without the field behave exactly as before (367.80542ms)
✔ a business with no role definitions at all is unlimited (274.226921ms)
✔ a malformed messaging field refuses at boot (75.517501ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (295.504059ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (327.370884ms)
✔ review requests and verdicts between roles without the field are unchanged (259.486313ms)
✔ v3b prototype refusals, views and append-only mutations (1272.389235ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (290.678756ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (999.762827ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (290.364772ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3924.408814ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (107.018782ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (162.631965ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (167.702239ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (173.065544ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (144.987032ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (123.496839ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (144.876943ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (105.726649ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (156.179631ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (470.966006ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7324.534021
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (999.762827ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:155:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /a thread claim names the thread's business/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (288.607074ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (315.745326ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (317.42959ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (271.274456ms)
✔ a sender-side list alone refuses a send to a role that has no list (267.688316ms)
✔ a target-side list alone refuses a send from a role that has no list (275.64254ms)
✔ the sender list is checked before the target list (252.610086ms)
✔ roles without the field behave exactly as before (397.843391ms)
✔ a business with no role definitions at all is unlimited (265.039935ms)
✔ a malformed messaging field refuses at boot (70.114167ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (285.201982ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (321.231825ms)
✔ review requests and verdicts between roles without the field are unchanged (266.10369ms)
✔ v3b prototype refusals, views and append-only mutations (1315.227096ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (311.586189ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1027.465621ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (274.480425ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3511.550223ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (104.814ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (146.125351ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (154.888716ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (170.325067ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (144.337436ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (133.004002ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (179.481308ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (103.874865ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (139.336054ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (444.154424ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6906.102127
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1027.465621ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: thread_claims DELETE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread_claims is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (261.090161ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (326.853892ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (304.769039ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (237.540213ms)
✔ a sender-side list alone refuses a send to a role that has no list (272.120743ms)
✔ a target-side list alone refuses a send from a role that has no list (279.267871ms)
✔ the sender list is checked before the target list (251.497034ms)
✔ roles without the field behave exactly as before (367.637916ms)
✔ a business with no role definitions at all is unlimited (267.307821ms)
✔ a malformed messaging field refuses at boot (75.445219ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (280.538746ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (316.93198ms)
✔ review requests and verdicts between roles without the field are unchanged (260.063937ms)
✔ v3b prototype refusals, views and append-only mutations (1260.469833ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (280.523806ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1000.220651ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (276.710564ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3657.651077ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (95.508041ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.089265ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (143.174305ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (161.479015ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (144.112088ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (129.865714ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (141.896811ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (101.92607ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (148.124969ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (550.463166ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7032.479923
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1000.220651ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: thread_claims INSERT OR REPLACE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:176:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread_claims is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (254.257863ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (307.742292ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (320.421803ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (276.335465ms)
✔ a sender-side list alone refuses a send to a role that has no list (280.736787ms)
✔ a target-side list alone refuses a send from a role that has no list (272.067793ms)
✔ the sender list is checked before the target list (243.833048ms)
✔ roles without the field behave exactly as before (364.910273ms)
✔ a business with no role definitions at all is unlimited (261.768687ms)
✔ a malformed messaging field refuses at boot (70.66778ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (423.634022ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (330.536528ms)
✔ review requests and verdicts between roles without the field are unchanged (273.606589ms)
✔ v3b prototype refusals, views and append-only mutations (1292.692176ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (269.902215ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1030.760411ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (271.933084ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3668.187829ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (103.182226ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (152.962671ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (152.926373ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (155.413917ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (138.684012ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (135.427345ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (142.761679ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (104.095578ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (146.168413ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (465.182048ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6996.953918
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1030.760411ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: thread_claims UPDATE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:174:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread_claims is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,54 @@
✔ the assistant sends to the user and to the chief of staff only (245.484376ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (339.882344ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (341.95241ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (260.778972ms)
✔ a sender-side list alone refuses a send to a role that has no list (285.018413ms)
✔ a target-side list alone refuses a send from a role that has no list (280.012485ms)
✔ the sender list is checked before the target list (244.293232ms)
✔ roles without the field behave exactly as before (340.110817ms)
✔ a business with no role definitions at all is unlimited (259.374384ms)
✔ a malformed messaging field refuses at boot (68.60931ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (278.140807ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (305.03047ms)
✔ review requests and verdicts between roles without the field are unchanged (254.114336ms)
✔ v3b prototype refusals, views and append-only mutations (1331.584837ms)
✖ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (227.218454ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1079.411042ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (288.20171ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3396.871503ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (95.368564ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (181.184316ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (170.994089ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (169.159818ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (145.590444ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (122.809392ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (146.994549ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (103.606433ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (140.956407ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (450.686384ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6782.507475
✖ failing tests:
test at tests/threads.test.mjs:80:1
✖ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (227.218454ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:95:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.start (node:internal/test_runner/test:1262:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread already held/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,54 @@
✔ the assistant sends to the user and to the chief of staff only (263.451815ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (301.024541ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (317.509139ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (265.109807ms)
✔ a sender-side list alone refuses a send to a role that has no list (305.204578ms)
✔ a target-side list alone refuses a send from a role that has no list (310.473484ms)
✔ the sender list is checked before the target list (244.662503ms)
✔ roles without the field behave exactly as before (351.317053ms)
✔ a business with no role definitions at all is unlimited (265.506613ms)
✔ a malformed messaging field refuses at boot (72.405952ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (283.28264ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (305.37176ms)
✔ review requests and verdicts between roles without the field are unchanged (251.043198ms)
✔ v3b prototype refusals, views and append-only mutations (1274.457233ms)
✖ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (243.487229ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1002.107839ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (320.577122ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3410.218509ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (101.407184ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (146.920289ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (153.87237ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (174.891344ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (149.246356ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (131.883044ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (150.515285ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (105.908173ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (149.662373ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (463.999017ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6764.75684
✖ failing tests:
test at tests/threads.test.mjs:80:1
✖ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (243.487229ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:98:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.start (node:internal/test_runner/test:1262:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /run already holds a thread/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (248.641623ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (290.089757ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (302.471757ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (252.759887ms)
✔ a sender-side list alone refuses a send to a role that has no list (277.129145ms)
✔ a target-side list alone refuses a send from a role that has no list (276.852007ms)
✔ the sender list is checked before the target list (232.871609ms)
✔ roles without the field behave exactly as before (355.573766ms)
✔ a business with no role definitions at all is unlimited (265.24815ms)
✔ a malformed messaging field refuses at boot (64.612577ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (290.806513ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (325.901731ms)
✔ review requests and verdicts between roles without the field are unchanged (259.044179ms)
✔ v3b prototype refusals, views and append-only mutations (1231.533546ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (273.281842ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (994.336743ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (281.185414ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3419.739528ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (90.208684ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (145.54971ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (182.131031ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (205.838859ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (147.612632ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (131.992105ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (147.157645ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (99.790419ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (140.366788ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (409.723875ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6734.566729
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (994.336743ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: thread_opens DELETE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread_opens is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (236.219101ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (294.703359ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (300.839213ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (246.311479ms)
✔ a sender-side list alone refuses a send to a role that has no list (265.526752ms)
✔ a target-side list alone refuses a send from a role that has no list (275.493491ms)
✔ the sender list is checked before the target list (237.160959ms)
✔ roles without the field behave exactly as before (340.982696ms)
✔ a business with no role definitions at all is unlimited (254.984542ms)
✔ a malformed messaging field refuses at boot (69.898711ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (293.78158ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (304.167301ms)
✔ review requests and verdicts between roles without the field are unchanged (247.938438ms)
✔ v3b prototype refusals, views and append-only mutations (1201.307193ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (251.710209ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (966.585798ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (279.612529ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3325.784836ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (96.374259ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (140.85622ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (150.624929ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (179.922106ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (150.296789ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (131.239373ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (146.059014ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (103.630131ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (132.195573ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (440.754033ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6564.075766
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (966.585798ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: thread_opens INSERT OR REPLACE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:176:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread_opens is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (249.958393ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (303.646214ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (314.933913ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (268.520004ms)
✔ a sender-side list alone refuses a send to a role that has no list (272.692126ms)
✔ a target-side list alone refuses a send from a role that has no list (275.675491ms)
✔ the sender list is checked before the target list (238.309663ms)
✔ roles without the field behave exactly as before (346.624504ms)
✔ a business with no role definitions at all is unlimited (273.875738ms)
✔ a malformed messaging field refuses at boot (72.799294ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (290.324936ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (317.120996ms)
✔ review requests and verdicts between roles without the field are unchanged (236.97101ms)
✔ v3b prototype refusals, views and append-only mutations (1252.355879ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (255.602725ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1004.372025ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (280.719386ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3407.432638ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (85.891202ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (144.039107ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (149.462699ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (172.741669ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (146.098964ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (138.338972ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (151.980011ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (101.67462ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (138.802624ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (402.702646ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6643.378618
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1004.372025ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: thread_opens UPDATE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:174:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread_opens is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (283.658681ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (304.268949ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (315.255124ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (261.093222ms)
✔ a sender-side list alone refuses a send to a role that has no list (283.011259ms)
✔ a target-side list alone refuses a send from a role that has no list (275.012234ms)
✔ the sender list is checked before the target list (234.825814ms)
✔ roles without the field behave exactly as before (356.616866ms)
✔ a business with no role definitions at all is unlimited (264.943082ms)
✔ a malformed messaging field refuses at boot (73.244899ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (285.89996ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (302.246318ms)
✔ review requests and verdicts between roles without the field are unchanged (267.958337ms)
✔ v3b prototype refusals, views and append-only mutations (1279.963232ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (277.528641ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (996.894579ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (283.597774ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3456.743671ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (97.379877ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (147.789262ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (150.435355ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (170.943952ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (156.740634ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (142.662544ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (154.177113ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (106.394989ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (152.941459ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (450.538064ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6811.553619
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (996.894579ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:157:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /thread is not held/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (279.521822ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (299.280688ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (282.06705ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (257.447023ms)
✔ a sender-side list alone refuses a send to a role that has no list (275.327092ms)
✔ a target-side list alone refuses a send from a role that has no list (285.449899ms)
✔ the sender list is checked before the target list (237.757833ms)
✔ roles without the field behave exactly as before (354.654027ms)
✔ a business with no role definitions at all is unlimited (262.995307ms)
✔ a malformed messaging field refuses at boot (72.500272ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (281.369714ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (295.17899ms)
✔ review requests and verdicts between roles without the field are unchanged (248.922981ms)
✔ v3b prototype refusals, views and append-only mutations (1238.166222ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (288.578085ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (976.674682ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (286.189424ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3352.304634ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (95.552136ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (159.791629ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (152.60082ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (170.600105ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (148.00877ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (130.751069ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (141.950957ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (101.580503ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (132.652481ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (431.001524ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6630.573217
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (976.674682ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:161:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /only the holder releases; others revoke/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (258.343825ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (283.35258ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (293.761225ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (253.075644ms)
✔ a sender-side list alone refuses a send to a role that has no list (263.295379ms)
✔ a target-side list alone refuses a send from a role that has no list (263.523507ms)
✔ the sender list is checked before the target list (229.236782ms)
✔ roles without the field behave exactly as before (382.749005ms)
✔ a business with no role definitions at all is unlimited (257.239238ms)
✔ a malformed messaging field refuses at boot (72.744845ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (264.088588ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (312.809877ms)
✔ review requests and verdicts between roles without the field are unchanged (270.519516ms)
✔ v3b prototype refusals, views and append-only mutations (1195.652045ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (274.128941ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (936.980795ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (265.154237ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3479.253765ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (196.907167ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (151.482518ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (159.663407ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (170.032541ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (149.64249ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (124.823335ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (146.626991ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (105.221096ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (154.214986ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (470.278098ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6848.45247
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (936.980795ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:162:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /revoke needs a resolved decision or a reason/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,66 @@
✔ the assistant sends to the user and to the chief of staff only (257.106472ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (323.487637ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (305.015582ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (256.365681ms)
✔ a sender-side list alone refuses a send to a role that has no list (279.489443ms)
✔ a target-side list alone refuses a send from a role that has no list (274.767175ms)
✔ the sender list is checked before the target list (231.290317ms)
✔ roles without the field behave exactly as before (346.914167ms)
✔ a business with no role definitions at all is unlimited (263.852378ms)
✔ a malformed messaging field refuses at boot (76.458729ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (276.28884ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (310.817788ms)
✔ review requests and verdicts between roles without the field are unchanged (251.873655ms)
✔ v3b prototype refusals, views and append-only mutations (1241.054001ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (271.732823ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (998.374721ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (284.498192ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3397.422937ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (99.099071ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (148.395489ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (152.41941ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (174.187812ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (144.754239ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (129.987558ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (149.105566ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (108.190478ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (132.436248ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (429.363311ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6682.128281
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (998.374721ms)
AssertionError [ERR_ASSERTION]: threads DELETE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: Error: FOREIGN KEY constraint failed
at file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:28
at getActual (node:assert:580:5)
at strict.throws (node:assert:728:24)
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:175:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3),
expected: /threads is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (268.143401ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (299.88301ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (315.619877ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (255.308413ms)
✔ a sender-side list alone refuses a send to a role that has no list (278.522431ms)
✔ a target-side list alone refuses a send from a role that has no list (268.925781ms)
✔ the sender list is checked before the target list (234.527429ms)
✔ roles without the field behave exactly as before (345.148644ms)
✔ a business with no role definitions at all is unlimited (276.689906ms)
✔ a malformed messaging field refuses at boot (73.051024ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (291.779301ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (323.282981ms)
✔ review requests and verdicts between roles without the field are unchanged (304.749368ms)
✔ v3b prototype refusals, views and append-only mutations (1274.433053ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (266.274458ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1015.757314ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (278.066426ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3572.287154ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (97.24506ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (155.620947ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (154.104736ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (176.1059ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (146.381818ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (134.660278ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (138.449644ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (97.624727ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (142.063376ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (466.277189ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6905.342244
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1015.757314ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: threads INSERT OR REPLACE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:176:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /threads is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (263.88842ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (320.442548ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (313.329149ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (264.944889ms)
✔ a sender-side list alone refuses a send to a role that has no list (285.391352ms)
✔ a target-side list alone refuses a send from a role that has no list (294.433622ms)
✔ the sender list is checked before the target list (250.254068ms)
✔ roles without the field behave exactly as before (336.11594ms)
✔ a business with no role definitions at all is unlimited (283.454982ms)
✔ a malformed messaging field refuses at boot (88.366166ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (284.495096ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (324.188722ms)
✔ review requests and verdicts between roles without the field are unchanged (262.415212ms)
✔ v3b prototype refusals, views and append-only mutations (1285.797762ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (271.530371ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1028.237827ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (285.374338ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3468.615082ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (102.086316ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (152.29762ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (154.778427ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (178.382664ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (148.186225ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (121.318293ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (144.130756ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (103.589322ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (137.084763ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (439.460546ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6796.103623
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1028.237827ms)
AssertionError [ERR_ASSERTION]: Missing expected exception: threads UPDATE
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:174:12)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /threads is append-only/,
operator: 'throws',
diff: 'simple'
}
@@ -0,0 +1,56 @@
✔ the assistant sends to the user and to the chief of staff only (366.202067ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (300.62005ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (295.593292ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (248.508702ms)
✔ a sender-side list alone refuses a send to a role that has no list (251.951831ms)
✔ a target-side list alone refuses a send from a role that has no list (309.86977ms)
✔ the sender list is checked before the target list (238.477031ms)
✔ roles without the field behave exactly as before (340.009055ms)
✔ a business with no role definitions at all is unlimited (256.769634ms)
✔ a malformed messaging field refuses at boot (68.11705ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (273.259006ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (310.424293ms)
✔ review requests and verdicts between roles without the field are unchanged (230.194338ms)
✔ v3b prototype refusals, views and append-only mutations (1325.758089ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (379.787594ms)
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (949.29811ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (263.023462ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3412.397636ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (97.68252ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (151.277299ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (146.207307ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (167.46531ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (139.10144ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (127.499688ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (142.855058ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (98.913767ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (136.124833ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (445.214097ms)
ℹ tests 28
ℹ suites 0
ℹ pass 27
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 6721.128817
✖ failing tests:
test at tests/threads.test.mjs:120:1
✖ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (949.29811ms)
AssertionError [ERR_ASSERTION]: Missing expected exception.
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r121/r2wt/packages/bus/tests/threads.test.mjs:150:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: /a thread belongs to its project's business/,
operator: 'throws',
diff: 'simple'
}

Some files were not shown because too many files have changed in this diff Show More