Short receipts for queue writes, behind an off-by-default switch #1137
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1137"
general
weight: 0.35
mvschwarz
What a person gets
Queue writes can print a short receipt instead of the whole row. Today
rig queue create,claim,unclaim,update,block,handoffandhandoff-and-completeprint the daemon's full row: about 30 fields,pickup,waitingand the entire body. A handoff prints two full rows. With the newoutput.compactswitch on, a write prints what the seat acts on next and says how to get the rest.The receipt shows:
tsCreatedandbodyBytes, so a seat can confirm the write landed without a second call;UNVERIFIED: no timed backstopwhen there is none;rig queue show <id> --full --json, or--fullon the write).It never echoes the body.
Wake evidence is labelled, and never says "scheduled". A write's response can't prove a wake reached the outbox, so the receipt reports only what it can prove:
| Case | What the receipt says |
|---|---|
|
--no-nudge| suppressed ||
failed:wake not retained| the row saved but its wake was NOT staged || An idempotent create that returned an existing row | no new wake; the row's earlier result is marked as earlier |
| No outbox | the daemon's own recorded result |
| Otherwise | one line: no result recorded yet |
| A same-body
create --idretry, or a re-driven cross-host handoff | a recorded result is labelled as the row's, possibly an earlier wake's, never as this write's ||
--verify|persistedand the wholedeliveryobject, as today |Writes that fail read as today. Refusals, a missing row, and cross-host INDETERMINATE writes print the whole response, with the same exit codes (1 and 2) and the same stderr.
--jsonkeeps today's paths. Every field the receipt keeps sits at today's key name, path and type, so existingjqfilters work in both modes. That includes:qitemId,state,destinationSession,sourceSession,tsCreated,tsUpdated,tags(null kept);priorityeven when it'sroutine, andsummaryeven when it's null;pickup, andlastNudgeResult/lastNudgeAttemptwith nulls kept;waiting.blockerandwaiting.nextBackstop, nested as today. The receipt'swaitingkeeps only those two; the rest is listed inreceipt.omittedaswaiting., and each verb's--fullhelp says so;closed/createdfor handoffs, andpersisted/deliveryfor--verify.The only additions are
bodyBytes,wake,hostandreceipt.A fix folded in: the daemon's
unknown_target_reporefusal told agents to runrig whoami --json | jq .workspace.repos, but compactwhoami --jsonhas noworkspace. It now namesrig whoami --full --json, which does.That the new command really yields
.workspace.reposwas checked by reading the source; no test asserts it:rig whoami --full --jsonprints the daemon's whoami payload whole (cli/src/commands/whoami.ts:291).workspace(daemon/src/domain/whoami-service.ts:334-350), whose block hasrepos(daemon/src/domain/workspace/workspace-resolver.ts:21,48).--jsonprojection dropsworkspace, andcli/test/whoami.test.ts:413asserts that, which is why the old hint was false.The switch
output.compact, off by default. An install prints today's output until the switch is turned on.rig config set output.compact true, orOPENRIG_OUTPUT_COMPACT=1for a seat or a single command.rig config set output.compact false, orOPENRIG_OUTPUT_COMPACT=0.rig config get output.compactreports it, through the config store. The environment variable acceptstrue/1(on) andfalse/0(off); an empty value defers to the config file. An invalid value is rejected with the store's warning and falls back to the file, forconfig getand for writes alike. An unreadable config is off.--fullon each of the seven verbs prints today's output byte for byte whether the switch is on or off, so scripts can pin it now.One switch is named for all compact defaults. Only queue writes read it in this PR.
The artery: the queue
Where it's shaped: the projection is CLI-side, in one new module (
cli/src/queue-receipt.ts) applied at the seven verbs' print call. The following are unchanged:The only daemon source change is the refusal hint's text, plus
output.compactregistered in the daemon settings store (twin of the CLI key).Downstream consumers of a write's stdout, checked across in-repo scripts, skills, docs and tests:
cli/test/queue.test.ts: the--verifyfields and create/handoff JSON. These run with the switch off, so today's output is unchanged. The receipt keepspersistedanddeliverywhole when on.queue-forwarded-response-outcome.test.tsandd14-loud-queue-transport-failure.test.ts: errors and indeterminate outcomes, which print whole in both modes.scenario-pipeline.ts: reads exit codes only, which are unchanged.rig queue claim <id> --json): shows the call only.tsCreatedand the body's size: the receipt carriestsCreatedandbodyBytes.-
verify-world.shandtrace-to-root.pyreadrig whoami;-
refocus.cjsreadsrig queue whoami;-
read-defaults.test.tscovers theshowand health read views;-
bodyTruncated/bodyBytesin the queue-handoff skill arequeue showfields.--fullon the seven verbs, andrig confighelp lists the key.Risk
--json, which keeps retained fields at today's paths, or--fullfor today's output.receipt.omitted, not silently dropped. A response shape the projection doesn't recognize prints whole.OPENRIG_OUTPUT_COMPACT, so a seat with the switch on doesn't change what the suite prints.--hostwrites: the receipt settles locality the way the daemon does (resolvesToLocalHost). It reads the selected daemon's ownselfHostId(/healthz, receipt path only), so--hostnaming this daemon reads as local. If that id can't be read, the receipt says it can't confirm where the row lives (hostUnconfirmedin--json) rather than assert remote. It then offers both reads as alternatives: the localrig queue showasfullCommand, and the on-host form asfullCommandOnHost(createdFullCommandOnHostfor a handoff's new row). A remote row's footer names the read asOPENRIG_URL='<daemon-url of host X>' rig queue show …, as the existing create recovery text does.Proof
Tests:
cli/test/queue-write-receipt.test.tshas 85 tests. The file fails on main (its module doesn't exist there). It covers:--full, output equal to today's printer, in plain and--json;tsCreated, body size, no body, and the footer;--jsonreceipt keeps each retained field at today's key, path and type, for every verb;--host: another daemon, this daemon's own host id, and an unreadable host id (both reads offered, for a create and a handoff);--idretry whose row has a recorded result;rig config getagreeing with the writes (filetrue+OPENRIG_OUTPUT_COMPACT=yes);--fullhelp's note onwaiting.Updated tests:
output.compact.Builder P1/P6 run, on one build with fixed rows:
-
--no-nudge;- an idempotent create with a different body;
- a create to a mistyped seat (advisory);
- a park with no timer;
- a refused update;
- a missing row;
- a cross-host create to a registered host that drops the connection mid-response (INDETERMINATE);
-
--verify.Results:
--json, with the switch off, with--fulland the switch off, and with--fulland the switch on.| stdout characters, same response | plain: today → receipt |
--json: today → receipt ||---|---|---|
| create | 3,281 → 613 | 2,956 → 1,240 |
| claim | 4,102 → 643 | 3,683 → 1,563 |
| unclaim | 3,575 → 484 | 3,250 → 1,345 |
| update | 3,606 → 544 | 3,281 → 1,400 |
| block | 3,658 → 542 | 3,304 → 1,436 |
| handoff | 7,279 → 1,104 | 6,348 → 3,050 |
| handoff-and-complete | 7,227 → 1,083 | 6,296 → 3,016 |
| create
--no-nudge| 3,268 → 503 | 2,943 → 1,127 || create, existing row returned | 4,310 → 1,170 | 3,872 → 2,166 |
| create with an advisory | 3,834 → 909 | 3,426 → 1,715 |
| block with no timer | 3,677 → 532 | 3,323 → 1,442 |
| refusal / missing row / INDETERMINATE | unchanged (printed whole) | unchanged (printed whole) |
| create
--verify| — | 3,202 → 1,488 |These are characters for these rows, with bodies of about 1.7 KB. They aren't a promise about savings in other workloads, or about usage allowance.
Not shown on the private daemon:
Full gate:
c6642730:-
npm run lint: passes.-
npm test:- repo checks 286/286;
- daemon 14,058 passed and 10 failed;
- CLI 4,038/4,038 (3,961 on main);
- TUI 912/912.
--fullhelp text and their tests. On the final head,npm run lintpasses and the CLI package passes 4,046/4,046.Native: NOT RUN (environment gap). Builder evidence on private daemons from the repo's harness, not Build's data or seats, and not a QA run.
Noted follow-ups, not in this PR
wakeStagedflag from the daemon. This PR doesn't change route shapes.rig queue resolveandrig queue fallbackalso print full rows.queue show,transitions,captureandwhoamican join the sameoutput.compactswitch.Refs: slice 15 (smaller everyday command output), P1 and P6.
🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Successful queue writes can display compact receipts when compact output is enabled. Receipts summarize key details without including the full record and provide commands to view it; use
--fullto display the complete response. Errors and writes without a receipt continue to show the full response.Added the
output.compactsetting, off by default, configurable through settings orOPENRIG_OUTPUT_COMPACT.Documentation
Updated queue command references to include
--fulland clarified that unknown repository errors direct users to the fullwhoamioutput.<!-- end of auto-generated comment: release notes by coderabbit.ai -->