✔ launch identity is stamped, payload identity is refused and stale holder cannot send (184.047781ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (257.734218ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (278.500051ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (165.068907ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (161.335881ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (159.243496ms)
✔ task action subjects and linked decision trail are complete and ordered (176.904294ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (109.155948ms)
✔ business isolation includes inherited object names and cross-business message references (174.305239ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (270.690431ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (127.365414ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (183.630887ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (137.706215ms)
✔ both arbiters require human resolution when their cross-role route is themselves (271.610917ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (1.748448ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (4.508833ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.886979ms)
✔ expiry refuses use and env references never become client data (0.832119ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.473483ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.359737ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (133.186192ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (129.549343ms)
✖ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (152.425639ms)
✔ endLaunch leaves a claim another run took alone (181.719438ms)
✔ refuse records action.refused against the caller with the code only (145.867162ms)
✔ launches off refuses role.launch with launch-revoked until launches on (176.571624ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (214.227705ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (2.122501ms)
✔ process reader gets own kernel identity without exposing environment values (0.56463ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.712195ms)
✔ real pid 1 remains inspectable when its environment is protected (0.361585ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (199.323709ms)
✔ missing and foreign-business citations refuse and roll back message and grant (191.07183ms)
✔ cross-role sends still need a matching resolved decision and consume it once (246.333185ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (188.169376ms)
✔ startup token refusal returns safe code without value or partial listening broker (41.838933ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (166.55587ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (176.255856ms)
✔ trusted host registers later launches; socket clients never have a registration verb (178.685487ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (36.737248ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (165.960804ms)
✔ v3b prototype refusals, views and append-only mutations (1032.22821ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (249.596775ms)
✔ another run cannot consume an approval; a failed check leaves it usable (224.168828ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (170.880883ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (308.703039ms)
✔ class drift gated to cross-role refuses before consumption (198.719962ms)
✔ class drift cross-role to gated refuses before consumption (226.403993ms)
✔ class drift gated to within-role refuses before consumption (207.238596ms)
✔ class drift cross-role to within-role refuses before consumption (227.695738ms)
✔ class drift within-role to gated refuses before consumption (194.611101ms)
✔ class drift within-role to cross-role refuses before consumption (170.531727ms)
✔ message.send consumes approval and prevents a later send or authorize (209.047544ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (321.964213ms)
✔ creates private WAL store and excludes a second writer until explicit close (137.579044ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (172.969185ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (191.788232ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (171.439266ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (105.58886ms)
✔ async transactions refuse before invoking their function (85.925133ms)
✔ recordTask keeps sync reads and a role write apart (184.805478ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (108.899917ms)
✔ a bad entry refuses the whole record (103.269817ms)
✔ taskView reads the projection for one business (126.877852ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (239.547908ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (395.224422ms)
✔ without an adapter the server refuses every task verb (198.533632ms)
✔ the runtime refuses an invalid adapter and closes a valid one (212.245707ms)
✔ the process loads the S3 adapter from plain-data trackers (258.328732ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (160.333179ms)
✔ two wire claims serialize; a lost reply never automatically retries (180.845064ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (99.411062ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.674905ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (135.16461ms)
ℹ tests 74
ℹ suites 0
ℹ pass 73
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2789.931252

✖ 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 (152.425639ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception.
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41/wt/packages/bus/tests/end-launch.test.mjs:80: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: /unknown-run/,
    operator: 'throws',
    diff: 'simple'
  }
