README invalid-options cell lists only count, key, text and duplicates; a
non-{key,text} option refuses invalid-request (Sage 28378, Filbert C1 28379).
Broker test pins the option shape cases. m1 and m2 killed; full gate passed
15:53:56-15:59:33Z on BASE 96656dd21.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
190 lines
16 KiB
Plaintext
190 lines
16 KiB
Plaintext
✔ agents: a held role with nothing on the bus is idle; a role session gets the claim rows unchanged (132.810564ms)
|
||
✔ agents: working counts what the holder received and has not read; routed alone is not working (225.367714ms)
|
||
✔ agents: input needed is the role's open decisions routed to the human, gated first, then oldest (323.358221ms)
|
||
✔ agents: working wins over waiting, and Input needed still shows (183.248055ms)
|
||
✔ agents: a new holder doesn't inherit what the last one left unread; decisions stay with the role (206.469922ms)
|
||
✔ agents: state reads only its own business, even for a run name both use (199.874927ms)
|
||
✔ agents: a message the holder released unread is stranded; the next holder gets nothing and cannot read it (210.082445ms)
|
||
✔ agents: a message the holder read is not stranded; one the current holder has not read is not listed (195.356635ms)
|
||
✔ agents: stranded is oldest first and capped at 50 for a role (824.044621ms)
|
||
✔ agents: stranded is per role and per business (307.634552ms)
|
||
✔ agents: a message routed to a held role and not yet received is not stranded (121.345238ms)
|
||
✔ launch identity is stamped, payload identity is refused and stale holder cannot send (164.250711ms)
|
||
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (276.049091ms)
|
||
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (267.612184ms)
|
||
✔ launch events require a human CLI capability; generic emit cannot forge authority events (178.361607ms)
|
||
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (188.925375ms)
|
||
✖ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (145.024412ms)
|
||
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (174.115813ms)
|
||
✔ task action subjects and linked decision trail are complete and ordered (180.979906ms)
|
||
✔ launch binding is durable and reconnecting requires the identical trusted record (107.369253ms)
|
||
✔ business isolation includes inherited object names and cross-business message references (200.942481ms)
|
||
✔ authority never transfers between action, run, target, unresolved or replaced role holder (258.733138ms)
|
||
✔ task projection uses schema current view, skipping earlier and equal-start polls (139.508849ms)
|
||
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (202.612581ms)
|
||
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (136.674642ms)
|
||
✔ both arbiters require human resolution when their cross-role route is themselves (215.116701ms)
|
||
✔ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (134.182701ms)
|
||
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (2.678344ms)
|
||
✔ credentials gives human and reader sessions service, account, role, date and state, and nothing else (95.894874ms)
|
||
✔ credentials refuses a role session and any argument (191.624738ms)
|
||
✔ credentials reads the status on each request, and a broker without one lists none (224.999191ms)
|
||
✔ the broker process answers credentials without a token, path or variable in its output, log or store (179.833724ms)
|
||
✔ only validated broker references load; returned data and exceptions cannot expose a known token (3.969822ms)
|
||
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.699532ms)
|
||
✔ expiry refuses use and env references never become client data (0.84767ms)
|
||
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.735888ms)
|
||
✔ opaque tokens shorter than 16 characters refuse before use (0.363104ms)
|
||
✔ roles lists open decisions routed to a role, and never the human inbox (215.378888ms)
|
||
✔ recent lists closed decisions of every route, newest close first, with how each closed (290.81494ms)
|
||
✔ recent gives the closing event as closed when the decision was seen first (298.324865ms)
|
||
✔ recent stops at RECENT rows (803.345987ms)
|
||
✔ every row is what trail already gives the same session for that id (259.004937ms)
|
||
✔ a role session can't list decisions, so it can't read another role's open decisions (377.565471ms)
|
||
✔ decisions is a read: one business, strict arguments, nothing written (340.103858ms)
|
||
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (117.476872ms)
|
||
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (159.533329ms)
|
||
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (158.692817ms)
|
||
✔ endLaunch leaves a claim another run took alone (174.243759ms)
|
||
✔ refuse records action.refused against the caller with the code only (125.043619ms)
|
||
✔ launches off refuses role.launch with launch-revoked until launches on (206.068825ms)
|
||
✔ broker process: launch ops authorize role.launch, record refusals and end runs (254.945246ms)
|
||
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (2.610696ms)
|
||
✔ process reader gets own kernel identity without exposing environment values (0.540881ms)
|
||
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (0.921427ms)
|
||
✔ real pid 1 remains inspectable when its environment is protected (0.2838ms)
|
||
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (187.756159ms)
|
||
✔ missing and foreign-business citations refuse and roll back message and grant (190.962089ms)
|
||
✔ cross-role sends still need a matching resolved decision and consume it once (242.162241ms)
|
||
✔ messages pages all human messages newest first without writes; read state is history (2507.372165ms)
|
||
✔ messages refuses role callers, invalid paging and cursors outside this human feed (243.622355ms)
|
||
✔ views messages passes only its paging arguments through (0.291015ms)
|
||
✔ messages isolates businesses even with a valid foreign cursor (145.007794ms)
|
||
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (197.985195ms)
|
||
✔ startup token refusal returns safe code without value or partial listening broker (36.883267ms)
|
||
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (177.434872ms)
|
||
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (176.501828ms)
|
||
✔ trusted host registers later launches; socket clients never have a registration verb (170.649934ms)
|
||
✔ runtime excludes declared project roots even when host supplies no repoRoots (38.642414ms)
|
||
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (180.095659ms)
|
||
✔ a reply is listed for human and reader sessions, and its delivery rows are unchanged (217.780839ms)
|
||
✔ the reply still reaches the human message.receive (mosaic talk) after the Console showed it (202.020912ms)
|
||
✔ a message with no reply gives an empty list (166.916292ms)
|
||
✔ replies come oldest first and stop at REPLIES (769.463566ms)
|
||
✔ an id that names no message in the business refuses message-not-found, and the refusal is recorded (286.888118ms)
|
||
✔ strict arguments; a role session gets human-required (373.426012ms)
|
||
✔ views passes replies through as one call with the id (0.201864ms)
|
||
✔ requirements returns the committed list to a holding role session, and no one else (222.693585ms)
|
||
✔ the PM's prd.approve with no task, when no id fits, reaches the human's Inbox (158.949786ms)
|
||
✔ the PM's non-blocking role.revoke with no task reaches the human's Inbox (170.887728ms)
|
||
✔ a push is recorded as the action.allowed for git.push.working on the task, and only the host records one (247.416654ms)
|
||
✔ review.request names the latest pushed commit and sends the reviewer a REVIEW-REQUEST (246.685529ms)
|
||
✔ review.request says which run holds the reviewer role, or null, and a null request waits for a claim (298.383853ms)
|
||
✔ review.request refuses a commit that isn't the latest push, a non-reviewer and a role without the action (380.844737ms)
|
||
✔ reviewFetch answers only the addressed reviewer, for the request it cites (242.43297ms)
|
||
✔ review.verdict answers one request once, to the role that asked (299.194999ms)
|
||
✔ task.close on a pushed task needs an approve verdict for the latest push (361.212553ms)
|
||
✔ a refusal the host decided is filed on the task it names, and only a task ref counts (234.479618ms)
|
||
✔ v3b prototype refusals, views and append-only mutations (1060.032268ms)
|
||
✔ gated approval authorizes once, survives store reopen, and fresh approval works (266.760273ms)
|
||
✔ another run cannot consume an approval; a failed check leaves it usable (225.050762ms)
|
||
✔ two scheduled callers have exactly one grant and one consumed refusal (166.455245ms)
|
||
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (328.78825ms)
|
||
✔ class drift gated to cross-role refuses before consumption (248.227283ms)
|
||
✔ class drift cross-role to gated refuses before consumption (234.73532ms)
|
||
✔ class drift gated to within-role refuses before consumption (216.36205ms)
|
||
✔ class drift cross-role to within-role refuses before consumption (242.137241ms)
|
||
✔ class drift within-role to gated refuses before consumption (197.493631ms)
|
||
✔ class drift within-role to cross-role refuses before consumption (181.340501ms)
|
||
✔ message.send consumes approval and prevents a later send or authorize (208.720326ms)
|
||
✔ role.revoke consumes approval and prevents a later revoke or authorize (231.923737ms)
|
||
✔ a business that never switched launches reads allowed with no time and no event (126.835108ms)
|
||
✔ launches revoked and then restored read allowed, with the restore time and event id (163.968597ms)
|
||
✔ a task closed on the tracker leaves the open list, and total counts the open ones (151.47458ms)
|
||
✔ a tombstone is not open (144.221329ms)
|
||
✔ the open list stops at the cap and says so; total still counts every open task (136.58219ms)
|
||
✔ a role and a reader session read state; arguments, and an unbound cap, refuse (145.046299ms)
|
||
✔ a human session reads the same state, with the same cap (150.161784ms)
|
||
✔ reading state writes nothing: every table keeps its row count (162.439836ms)
|
||
✔ creates private WAL store and excludes a second writer until explicit close (130.2977ms)
|
||
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (183.280746ms)
|
||
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (188.8067ms)
|
||
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (161.341083ms)
|
||
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (119.882789ms)
|
||
✔ async transactions refuse before invoking their function (103.50928ms)
|
||
✔ the session default fits under the reply cap and pages to the end with next (297.024855ms)
|
||
✔ the short form: no description, assignees by role, every listed key (250.901784ms)
|
||
✔ each filter, alone and together, and total counts every match (317.364885ms)
|
||
✔ task_ref reads one task in full, as the whole board has it (262.991038ms)
|
||
✔ no arguments is the read the Console and mosaic make, unchanged (237.508035ms)
|
||
✔ an unknown argument or a bad value refuses invalid-request (881.972543ms)
|
||
✔ tasks rows carry priority and requirement for every session that reads tasks (316.662278ms)
|
||
✔ the read model rebuilds from the ledger: a reopened bus and each trail give the same values (336.277249ms)
|
||
✔ an empty business and one with snapshots but no task.created read cleanly (106.335109ms)
|
||
✔ recordTask keeps sync reads and a role write apart (191.174601ms)
|
||
✔ read_at must be one canonical UTC format, so the projection compares strings safely (104.22706ms)
|
||
✔ a bad entry refuses the whole record (112.818873ms)
|
||
✔ taskView reads the projection for one business (135.406402ms)
|
||
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (245.098943ms)
|
||
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (396.630849ms)
|
||
✔ without an adapter the server refuses every task verb (211.662909ms)
|
||
✔ the runtime refuses an invalid adapter and closes a valid one (210.411173ms)
|
||
✔ the process loads the S3 adapter from plain-data trackers (271.638821ms)
|
||
✔ the tester binds only when the business sets bus.tester to exactly true (798.102959ms)
|
||
✔ a business may not name a role tester, so the tester address is never a role (247.324291ms)
|
||
✔ every verb outside the tester list refuses tester-refused and is recorded against the tester (502.770387ms)
|
||
✔ a tester message is from tester, starts [mos test], and writes no human.input or authority (209.271142ms)
|
||
✔ a role answers a tester only in reply to a tester message, and the answer never reaches the human (214.735067ms)
|
||
✔ the tester reads the human views a reader reads (87.812428ms)
|
||
✔ tester proof binds its own CLI, start time and nonce, refuses a managed run and allows an agent (1.104554ms)
|
||
✔ neither CLI's nonce proves the other: each proof is bound to its own CLI and nonce variable (0.366745ms)
|
||
✔ testerNonce reads only the tester's variable and gives null on any read error (0.193622ms)
|
||
✔ an envelope carries exactly one of cap, human and tester; no tester authenticator refuses (50.132031ms)
|
||
✔ tester-cli.mjs binds through the runtime when the switch is on, and refuses off or under a run marker (707.235469ms)
|
||
✔ socket capability stamps launch identity; shared views use wire, no SQL client (166.251614ms)
|
||
✔ two wire claims serialize; a lost reply never automatically retries (177.49142ms)
|
||
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (101.694805ms)
|
||
✔ client preserves UTF-8 when a response divides a multibyte character (12.267057ms)
|
||
✔ committed mutation followed by dropped reply reports unknown and is never retried (129.912543ms)
|
||
ℹ tests 148
|
||
ℹ suites 0
|
||
ℹ pass 147
|
||
ℹ fail 1
|
||
ℹ cancelled 0
|
||
ℹ skipped 0
|
||
ℹ todo 0
|
||
ℹ duration_ms 3887.391646
|
||
|
||
✖ failing tests:
|
||
|
||
test at tests/broker.test.mjs:158:1
|
||
✖ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (145.024412ms)
|
||
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /invalid-recommendation/. Input:
|
||
|
||
'Error: invalid-options'
|
||
|
||
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:168: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 Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
|
||
generatedMessage: true,
|
||
code: 'ERR_ASSERTION',
|
||
actual: Error: invalid-options
|
||
at fail (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:76:9)
|
||
at #dispatch (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:785:11)
|
||
at file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:675:38
|
||
at Store.transaction (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/store.mjs:156:22)
|
||
at Broker.request (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/src/broker.mjs:669:26)
|
||
at call (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:45:45)
|
||
at raise (file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:47:3)
|
||
at file:///home/jwoltje/darkwing-scratch/r112/wt/packages/bus/tests/broker.test.mjs:168:25
|
||
at getActual (node:assert:580:5)
|
||
at strict.throws (node:assert:728:24),
|
||
expected: /invalid-recommendation/,
|
||
operator: 'throws',
|
||
diff: 'simple'
|
||
}
|