✔ launch identity is stamped, payload identity is refused and stale holder cannot send (292.561005ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (277.551361ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (497.078545ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (226.410623ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (200.406094ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (167.322227ms)
✔ task action subjects and linked decision trail are complete and ordered (167.929413ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (115.499176ms)
✔ business isolation includes inherited object names and cross-business message references (191.409782ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (274.594256ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (108.292348ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (189.599503ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (122.287696ms)
✔ both arbiters require human resolution when their cross-role route is themselves (209.820218ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (2.954793ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (6.947483ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (3.716844ms)
✔ expiry refuses use and env references never become client data (1.082525ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.931891ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.446136ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (247.796173ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (130.726344ms)
✖ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (157.253366ms)
✔ endLaunch leaves a claim another run took alone (289.241075ms)
✔ refuse records action.refused against the caller with the code only (251.654803ms)
✔ launches off refuses role.launch with launch-revoked until launches on (250.720391ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (262.370088ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (3.987867ms)
✔ process reader gets own kernel identity without exposing environment values (0.776973ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (1.162267ms)
✔ real pid 1 remains inspectable when its environment is protected (0.450215ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (318.86415ms)
✔ missing and foreign-business citations refuse and roll back message and grant (196.815379ms)
✔ cross-role sends still need a matching resolved decision and consume it once (373.987519ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (309.978292ms)
✔ startup token refusal returns safe code without value or partial listening broker (40.260658ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (212.318126ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (284.283419ms)
✔ trusted host registers later launches; socket clients never have a registration verb (331.796722ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (50.863608ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (199.936442ms)
✔ v3b prototype refusals, views and append-only mutations (1474.221154ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (370.765558ms)
✔ another run cannot consume an approval; a failed check leaves it usable (254.968901ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (269.788235ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (497.173983ms)
✔ class drift gated to cross-role refuses before consumption (223.510713ms)
✔ class drift cross-role to gated refuses before consumption (231.466212ms)
✔ class drift gated to within-role refuses before consumption (212.371643ms)
✔ class drift cross-role to within-role refuses before consumption (210.13879ms)
✔ class drift within-role to gated refuses before consumption (186.617229ms)
✔ class drift within-role to cross-role refuses before consumption (166.777678ms)
✔ message.send consumes approval and prevents a later send or authorize (201.323203ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (232.747756ms)
✔ creates private WAL store and excludes a second writer until explicit close (245.691122ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (172.009427ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (256.716305ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (351.248691ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (149.511218ms)
✔ async transactions refuse before invoking their function (119.740418ms)
✔ recordTask keeps sync reads and a role write apart (277.097949ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (114.028215ms)
✔ a bad entry refuses the whole record (116.960536ms)
✔ taskView reads the projection for one business (210.868484ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (438.207826ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (438.027227ms)
✔ without an adapter the server refuses every task verb (198.146102ms)
✔ the runtime refuses an invalid adapter and closes a valid one (216.186052ms)
✔ the process loads the S3 adapter from plain-data trackers (273.619163ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (260.103868ms)
✔ two wire claims serialize; a lost reply never automatically retries (186.295991ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (122.398394ms)
✔ client preserves UTF-8 when a response divides a multibyte character (12.28368ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (244.901528ms)
ℹ tests 74
ℹ suites 0
ℹ pass 73
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3166.363958

✖ 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 (157.253366ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception.
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41/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'
  }
