✔ launch identity is stamped, payload identity is refused and stale holder cannot send (156.688073ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (254.990034ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (263.4071ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (161.541146ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (168.597858ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (163.557403ms)
✔ task action subjects and linked decision trail are complete and ordered (196.811971ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (98.107431ms)
✔ business isolation includes inherited object names and cross-business message references (184.203812ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (264.871253ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (151.601254ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (208.945298ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (132.772431ms)
✔ both arbiters require human resolution when their cross-role route is themselves (206.679273ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (1.721977ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (4.468229ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.381998ms)
✔ expiry refuses use and env references never become client data (0.725347ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.585195ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.367562ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (115.594666ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (125.580874ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (149.334492ms)
✔ endLaunch leaves a claim another run took alone (179.262151ms)
✔ refuse records action.refused against the caller with the code only (123.396171ms)
✔ launches off refuses role.launch with launch-revoked until launches on (182.423177ms)
✖ broker process: launch ops authorize role.launch, record refusals and end runs (255.509266ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (2.798434ms)
✔ process reader gets own kernel identity without exposing environment values (0.564421ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.86072ms)
✔ real pid 1 remains inspectable when its environment is protected (0.307777ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (165.580215ms)
✔ missing and foreign-business citations refuse and roll back message and grant (179.045078ms)
✔ cross-role sends still need a matching resolved decision and consume it once (248.113233ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (178.726728ms)
✔ startup token refusal returns safe code without value or partial listening broker (36.961343ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (179.862873ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (201.608434ms)
✔ trusted host registers later launches; socket clients never have a registration verb (188.507925ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (50.946893ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (202.870546ms)
✔ v3b prototype refusals, views and append-only mutations (996.668482ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (230.014396ms)
✔ another run cannot consume an approval; a failed check leaves it usable (219.424366ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (163.386829ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (313.530515ms)
✔ class drift gated to cross-role refuses before consumption (203.402278ms)
✔ class drift cross-role to gated refuses before consumption (231.111744ms)
✔ class drift gated to within-role refuses before consumption (205.601926ms)
✔ class drift cross-role to within-role refuses before consumption (207.540289ms)
✔ class drift within-role to gated refuses before consumption (227.612879ms)
✔ class drift within-role to cross-role refuses before consumption (182.67593ms)
✔ message.send consumes approval and prevents a later send or authorize (205.696724ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (223.52629ms)
✔ creates private WAL store and excludes a second writer until explicit close (106.384558ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (172.585017ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (194.975755ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (191.459506ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (110.751067ms)
✔ async transactions refuse before invoking their function (97.662881ms)
✔ recordTask keeps sync reads and a role write apart (161.995121ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (99.394876ms)
✔ a bad entry refuses the whole record (105.139574ms)
✔ taskView reads the projection for one business (144.68784ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (234.262551ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (429.558263ms)
✔ without an adapter the server refuses every task verb (209.208603ms)
✔ the runtime refuses an invalid adapter and closes a valid one (211.154568ms)
✔ the process loads the S3 adapter from plain-data trackers (304.261499ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (130.132782ms)
✔ two wire claims serialize; a lost reply never automatically retries (167.754097ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (119.612349ms)
✔ client preserves UTF-8 when a response divides a multibyte character (13.392997ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (137.570475ms)
ℹ tests 74
ℹ suites 0
ℹ pass 73
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2705.19541

✖ failing tests:

test at packages/bus/tests/end-launch.test.mjs:135:1
✖ broker process: launch ops authorize role.launch, record refusals and end runs (255.509266ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  undefined !== 7
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/bus/tests/end-launch.test.mjs:179:10)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: 7,
    operator: 'strictEqual',
    diff: 'simple'
  }
