npm notice run test
npm notice run node --test tests/*.test.mjs
✔ agents: a held role with nothing on the bus is idle; a role session gets the claim rows unchanged (187.979573ms)
✔ agents: working counts what the holder received and has not read; routed alone is not working (250.003513ms)
✔ agents: input needed is the role's open decisions routed to the human, gated first, then oldest (379.306477ms)
✔ agents: working wins over waiting, and Input needed still shows (197.134471ms)
✔ agents: a new holder doesn't inherit what the last one left unread; decisions stay with the role (233.288492ms)
✔ agents: state reads only its own business, even for a run name both use (218.968439ms)
✔ agents: a message the holder released unread is stranded; the next holder gets nothing and cannot read it (242.747582ms)
✔ agents: a message the holder read is not stranded; one the current holder has not read is not listed (242.656328ms)
✔ agents: stranded is oldest first and capped at 50 for a role (1087.728853ms)
✔ agents: stranded is per role and per business (389.888348ms)
✔ agents: a message routed to a held role and not yet received is not stranded (149.982698ms)
✔ REQ-DEC an approval outlives its run and a broker restart; a new run of the instance consumes it once (359.128532ms)
✔ REQ-DEC another instance of the same definition cannot consume an approval, and its refusal consumes nothing (213.17523ms)
✔ REQ-DEC REQ-THREAD-1 a thread approval is consumed only by a run holding the same thread (305.385864ms)
✔ REQ-DEC a later run of the same instance supersedes an open decision; another instance cannot (285.470316ms)
✔ REQ-DEC REQ-THREAD-1 a thread decision is superseded only from the same thread (282.032239ms)
✔ REQ-DEC REQ-THREAD-1 a thread instance decision raised before row 121 is not consumed or superseded by any thread run (410.881641ms)
✔ launch identity is stamped, payload identity is refused and stale holder cannot send (226.242414ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (285.577332ms)
✖ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (276.311729ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (222.646139ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (217.032618ms)
✔ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (325.297846ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (203.250439ms)
✔ task action subjects and linked decision trail are complete and ordered (226.816188ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (130.141629ms)
✔ business isolation includes inherited object names and cross-business message references (239.451653ms)
✖ authority never transfers between action, target, unresolved or replaced role holder; a later run of the instance keeps it (300.745369ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (208.663163ms)
✖ revocation permanently bars the old run from reclaiming first, including after broker restart (235.877466ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (177.49322ms)
✔ both arbiters require human resolution when their cross-role route is themselves (261.487303ms)
✖ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (221.123239ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (2.629091ms)
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (286.51485ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (376.855894ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (315.645328ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (282.389298ms)
✖ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (294.778571ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (359.17504ms)
✔ REQ-COS-1: the chief of staff cannot end its own run or the assistant's through role.end (315.915045ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (248.758725ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (396.76465ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (372.368335ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (443.270185ms)
✔ REQ-ROLE-3, REQ-LIMIT-1: a chief-of-staff change is validated, written and logged like a human's; an invalid one is refused (634.986751ms)
✔ REQ-ROLE-2, REQ-COS-1: the 3c→3d migration lets the chief of staff end a held role with a reason; neither is still refused (2731.791486ms)
✔ comment cursors isolate businesses, move only forward and remain append-only (157.074188ms)
✔ only trusted sync writes validated cursors; events and cursor share rollback (129.364417ms)
✔ explicit 3b copy migration preserves evidence and opens as 3f; normal startup never migrates (921.994142ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1656.441477ms)
✔ named migration registry chains 3b through 3f to a fixture-only future version in order (927.175538ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (956.583424ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (2670.905327ms)
✔ credentials gives human and reader sessions service, account, role, date and state, and nothing else (117.05724ms)
✔ credentials refuses a role session and any argument (210.285793ms)
✔ credentials reads the status on each request, and a broker without one lists none (239.234307ms)
✔ the broker process answers credentials without a token, path or variable in its output, log or store (243.549598ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (4.547202ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (16.875163ms)
✔ expiry refuses use and env references never become client data (0.987034ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.834952ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.408702ms)
✔ each C-suite role file carries the same two lists: human, chief-of-staff, pm, cto (1.712827ms)
✔ chief-executive-officer: messages to and from the user, chief of staff, pm and cto pass (573.081941ms)
✔ chief-executive-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (546.976966ms)
✔ chief-executive-officer: another C-suite role isn't on the lists either (481.643232ms)
✔ chief-financial-officer: messages to and from the user, chief of staff, pm and cto pass (523.396143ms)
✔ chief-financial-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (511.342094ms)
✔ chief-financial-officer: another C-suite role isn't on the lists either (518.7901ms)
✔ chief-information-officer: messages to and from the user, chief of staff, pm and cto pass (532.140244ms)
✔ chief-information-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (538.318988ms)
✔ chief-information-officer: another C-suite role isn't on the lists either (1023.446239ms)
✔ chief-information-security-officer: messages to and from the user, chief of staff, pm and cto pass (1672.162917ms)
✔ chief-information-security-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (566.190642ms)
✔ chief-information-security-officer: another C-suite role isn't on the lists either (447.91515ms)
✔ chief-marketing-officer: messages to and from the user, chief of staff, pm and cto pass (566.441962ms)
✔ chief-marketing-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (486.013911ms)
✔ chief-marketing-officer: another C-suite role isn't on the lists either (401.813492ms)
✔ a human resolve sends the raising role one message from the human, and its request is the answer (269.791553ms)
✔ a cross-role decision resolved by its arbiter comes from that role and run, with no request (279.668194ms)
✔ a human withdraw sends one message with the note (279.751241ms)
✔ a human seen before the close leaves the request on the close's answer, not the seen (318.065418ms)
✔ the raising run's withdraw, a supersede, a within-role raise and seen send nothing (324.683167ms)
✔ refused closes send nothing: invalid-choice, decision-closed, not-resolver (351.390022ms)
✔ a raising role nobody holds at the close gets the message on the next claim (332.645138ms)
✔ a human DECISION send keeps its own instruction as the request, not a close's answer (275.980035ms)
✔ a cross-role raise whose arbiter the raiser does not hear from is refused and stores nothing (365.155698ms)
✔ a gated raise by a role that does not hear from the human is refused and stores nothing (317.986305ms)
✔ a route the raiser hears from is allowed, checked from the route to the raiser (416.913303ms)
✔ a refused supersede withdraws nothing (349.568301ms)
✖ the assistant's within-role and gated raises still work (343.772815ms)
✔ roles lists open decisions routed to a role, and never the human inbox (264.83617ms)
✔ recent lists closed decisions of every route, newest close first, with how each closed (341.355751ms)
✔ recent gives the closing event as closed when the decision was seen first (365.813778ms)
✔ recent stops at RECENT rows (979.228023ms)
✔ every row is what trail already gives the same session for that id (301.144837ms)
✔ a role session can't list decisions, so it can't read another role's open decisions (506.439107ms)
✔ decisions is a read: one business, strict arguments, nothing written (456.208585ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (174.168961ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (159.685964ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (184.562049ms)
✔ endLaunch leaves a claim another run took alone (192.792038ms)
✔ refuse records action.refused against the caller with the code only (180.228604ms)
✔ launches off refuses role.launch with launch-revoked until launches on (223.314069ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (383.022954ms)
✔ REQ-WAIT-1: the broker hard waits are exactly the list, and match the business vocabulary (1.161747ms)
✔ REQ-WAIT-2: a business granting a hard wait at either class is refused; the actions that left are grantable (140.265647ms)
✔ REQ-DEC-2: every hard wait goes to the human, cited or not, and the arbiter cannot resolve it (820.390344ms)
✖ REQ-DEC-2: a gated raise citing the current spec goes to the arbiter for its domain; uncited, to the human (230.400088ms)
✔ REQ-DEC-2: an arbiter-approved cited gated decision authorizes the raiser, and the human cannot resolve it (305.342949ms)
✖ REQ-DEC-2: a cited merge raised by merge-gate goes to the technical arbiter; a merge raised without the grant routes by citation (367.670214ms)
✔ REQ-DEC-2: a stale or unconfirmed citation refuses without a decision; an arbiter raising its own goes to the human (302.641604ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (1.362564ms)
✔ process reader gets own kernel identity without exposing environment values (0.408004ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.532803ms)
✔ real pid 1 remains inspectable when its environment is protected (0.240907ms)
✔ a message to a stopped role sends launch.by one notice, and the result says so (258.493483ms)
✔ a message to a role outside launch.instances says so in its result and in the notice (173.098783ms)
✔ a message to a running role sends no notice and its result is unchanged (159.898419ms)
✔ a re-route at a claim, a release and claim, and a broker restart send no second notice (286.970608ms)
✔ a run launched but not yet claimed counts as no holder (153.62933ms)
✔ no notice for a message to launch.by, from it, from a tester, to the human, or in a thread to a thread instance (313.273224ms)
✔ a business with no launch block tells nobody and says there is no launcher (138.606381ms)
✔ the notice sender stays internal: no role is named _bus and no caller can send as it or to it (407.808997ms)
✔ limits binds actor from human proof and rejects role, reader, tester and forged actor (240.785342ms)
✔ runtime wires verified human settings to the actual shared file writer and actor receipt (298.560363ms)
✔ uncertain organization receipts leave bus startup and reads alone but refuse writes until reconciled (457.18615ms)
✖ within-role sends cite an open gated launch decision without spending it or naming it in grants (204.910763ms)
✔ missing and foreign-business citations refuse and roll back message and grant (214.333281ms)
✔ cross-role sends still need a matching resolved decision and consume it once (314.37551ms)
✔ messages pages all human messages newest first without writes; read state is history (3004.727286ms)
✔ messages refuses role callers, invalid paging and cursors outside this human feed (293.034715ms)
✔ views messages passes only its paging arguments through (0.292194ms)
✔ messages isolates businesses even with a valid foreign cursor (204.518473ms)
✔ the assistant sends to the user and to the chief of staff only (373.702951ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (444.283744ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (379.777055ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (410.094974ms)
✔ a sender-side list alone refuses a send to a role that has no list (422.077088ms)
✔ a target-side list alone refuses a send from a role that has no list (378.15478ms)
✔ the sender list is checked before the target list (389.851609ms)
✔ roles without the field behave exactly as before (522.092854ms)
✔ a business with no role definitions at all is unlimited (1123.363262ms)
✔ a malformed messaging field refuses at boot (599.227879ms)
✖ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (831.315414ms)
✖ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (441.257481ms)
✔ review requests and verdicts between roles without the field are unchanged (357.274451ms)
✔ plugins and plugins.set refuse every non-human session and a forged actor, and pass only the patch with the verified actor (232.513864ms)
✔ runtime: the switch changes the organization file, the receipt carries the actor, and a bad shape, an unknown module and a stale revision are refused with nothing written (550.598557ms)
✔ vikunja:19/309 through the broker, a patch switches the kinds it names and keeps the rest; null removes one kind and is trailed (427.551415ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (246.234445ms)
✔ startup token refusal returns safe code without value or partial listening broker (66.597794ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (226.100074ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (232.132126ms)
✔ trusted host registers later launches; socket clients never have a registration verb (242.682086ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (66.457801ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (243.860667ms)
✔ D1: committed write with a failed receipt refuses outcome-unknown without action.allowed (186.823442ms)
✔ D2: spec.read refuses without content if its role is released during the read (177.97009ms)
✔ D3: spec.read secret check refuses flagged content without content (163.203327ms)
✔ D3: spec.read secret check refuses flagged subject without content (161.487905ms)
✔ Broker keeps the existing sandbox client import closure: no new imports or lazy project import (1.304767ms)
✔ without a trusted project adapter all three async paths refuse project-not-configured (232.009629ms)
✔ real startBroker injects the project adapter for socket reads and bound-author record writes (239.876655ms)
✔ a reply is listed for human and reader sessions, and its delivery rows are unchanged (269.374347ms)
✔ the reply still reaches the human message.receive (mosaic talk) after the Console showed it (236.544707ms)
✔ a message with no reply gives an empty list (204.998597ms)
✔ replies come oldest first and stop at REPLIES (895.427908ms)
✔ an id that names no message in the business refuses message-not-found, and the refusal is recorded (383.767138ms)
✔ strict arguments; a role session gets human-required (452.435983ms)
✔ views passes replies through as one call with the id (0.483178ms)
✔ requirements returns the committed list to a holding role session, and no one else (254.604094ms)
✔ the PM's prd.approve with no task, when no id fits, reaches the human's Inbox (197.706036ms)
✔ the PM's non-blocking role.revoke with no task reaches the human's Inbox (217.674955ms)
✔ a push is recorded as the action.allowed for git.push.working on the task, and only the host records one (270.161035ms)
✔ review.request names the latest pushed commit and sends the reviewer a REVIEW-REQUEST (316.946075ms)
✔ review.request says which run holds the reviewer role, or null, and a null request waits for a claim (348.70753ms)
✔ review.request refuses a commit that isn't the latest push, a non-reviewer and a role without the action (454.883738ms)
✔ reviewFetch answers only the addressed reviewer, for the request it cites (267.705036ms)
✔ review.verdict answers one request once, to the role that asked (348.708778ms)
✔ task.close on a pushed task needs an approve verdict for the latest push (1229.249132ms)
✔ a refusal the host decided is filed on the task it names, and only a task ref counts (1125.844239ms)
✔ v3b prototype refusals, views and append-only mutations (1720.18795ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (292.839604ms)
✔ another run of the same instance consumes an approval once; a failed check leaves it usable (279.290723ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (185.653169ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (358.109852ms)
✔ class drift gated to cross-role refuses before consumption (321.650147ms)
✔ class drift cross-role to gated refuses before consumption (273.25285ms)
✔ class drift gated to within-role refuses before consumption (318.484176ms)
✔ class drift cross-role to within-role refuses before consumption (979.054528ms)
✔ class drift within-role to gated refuses before consumption (1177.380931ms)
✔ class drift within-role to cross-role refuses before consumption (278.984877ms)
✖ message.send consumes approval and prevents a later send or authorize (236.690492ms)
✖ role.revoke consumes approval and prevents a later revoke or authorize (250.764187ms)
✔ 3e copy migrates to 3f preserving every old column/row and adding null spec citations (1609.582169ms)
✔ real socket awaits spec reads, record writes and cited raises; other requests still return normally (329.769413ms)
✔ real socket preserves asynchronous refusal codes and disconnects its transient proof (179.197301ms)
✔ two real socket writes to one repository yield one commit and one project-busy refusal (269.127449ms)
✔ client disconnect during await tolerates late reply (217.683626ms)
✔ client disconnect during await tolerates late refusal (184.591481ms)
✔ N-a: slow admitted record.write returns its committed result after the idle deadline (417.806631ms)
✔ current citation is recorded; docs commits do not stale it and a new spec never reopens settlement (337.278147ms)
✔ stale, unconfirmed, missing and partial spec citations refuse without inserting a decision (323.492821ms)
✔ uncited raises retain their synchronous path and spec read is available to any held role in its business (308.833779ms)
✔ record writes bind the session author, require authority and refuse spec and impersonation paths (256.848569ms)
✔ REQ-COS-1: the pm asks the chief of staff for roles and counts; the chief receives a STAFF-REQUEST and answers it (272.717214ms)
✔ REQ-COS-1: only the pm can send a staff request; every other session is refused and the chief of staff hears nothing (410.558239ms)
✔ REQ-COS-1: a pm without message.send is refused like any other gated action (184.606945ms)
✔ REQ-COS-1: the request goes to the business launcher, and only when that is a chief of staff (544.290978ms)
✔ REQ-COS-1: the sender is judged by definition: an instance `lead` of the pm definition can ask, an instance `pm` of the coder definition can't (2020.429682ms)
✔ REQ-COS-1: the launcher is judged by definition: an instance `boss` of the chief-of-staff definition receives, a `chief` of the coder definition gives no-chief-of-staff (535.239498ms)
✔ REQ-COS-1: a refused staff request leaves no staff.request action.allowed event (272.749896ms)
✔ REQ-ASSIST-2: the role definitions' messaging lists hold for a staff request, sender and recipient (773.817625ms)
✔ a staff request names a task, 1 to 10 distinct roles and counts of 1 to 20; nothing else is accepted (489.552281ms)
✔ REQ-COS-1: a staff request grants nothing: the pm still can't launch and the chief of staff launches as before (269.913411ms)
✔ a business that never switched launches reads allowed with no time and no event (198.179306ms)
✔ launches revoked and then restored read allowed, with the restore time and event id (156.225685ms)
✔ a task closed on the tracker leaves the open list, and total counts the open ones (176.09302ms)
✔ a tombstone is not open (152.463685ms)
✔ the open list stops at the cap and says so; total still counts every open task (228.380239ms)
✔ a role and a reader session read state; arguments, and an unbound cap, refuse (523.78999ms)
✔ a human session reads the same state, with the same cap (605.586855ms)
✔ reading state writes nothing: every table keeps its row count (971.371138ms)
✔ creates private WAL store and excludes a second writer until explicit close (129.701536ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (191.316249ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (201.574306ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (301.365789ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (688.85823ms)
✔ async transactions refuse before invoking their function (385.707745ms)
✔ the session default fits under the reply cap and pages to the end with next (574.356049ms)
✔ the short form: no description, assignees by role, every listed key (1046.990941ms)
✔ each filter, alone and together, and total counts every match (1062.39483ms)
✔ task_ref reads one task in full, as the whole board has it (364.728058ms)
✔ no arguments is the read the Console and mosaic make, unchanged (279.912541ms)
✔ an unknown argument or a bad value refuses invalid-request (1052.395499ms)
✔ tasks rows carry priority and requirement for every session that reads tasks (445.883938ms)
✔ the read model rebuilds from the ledger: a reopened bus and each trail give the same values (1932.304887ms)
✔ an empty business and one with snapshots but no task.created read cleanly (166.710313ms)
✔ recordTask keeps sync reads and a role write apart (252.845317ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (123.574883ms)
✔ a bad entry refuses the whole record (755.210208ms)
✔ taskView reads the projection for one business (593.919053ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (859.753903ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (459.803584ms)
✔ without an adapter the server refuses every task verb (251.271116ms)
✔ the runtime refuses an invalid adapter and closes a valid one (239.005323ms)
✔ the process loads the S3 adapter from plain-data trackers (407.20966ms)
✔ the tester binds only when the business sets bus.tester to exactly true (2578.139466ms)
✔ a business may not name a role tester, so the tester address is never a role (320.406607ms)
✔ every verb outside the tester list refuses tester-refused and is recorded against the tester (659.221624ms)
✔ a tester message is from tester, starts [mos test], and writes no human.input or authority (295.353561ms)
✔ a role answers a tester only in reply to a tester message, and the answer never reaches the human (284.226912ms)
✔ the tester reads the human views a reader reads (201.455935ms)
✔ tester proof binds its own CLI, start time and nonce, refuses a managed run and allows an agent (1.260133ms)
✔ neither CLI's nonce proves the other: each proof is bound to its own CLI and nonce variable (0.370595ms)
✔ testerNonce reads only the tester's variable and gives null on any read error (0.254634ms)
✔ an envelope carries exactly one of cap, human and tester; no tester authenticator refuses (122.328879ms)
✔ tester-cli.mjs binds through the runtime when the switch is on, and refuses off or under a run marker (1055.922702ms)
✔ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (2828.27177ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (989.540477ms)
✔ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (921.441195ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (1627.132146ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1759.858535ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (435.49787ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (4276.825466ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (115.513289ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (163.796028ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (168.699679ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (164.949356ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (155.352812ms)
✖ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (143.436125ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (165.797872ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (125.381076ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (181.587597ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (530.503046ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (916.77671ms)
✔ two wire claims serialize; a lost reply never automatically retries (240.561181ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (155.322315ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.524891ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (194.86412ms)
✔ web.search: a granted role gets labelled results, and the call is trailed with role, run, verb and query (224.275158ms)
✔ web.fetch: a granted role gets the page as labelled text, and the call is trailed with the url (190.303442ms)
✔ a role without the grant is refused, the refusal is logged with the verb, and nothing is fetched (257.263786ms)
✔ a broker with no web service refuses a granted role (158.431598ms)
✔ bad requests are refused: unknown verb, extra or missing argument, not a string, a human or reader session (215.31721ms)
✔ a session that is not the role holder is refused (164.011553ms)
✔ web.mjs's fences hold on the broker side: refusals are normal results with the fixed reason (512.346079ms)
✔ web.search with no search source configured is a refused result, not an error (172.325922ms)
✔ a search source that fails with its own refusal, or that throws, is handled (205.692043ms)
✔ a slow search source ends in a refusal at the deadline (202.232761ms)
✔ a secret in the arguments is refused before anything is trailed or fetched (145.815819ms)
✔ over the socket: the server routes web verbs to the service; other roles are refused; no service is web-not-configured (231.454879ms)
✔ busBusiness: the web grant comes from "web" in the resolved tool limit (0.257028ms)
✔ webServices: the business's search-source plug-in and web.searxng var make web.search work; without either it is refused as not configured (430.324555ms)
✔ an ungranted call is refused at once: no admission, no wait, nothing touched (181.78835ms)
✔ over the socket an ungranted caller is dropped by the server timeout and a granted one gets the longer wait (484.501624ms)
✔ a search that never answers is aborted at the deadline, the module sees the signal, and the call is trailed as refused (timeout) (183.270186ms)
✔ a fetch that stalls is cut off at the deadline: the request is destroyed, not left running (304.832084ms)
✔ one query limit: over SEARCH_MAX_QUERY_CHARS or empty is refused with the same reason before any backend, and the tool schema carries the same number (179.988413ms)
ℹ tests 301
ℹ suites 0
ℹ pass 287
ℹ fail 14
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 14719.50106

✖ failing tests:

test at tests/broker.test.mjs:96:1
✖ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (276.311729ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/broker.test.mjs:45:45)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/broker.test.mjs:111:3)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'agent-required'
  }

test at tests/broker.test.mjs:274:1
✖ authority never transfers between action, target, unresolved or replaced role holder; a later run of the instance keeps it (300.745369ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/broker.test.mjs:45:45)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/broker.test.mjs:290:3)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'agent-required'
  }

test at tests/broker.test.mjs:322:1
✖ revocation permanently bars the old run from reclaiming first, including after broker restart (235.877466ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/broker.test.mjs:45:45)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/broker.test.mjs:329:3)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'agent-required'
  }

test at tests/broker.test.mjs:393:1
✖ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (221.123239ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  'pm' !== 'human'
  
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/broker.test.mjs:407: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: true,
    code: 'ERR_ASSERTION',
    actual: 'pm',
    expected: 'human',
    operator: 'strictEqual',
    diff: 'simple'
  }

test at tests/chief-of-staff.test.mjs:139:1
✖ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (294.778571ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/chief-of-staff.test.mjs:73:44)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/chief-of-staff.test.mjs:152:3)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'agent-required'
  }

test at tests/decision-route.test.mjs:139:1
✖ the assistant's within-role and gated raises still work (343.772815ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  'chief' !== 'human'
  
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/decision-route.test.mjs:150: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: true,
    code: 'ERR_ASSERTION',
    actual: 'chief',
    expected: 'human',
    operator: 'strictEqual',
    diff: 'simple'
  }

test at tests/hard-waits.test.mjs:51:1
✖ REQ-DEC-2: a gated raise citing the current spec goes to the arbiter for its domain; uncited, to the human (230.400088ms)
  AssertionError [ERR_ASSERTION]: git.merge.protected
  + actual - expected
  
    {
      class: 'gated',
  +   route_to: 'reviewer'
  -   route_to: 'human'
    }
  
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/hard-waits.test.mjs:57:12)
      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: false,
    code: 'ERR_ASSERTION',
    actual: { class: 'gated', route_to: 'reviewer' },
    expected: { class: 'gated', route_to: 'human' },
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at tests/hard-waits.test.mjs:73:1
✖ REQ-DEC-2: a cited merge raised by merge-gate goes to the technical arbiter; a merge raised without the grant routes by citation (367.670214ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected
  
    {
      class: 'gated',
  +   route_to: 'cto'
  -   route_to: 'human'
    }
  
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/hard-waits.test.mjs:87: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: { class: 'gated', route_to: 'cto' },
    expected: { class: 'gated', route_to: 'human' },
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at tests/message-citation.test.mjs:53:1
✖ within-role sends cite an open gated launch decision without spending it or naming it in grants (204.910763ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at Object.call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/message-citation.test.mjs:27:44)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/message-citation.test.mjs:69:5)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'agent-required'
  }

test at tests/messaging.test.mjs:263:1
✖ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (831.315414ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/messaging.test.mjs:76:44)
      at approved (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/messaging.test.mjs:259:3)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/messaging.test.mjs:266:20)
      at Test.runInAsyncScope (node:async_hooks:226:14) {
    code: 'agent-required'
  }

test at tests/messaging.test.mjs:280:1
✖ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (441.257481ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/messaging.test.mjs:76:44)
      at approved (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/messaging.test.mjs:259:3)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/messaging.test.mjs:284:20)
      at Test.runInAsyncScope (node:async_hooks:226:14) {
    code: 'agent-required'
  }

test at tests/single-use.test.mjs:208:1
✖ message.send consumes approval and prevents a later send or authorize (236.690492ms)
  Error: not-resolver
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1298:38)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/single-use.test.mjs:25:42)
      at Object.approve (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/single-use.test.mjs:56:7)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/single-use.test.mjs:210:11)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'not-resolver'
  }

test at tests/single-use.test.mjs:231:1
✖ role.revoke consumes approval and prevents a later revoke or authorize (250.764187ms)
  Error: not-resolver
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1298:38)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/single-use.test.mjs:25:42)
      at Object.approve (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/single-use.test.mjs:56:7)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/single-use.test.mjs:235:15)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'not-resolver'
  }

test at tests/threads.test.mjs:396:1
✖ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (143.436125ms)
  Error: agent-required
      at fail (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:104:9)
      at #agent (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:295:18)
      at #dispatch (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:1297:22)
      at file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:950:38
      at Store.transaction (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/store.mjs:242:22)
      at Broker.request (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/src/broker.mjs:944:26)
      at call (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/threads.test.mjs:50:44)
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/threads.test.mjs:409:3)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25) {
    code: 'agent-required'
  }
