Repository navigation
ux(output): repo-scoped formats disclose progress and audit-path cost (#4945) - #4955
Conversation
…#4945) The seven full-repo audit-path formats (repo-seams-json/md, repo-exposure-json/summary-json/md, repo-sarif, agent-seam-packets-json) were the only fully silent surfaces: the CLI progress sink was wired after the RepoExposureJson early return, the seam-inventory dispatch never received it, and the render arms drove walkers that take (root, config) only — while ripr check --help promises 'ripr progress: <stage> [<scope>]' stages for long-running analysis. Measured on the issue's host (DEBUG): repo-exposure-json ~24.5 min, repo-exposure-summary-json ~27.7 min, all fully silent. - wire CliProgressSink before every repo-format path and thread it through render via render_check_with_config_and_progress / _and_navigation_and_progress; the seven audit arms bracket their inventory walks with app::repo_inventory_with_progress, reusing the diff-scoped stage/elapsed shape at [repo] scope (fail-closes to failed/cancelled on drop, holds completed until stdout commit) - add an invocation-time one-line stderr disclosure naming the audit-path cost class, gated to exactly the seven formats via a declarative is_full_repo_analysis spec field (repo-badge-* excluded); it is an advisory notice like the repo-scope --base/--diff warning, so --quiet keeps it while still dropping the progress stream - stdout byte-shape unchanged: progress and disclosure are stderr-only Disclosure only — no behavior or speed change (speed is #3794, latency-evidence rows #3864). Proof: cargo test -p ripr repo_format (6: disclosure-set spec test, sink-receives-progress render test on a temp seam workspace, CLI stderr-progress + clean-JSON stdout pin, --quiet stdout byte-identical pin, diff/badge exclusion controls) plus repo_inventory_with_progress / repo_inventory_progress helper tests (2, including fail-close on both closure errors); cli_progress suite 13/13; fmt; clippy -D warnings; goldens check (275 fixtures, no drift, no stderr re-bless needed); check-output-contracts.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request implements progress reporting and invocation-time cost disclosures for full-repo audit-path formats. It introduces the 'repo_inventory_with_progress' helper to bracket full-repo inventory walks with repo-scope progress boundaries, updates rendering functions to accept progress sinks, and configures the CLI to emit progress events and cost disclosures. Additionally, comprehensive unit and integration tests are added to verify these behaviors. Feedback on the changes suggests a minor improvement in a unit test assertion within 'crates/ripr/src/app/progress.rs' to check for specific error messages instead of just asserting 'is_err()', which helps pin the operator-facing error messages.
Review findings dispositioned on the #4945 candidate: - repo_audit_path_disclosure promised warm seam-facts cache reuse to all seven audit formats, but the raw repo-seams-* walks (inventory_seams_at_with_config) rebuild the corpus index on every run and never read RepoSeamFactCache. The warm-rerun clause is now honest per format: the five classified/compact-classified walks keep the cache claim; the raw walks disclose that every run pays the full walk. Pinned by a per-spec disclosure test and an exactly-five cache-backed group test. - repo_inventory_with_progress's doc comment claimed LoadingInput covers corpus discovery; discovery runs inside the Analyzing coarse stage. Doc corrected to the honest coarse-stage semantics. - the fail-close test now asserts the closure error propagates verbatim instead of only is_err. - CHANGELOG: Unreleased/Added entry per CONTRIBUTING.md:67.
Four bot-review findings dispositioned on the candidate; all repaired: - the unchanged-tests note no longer fires on repo-scoped formats: their corpus walks never read include_unchanged_tests, so the smaller/faster- index claim was false there (analysis/workspace/select.rs narrows every diff-scoped mode when it is false; the inventory walks read only the corpus). The repair route now names the knob that owns the value — the CLI flag when passed, [analysis] include_unchanged_tests otherwise — because "drop the flag" is unreachable advice for the config-driven case (no positive CLI counterpart exists). Pinned by a config-driven smoke test (config knob + route present, flag advice absent) and a repo-badge-json absence control. - the shared git timeout error named only the CLI knobs (--git-timeout / RIPR_GIT_TIMEOUT); the same deadline wait serves the editor sidecar, whose deadline comes from the gitTimeoutMs initialization option. The repair route now names all three and the 0-disables escape; test pin extended to gitTimeoutMs. - CONFIGURATION.md's cancellation claim narrows to the files ripr writes itself: a shell-redirected stdout file is owned by the shell and can be truncated by an interruption; re-running rewrites it. Also merges origin/main (d09426d = #4955, plus #4954) for the coupled check.rs/CHANGELOG surfaces; the merged region was verified semantically (single progress wiring, #4946 note and #4945 disclosure coexist).
…ut knob (#4946) (#4953) * ux(output): restate mode/test-filter tradeoffs and name the git-timeout knob (#4946) * fix(ux): honest disclosure repairs from review (#4946) Four bot-review findings dispositioned on the candidate; all repaired: - the unchanged-tests note no longer fires on repo-scoped formats: their corpus walks never read include_unchanged_tests, so the smaller/faster- index claim was false there (analysis/workspace/select.rs narrows every diff-scoped mode when it is false; the inventory walks read only the corpus). The repair route now names the knob that owns the value — the CLI flag when passed, [analysis] include_unchanged_tests otherwise — because "drop the flag" is unreachable advice for the config-driven case (no positive CLI counterpart exists). Pinned by a config-driven smoke test (config knob + route present, flag advice absent) and a repo-badge-json absence control. - the shared git timeout error named only the CLI knobs (--git-timeout / RIPR_GIT_TIMEOUT); the same deadline wait serves the editor sidecar, whose deadline comes from the gitTimeoutMs initialization option. The repair route now names all three and the 0-disables escape; test pin extended to gitTimeoutMs. - CONFIGURATION.md's cancellation claim narrows to the files ripr writes itself: a shell-redirected stdout file is owned by the shell and can be truncated by an interruption; re-running rewrites it. Also merges origin/main (d09426d = #4955, plus #4954) for the coupled check.rs/CHANGELOG surfaces; the merged region was verified semantically (single progress wiring, #4946 note and #4945 disclosure coexist).
Sync for #4924: origin/main moved to ec4eee3 (human-output disclosure family #4936/#4942/#4953/#4955 and render progress plumbing #4945). Conflicts: app.rs/check.rs/render.rs semantically unioned (FindingDrillIn param + progress sink); 71 fixture bless CHANGELOGs unioned (both sides' Pending sections kept, numbering deduplicated); human-full goldens and human.rs/sections.rs/triage.rs/navigation.rs auto-merged.
Summary
repo-seams-json,repo-seams-md,repo-exposure-json,repo-exposure-summary-json,repo-exposure-md,repo-sarif,agent-seam-packets-jsonnow emit the same producer stages the diff path promises (ripr progress: loading_input|analyzing|building_output [repo], throttledstill active after <elapsed class>heartbeats,completed [repo]only after stdout commit; fail-closes tofailed [repo]/cancelled [repo]).ripr: <format> is the full-repo audit path: a cold run analyzes every seam in the workspace and can take minutes on large repositories;followed by a per-format warm-rerun clause — the five classified/compact-classified walks claimwarm reruns reuse the seam-facts cache and are much faster.; the rawrepo-seams-*walks discloseraw seam inventory does not read the seam-facts cache, so every run pays the full walk.CliProgressSinkis now wired before every repo-format path (previously theRepoExposureJsonearly return preceded the wiring, and the seam-inventory dispatch never received the sink), threaded throughrender_check_with_config_and_progress/..._and_navigation_and_progress; the seven audit arms bracket their inventory walks withapp::repo_inventory_with_progress, which reuses the diff-scopedProgressRunstage/elapsed shape atAnalysisProgressScope::Repo. Inventory function signatures are unchanged — the sink threads at the render/CLI seams.is_full_repo_analysisfield inFORMAT_SPECS(repo-badge-* render compact/badge summaries and stay excluded — they must not claim minutes they do not charge). Like the repo-scope--base/--diffwarning, the disclosure is an advisory notice, so--quietkeeps it while still dropping the progress stream.--quietcomparison and a parse-as-pure-JSON pin.Scope: disclosure only — no behavior or speed change (raw speed is #3794; latency-evidence rows are #3864).
Golden summary
cargo xtask goldens check: pass, 275 fixtures, zero drift — no golden pins the stderr these lines touch, so no re-bless was needed.Proof
cargo test -p ripr repo_format— 6 passed:repo_format_audit_path_disclosure_covers_exactly_the_full_repo_analysis_group+repo_format_audit_path_group_is_the_seven_measured_formats(format spec set),repo_format_render_reports_stage_events_to_the_progress_sink(sink receives the four repo-scope stage boundaries on a temp seam workspace), and CLI built-binary pinsrepo_format_audit_path_progress_reaches_stderr_and_stdout_stays_clean,repo_format_quiet_keeps_stdout_byte_identical_and_drops_progress_stages,repo_format_disclosure_is_absent_outside_the_audit_path_group(diffjson+repo-badge-jsoncontrols). The exact ask-spelled filtercargo test -p ripr repo-formatmatches 0 tests (Rust names use underscores); both spellings were run.repo_inventory_with_progress_reports_the_diff_stage_shape_at_repo_scope+repo_inventory_progress_fail_closes_without_completed_on_either_closure_error— the helper emits the diff stage shape at repo scope and fail-closes on both closure errors.cargo test -p ripr --test cli_progress— 13/13 (all pre-existing diff-scope pins still green).cargo fmt --checkclean;cargo clippy --workspace --all-targets -- -D warningsclean;cargo xtask goldens checkexit 0;cargo xtask check-output-contractspass.Review repairs (ce4f111)
Bot review raised five findings; four were repaired on the candidate, one tracked as a residual:
inventory_seams_at_with_configrebuilds the corpus index every run and never readsRepoSeamFactCache(only the classified/compact-classified paths do). The warm-rerun clause now derives from a declarativeis_seam_fact_cache_backedspec field: five walks keep the cache claim,repo-seams-json/repo-seams-mddisclose the uncached walk. Pinned per-format both ways plus an exactly-five cache-backed group pin.is_err(repaired). It now asserts the closure error propagates verbatim for both arms.LoadingInput(repaired).repo_inventory_with_progress's doc now states the honest coarse-stage semantics:Analyzingcovers discovery plus the walk; no separate discovery/compute boundary exists without re-plumbing inventory signatures (a stated non-goal).check-output-contractsgreen).ProgressPolicy::STANDARDcaps heartbeats at 16 × 2s, so a long repo stage goes quiet after ~32s until the terminal stages. Reusing that capped policy is what ux(output): repo-scoped formats are fully silent and disclose no invocation-time cost — docs-recommended summary-json costs as much as the full artifact #4945 asked for; sparse elapsed-class heartbeats tracked in ux(progress): audit-path stage heartbeats stop at the STANDARD 16-heartbeat cap (~32s) on minutes-long repo walks #4957.All named gates re-run green on ce4f111. CI note: the
cargo-denyadvisory check turns red on this head because upstream yankedyoke-derive 0.8.3(0.8.4 is the fix) between the previous green run and this push;Cargo.lockis byte-identical toorigin/main, so the failure is inherited, not introduced.cargo-denyis not a required check (required:Ripr Rust Small Result); the lockfile repair routes as a separate dependency PR.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Governing issue: #4945. Spec: none added (stderr-only disclosure; no output contract change —
check-output-contractsgreen). ADR: none required.