✔ launch identity is stamped, payload identity is refused and stale holder cannot send (175.826567ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (268.860961ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (271.683247ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (186.811712ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (242.416615ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (226.884635ms)
✔ task action subjects and linked decision trail are complete and ordered (240.516482ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (112.625817ms)
✔ business isolation includes inherited object names and cross-business message references (214.472286ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (315.031447ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (179.983563ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (200.959345ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (125.747465ms)
✔ both arbiters require human resolution when their cross-role route is themselves (190.776876ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (1.892175ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (5.049967ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.019704ms)
✔ expiry refuses use and env references never become client data (0.588128ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.311728ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.369558ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (119.49428ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (122.730917ms)
✖ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (153.743346ms)
✔ endLaunch leaves a claim another run took alone (170.522948ms)
✔ refuse records action.refused against the caller with the code only (138.954956ms)
✔ launches off refuses role.launch with launch-revoked until launches on (208.024904ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (339.242223ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (2.568342ms)
✔ process reader gets own kernel identity without exposing environment values (0.724472ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (1.076629ms)
✔ real pid 1 remains inspectable when its environment is protected (0.337982ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (185.856069ms)
✔ missing and foreign-business citations refuse and roll back message and grant (193.266271ms)
✔ cross-role sends still need a matching resolved decision and consume it once (246.414013ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (193.313699ms)
✔ startup token refusal returns safe code without value or partial listening broker (34.722496ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (198.309309ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (162.012783ms)
✔ trusted host registers later launches; socket clients never have a registration verb (178.600888ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (37.296474ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (224.977314ms)
✔ v3b prototype refusals, views and append-only mutations (1141.883601ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (251.83052ms)
✔ another run cannot consume an approval; a failed check leaves it usable (229.201842ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (168.502218ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (368.781137ms)
✔ class drift gated to cross-role refuses before consumption (303.716619ms)
✔ class drift cross-role to gated refuses before consumption (305.8573ms)
✔ class drift gated to within-role refuses before consumption (210.931ms)
✔ class drift cross-role to within-role refuses before consumption (256.176102ms)
✔ class drift within-role to gated refuses before consumption (237.786434ms)
✔ class drift within-role to cross-role refuses before consumption (213.51124ms)
✔ message.send consumes approval and prevents a later send or authorize (205.615916ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (201.284131ms)
✔ creates private WAL store and excludes a second writer until explicit close (123.676876ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (173.964344ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (173.329183ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (180.89419ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (110.220299ms)
✔ async transactions refuse before invoking their function (90.935183ms)
✔ recordTask keeps sync reads and a role write apart (178.34485ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (105.066353ms)
✔ a bad entry refuses the whole record (115.43348ms)
✔ taskView reads the projection for one business (124.036913ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (259.12632ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (456.306481ms)
✔ without an adapter the server refuses every task verb (274.270368ms)
✔ the runtime refuses an invalid adapter and closes a valid one (247.228167ms)
✔ the process loads the S3 adapter from plain-data trackers (288.195365ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (155.955841ms)
✔ two wire claims serialize; a lost reply never automatically retries (177.626273ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (118.252926ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.92216ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (151.54177ms)
ℹ tests 74
ℹ suites 0
ℹ pass 73
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3036.102819

✖ failing tests:

test at packages/bus/tests/end-launch.test.mjs:73:1
✖ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (153.743346ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception.
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/bus/tests/end-launch.test.mjs:79: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: /run-ended/,
    operator: 'throws',
    diff: 'simple'
  }
