✔ inbox lists only decisions routed to the human, with what approving authorizes and how to decide (128.195384ms)
✔ decide resolves by id prefix with --yes, and the trail shows it in broker order with the task to follow (173.03349ms)
✔ decide refuses without a terminal or --yes, on an unknown option and on a short reference (101.725873ms)
✔ decide prints a declining choice as declining (211.031203ms)
✔ an unknown outcome is reported once and never resent (168.845654ms)
✔ a decision closed before the answer arrives exits 2 and points at its trail (197.827882ms)
✔ a prefix that matches two open decisions exits 2 and resolves neither (142.434566ms)
✔ without --business a command uses the live host's business, and a stale host.json is not a host (105.022882ms)
✔ every human command refuses inside an agent run before it touches the bus (114.596595ms)
✔ usage errors exit 4; no business and no host is a usage error (66.603429ms)
✔ agents and tasks print through the broker (68.059725ms)
✔ notify.json: missing, loose, malformed and extra keys refuse; a binding or null passes (1.285612ms)
✔ bootConfig builds the broker's boot message for one business, with no trackers key when no project names one (92.375276ms)
✔ trackers come from the tracker.* variables of the one project that names a tracker project (61.819103ms)
✔ with two projects, the one that sets tracker.project supplies the tracker and the other is no conflict (60.559355ms)
✔ two projects that each name a tracker project refuse, since the boot shape holds one (49.117414ms)
✔ a business without tracker.baseUrl gets no trackers entry (53.852451ms)
✔ an unknown business and a broken system config refuse with exit 3 (87.694477ms)
✔ empty views say so (1.285418ms)
✔ the trail keeps the broker's order and names a decision's task without its rows (1.478037ms)
✔ tasks print the tracker fields the snapshot carries (0.28882ms)
✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (1033.632014ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (262.045607ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (203.472241ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (22.806465ms)
✔ bus stop refuses to signal a live pid that is not a bus host (203.474754ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (245.182997ms)
✔ bus start refuses with exit 3 without a notifier config (101.641085ms)
✔ bus start runs until bus stop; status reports it while it runs (687.392239ms)
✔ bus-service.sh renders the unit and installs it into a given directory (27.544558ms)
✔ zoned uses the IANA zone across DST (26.513988ms)
✔ each open blocking decision is DM'd once, across polls and a restart; non-blocking ones are not (103.232685ms)
✔ two blocking decisions get two DMs with different nonces (166.594618ms)
✔ the digest nonce differs per business and per day and fits Discord's 25 characters (0.542796ms)
✔ a failed DM is journaled, backs off, and is retried until it lands (101.736767ms)
✔ the digest goes at 08:00 Chicago once a day, with blocking ones marked as DM'd (176.495893ms)
✔ a late start with no digest for the day sends one at once; an empty inbox gets one line (175.331443ms)
✔ an inbox read failure is logged and the next poll retries (1.349032ms)
✔ no Discord id reaches the journal or the log (176.712746ms)
✔ the journal: a torn tail is copied out and truncated, so an append after it reopens cleanly (56.520073ms)
✔ the journal: a crash between the copy and the truncate leaves a tail the next open repairs (49.840375ms)
✔ the journal: a whole file that is one torn line truncates to empty (22.119255ms)
✔ the journal: a malformed complete line refuses and leaves the file and any torn tail alone (2.003867ms)
✔ the journal: a loose file mode, a loose directory or a symlinked journal refuses (0.994243ms)
✔ digest content stays within Discord's 2000 characters (0.486197ms)
✔ runLoop never overlaps ticks and stops after the one in flight (110.970108ms)
✔ the transport writes {business, verb, args} to the child and reads its JSON (54.522158ms)
✔ a bus code on stderr becomes the exit code; garbage and timeouts are outcome problems (2267.743264ms)
✔ busExit and refuseInsideAgent (0.466679ms)
✔ approvals: a request is validated before anything is posted; the rendering shows names and never ids (3.446995ms)
✔ approvals: the ledger is appended and folded into open requests with bind and approval states (1.777098ms)
✔ approvals: a reply approves only when it points at a request, says exactly approve, and comes from a listed approver once (0.701757ms)
✔ approvals: a button approves only on its own request message with the matching custom id (0.514843ms)
✔ approvals flow: a turn that opened a request posts the message with the button, records it, binds it, and both approvers approve (19.376227ms)
✔ approvals flow: a non-approver, a repeat, a wrong custom id and a service refusal each get their fixed line and a drop entry (6.783828ms)
✔ approvals flow: an invalid request from the model, a refused post, and no api client are recorded and post nothing (11.817459ms)
✔ approvals flow: start retries a bind and an approval left as unknown, under their original keys (2.623937ms)
✔ authorize: open channel, listed user (1.991359ms)
✔ authorize: wrong guild (0.234897ms)
✔ authorize: no guild (DM) (0.176042ms)
✔ authorize: unlisted channel (0.199873ms)
✔ authorize: unknown channel, no info (0.184158ms)
✔ authorize: thread of listed parent (0.238941ms)
✔ authorize: thread of unlisted parent (0.155529ms)
✔ authorize: text channel that is not a thread and not listed (0.183767ms)
✔ authorize: unlisted user (0.190022ms)
✔ authorize: no author (0.365207ms)
✔ authorize: bot author (listed id, bot flag) (0.173026ms)
✔ authorize: system author (0.118875ms)
✔ authorize: the bot itself (0.099871ms)
✔ authorize: webhook (0.095675ms)
✔ authorize: mention channel without mention (0.149411ms)
✔ authorize: mention channel with bot mention (0.17239ms)
✔ authorize: mention channel with @everyone only (0.113569ms)
✔ authorize: mention channel mentioning someone else (0.096703ms)
✔ authorize: mention channel, content says @bot but mentions empty (0.094882ms)
✔ authorize: private thread under mention channel, mentioned (0.098952ms)
✔ authorize: private thread under mention channel, not mentioned (0.105221ms)
✔ authorize: thread in another guild per channel info (0.086125ms)
✔ authorize: not an object (0.080474ms)
✔ authorize: no id (0.08ms)
✔ authorize: oversize content is accepted and flagged (0.083916ms)
✔ authorize: exactly the limit is not oversize (0.072872ms)
✔ authorize: a user's channel allowlist drops them outside it, threads count as the parent, others are unaffected (0.48684ms)
✔ authorize: order puts wrong guild before user, and user before channel (no channel lookup for strangers) (0.164021ms)
✔ binding: a complete binding validates and is frozen (3.221593ms)
✔ binding: unknown key, missing field, wrong type refuse with exit 2 (1.664308ms)
✔ binding: empty allowlists refuse (0.489484ms)
✔ binding: a user's channel allowlist must be non-empty, listed and unique; absent means every listed channel (1.530283ms)
✔ reloadDiff: reloadable keys are summarised by id; every fixed key refuses with exit 2 (2.331597ms)
✔ binding: dmRecipient is optional, a snowflake, one of the listed users, and a fixed key (1.395098ms)
✔ binding: file must be 0600, regular, not a symlink (2.156108ms)
✔ binding: token file mode, symlink, emptiness and shape are checked; token never appears in errors (3.713437ms)
✔ cli: check refuses a non-0600 token file with exit 2 before any network use (115.304298ms)
✔ context files: absolute paths, traversal, symlinks and out-of-repo targets refuse; in-repo files resolve (3.29538ms)
✔ cli: check refuses a missing context file and a missing binding with exit 2; usage is exit 4 (434.958653ms)
✔ cli: reload validates the file first (exit 2), then needs a live owner (exit 1); usage is exit 4 (238.946386ms)
✔ cli: run refuses when STOP is present, before any network use (152.871089ms)
✔ binding: tools is optional, validated strictly, a fixed key for reload, and its roots are resolved against the data root (3.135857ms)
✔ binding: a git key is validated at load and reaches the extension whole, and only on a writable root (2.122184ms)
✔ delivery: an accepted message is in the inbox before the turn, the reply is chunked with one nonce per chunk, and the turn record is write-once (18.934291ms)
✔ delivery: refused and unknown outcomes are journaled; a later chunk is not sent after a failure (30.088217ms)
✔ delivery: restart with an unknown entry re-sends the same nonce once and reconciles before accepting traffic (3.499336ms)
✔ delivery: an unknown entry older than the dedupe window is marked refused, not re-sent; a still-unknown one refuses start (2.520585ms)
✔ delivery: repeated unknown reconciliations never refresh the dedupe window; the original intent time decides (1.451321ms)
✔ turn: a failed engine turn posts the fixed line, never model output, and writes a failed record (3.229017ms)
✔ turn: a second message during a turn is held by the engine, both get their own reply and record (33.681902ms)
✔ turn: a thread under a listed channel is answered in the thread; an unknown thread is looked up once (3.973696ms)
✔ drop: an unlisted user gets silence and one drop line; no inbox entry, no REST call, no engine call (1.294851ms)
✔ drop: an oversize message is accepted into the inbox, answered with the fixed line and journaled as a drop (1.799863ms)
✔ restart: an inbox with three ids and a replay of the same three produces zero turns (45.065449ms)
✔ stop: STOP present refuses start; STOP written while running refuses new turns and the current one finishes (33.457106ms)
✔ ceiling: the ceiling plus one is refused and journaled; one fixed line per UTC day; a new day accepts again (5.686495ms)
✔ ceiling: a burst arriving while turns are still running cannot queue past the ceiling (4.778305ms)
✔ ceiling: a turn interrupted by a crash still counts after restart; admissions are durable (2.148577ms)
✔ ceiling: the daily notice survives a same-day restart; one delivery attempt in total, even when the first attempt crashed mid-flight (6.217326ms)
✔ duplicate: the same event delivered twice while the thread lookup is held yields one prompt, one admission and one reply (4.351708ms)
✔ journal: no token-shaped string and no model output on the drop path reaches disk (0.873163ms)
✔ receipt: an admitted message gets one eyes reaction on the inbound message; drops and refusals get none; a failed reaction is recorded and does not fail the turn (2.348064ms)
✔ receipt: Discord refusing the reaction leaves the turn intact and records ok false (3.501793ms)
✔ reload: a new user is silent before and answered after; a removed channel goes silent; a lower ceiling applies at once (4.052151ms)
✔ reload: a fixed key refuses with exit 2 and the old binding stays in force (2.393233ms)
✔ tools: with a tools binding the turn record lists every read and its outcome; without one the field is null (5.212187ms)
✔ context: the Discord block names the server, channels and modes, and states the rules from Q15 and Q16 (2.823545ms)
✔ context: with tools the block names the roots, keeps file content as data, and says to state refusals plainly (0.82393ms)
✔ context: a writable root adds the write rules and says a write is real only once Jason commits (2.13179ms)
✔ context: the envelope is one bracketed line then the text; names cannot break the line (1.298018ms)
✔ context: a git root swaps the terminal-commit line for the git verbs, and a vault root adds the id protocol (1.744131ms)
✔ context: assembleContext concatenates files in launcher format and appends the block; sha256 is stable (1.733223ms)
✔ context: splitReply keeps paragraphs together under the limit and splits long ones at lines, spaces, then hard (0.762688ms)
✔ engine: buildPiArgs carries the fixed flags, engine settings, session dir and prompt file (2.944535ms)
✔ engine: with tools, buildPiArgs turns pi's own tools off, loads the extension explicitly and allowlists exactly our three (0.465626ms)
✔ engine: a run with tool turns settles once, on the answer, with every tool call in the result (62.822814ms)
✔ engine: a run that ends on a tool-only turn fails the prompt as empty; a retried run settles on the real end (61.145295ms)
✔ engine: one prompt, one turn, text and usage come back (65.381089ms)
✔ engine: a prompt while streaming is held until pi settles, then sent as its own run, and answered in order (351.693041ms)
✔ engine: a held prompt that times out before pi settles fails on its own and is never sent (252.49447ms)
✔ engine: timeout sends abort and fails only that turn; the process stays (104.961156ms)
✔ engine: tool events from a run that outlived its timeout never land in the next prompt's record (236.952688ms)
✔ engine: a prompt after a turn that timed out before its agent_start waits for pi to settle instead of being refused (136.060149ms)
✔ engine: when pi has not started a timed-out turn by the end of the abort grace, the engine stops pi and fails held prompts (213.56674ms)
✔ engine: a timed-out turn pi starts only after the grace never answers a later prompt (614.013047ms)
✔ engine: late events of a run past its grace, before pi exits, answer nothing and nothing more is sent (early prompt response) (1.50905ms)
✔ engine: late events of a run past its grace, before pi exits, answer nothing and nothing more is sent (late prompt response) (0.982612ms)
✔ engine: a timed-out run pi did start outlives the grace; the next prompt goes out when it ends (438.371393ms)
✔ engine: a malformed JSONL line fails the turn, not the process (25.024093ms)
✔ engine: a turn that ends in error rejects with the error code; process exit fails pending turns (44.214839ms)
✔ gateway: hello -> identify with intents, ready, heartbeat with jitter, ack (2.80776ms)
✔ gateway: missed ack closes the socket and resumes with the last sequence (1.836378ms)
✔ gateway: op 7 reconnect resumes; op 9 non-resumable re-identifies (0.562911ms)
✔ gateway: op 9 resumable resumes (0.397066ms)
✔ gateway: close 4014 is fatal, reports the missing intent, never reconnects (1.091203ms)
✔ gateway: 4004 and 4013 are fatal too; 1006 reconnects with identify when no session (0.585441ms)
✔ gateway: close() is final and unparseable frames are ignored (0.509514ms)
✔ git: config validation is strict, needs write: true, a work tree and a private token file (81.630624ms)
✔ git: the child environment drops every host git config, names one helper, and carries the token path only for origin (55.182558ms)
✔ git: status reports the branch, ahead/behind and changed paths, and refuses off the named branch or mid-merge (104.588538ms)
✔ git: parseStatus reads porcelain v2 including renames and conflicts (0.386886ms)
✔ git: a commit stages exactly the named files, carries the seat author and the requester trailer, and pushes at once (129.509564ms)
✔ git: commit refusals: message, paths, requester, nothing to commit, and an index that already holds other work (129.242538ms)
✔ git: a commit whose push fails is still a commit, says so, and the next commit's push carries both (D6) (128.941211ms)
✔ git: pull is fast-forward only; a diverged origin or dirty local files refuse with nothing merged (270.059409ms)
✔ git: push pushes the named branch only and reports up to date (108.38127ms)
✔ git: no token value or token path ever reaches a git argument list; outputs are masked and capped (120.832286ms)
✔ git: the credential helper answers get over https from a private file and nothing else (235.297232ms)
✔ git: the vault protocol validates before a commit, honours another owner's lock, reserves ids, and locks around writes (870.316574ms)
✔ lock: the claim is exclusive; a second start against a live owner refuses (5.461445ms)
✔ lock: a stale lock (dead owner, reused pid, or record without start) refuses run and is never signaled; only unlock clears it (6.077463ms)
✔ lock: an incomplete claim (directory without owner record) is busy and refuses run; unlock clears it (1.154073ms)
✔ lock: an owner record that exists but cannot be read is invalid: never signaled, never removed, never claimed over (2.958004ms)
✔ lock: legacy upgrade; a live connector holding a {pid, start} record is unknown, unlock refuses and nothing changes; after it exits, unlock clears it (68.497107ms)
✔ lock: a live pid whose record carries a malformed or noncanonical start or boot string is unknown, not a mismatch; nothing signals, removes, or claims over it (414.276972ms)
✔ lock: identity syntax; only canonical unsigned decimal start ticks and lowercase boot uuids are identities (0.568485ms)
✔ lock: a process whose start marker or boot id cannot be read refuses to claim (0.622695ms)
✔ lock: a live pid whose identity cannot be read right now is unknown: never signaled, never removed, never claimed over (1.24818ms)
✔ lock: four processes racing for the same binding; exactly one claims it and the others refuse (65.895538ms)
✔ lock: stale handoff; concurrent starts over a stale lock all refuse, nothing reclaims, one unlock then exactly one live owner (136.975315ms)
✔ lock: four-party schedule; claims landing inside an unlock's gap never survive, one unlock leaves no owner and no residue (62.784536ms)
✔ notices: a kind is recorded per UTC day and found again (0.47959ms)
✔ notify: the DM channel opens once, every send carries the nonce, and only the message id comes back (6.202273ms)
✔ notify: refusals and unknowns surface as RestOutcome without ids; a refused send reopens the channel next time (2.347778ms)
✔ notify: no dmRecipient, a non-0600 binding or token, or a missing binding refuse before any network use (2.088161ms)
✔ recover: nothing to do is clean; a lock whose owner is gone or that has no record is cleared and STOP ends up absent (46.846093ms)
✔ recover: an operator STOP refuses with exit 3 and is never removed, whatever the lock says (46.862321ms)
✔ recover: a brake written during the unlock wins; STOP stays with both lines and the start is refused (36.118273ms)
✔ recover: a held binding refuses with exit 3 and writes no STOP: live owner, alive pid without verifiable identity, unreadable record (85.679261ms)
✔ cli: recover exits 0 when ready, 3 behind a brake or a held binding, and run's own STOP refusal is 3 (786.96409ms)
✔ rest: createMessage sends nonce, enforce_nonce, empty allowed_mentions and a soft reply reference (2.469546ms)
✔ rest: 429 waits retry_after and retries; 4xx is refused; 5xx and socket errors are unknown (6.499215ms)
✔ rest: content and nonce limits are enforced locally; typing never throws (0.663236ms)
✔ rest: react PUTs the encoded emoji on the inbound message for @me; 2xx is true, anything else is false and never throws (1.10301ms)
✔ rest: createDm posts the recipient and resolves the channel id; 4xx refused, 5xx unknown, bad id never sent (1.019735ms)
✔ setspark config: a bare https or loopback origin, a private key file, a principal (5.327066ms)
✔ setspark config: reaches the tools config and the binding as a fixed key (2.605257ms)
✔ setspark config: the binding's key survives resolveToolRoots and the engine's JSON hand-off to the extension (1.225081ms)
✔ setspark config: approvers come from the binding's users, never from the binding's setspark key (2.048754ms)
✔ setspark verbs: required_approvers go out as discord ids from names and come back as names (28.04122ms)
✔ setspark verbs: no Discord user id reaches tool text, whatever shape the service returns it in (12.465965ms)
✔ setspark contract: a decision made with names opens a request the connector accepts; names stored by an old record still refuse (8.034413ms)
✔ setspark keys: read per call, one printable token per file, rotation without a restart (4.868421ms)
✔ setspark idempotency keys: principal, turn id, call index; connector keys name a step (0.667357ms)
✔ setspark http core: json in and out, bearer header, idempotency header, fixed user agent, no key anywhere else (2.697976ms)
✔ setspark http core: error bodies become fixed refusals with code and the 409 fields; server text is data, cut (1011.422397ms)
✔ setspark verbs: a setspark key enables the eight verbs and no counters (0.574031ms)
✔ setspark verbs: writes carry the turn's key and the asserted requester, reads carry no key, and the api key never appears in text or details (7.422913ms)
✔ setspark verbs: no turn refuses every write before any request; bad arguments refuse before any request; reads still work (1.467746ms)
✔ setspark verbs: renderRecord caps long output and hides the accepted snapshot (0.250436ms)
✔ setspark api: bind, add_approval (button and reply) and get use integer request ids and the connector's keys (2.738467ms)
✔ tools: config refuses a missing, symlinked, dotted, non-directory or duplicate root and bad limits (4.390017ms)
✔ tools: every escape is refused with a fixed reason and nothing outside the root is read (4.716188ms)
✔ tools: happy paths list, read a window, and search case-insensitively; dotfiles and symlinks never appear (5.057023ms)
✔ tools: the tool set renders text for the model, records details for the journal, and enforces the per-run budget (3.659219ms)
✔ tools: listing and search caps hold (12.247961ms)
✔ tools: credential shapes are caught; ordinary prose and ids are not (0.942743ms)
✔ tools: the read uses the checked file itself; a symlink, a swapped file, a FIFO, a grown file or a hard link at read time is refused (5.486088ms)
✔ tools: an unreadable file under the root is skipped by search and refused by read (1.284782ms)
✔ tools: config accepts write: true only as a boolean, and enables the write tools only then (1.243556ms)
✔ tools: every write outside the fence is refused before any byte lands, and no temp file remains (5.044765ms)
✔ tools: write_file leaves the exact bytes, edit_file replaces one exact match, and the set renders the change as uncommitted (2.66857ms)
✔ tools: a target that changed between the check and the rename is refused and the temp file is removed (1.687135ms)
✔ web: config takes an https or loopback-http SearXNG base url and a bounded fetch cap (3.829048ms)
✔ web: address rules refuse every private, loopback, link-local, mapped and multicast form (2.407129ms)
✔ web: web_fetch refuses bad urls, private hosts, rebinding names, non-https redirects, too many hops, error status, non-text bodies, and times out (1029.680966ms)
✔ web: web_fetch returns html as text with the title, follows an https redirect, keeps plain text and json, and cuts at the cap (5.749177ms)
✔ web: html to text drops scripts, styles and comments, decodes entities and keeps block breaks (0.345888ms)
✔ web: web_search asks the instance for json, returns at most ten clean results, and refuses a bad query, a down instance or an unusable answer (3.21551ms)
✔ web: the tool set enables the web tools only with a web key, counts them in the budget, and records url, status and hits (2.689858ms)
ℹ tests 227
ℹ suites 0
ℹ pass 227
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2941.501687
