Repository navigation
feat(pilot): emit packet summary on stdout with --format json - #8155
Conversation
`ripr pilot --format json` now writes the existing pilot-summary.json document to stdout and suppresses the human terminal, matching other ripr subcommands. Packet files under --out are unchanged. --json is not added as an alias because it never existed on this command. Closes #7428. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
Walkthrough
ChangesPilot stdout format
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant CLI as ripr pilot CLI
participant Pilot as Pilot command
participant Files as Summary and packet files
participant Stdout as Standard output
CLI->>Pilot: Run with selected format
Pilot->>Files: Write summary and packet files
Pilot->>Stdout: Emit JSON summary or human terminal text
Merge Risk: ⚪ Minimal · up to
|
The binary discriminator compares stdout to pilot-summary.json. Running without --quiet would fail that equality if progress leaked onto stdout. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author self-review of exact head 4057b937ceb1b7911a86f3db601cdf539f68d965 (GitHub cannot request changes from the author; this COMMENT is the disposition, not approval).
reviewed_head_sha: 4057b937ceb1b7911a86f3db601cdf539f68d965
integration_basis: origin/main 20022bbfe
claim_boundary: #7428 — `ripr pilot --format json` emits existing pilot-summary.json on stdout and suppresses the human terminal; packet files stay; no --json alias
changed_surfaces_and_semantic_owners_inspected:
- cli/commands/pilot.rs parse_pilot_options, parse_pilot_format, pilot_stdout, complete and timeout print sites
- cli/commands_options.rs PilotStdoutFormat
- cli/help/{core,overview}.rs PILOT_HELP and HELP_ALL usage; not CHECK_HELP/GATE_HELP/AGENT_VERIFY_HELP (#8151)
- cli/help.rs flag/help parity pins
- cli/command_metadata.rs cmd:pilot json_support
- tests/cli_smoke.rs binary stdout==file discriminator
- docs/OUTPUT_SCHEMA.md flag note only; schema 0.3 unchanged
blocking_findings: none on source/oracle
non_blocking_suggestions:
- timeout JSON stdout is covered by the shared helper, not a separate timeout binary run
- cmd:pilot catalog outputs still name only the packet directory; json_support:true is the machine signal
refuted_or_stale_findings: none
proof_and_ci_observed:
- cargo test -p ripr --lib -- parse_pilot_options json_stdout_is_the_summary every_parsed_flag_agrees_with_its_help_documentation command_specific_help_usage_lines_are_stable pilot_row_reports_stdout_json_support → 8 passed
- cargo test -p ripr --test cli_smoke -- pilot_format_json_prints_the_packet_summary -- --exact → ok (without --quiet, so a stdout progress leak would fail file equality)
- cargo xtask precommit → exit 0 on 4057b937c
- hosted: rust-only feature lane and others still in flight on this head
proof_or_review_missing: required hosted checks and merge-gate artifacts for this published head
affected_currentness_dimensions: production implementation, test stimulus/oracle, public claim (help/catalog/schema note)
residual_assumptions_and_non_claims:
- no --json alias
- --format json does not imply --quiet; progress stays on stderr
- usage errors after parse still return prose on stderr, not a JSON envelope
- schema/renderer unchanged; this is a stdout selection
disposition: REVIEW_INCOMPLETE — source and local oracle are clean; hosted required checks are not yet current. Re-enter for exact-head CI before merge.
Oracle challenge: printing the human block, a different JSON document, or concatenating both would fail stdout == pilot-summary.json and the focused test: absence check. --json and unknown formats still fail closed. Help/parser parity would reject an undocumented --format.
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- No public JSON contract change; schema_version stays 0.3. Docs add only a one-paragraph flag note. No migration risk.
pilot_stdoutonly chooses between two pre-rendered strings; if a future change renders the terminal after file write but before print and that render panics, stdout would already have the prior body — but today both branches are produced before the print in both the timeout and complete paths, so no ordering hazard exists.
Verification questions
- Confirm cli_smoke binary proof asserts stdout equals pilot-summary.json, not just 'is JSON', and checks human block is absent.
- Confirm cli_smoke binary witness
pilot_format_json_prints_the_packet_summary_and_suppresses_the_human_blockis the only end-to-end proof that stdout equals the packet file.
Refuted
--formatcould allow an empty or whitespace value to silently default; refuted because: expect_value enforces a non-empty token; missing-value test asserts the exact error string. Whitespace tokens would still be parsed and rejected by parse_pilot_format.- Proposal that
PilotStdoutFormat::Jsoncould be parsed but ignored, soripr pilot --format jsonstill prints the human block; refuted because: Two print! call sites in pilot.rs pass the body through pilot_stdout(format, json, terminal); a unit test asserts the helper returns the JSON string for Json and terminal for Human; the new cli_smoke test asserts stdout equals pilot-summary.json and must not contain 'focused test:'. Source-grep confirms no other print!/println! of terminal text remains on the pilot path. --format jsoncould change the schema version or content of the written JSON file; refuted because: The sameoutput::pilot::render_pilot_summary_json(&classified, context)function is reused and written to both the file and stdout via&summary_json; the binary test pinsschema_version == "0.3".
Evidence gaps
- Binary proof for stdout assertion not yet in receipt; cli_smoke test exists and is the gate but its execution result is absent.
- Model proof intent was rejected by deterministic validation.
|
Re: the github-actions review on Verification
Evidence gap (“binary proof not in a receipt”): the run is recorded in the PR Proof section and the rust-only lane. That is missing hosted-receipt packaging, not missing execution. Head stays frozen. The two “confirmed findings” (schema 0.3 unchanged; both stdout branches rendered before |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Published-head review of 4057b937ceb1b7911a86f3db601cdf539f68d965 after hosted rust-only completed.
reviewed_head_sha: 4057b937ceb1b7911a86f3db601cdf539f68d965
integration_basis: origin/main 20022bbfe
claim_boundary: #7428 — --format json stdout packet summary; no --json alias
changed_surfaces_and_semantic_owners_inspected: same as prior COMMENT; no head movement
blocking_findings: none
non_blocking_suggestions: timeout stdout JSON remains helper-covered, not a separate timeout binary
refuted_or_stale_findings:
- github-actions “findings remain” / missing binary receipt: not a source defect. The cli_smoke witness asserts stdout==file and absent human block; local exact-filter run ok; rust-only lane succeeded. Replied on the PR. Zero inline threads.
- Gemini quota comment: missing review for that provider, not a finding.
- CodeRabbit: no actionable comments.
proof_and_ci_observed:
- local lib + cli_smoke + precommit as previously recorded
- hosted rust-only feature lane success (38830550283)
- other completed checks success or skipped-by-policy (coverage, msrv, vscode, perl, windows-advisory full, future-clippy, junit)
proof_or_review_missing: Ripr Rust Small Result (Ready-triggered); merge-gate aggregator if any after Ready
affected_currentness_dimensions: exact-head CI receipts refreshed for rust-only; implementation/oracle unchanged
residual_assumptions_and_non_claims: unchanged
disposition: REVIEW_READY for source/oracle and observed rust-only. Merge waits on Ready-triggered Ripr Rust Small Result on this frozen head.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
CONTRIBUTING requires a changelog.d entry for user-visible CLI behavior. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author self-review of exact head 21a2551f5d3a75b1095a089dd79e54018c6e523b after the changelog repair (GitHub cannot request changes from the author; this COMMENT is the disposition, not approval).
reviewed_head_sha: 21a2551f5d3a75b1095a089dd79e54018c6e523b
integration_basis: origin/main 20022bbfe
merge_ref: 3ab624b5 parents 20022bbfe + 21a2551f5; tree 22af7aaac equals candidate tree (no combined-tree delta)
claim_boundary: #7428 — `ripr pilot --format json` emits existing pilot-summary.json on stdout and suppresses the human terminal; packet files stay; no --json alias
changed_surfaces_and_semantic_owners_inspected:
- production/oracle unchanged from 4057b937c (cli parse, pilot_stdout, help, catalog, cli_smoke, OUTPUT_SCHEMA flag note)
- changelog.d/8155-pilot-format-json.md Added fragment (#7428)
blocking_findings: none
non_blocking_suggestions: timeout JSON stdout remains helper-covered; retry_command still omits presentation flags
refuted_or_stale_findings:
- Devin retry_command drops --format json: residual, not a stdout-path defect. Packet field from PilotCommands::new is independent of CLI format; presentation flags are not analysis-retry parameters. Replied; thread resolved.
- Devin missing spec/traceability: fenced by the #7428 coordinate; schema 0.3 unchanged; OUTPUT_SCHEMA.md already notes the flag. Replied; thread resolved.
- Devin missing changelog: valid; repaired by 21a2551f5. Thread resolved after the fragment landed.
proof_and_ci_observed:
- cargo xtask check-changelog-fragments → pass on 21a2551f5
- cargo xtask precommit → exit 0 on 21a2551f5
- prior lib + cli_smoke binary proof on 4057b937c still applies (no production delta in 21a2551f5)
proof_or_review_missing: hosted required checks for this published head (Ready not yet requested at review time)
affected_currentness_dimensions: public-claim (changelog); implementation/oracle unchanged
residual_assumptions_and_non_claims:
- no --json alias
- --format json does not imply --quiet
- retry_command does not carry presentation flags
- usage errors stay prose on stderr, not a JSON envelope
disposition: REVIEW_INCOMPLETE — source/oracle/changelog clean; hosted required checks are not yet current for 21a2551f5. Mark Ready to request Ripr Rust Small Result; re-enter before merge.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- next.retry_command is a packet-document field generated independently of CLI stdout selection in output::pilot::PilotCommands::new.
- crates/ripr/src/cli/help/core.rs:61 — Help grammatically claims '--format FORMAT human or json. Defaults to human. json writes the same ...' - the 'json writes' sentence reads as if the verb subject is the literal token 'json' rather than 'FORMAT'. Tighten to e.g. 'When set to json, the same pilot-summary.json document is written to stdout ...' to avoid implying 'json' alone runs the command.
Verification questions
- Confirm binary witness is the only end-to-end proof that stdout equals the packet file; helper test only proves selection function returns the precomputed json string.
- Confirm retry_command already excludes other presentation flags (--quiet, --format); carrying --format into retry_command would mutate the written pilot-summary.json document relative to schema 0.3 default.
Refuted
- Devin retry_command comment: pilot-summary.json's next.retry_command is rendered from PilotCommands::new, independent of CLI stdout selection. Presentation flags do not flow into the packet document; carrying --format json would alter the schema, which is intentionally unchanged.
- pilot_stdout could read a half-written body if a later render panicked after selecting the branch; refuted because: Both terminal and JSON strings are fully rendered into local variables before pilot_stdout is invoked in both the complete and timeout call sites; selecting a branch returns a pre-existing &str, so no partial-write window exists.
- devin concern that PilotCommands::new retry_command omits --format: pre-existing presentation-flag omission, not a stdout path defect; rendering uses the same shared helper so jq .status still works.
- A sibling CLI helper somewhere else in ripr already writes pilot JSON to stdout; refuted because: pilot_stdout is the only stdout selector in commands/pilot.rs; parse_pilot_format is the only parser; pilot() owns the only two print sites. No other route referenced the pilot-summary.json document as stdout.
- JSON stdout route lacks a JSON error envelope on usage/operational failure; refuted because: Claim boundary in PR body explicitly excludes 'a JSON error envelope on usage/operational failure'; current diff only reuses the summary document on success. Out of scope for #7428.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Re: github-actions review on Confirmed findings
Verification
Evidence gap (“model proof intent rejected” / receipt packaging): local cli_smoke + precommit on this head; hosted lanes in flight. That is missing receipt packaging, not missing execution. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
reviewed_head_sha: 21a2551
integration_basis: origin/main 20022bbfe06859dd3369fef39ff4fc5e4d2919d3
claim_boundary: #7428 — ripr pilot --format json emits existing pilot-summary.json on stdout and suppresses the human terminal; packet files stay; no --json alias
changed_surfaces_and_semantic_owners_inspected:
- crates/ripr/src/cli/commands/pilot.rs: parse_pilot_format, pilot_stdout selection, pilot() command entrypoint
- crates/ripr/src/cli/command_metadata.rs, crates/ripr/src/cli/commands_options.rs, crates/ripr/src/cli/help.rs: CLI flag and catalog definitions
- crates/ripr/tests/cli_smoke.rs: binary smoke tests verifying --format json stdout matches pilot-summary.json
- changelog.d/8155-pilot-format-json.md: Added fragment for #7428
- docs/OUTPUT_SCHEMA.md: note on --format json
blocking_findings: none
non_blocking_suggestions: none
refuted_or_stale_findings: - Devin retry_command drops --format json: packet field from PilotCommands::new is independent of CLI format; presentation flags are not analysis-retry parameters. Thread resolved.
- Devin missing spec/traceability: fenced by the #7428 coordinate; schema 0.3 unchanged; OUTPUT_SCHEMA.md already notes the flag. Thread resolved.
- Devin missing changelog: repaired by 21a2551. Thread resolved.
proof_and_ci_observed: - cargo xtask check-changelog-fragments (pass on 21a2551)
- cargo xtask precommit (pass on 21a2551)
- Ripr Rust Small Result from Routed Rust Small run 38833774318
proof_or_review_missing: none
affected_currentness_dimensions: public-claim (changelog), CLI surface
residual_assumptions_and_non_claims: - no --json alias
- --format json does not imply --quiet
- retry_command does not carry presentation flags
- usage errors stay prose on stderr, not a JSON envelope
disposition: REVIEW_READY
|
Test-oracle follow-up is PR #8219, exact head Verified gap: replacing the completed pilot path's summary renderer with the timeout renderer leaves the original Exact-head check-fast, precommit and exact smoke all pass, native 0. Independent semantic/oracle review and GitHub merge-subject currentness inspection found no actionable/material issue; the PR body links the review and records head/basis/tree, control witnesses, limits and continuation. Required hosted qualification completed on the unchanged head before merge (see below). Parent memory check: native execution remained available; cgroup OOM counters are zero. Peak 9.74 GiB / limit 16 GiB is an environment/compiler observation, not a test-process peak or proof of disconnect cause. Actual selected test takes 0.09 seconds; precommit compilation also selects xtask through its existing reverse-dependent policy. Two owned failed-test fixture trees (38,739 bytes) were archived, hash-verified and removed; all candidate/control evidence is preserved. No broad test/policy churn. LANDED (2026-10-16T07:19:36Z): PR #8219 squash-merged as |
Summary
Closes #7428.
ripr pilothad no stdout JSON path:--format jsonand--jsonboth exited 2 withunknown pilot argument, so CI had to locatepilot-summary.jsonunder the packet directory. This PR accepts--format jsonthe same way other ripr subcommands do: the existingpilot-summary.jsondocument is written to stdout and the human terminal is suppressed. Packet files under--outare unchanged.--jsonis not added as an alias because it never existed on this command.Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk for trusted same-reporiprwork.ripr-swarmSource-of-truth Links
Proposal: n/a
Spec: n/a (existing
pilot-summary.jsonschema0.3is unchanged)ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #7428
Acceptance delta:
ripr pilot --format jsonprints the packet summary on stdout; default human stdout and packet files stay as they are.Candidate Relationships
Candidate branch:
cursor/pilot-format-json-514fStack parent or prerequisite PR: none
Proposed replacement of PR: none
Acceptance retained from a replaced candidate: none
Open PR #8151 owns check/gate/agent-verify help exit-contract text; this PR does not touch those help bodies.
Scope
CLI argv, stdout selection, help, catalog
json_support, a one-paragraphOUTPUT_SCHEMA.mdnote for the new flag, and achangelog.d/fragment. Renderer and schema are reused, not forked.Scope Classification
This PR is scoped by:
Production delta:
parse_pilot_optionsaccepts--format human|json(default human).--format jsonis set; human terminal is suppressed.--outare still written.cmd:pilotcatalog row reportsjson_support: true.ripr pilot --helpandripr help --allname--format json.Evidence/support delta:
jsonn/--json, require a--formatvaluejson_stdout_is_the_summary_document_not_the_human_block(selection helper)pilot_format_json_prints_the_packet_summary_and_suppresses_the_human_block(binary: stdout equalspilot-summary.json, without--quiet)changelog.d/8155-pilot-format-json.md(Added, ux(pilot): pilot rejects --format/--json with an unknown-argument error, leaving no way to get the packet as stdout for CI #7428)Single acceptance criterion:
A CI script can run
ripr pilot --root X --format json | jq .statusand get the packet summary, without reading the out-dir.Non-goals:
--jsonalias.check.rs, classify, owner_pin, or traceability edits.next.retry_commanddoes not carry presentation flags (--format,--quiet).Support-tier Impact
Claim/proof notes: new CLI flag, catalog
json_support, and changelog fragment. Schema version and file packet contract are unchanged.Policy Impact
Proof
What the proof establishes: argv accepts
--format json; unknown formats and--jsonstill fail closed; help documents the flag; catalog reports JSON support; the built binary writes the packet summary to stdout and not the human block; the changelog fragment is well-formed.What the proof does not establish: hosted required-check matrix for
21a2551f5(requested after Ready); timeout-path stdout JSON except via the shared helper; a JSON error envelope on usage/operational failure.Claim Boundary
What may be claimed after this PR?
ripr pilot --format jsonemits the existingpilot-summary.jsondocument on stdout and suppresses the human block. Packet files remain.What must not be claimed yet? This does not add
--json, change the summary schema, or make--format jsonimply--quiet. Progress still goes to stderr unless--quietis set.next.retry_commandremains an analysis re-run recipe and does not copy presentation flags.Rollback
Revert the squash commit. CLI flag, help, catalog row, stdout selection, and changelog fragment only.
Spec-Test-Code Traceability
docs/OUTPUT_SCHEMA.mdPilot Summary (flag note only; schema0.3unchanged)crates/ripr/src/cli/commands/pilot.rs,crates/ripr/src/cli/help.rs,crates/ripr/src/cli/command_metadata.rs,crates/ripr/tests/cli_smoke.rscrates/ripr/src/cli/commands/pilot.rs,crates/ripr/src/cli/commands_options.rs,crates/ripr/src/cli/help/{core,overview}.rs,crates/ripr/src/cli/command_metadata.rschangelog.d/8155-pilot-format-json.mdStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a — no workflow, lane, or protection change.
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
cli::commands::pilot/cli::help/cli::command_metadatatestscargo test -p ripr --test cli_smoke -- pilot_format_json_prints_the_packet_summarycargo xtask check-changelog-fragments(pass on 21a2551)cargo xtask precommit(exit 0 on 21a2551)Continuation