✔ launch identity is stamped, payload identity is refused and stale holder cannot send (186.289558ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (304.018727ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (312.896779ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (176.026053ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (214.016058ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (156.008229ms)
✔ task action subjects and linked decision trail are complete and ordered (186.987338ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (116.187895ms)
✔ business isolation includes inherited object names and cross-business message references (246.496569ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (251.859443ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (122.105337ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (218.667672ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (164.00194ms)
✔ both arbiters require human resolution when their cross-role route is themselves (257.710544ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (1.954557ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (5.251571ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.375131ms)
✔ expiry refuses use and env references never become client data (0.751766ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.531434ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.414561ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (154.694325ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (171.902185ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (174.905205ms)
✔ endLaunch leaves a claim another run took alone (212.217176ms)
✔ refuse records action.refused against the caller with the code only (138.391095ms)
✔ launches off refuses role.launch with launch-revoked until launches on (215.338187ms)
✖ broker process: launch ops authorize role.launch, record refusals and end runs (213.614803ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (3.386446ms)
✔ process reader gets own kernel identity without exposing environment values (0.689787ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (1.079005ms)
✔ real pid 1 remains inspectable when its environment is protected (0.397066ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (254.253894ms)
✔ missing and foreign-business citations refuse and roll back message and grant (212.627037ms)
✔ cross-role sends still need a matching resolved decision and consume it once (289.310244ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (218.517678ms)
✔ startup token refusal returns safe code without value or partial listening broker (32.491119ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (178.304823ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (191.566072ms)
✔ trusted host registers later launches; socket clients never have a registration verb (189.349722ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (36.89722ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (175.689007ms)
✔ v3b prototype refusals, views and append-only mutations (1197.281905ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (305.159404ms)
✔ another run cannot consume an approval; a failed check leaves it usable (262.492222ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (181.830806ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (346.4383ms)
✔ class drift gated to cross-role refuses before consumption (222.934014ms)
✔ class drift cross-role to gated refuses before consumption (241.225922ms)
✔ class drift gated to within-role refuses before consumption (251.437257ms)
✔ class drift cross-role to within-role refuses before consumption (223.715857ms)
✔ class drift within-role to gated refuses before consumption (178.191594ms)
✔ class drift within-role to cross-role refuses before consumption (157.94191ms)
✔ message.send consumes approval and prevents a later send or authorize (245.832812ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (292.283314ms)
✔ creates private WAL store and excludes a second writer until explicit close (140.014706ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (212.834441ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (219.258383ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (187.366748ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (117.888079ms)
✔ async transactions refuse before invoking their function (89.581295ms)
✔ recordTask keeps sync reads and a role write apart (215.864702ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (138.896899ms)
✔ a bad entry refuses the whole record (119.620932ms)
✔ taskView reads the projection for one business (146.650022ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (263.17009ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (411.847863ms)
✔ without an adapter the server refuses every task verb (196.381669ms)
✔ the runtime refuses an invalid adapter and closes a valid one (227.028171ms)
✔ the process loads the S3 adapter from plain-data trackers (291.300727ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (175.428009ms)
✔ two wire claims serialize; a lost reply never automatically retries (203.728929ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (124.215141ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.588695ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (170.147838ms)
ℹ tests 74
ℹ suites 0
ℹ pass 73
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3003.137811

✖ 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 (213.614803ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  undefined !== 7
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41c/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'
  }
