✔ launch identity is stamped, payload identity is refused and stale holder cannot send (177.229803ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (275.752672ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (278.809307ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (179.057449ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (166.815435ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (167.264193ms)
✔ task action subjects and linked decision trail are complete and ordered (180.406752ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (109.64095ms)
✔ business isolation includes inherited object names and cross-business message references (252.119335ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (424.591029ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (139.347503ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (246.764458ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (157.256723ms)
✔ both arbiters require human resolution when their cross-role route is themselves (256.737356ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (1.815371ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (5.505282ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.675771ms)
✔ expiry refuses use and env references never become client data (0.928186ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.806798ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.423882ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (134.40541ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (126.056749ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (173.037613ms)
✔ endLaunch leaves a claim another run took alone (186.025336ms)
✔ refuse records action.refused against the caller with the code only (132.051699ms)
✖ launches off refuses role.launch with launch-revoked until launches on (167.479733ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (251.260579ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (3.799433ms)
✔ process reader gets own kernel identity without exposing environment values (0.636082ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.788808ms)
✔ real pid 1 remains inspectable when its environment is protected (0.341787ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (211.319193ms)
✔ missing and foreign-business citations refuse and roll back message and grant (195.215344ms)
✔ cross-role sends still need a matching resolved decision and consume it once (266.86907ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (186.52044ms)
✔ startup token refusal returns safe code without value or partial listening broker (37.446938ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (173.835214ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (188.388532ms)
✔ trusted host registers later launches; socket clients never have a registration verb (190.013239ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (37.739358ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (163.945389ms)
✔ v3b prototype refusals, views and append-only mutations (1083.019917ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (263.722973ms)
✔ another run cannot consume an approval; a failed check leaves it usable (243.701826ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (168.502436ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (325.314036ms)
✔ class drift gated to cross-role refuses before consumption (208.156247ms)
✔ class drift cross-role to gated refuses before consumption (216.120898ms)
✔ class drift gated to within-role refuses before consumption (235.048484ms)
✔ class drift cross-role to within-role refuses before consumption (328.948633ms)
✔ class drift within-role to gated refuses before consumption (281.360844ms)
✔ class drift within-role to cross-role refuses before consumption (206.289663ms)
✔ message.send consumes approval and prevents a later send or authorize (240.808783ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (280.998053ms)
✔ creates private WAL store and excludes a second writer until explicit close (138.150282ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (182.019336ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (211.271904ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (168.894848ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (119.46873ms)
✔ async transactions refuse before invoking their function (96.187261ms)
✔ recordTask keeps sync reads and a role write apart (185.827602ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (108.208596ms)
✔ a bad entry refuses the whole record (126.728342ms)
✔ taskView reads the projection for one business (141.375996ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (253.38447ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (409.317736ms)
✔ without an adapter the server refuses every task verb (201.178983ms)
✔ the runtime refuses an invalid adapter and closes a valid one (250.764772ms)
✔ the process loads the S3 adapter from plain-data trackers (322.736733ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (160.441912ms)
✔ two wire claims serialize; a lost reply never automatically retries (176.70387ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (133.427523ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.974517ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (136.481387ms)
ℹ tests 74
ℹ suites 0
ℹ pass 73
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3088.587313

✖ failing tests:

test at packages/bus/tests/end-launch.test.mjs:121:1
✖ launches off refuses role.launch with launch-revoked until launches on (167.479733ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception.
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/bus/tests/end-launch.test.mjs:128: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: 'launch-revoked' },
    operator: 'throws',
    diff: 'simple'
  }
