✔ launch identity is stamped, payload identity is refused and stale holder cannot send (163.89862ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (275.331186ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (282.996644ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (195.063187ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (208.388066ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (157.831971ms)
✔ task action subjects and linked decision trail are complete and ordered (156.524887ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (97.415614ms)
✔ business isolation includes inherited object names and cross-business message references (159.041055ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (227.530616ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (94.890129ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (180.592353ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (106.579275ms)
✔ both arbiters require human resolution when their cross-role route is themselves (189.732423ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (1.899132ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (5.641078ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (3.241221ms)
✔ expiry refuses use and env references never become client data (0.737712ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.517077ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.297143ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (122.779602ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (127.653631ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (155.030205ms)
✔ endLaunch leaves a claim another run took alone (193.274277ms)
✔ refuse records action.refused against the caller with the code only (145.282316ms)
✖ launches off refuses role.launch with launch-revoked until launches on (183.043385ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (266.177254ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (3.887495ms)
✔ process reader gets own kernel identity without exposing environment values (0.762853ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (1.082879ms)
✔ real pid 1 remains inspectable when its environment is protected (0.430481ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (196.161745ms)
✔ missing and foreign-business citations refuse and roll back message and grant (183.836168ms)
✔ cross-role sends still need a matching resolved decision and consume it once (274.522528ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (190.003233ms)
✔ startup token refusal returns safe code without value or partial listening broker (40.621827ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (184.028601ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (188.935171ms)
✔ trusted host registers later launches; socket clients never have a registration verb (175.835554ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (39.471345ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (178.989186ms)
✔ v3b prototype refusals, views and append-only mutations (1120.730725ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (251.703532ms)
✔ another run cannot consume an approval; a failed check leaves it usable (238.891458ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (180.906441ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (351.290843ms)
✔ class drift gated to cross-role refuses before consumption (218.014846ms)
✔ class drift cross-role to gated refuses before consumption (203.570384ms)
✔ class drift gated to within-role refuses before consumption (183.6351ms)
✔ class drift cross-role to within-role refuses before consumption (196.755743ms)
✔ class drift within-role to gated refuses before consumption (134.864109ms)
✔ class drift within-role to cross-role refuses before consumption (160.50952ms)
✔ message.send consumes approval and prevents a later send or authorize (173.816965ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (195.598037ms)
✔ creates private WAL store and excludes a second writer until explicit close (123.44453ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (181.784127ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (215.291682ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (169.453598ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (119.878794ms)
✔ async transactions refuse before invoking their function (107.045531ms)
✔ recordTask keeps sync reads and a role write apart (179.866702ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (109.539813ms)
✔ a bad entry refuses the whole record (118.580361ms)
✔ taskView reads the projection for one business (143.124952ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (262.005489ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (413.469594ms)
✔ without an adapter the server refuses every task verb (173.691791ms)
✔ the runtime refuses an invalid adapter and closes a valid one (180.508213ms)
✔ the process loads the S3 adapter from plain-data trackers (232.75675ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (146.93786ms)
✔ two wire claims serialize; a lost reply never automatically retries (182.474377ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (113.923911ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.855361ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (162.548925ms)
ℹ tests 74
ℹ suites 0
ℹ pass 73
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2579.991609

✖ failing tests:

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