Skip to content

fix(check): preserve artifacts on unsupported input (#8212) - #8230

Merged
EffortlessSteven merged 1 commit into
mainfrom
codex/unsupported-check-artifact
Oct 16, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
codex/unsupported-check-artifact

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

ripr check --write-artifact wrote or replaced a reusable v1 artifact even when malformed diff input produced unsupported_input and exit 2. context --from could then accept those findings without the producer's failure limitation. Use the existing outcome-to-exit decision to suppress that publication and keep direct-input drill-in commands in the original incomplete report.

Closes #8212. Valid and advisory partial writes/reuse retain their existing behavior. IDs, schema, analyzer, artifact loader, and admission policy do not change. Older v1 artifacts cannot identify their producing outcome; regenerate them if that history is unknown.

Scope and relationships

Ordinary product repair in EffortlessMetrics/ripr-swarm, one behavior owned by cli/commands/check.rs. No stack or replacement; #7887 baseline parsing, #8193 discovery assertions, and #8201 native output sets remain separate. Scope is the CLI publication boundary and its regressions/docs/traceability, with no workflow, dependency, permission, release, or validator-policy change.

Spec: RIPR-SPEC-0140. Changelog: changelog.d/8212-unsupported-check-artifact.md, checked against changelog.d/README.md: Fixed marker, - bullet, trailing (#8212). Rollback is this bounded source/test/spec slice.

Acceptance and proof

New native CLI controls cover garbage, truncated hunk and mixed input; exact stdout/stderr parity with ordinary unsupported check; new destinations, absent parents and existing sentinel preservation; downstream refusal for an absent artifact; preserved valid artifact/context; successful valid and advisory partial writes/reuse.

Exact source: head 7e7c526c2ebcaf336855feec292d4c4d02aa2446, tree 0fe69785067d6a5e68904b6fdd512a94c977dde2, base d08c77d144c016078364fcc1fcf2fa593d21cefc. Linux/Bash, Rust/Cargo 1.95.0, default features, one Cargo job, incremental disabled, dev/test debug info disabled. The root's admitted generation budget was 12 GiB additional growth with an 8 GiB reserve; recorded free-space observations stayed above that reserve.

cargo xtask check-process-policy
cargo xtask check-fast
cargo test --locked -p ripr --test cli_smoke artifact -- --test-threads=1
cargo test --locked -p ripr --test cli_smoke unsupported_check_exit -- --test-threads=1
cargo xtask precommit

All five commands above exited 0. Committed-head check-fast passed 14 gates, including actual workspace/all-target strict Clippy exit 0; fixture contracts were its one skipped gate. The independently resolved eight-path selector and merge base match the report. Committed-head runtime controls passed 26/26 artifact tests (including the three new regressions) and 4/4 unsupported-exit tests. Precommit v2 reports pass for this exact head/base, a complete eight-path inventory, both selected strict Clippy obligations (ripr --all-targets, xtask --all-targets), no skipped obligations and no limitations. Its policy aggregate also passed fixture contracts. Capability-check output retains historical reference disagreements; no fresh efficacy run is claimed.

Precommit structured report digest: sha256:ee9919cf7d2c780056e78d65d5edc721e80286fbd1f2df3dee93ea895a8a1d14; JSON file SHA256: 36a9cc51fef43b8af1dc4f6f4a43014fbd881403c59a195dc2d1e63d7b3991b7.

Unchanged-base worktree doctor, six applicable check-fast gates (zero paths independently verified against identical main/base), and cargo check --locked -p ripr --all-targets passed before mutation. Candidate proof is not relabelled baseline proof or full hosted qualification.

The unchanged-base regression run reached the real producer: 1 control passed / 2 intended failures at artifact creation and replacement. An earlier test-wrapper return-type mismatch was a compile/setup error and is not counted as behavioral red evidence.

Claim boundary and continuation

This prevents new unsupported-input artifact publication; it does not retrospectively classify old v1 artifacts or promote artifacts into gate/proof evidence. No support-tier change. No full workspace/golden/package/release matrix or native Windows execution is claimed unless listed in the final receipts.

Independent review before publication inspected all eight committed files, the sole writer and navigation consumers, outcome authority, schema/legacy limitations, and the raw red/green receipts. It found no blocking source/oracle defect. Its independent frozen-CLI challenge passed nine cases: human/human-full/JSON × symlink/directory/nonexistent destination, each preserving bytes and direct-input navigation with exit 2. Skipping only the writer would fail navigation parity; blocking every incomplete result would fail the partial-input control. Disposition: REVIEW_INCOMPLETE for merge, no source blocker to Draft publication after local gates.

Frozen exact-head binary SHA256 ecaaf606b2f645d0aa83e199e8306c0b96d2752513f6ae92e61e8b2c7e9f721d; --version identifies the head above. Retained local receipts (not uploaded hosted artifacts): /workspace/scratch/json-failure-audit/, /tmp/json-artifact-*.log, and /tmp/ripr-artifact-review-6k05_k14/review-results.json. Original audit witness and bundle remain distinct retained baseline evidence.

Publication recheck: no equivalent all-state claim PR found. Current main e660a99480dc13a4ed93b131042d11506fd484b6 adds #8161 oracle-row/hidden-finding rendering and #8164 first-run help; neither changes this owner, outcome helper, loader or navigation. Independent review inspected the delta: the one-finding/no-related-tests controls remain applicable. A clean local merge-tree produces tree 68a1faad8987d73c1a71201d2b301ab02c9afdc9; this is composition inspection, not combined-tree execution or qualification. The receipts above retain their original d08 basis. No behind-only restack or repeated qualification was performed.

Keep Draft. No Ready transition or explicit hosted-CI request. Parent owns later current published-head review, hosted/integration judgment and any protected incorporation; no merge-readiness claim.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: dd3654dc-fa7b-40eb-b3e0-01ef0135c357
📥 Commits

Reviewing files that changed from the base of the PR and between e660a99 and 7e7c526.

📒 Files selected for processing: 8
  • .ripr/traceability.toml
  • changelog.d/8212-unsupported-check-artifact.md
  • crates/ripr/src/cli/commands/check.rs
  • crates/ripr/tests/cli_smoke.rs
  • crates/ripr/tests/cli_smoke/unsupported_artifact.rs
  • docs/EXIT_CODES.md
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0140-check-artifact-reuse.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Summary by CodeRabbit

  • Bug Fixes
    • ripr check --write-artifact no longer creates or replaces an artifact when input is unsupported. The incomplete report and direct-input navigation remain available, and the command exits with code 2.
    • Existing valid artifacts remain reusable after a rejected write. Advisory partial results can still produce reusable artifacts.
  • Documentation
    • Clarified artifact behavior for unsupported input and noted that older artifacts with an unknown outcome may need to be regenerated.

Walkthrough

The check command now writes a requested artifact only after a successful analysis outcome. Unsupported input still produces an incomplete report and direct-input navigation. CLI tests and documentation cover destination preservation and unchanged valid and advisory partial artifact behavior.

Changes

Unsupported check artifact publication

Layer / File(s) Summary
Outcome-gated artifact publication
crates/ripr/src/cli/commands/check.rs, docs/specs/RIPR-SPEC-0140-check-artifact-reuse.md, docs/EXIT_CODES.md, docs/OUTPUT_SCHEMA.md, changelog.d/8212-unsupported-check-artifact.md
The check command writes the requested artifact only when the computed outcome exit result is successful. Unsuccessful outcomes do not expose the artifact path for finding navigation. The specification and documentation describe unsupported-input behavior and unchanged valid and advisory partial artifact behavior.
CLI regression coverage
crates/ripr/tests/cli_smoke.rs, crates/ripr/tests/cli_smoke/unsupported_artifact.rs, .ripr/traceability.toml, docs/specs/RIPR-SPEC-0140-check-artifact-reuse.md
Smoke tests cover unsupported reports and destination preservation, preservation and reuse of an existing valid artifact, and writing and reuse for advisory partial input. Traceability and specification test mappings include the coverage.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 7e7c5

Unsupported-input check runs no longer create or replace reusable artifacts, and valid and advisory partial runs behave as before. No merge-blocking risk was found.

Security architecture risk: ⚪ Minimal · up to 7e7c5

The change prevents rejected input from replacing reusable results and keeps follow-up commands tied to the original input. It narrows existing behavior without expanding authority or weakening validation. Previously saved results retain their existing compatibility limitations.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed exposure is bounded to the CLI-requested local findings destination and consumers reusing it. Malformed diff input loses a publication route; the change introduces no additional filesystem authority or downstream reuse capability.

Security Findings and Attack Paths

  • observed — The changed path blocks unsupported-input findings from being newly persisted without their failure limitation. Direct reuse of a compatible older v1 file remains possible because the loader has no producer-outcome field to check; that limitation and its exposure are unchanged, not an introduced PR concern.

Trust Boundaries and Controls

  • observed — The producer now enforces its typed unsupported-input decision before entering the persistence boundary. Consumer-side structure, scope, and identity verification remain separate controls; navigation receives only the producer-eligible destination.

Resilience and Maintainability Implications

  • observed — Unsupported repetition bypasses the writer entirely, preserving prior destination state. Eligible writes retain the existing same-directory atomic replacement contract, and writer errors still fail the command. Interruption and concurrent-reader guarantees therefore remain those of the unchanged writer rather than a new multi-step publication mechanism.
Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (6 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed #8212 is directly linked and has coding requirements. check.rs now uses the computed outcome exit result before publication and exposes the artifact only for successful results. This prevents artifa…
Out of Scope Changes check Passed The changed paths are connected to #8212. The source change defines the CLI publication boundary. The smoke-test registration and tests provide the required regressions. The changelog, traceability en…
Title check Passed The title clearly and concisely describes the main change: preserving artifacts when check input is unsupported.
Description check Passed The description is detailed and covers the change, scope, relationships, acceptance criteria, proof, claim boundaries, rollback, and limitations. It does not reproduce every template heading or checkb…
Full details: Linked Issues check

Explanation

#8212 is directly linked and has coding requirements. check.rs now uses the computed outcome exit result before publication and exposes the artifact only for successful results. This prevents artifact creation or replacement for unsupported_input while preserving the incomplete report and direct-input navigation. The native smoke tests cover garbage, truncated, and mixed input; exit 2; exact stdout/stderr parity; absent and existing destinations; absent-artifact refusal by context --from; valid-artifact preservation; and valid and partial_with_limitations write/reuse. The CLI, exit-code, output-schema, and RIPR-SPEC-0140 documentation record the behavior. The implementation keeps the existing schema, IDs, loader, and admission policy.

Full details: Out of Scope Changes check

Explanation

The changed paths are connected to #8212. The source change defines the CLI publication boundary. The smoke-test registration and tests provide the required regressions. The changelog, traceability entry, exit-code documentation, output-schema documentation, and RIPR-SPEC-0140 update document the same behavior. No unrelated workflow, dependency, permission, release, validator-policy, gate, badge, support-tier, or proof-input change is shown.

Full details: Description check

Explanation

The description is detailed and covers the change, scope, relationships, acceptance criteria, proof, claim boundaries, rollback, and limitations. It does not reproduce every template heading or checkbox, but the missing template details are non-critical because the required information is provided in equivalent sections.

Full details: Docstring Coverage

Explanation

Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (6 skipped: 5 unsupported, 1 too large.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checked the patch at dawn
And found one hunk was malformed
The old artifact stayed in place
The report kept its direct-input trace
Valid findings hopped back to view
Advisory partials worked as usual too

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member Author

Independent published-head inspection: no actionable findings emitted. Disposition: REVIEW_INCOMPLETE for merge; no blocking source/oracle defect found in this bounded repair.

Reviewed head 7e7c526c2ebcaf336855feec292d4c4d02aa2446, tree 0fe69785067d6a5e68904b6fdd512a94c977dde2; predecessor/merge base d08c77d144c016078364fcc1fcf2fa593d21cefc; current main/PR base e660a99480dc13a4ed93b131042d11506fd484b6 (rechecked before posting). Issue #8212. Inspected all eight changed paths, repository review instructions, the sole production writer, outcome helper, navigation/render consumers, artifact identity/schema loader, and context/explain reuse.

Observed independently on Linux/Bash, Rust 1.95.0, default features:

  • Explicit builds: cargo build --locked -p ripr --bin ripr at head and predecessor, serialized, one job, incremental/debug info disabled. Peak observed growth remained below the 12 GiB ceiling with more than 8 GiB free.
  • cargo test --locked -p ripr --test cli_smoke unsupported_artifact -- --test-threads=1: 3/3 passed.
  • Same target with filter unsupported_check_exit: 4/4 passed.
  • Independent frozen-head challenge: 252/252 passed — garbage, truncated hunk, mixed valid/malformed and header-only input × JSON/human/human-full/GitHub/SARIF/four diff badge formats × new destination/absent parent/binary sentinel/directory/symlink/dangling link/file parent. Exit 2 and stdout/stderr exactly match ordinary checks; destinations, link targets and absent parents remain intact.
  • Valid and advisory partial_with_limitations writes/reuse passed with matching finding IDs, schema ripr-check-artifact-v1, and candidate_current context. Both artifacts and context bytes survive rejected replacement. Empty/whitespace writes, absent-artifact refusal, invalid UTF-8/missing diff preservation, same-input destination preservation, and eligible-write errors also passed.
  • Actual Bash human context commands and the JSON canonical detail route executed successfully; rejected input retains --diff, eligible input uses --from. Quoted artifact names were exercised. An initial PowerShell-line-through-Bash harness mismatch was corrected, not counted as a product failure.
  • Predecessor negative control: all 252 preservation/report controls detect the old behavior. A truncated producer exits 2 yet publishes an artifact that its own context --from accepts with exit 0.

The same outcome_exit decision gates publication and navigation, then returns only after rendering. It rejects the typed unsupported outcome rather than every incomplete result. IDs/schema and loader admission remain unchanged; older v1 artifacts still cannot retrospectively disclose producer completeness.

Current composition inspected: clean merge-tree 68a1faad8987d73c1a71201d2b301ab02c9afdc9; publication/helper/navigation/loader/context/explain paths equal reviewed head. Main's classifier-row and triage/help deltas were read. This is source composition inspection, not local combined-tree execution.

Evidence retained in this review environment: /workspace/review-8230-evidence/ (challenge.py, per-invocation streams/argv/status/hashes, head/base results, build/test logs, frozen executables). Head binary SHA256 8977ec1fe5fc0dd35611f9e818ececd1684ecfd1db7a72055f0d80d251fb9854; predecessor a4a307ed8e5bca9d95f1dd42ea001bf729801eb1b9be392fe52f47f49975951b. These are new executions, separate from owner-reported receipts absent here.

Residuals: no native Windows run or full hosted/package/merge qualification. Observed the associated CI Rust-only job's test step succeed; skipped lanes do not establish their coverage. No source, PR state, policy or CI changes requested by this review.

Copy link
Copy Markdown
Member Author

Ready-admission receipt for unchanged head 7e7c526c2ebcaf336855feec292d4c4d02aa2446, tree 0fe69785067d6a5e68904b6fdd512a94c977dde2, implementation/review basis d08c77d144c016078364fcc1fcf2fa593d21cefc.

Admission verifier /root/check_fixture_ready_admission read the full direct result from independent reviewer task 01a1436d-9cd2-70d0-9563-d3dacb3d0028, completed turn 01a1436d-a651-72dc-b719-7fc8052df10f, and its published exact-head review. Substantive review is complete with no actionable finding: all eight paths and actual writer/outcome/navigation/rendering/reuse consumers inspected; 252 candidate controls passed across four malformed inputs, nine formats and seven destination kinds; all 252 predecessor controls detected the defect. Three native artifact and four unsupported-exit tests passed. Valid/advisory writes, schema/IDs, context reuse, rejected-replacement preservation and actual navigation commands passed. These are reviewer execution, separate from owner receipts and from this admission read.

Owner exact-head check-fast and precommit passed, with complete eight-path selection, selected strict Clippy obligations and no skipped precommit obligations. Current CodeRabbit review reports no actionable comments; its docstring percentage is a non-required advisory, not an identified contract failure. Gemini quota remains missing provider review. No inline review threads or new material finding/hold was found.

Actual GitHub merge ref independently read: efcd0a0860cfac7ce70e2956673325f996be7e62, parents current main e660a99480dc13a4ed93b131042d11506fd484b6 and reviewed head; tree 68a1faad8987d73c1a71201d2b301ab02c9afdc9 exactly matches the reviewer's inspected composition. Relevant producer/consumer blobs retain reviewed identity. This establishes source currentness, not combined-tree execution. Older v1 artifacts still lack retrospective producer-completeness evidence; native Windows/full hosted/package qualification is not claimed. No new native-Windows gate is introduced by this admission.

Live configured required context remains Ripr Rust Small Result; ruleset protections and conversation-resolution requirements remain unchanged. No existing Routed Rust Small run for this head. CI, Security, Source of Truth, Printed Command Paste and Windows Advisory are terminal success; ordinary wheel/UB advisory runs remain active and will not be cancelled or duplicated.

Parent-authorized disposition supersedes the delivery handoff's Keep Draft instruction for this PR: request normal Ready-triggered qualification once, without manual dispatch or retries. REVIEW_INCOMPLETE remains for later hosted/integration qualification, not incomplete substantive review. After Ready verify actual Rust job checkout/parents/tree and monitor the single required run. No REVIEW_READY, merge, release or protection bypass is claimed.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 16, 2026 06:50
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • No test pins stderr substring as anchored at line start; a stderr formatter change could silently drop the 'unsupported_input' marker while tests still pass on stdout parity alone. Minor oracle brittleness, not a behavior regression.

Verification questions

  • Confirm stderr substring 'unsupported_input' oracle may be too narrow; library could emit a different rendered message and still exit 2.
  • Confirm outcome=='unknown_input' or other non-unsupported failure outcome is not exercised at the artifact-write gate; only 'unsupported_input' is enumerated in the source filter.
  • Confirm three new regression tests cover garbage/truncated/mixed x new/sentinel/absent-parent + valid preservation + partial advisory reuse. Symlink and directory destinations are NOT covered in this PR. The PR body references a 9-case frozen-CLI challenge but no automated test pins those cases; subsequent fix to that surface is unanchored.

Refuted

  • Changing analysis_outcome_exit_result? to outcome_exit? could diverge machine output for non-unsupported outcomes because the helper is now called twice in the same fn.; refuted because: Helper is pure: it depends only on analysis_outcome; second call site replaces the first and yields identical behavior for every non-unsupported outcome. No new allocation, no ordering change.

Parked follow-ups

  • Spec claims existing valid/partial write and reuse behavior unchanged, but this PR does not add a focused unit/clippy gate ensuring the reusable_artifact binding is not silently inverted to Some(_) again. Refactor risk is asymmetric given the gate is a single boolean binding at one call site.

Copy link
Copy Markdown
Member Author

Returning to Draft: required run 38863530464, attempt 1 failed PR evidence because its ripr check producer timed out after 3,600 seconds; review-comments correctly did not run. Hosted Rust job 116851153648 and required aggregate 116887856280 failed. This is not a test failure or an established infrastructure diagnosis, and the required blocker is not waived.

Actual hosted checkout and reusable workflow: efcd0a0860cfac7ce70e2956673325f996be7e62, tree 68a1faad8987d73c1a71201d2b301ab02c9afdc9, merging unchanged head 7e7c526c2ebcaf336855feec292d4c4d02aa2446 into e660a99480dc13a4ed93b131042d11506fd484b6. Earlier formatting, policy, workspace/all-feature checks, strict Clippy, goldens, fixture contracts and verdict corpora passed. Tests: 16,322 passed (25 slow), 3 skipped, including all three new artifact-preservation/reuse regressions. Doctests: 2 passed, 1 ignored. These passes do not replace PR evidence.

Failure diagnostic artifact, SHA256 7998fb33d7a22f2f597efcd01ff951d160fae60b69287666045a88e0c2c43064, and the failed run are retained. Existing owner retains diagnosis; the attempted diagnostic handoff failed at the backend and is not admitted execution. No rerun or dispatch. Keep Draft pending an evidence-backed diagnosis and applicable repair/review before any separately justified qualification refresh.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Merge convergence blocked: required check fails on an inherited analyzer hang (issue #8255)

Ripr Rust Small Result is red on head 7e7c526c2ebcaf336855feec292d4c4d02aa2446: the hosted "PR evidence" step's ripr check producer ran the full 3,600s ceiling without converging and was killed (run 38863530464, job 116851153648, step started 07:34:12Z, killed 08:38:18Z: ripr check for PR evidence timed out after 3600 seconds). All other checks on the head are green/skipped and there are no unresolved review threads.

This is deterministic, not runner noise, and not caused by this PR's changes:

Full probe table and reproduction commands: #8255.

What is needed to land this PR: an analysis repair so diff-scoped check converges on check.rs hunks (separate lane, out of this PR's CLI-publication scope), then re-run the failed job — gh run rerun 38863530464 --failed (the pull_request merge ref recomputes against fixed main). No re-run was attempted now: it would deterministically burn another hour to the same kill. No branch force-push, no protection change, and no check bypass was used or is requested.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven merged commit 391e3dc into main Oct 16, 2026
49 of 51 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/unsupported-check-artifact branch October 16, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(check-artifact): preserve destinations when diff input is unsupported

1 participant