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 (146.701078ms)
✔ agents: working counts what the holder received and has not read; routed alone is not working (260.817711ms)
✔ agents: input needed is the role's open decisions routed to the human, gated first, then oldest (396.009553ms)
✔ agents: working wins over waiting, and Input needed still shows (222.326641ms)
✔ agents: a new holder doesn't inherit what the last one left unread; decisions stay with the role (257.542184ms)
✔ agents: state reads only its own business, even for a run name both use (219.807958ms)
✔ agents: a message the holder released unread is stranded; the next holder gets nothing and cannot read it (271.458603ms)
✔ agents: a message the holder read is not stranded; one the current holder has not read is not listed (242.177599ms)
✔ agents: stranded is oldest first and capped at 50 for a role (1012.576722ms)
✔ agents: stranded is per role and per business (451.131479ms)
✔ agents: a message routed to a held role and not yet received is not stranded (155.583777ms)
✔ REQ-DEC an approval outlives its run and a broker restart; a new run of the instance consumes it once (335.627353ms)
✔ REQ-DEC another instance of the same definition cannot consume an approval, and its refusal consumes nothing (240.774445ms)
✔ REQ-DEC REQ-THREAD-1 a thread approval is consumed only by a run holding the same thread (321.684873ms)
✔ REQ-DEC a later run of the same instance supersedes an open decision; another instance cannot (301.698893ms)
✔ REQ-DEC REQ-THREAD-1 a thread decision is superseded only from the same thread (303.937334ms)
✔ REQ-DEC REQ-THREAD-1 a thread instance decision raised before row 121 is not consumed or superseded by any thread run (448.161807ms)
✔ launch identity is stamped, payload identity is refused and stale holder cannot send (188.238239ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (320.649862ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (322.512957ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (228.3145ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (221.499745ms)
✔ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (323.336826ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (228.075274ms)
✔ task action subjects and linked decision trail are complete and ordered (222.907906ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (146.672571ms)
✔ business isolation includes inherited object names and cross-business message references (224.911518ms)
✔ authority never transfers between action, target, unresolved or replaced role holder; a later run of the instance keeps it (335.730502ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (181.229717ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (322.097238ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (182.335926ms)
✔ both arbiters require human resolution when their cross-role route is themselves (295.542121ms)
✔ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (225.243693ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (2.117548ms)
✔ REQ-COS-1, REQ-ROLE-2: the chief of staff ends a run with a reason and no decision, and the reason is logged (309.141378ms)
✔ REQ-ROLE-2: a role without role.end still needs a resolved decision to revoke (392.552929ms)
✔ REQ-ROLE-2: storage accepts a revoke with a reason or a decision and aborts one with neither (295.018572ms)
✔ REQ-ROLE-2: the chief of staff may still cite a decision, and a decision alone is the old path (299.418368ms)
✔ REQ-ROLE-2: a role without role.end still ends a run through a resolved decision, which is recorded and has no reason (301.459962ms)
✔ REQ-ROLE-2: a reason is required, bounded, and never sent with a decision (363.316282ms)
✔ REQ-COS-1: the chief of staff cannot end its own run; its end of the assistant gets past the protection (304.892067ms)
✔ REQ-LIMIT-1, REQ-COS-1: organization.set from the chief of staff reaches the shared writer, named as the actor (262.665582ms)
✔ REQ-LIMIT-1, REQ-COS-1: a refused organization.set logs action.refused and no action.allowed, like a refused limits.set (382.794871ms)
✔ REQ-LIMIT-1: organization.set is refused for every caller whose role file lacks organization.change (422.190803ms)
✔ REQ-LIMIT-1: the chief of staff is logged as allowed, and organization.set takes only the human's keys (456.995316ms)
✔ 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 (596.34087ms)
✔ 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 (1190.003732ms)
✔ comment cursors isolate businesses, move only forward and remain append-only (167.954579ms)
✔ only trusted sync writes validated cursors; events and cursor share rollback (146.621789ms)
✔ explicit 3b copy migration preserves evidence and opens as 3f; normal startup never migrates (1022.194563ms)
✔ migration refuses active writers and drifted legacy schemas, with no partial upgrade (1790.247313ms)
✔ named migration registry chains 3b through 3f to a fixture-only future version in order (1046.323465ms)
✔ migration refuses mismatched source metadata without changing schema or evidence (876.244466ms)
✔ offline command migrates only the supplied fixture root and reports usage errors (1168.422563ms)
✔ credentials gives human and reader sessions service, account, role, date and state, and nothing else (119.075652ms)
✔ credentials refuses a role session and any argument (220.331551ms)
✔ credentials reads the status on each request, and a broker without one lists none (273.316901ms)
✔ the broker process answers credentials without a token, path or variable in its output, log or store (242.983749ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (4.649569ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.869215ms)
✔ expiry refuses use and env references never become client data (1.17271ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.736197ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.2805ms)
✔ each C-suite role file carries the same two lists: human, chief-of-staff, pm, cto (2.338512ms)
✔ chief-executive-officer: messages to and from the user, chief of staff, pm and cto pass (573.840426ms)
✔ chief-executive-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (561.631226ms)
✔ chief-executive-officer: another C-suite role isn't on the lists either (483.672031ms)
✔ chief-financial-officer: messages to and from the user, chief of staff, pm and cto pass (589.269609ms)
✔ chief-financial-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (514.576772ms)
✔ chief-financial-officer: another C-suite role isn't on the lists either (506.780869ms)
✔ chief-information-officer: messages to and from the user, chief of staff, pm and cto pass (599.350485ms)
✔ chief-information-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (514.538746ms)
✔ chief-information-officer: another C-suite role isn't on the lists either (465.526314ms)
✔ chief-information-security-officer: messages to and from the user, chief of staff, pm and cto pass (688.610395ms)
✔ chief-information-security-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (551.277085ms)
✔ chief-information-security-officer: another C-suite role isn't on the lists either (431.318732ms)
✔ chief-marketing-officer: messages to and from the user, chief of staff, pm and cto pass (599.285506ms)
✔ chief-marketing-officer: a message to or from the coder, reviewer or assistant is refused and logged, and nothing is stored (489.417021ms)
✔ chief-marketing-officer: another C-suite role isn't on the lists either (396.19236ms)
✔ a human resolve sends the raising role one message from the human, and its request is the answer (266.258785ms)
✔ a cross-role decision resolved by its arbiter comes from that role and run, with no request (291.665624ms)
✔ a human withdraw sends one message with the note (281.497502ms)
✔ a human seen before the close leaves the request on the close's answer, not the seen (341.842355ms)
✔ the raising run's withdraw, a supersede, a within-role raise and seen send nothing (334.791501ms)
✔ refused closes send nothing: invalid-choice, decision-closed, not-resolver (380.371441ms)
✔ a raising role nobody holds at the close gets the message on the next claim (306.434621ms)
✔ a human DECISION send keeps its own instruction as the request, not a close's answer (266.780996ms)
✔ a cross-role raise whose arbiter the raiser does not hear from is refused and stores nothing (346.835636ms)
✔ a gated raise by a role that does not hear from the human is refused and stores nothing (352.628669ms)
✔ a route the raiser hears from is allowed, checked from the route to the raiser (437.375646ms)
✔ a refused supersede withdraws nothing (341.643056ms)
✔ the assistant's within-role and gated raises still work (374.80254ms)
✔ roles lists open decisions routed to a role, and never the human inbox (256.872522ms)
✔ recent lists closed decisions of every route, newest close first, with how each closed (362.964659ms)
✔ recent gives the closing event as closed when the decision was seen first (360.006717ms)
✔ recent stops at RECENT rows (985.913621ms)
✔ every row is what trail already gives the same session for that id (299.46152ms)
✔ a role session can't list decisions, so it can't read another role's open decisions (474.885195ms)
✔ decisions is a read: one business, strict arguments, nothing written (547.655836ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (152.948705ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (172.805643ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (177.806429ms)
✔ endLaunch leaves a claim another run took alone (214.194146ms)
✔ refuse records action.refused against the caller with the code only (165.603353ms)
✔ launches off refuses role.launch with launch-revoked until launches on (244.192895ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (375.864401ms)
✖ REQ-WAIT-1: the broker hard waits are exactly the list, and match the business vocabulary (1.836942ms)
✖ REQ-WAIT-2: a business granting a hard wait at either class is refused; the actions that left are grantable (135.023841ms)
✖ REQ-DEC-2: every hard wait goes to the human, cited or not, and the arbiter cannot resolve it (457.569248ms)
✔ REQ-DEC-2: a gated raise citing the current spec goes to the arbiter for its domain; uncited, to the human (501.359059ms)
✔ REQ-DEC-2: an arbiter-approved cited gated decision authorizes the raiser, and the human cannot resolve it (296.774298ms)
✔ REQ-DEC-2: a cited merge raised by merge-gate goes to the technical arbiter; a merge raised without the grant routes by citation (441.192039ms)
✔ REQ-DEC-2: a stale or unconfirmed citation refuses without a decision; an arbiter raising its own goes to the human (301.481105ms)
✔ Q169: the chief of staff's end of the assistant is not refused role-end-refused; its own run and another ender's are (277.831999ms)
✔ Q169: another role's cited revoke of the assistant, resolved by an arbiter, is refused (262.723342ms)
✔ Q169: a revoke of the assistant citing a decision the human resolved is not refused by the protection (268.099577ms)
✔ Q169: a cited revoke of a role not in END_PROTECTED still goes to the arbiter, and executes (317.444058ms)
✔ Q169: a role granted role.revoke at either class still sends a revoke of the assistant to the human (340.457331ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (1.404841ms)
✔ process reader gets own kernel identity without exposing environment values (0.413017ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.534074ms)
✔ real pid 1 remains inspectable when its environment is protected (0.214436ms)
✔ a message to a stopped role sends launch.by one notice, and the result says so (239.443588ms)
✔ a message to a role outside launch.instances says so in its result and in the notice (213.328084ms)
✔ a message to a running role sends no notice and its result is unchanged (164.536694ms)
✔ a re-route at a claim, a release and claim, and a broker restart send no second notice (292.498322ms)
✔ a run launched but not yet claimed counts as no holder (158.331957ms)
✔ no notice for a message to launch.by, from it, from a tester, to the human, or in a thread to a thread instance (319.23462ms)
✔ a business with no launch block tells nobody and says there is no launcher (148.598027ms)
✔ the notice sender stays internal: no role is named _bus and no caller can send as it or to it (437.384832ms)
✔ limits binds actor from human proof and rejects role, reader, tester and forged actor (270.019252ms)
✔ runtime wires verified human settings to the actual shared file writer and actor receipt (347.886503ms)
✔ uncertain organization receipts leave bus startup and reads alone but refuse writes until reconciled (506.349775ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (247.877894ms)
✔ missing and foreign-business citations refuse and roll back message and grant (229.254516ms)
✔ cross-role sends still need a matching resolved decision and consume it once (313.043452ms)
✔ messages pages all human messages newest first without writes; read state is history (3105.389445ms)
✔ messages refuses role callers, invalid paging and cursors outside this human feed (294.507617ms)
✔ views messages passes only its paging arguments through (0.269292ms)
✔ messages isolates businesses even with a valid foreign cursor (217.137588ms)
✔ the assistant sends to the user and to the chief of staff only (383.867818ms)
✔ an assistant send to any other role, or to the tester, is refused and logged (446.13424ms)
✔ only the user and the chief of staff may send to the assistant; the tester is refused by default (412.302115ms)
✔ REQ-ASSIST-2 REQ-THREAD-1 thread.send to an instance that does not hear from the user is refused and stores nothing (361.402724ms)
✔ a sender-side list alone refuses a send to a role that has no list (450.882483ms)
✔ a target-side list alone refuses a send from a role that has no list (404.810806ms)
✔ the sender list is checked before the target list (372.074531ms)
✔ roles without the field behave exactly as before (487.694474ms)
✔ a business with no role definitions at all is unlimited (378.524097ms)
✔ a malformed messaging field refuses at boot (145.716305ms)
✔ the assistant's review.request to a reviewer is refused and logged, even with an approved decision (535.728346ms)
✔ a review.verdict to the assistant from a role outside its receiveFrom is refused and logged (474.351151ms)
✔ review requests and verdicts between roles without the field are unchanged (355.567133ms)
✔ plugins and plugins.set refuse every non-human session and a forged actor, and pass only the patch with the verified actor (251.58783ms)
✔ 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 (554.789818ms)
✔ vikunja:19/309 through the broker, a patch switches the kinds it names and keeps the rest; null removes one kind and is trailed (481.914398ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (292.352104ms)
✔ startup token refusal returns safe code without value or partial listening broker (79.090713ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (239.661442ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (248.099518ms)
✔ trusted host registers later launches; socket clients never have a registration verb (216.41706ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (67.862701ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (229.256427ms)
✔ D1: committed write with a failed receipt refuses outcome-unknown without action.allowed (174.375688ms)
✔ D2: spec.read refuses without content if its role is released during the read (183.652447ms)
✔ D3: spec.read secret check refuses flagged content without content (157.590525ms)
✔ D3: spec.read secret check refuses flagged subject without content (163.586873ms)
✔ Broker keeps the existing sandbox client import closure: no new imports or lazy project import (1.583628ms)
✔ without a trusted project adapter all three async paths refuse project-not-configured (224.005804ms)
✔ real startBroker injects the project adapter for socket reads and bound-author record writes (222.481064ms)
✔ a reply is listed for human and reader sessions, and its delivery rows are unchanged (275.117042ms)
✔ the reply still reaches the human message.receive (mosaic talk) after the Console showed it (213.95472ms)
✔ a message with no reply gives an empty list (213.705103ms)
✔ replies come oldest first and stop at REPLIES (965.369732ms)
✔ an id that names no message in the business refuses message-not-found, and the refusal is recorded (356.67467ms)
✔ strict arguments; a role session gets human-required (431.702471ms)
✔ views passes replies through as one call with the id (0.322395ms)
✔ requirements returns the committed list to a holding role session, and no one else (261.382848ms)
✔ the PM's prd.approve with no task, when no id fits, reaches the human's Inbox (200.934435ms)
✔ the PM's non-blocking role.revoke with no task reaches the human's Inbox (238.169394ms)
✔ a push is recorded as the action.allowed for git.push.working on the task, and only the host records one (278.692135ms)
✔ review.request names the latest pushed commit and sends the reviewer a REVIEW-REQUEST (311.826032ms)
✔ review.request says which run holds the reviewer role, or null, and a null request waits for a claim (371.230923ms)
✔ review.request refuses a commit that isn't the latest push, a non-reviewer and a role without the action (448.57168ms)
✔ reviewFetch answers only the addressed reviewer, for the request it cites (269.936227ms)
✔ review.verdict answers one request once, to the role that asked (364.239883ms)
✔ task.close on a pushed task needs an approve verdict for the latest push (451.4654ms)
✔ a refusal the host decided is filed on the task it names, and only a task ref counts (305.842065ms)
✔ v3b prototype refusals, views and append-only mutations (1804.5363ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (314.461871ms)
✔ another run of the same instance consumes an approval once; a failed check leaves it usable (313.406501ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (188.335345ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (395.473465ms)
✔ class drift gated to cross-role refuses before consumption (241.040352ms)
✔ class drift cross-role to gated refuses before consumption (299.663888ms)
✔ class drift gated to within-role refuses before consumption (274.166484ms)
✔ class drift cross-role to within-role refuses before consumption (295.902318ms)
✔ class drift within-role to gated refuses before consumption (250.142589ms)
✔ class drift within-role to cross-role refuses before consumption (383.320383ms)
✔ message.send consumes approval and prevents a later send or authorize (302.38901ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (299.270966ms)
✔ 3e copy migrates to 3f preserving every old column/row and adding null spec citations (1670.879947ms)
✔ real socket awaits spec reads, record writes and cited raises; other requests still return normally (300.592584ms)
✔ real socket preserves asynchronous refusal codes and disconnects its transient proof (232.067683ms)
✔ two real socket writes to one repository yield one commit and one project-busy refusal (249.83309ms)
✔ client disconnect during await tolerates late reply (194.581701ms)
✔ client disconnect during await tolerates late refusal (198.061224ms)
✔ N-a: slow admitted record.write returns its committed result after the idle deadline (419.080223ms)
✔ current citation is recorded; docs commits do not stale it and a new spec never reopens settlement (329.781006ms)
✔ stale, unconfirmed, missing and partial spec citations refuse without inserting a decision (364.371467ms)
✔ uncited raises retain their synchronous path and spec read is available to any held role in its business (240.027776ms)
✔ record writes bind the session author, require authority and refuse spec and impersonation paths (285.351153ms)
✔ REQ-COS-1: the pm asks the chief of staff for roles and counts; the chief receives a STAFF-REQUEST and answers it (294.309225ms)
✔ REQ-COS-1: only the pm can send a staff request; every other session is refused and the chief of staff hears nothing (349.893145ms)
✔ REQ-COS-1: a pm without message.send is refused like any other gated action (200.336126ms)
✔ REQ-COS-1: the request goes to the business launcher, and only when that is a chief of staff (506.098614ms)
✔ 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 (576.803313ms)
✔ 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 (471.511499ms)
✔ REQ-COS-1: a refused staff request leaves no staff.request action.allowed event (262.340739ms)
✔ REQ-ASSIST-2: the role definitions' messaging lists hold for a staff request, sender and recipient (775.714446ms)
✔ a staff request names a task, 1 to 10 distinct roles and counts of 1 to 20; nothing else is accepted (480.702883ms)
✔ REQ-COS-1: a staff request grants nothing: the pm still can't launch and the chief of staff launches as before (253.138321ms)
✔ a business that never switched launches reads allowed with no time and no event (172.869528ms)
✔ launches revoked and then restored read allowed, with the restore time and event id (164.507433ms)
✔ a task closed on the tracker leaves the open list, and total counts the open ones (166.473176ms)
✔ a tombstone is not open (167.182076ms)
✔ the open list stops at the cap and says so; total still counts every open task (166.797616ms)
✔ a role and a reader session read state; arguments, and an unbound cap, refuse (168.221518ms)
✔ a human session reads the same state, with the same cap (154.475643ms)
✔ reading state writes nothing: every table keeps its row count (201.593172ms)
✔ creates private WAL store and excludes a second writer until explicit close (144.305665ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (210.554834ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (228.566791ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (190.162036ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (126.298188ms)
✔ async transactions refuse before invoking their function (132.333672ms)
✔ the session default fits under the reply cap and pages to the end with next (341.534823ms)
✔ the short form: no description, assignees by role, every listed key (310.616891ms)
✔ each filter, alone and together, and total counts every match (407.867897ms)
✔ task_ref reads one task in full, as the whole board has it (350.360734ms)
✔ no arguments is the read the Console and mosaic make, unchanged (277.722281ms)
✔ an unknown argument or a bad value refuses invalid-request (1075.231076ms)
✔ tasks rows carry priority and requirement for every session that reads tasks (362.661245ms)
✔ the read model rebuilds from the ledger: a reopened bus and each trail give the same values (410.369429ms)
✔ an empty business and one with snapshots but no task.created read cleanly (258.849606ms)
✔ recordTask keeps sync reads and a role write apart (210.563369ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (114.883197ms)
✔ a bad entry refuses the whole record (149.69772ms)
✔ taskView reads the projection for one business (137.066258ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (427.470856ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (442.43973ms)
✔ without an adapter the server refuses every task verb (251.00903ms)
✔ the runtime refuses an invalid adapter and closes a valid one (225.620203ms)
✔ the process loads the S3 adapter from plain-data trackers (440.234043ms)
✔ the tester binds only when the business sets bus.tester to exactly true (1022.58458ms)
✔ a business may not name a role tester, so the tester address is never a role (290.950337ms)
✔ every verb outside the tester list refuses tester-refused and is recorded against the tester (617.480066ms)
✔ a tester message is from tester, starts [mos test], and writes no human.input or authority (365.526365ms)
✔ a role answers a tester only in reply to a tester message, and the answer never reaches the human (285.645179ms)
✔ the tester reads the human views a reader reads (210.447206ms)
✔ tester proof binds its own CLI, start time and nonce, refuses a managed run and allows an agent (1.1717ms)
✔ neither CLI's nonce proves the other: each proof is bound to its own CLI and nonce variable (0.373205ms)
✔ testerNonce reads only the tester's variable and gives null on any read error (0.272355ms)
✔ an envelope carries exactly one of cap, human and tester; no tester authenticator refuses (112.47102ms)
✔ tester-cli.mjs binds through the runtime when the switch is on, and refuses off or under a run marker (936.730574ms)
✔ REQ-THREAD-1 REQ-ORG-2: the 3d→3e migration adds the thread tables and leaves messages from before threads as written (1282.857782ms)
✔ REQ-THREAD-1: a 3d bus with a changed schema is refused and keeps its version and tables (999.406449ms)
✔ REQ-THREAD-1: the offline command prints the kept-message counts before the ready line (888.216713ms)
✔ REQ-ROLE-2 REQ-THREAD-1: one holder per thread, through the broker and the trigger (405.904062ms)
✔ REQ-ROLE-2 REQ-THREAD-1: the 3e triggers refuse writes that skip the broker (1537.616599ms)
✔ REQ-MSG-1: a message to or from the assistant names its thread, or is refused (376.387463ms)
✔ REQ-MSG-1: the chief of staff's reply comes back to the thread that sent the work (3721.326824ms)
✔ REQ-MSG-1: a reply can't carry one thread instance's thread to another thread instance (138.109062ms)
✔ REQ-THREAD-1 REQ-USER-2: one thread's messages never reach another thread's holder (154.570829ms)
✔ REQ-LAUNCH-1: a message to a thread with no holder waits, and the next holder gets it (161.163826ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: threadIdle releases only a thread with nothing waiting, and only for its holder (191.856734ms)
✔ REQ-THREAD-2 REQ-LAUNCH-1: a message delivered to a run that ended unread doesn't hold up the next holder (153.34101ms)
✔ REQ-ROLE-2 REQ-THREAD-1: an approved role.revoke never reaches a thread run, and the thread stays held (131.797885ms)
✔ REQ-USER-2: the human verbs refuse another owner's thread (152.316703ms)
✔ REQ-THREAD-1: thread.create refuses when the business has no thread instance or more than one (114.444995ms)
✔ REQ-ORG-2: projects and threads are named once, and the repo names a business project (153.917425ms)
✔ REQ-THREAD-2: thread.messages returns the thread's history in pages and writes nothing (498.95702ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (167.064414ms)
✔ two wire claims serialize; a lost reply never automatically retries (305.994102ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (161.95357ms)
✔ client preserves UTF-8 when a response divides a multibyte character (11.762413ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (168.109489ms)
✔ web.search: a granted role gets labelled results, and the call is trailed with role, run, verb and query (180.29961ms)
✔ web.fetch: a granted role gets the page as labelled text, and the call is trailed with the url (287.127644ms)
✔ a role without the grant is refused, the refusal is logged with the verb, and nothing is fetched (244.267741ms)
✔ a broker with no web service refuses a granted role (165.59634ms)
✔ bad requests are refused: unknown verb, extra or missing argument, not a string, a human or reader session (237.448263ms)
✔ a session that is not the role holder is refused (146.458483ms)
✔ web.mjs's fences hold on the broker side: refusals are normal results with the fixed reason (551.372051ms)
✔ web.search with no search source configured is a refused result, not an error (170.011308ms)
✔ a search source that fails with its own refusal, or that throws, is handled (202.22383ms)
✔ a slow search source ends in a refusal at the deadline (204.450616ms)
✔ a secret in the arguments is refused before anything is trailed or fetched (156.728323ms)
✔ over the socket: the server routes web verbs to the service; other roles are refused; no service is web-not-configured (255.64178ms)
✔ busBusiness: the web grant comes from "web" in the resolved tool limit (0.261037ms)
✔ webServices: the business's search-source plug-in and web.searxng var make web.search work; without either it is refused as not configured (261.882637ms)
✔ an ungranted call is refused at once: no admission, no wait, nothing touched (202.409957ms)
✔ over the socket an ungranted caller is dropped by the server timeout and a granted one gets the longer wait (454.856955ms)
✔ a search that never answers is aborted at the deadline, the module sees the signal, and the call is trailed as refused (timeout) (172.383216ms)
✔ a fetch that stalls is cut off at the deadline: the request is destroyed, not left running (195.328175ms)
✔ 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 (161.732615ms)
ℹ tests 306
ℹ suites 0
ℹ pass 303
ℹ fail 3
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 12913.120511

✖ failing tests:

test at tests/hard-waits.test.mjs:18:1
✖ REQ-WAIT-1: the broker hard waits are exactly the list, and match the business vocabulary (1.836942ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected
  
    [
  -   'account.create',
      'credential.mint',
      'data.delete',
      'deploy',
      'git.push.protected',
      'message.external',
  
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/hard-waits.test.mjs:19:10)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25)
      at Test.start (node:internal/test_runner/test:1262:17)
      at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: [ 'credential.mint', 'data.delete', 'deploy', 'git.push.protected', 'message.external', 'network.expose', 'spend' ],
    expected: [ 'account.create', 'credential.mint', 'data.delete', 'deploy', 'git.push.protected', 'message.external', 'network.expose', 'spend' ],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at tests/hard-waits.test.mjs:25:1
✖ REQ-WAIT-2: a business granting a hard wait at either class is refused; the actions that left are grantable (135.023841ms)
  AssertionError [ERR_ASSERTION]: Missing expected exception: account.create
      at TestContext.<anonymous> (file:///home/jwoltje/dewey-scratch/r139/wt/packages/bus/tests/hard-waits.test.mjs:32:12)
      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 startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: /invalid-authority/,
    operator: 'throws',
    diff: 'simple'
  }

test at tests/hard-waits.test.mjs:38:1
✖ REQ-DEC-2: every hard wait goes to the human, cited or not, and the arbiter cannot resolve it (457.569248ms)
  AssertionError [ERR_ASSERTION]: account.create {"project":"stack","spec_path":"spec/north-star.md","spec_commit":"b3d963f03ea0ed293d885c0fc05abaec14aa6b28"}
  + 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:43:14)
      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'
  }
