Skip to content

feat(analysis): enforce non-vacuous complete-zero and outcome consistency (slice of #6473) - #10015

Merged
EffortlessSteven merged 4 commits into
mainfrom
claude/complete-zero-consistency-6473
Oct 24, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
claude/complete-zero-consistency-6473

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #6473 (internal invariant slice; the issue stays open)

Acceptance delta (one sentence): The internal language aggregate and a new pure reconcile check now reject complete-zero without discovery proof, findings or counts that disagree with the child rows, an omitted selected language, a conflicting duplicate child, a complete outcome kind over a hard blocker, and unsupported changed source without its top-level limitation, all without changing release behavior or any public output.

Changes

  • language_outcome/diff_aggregate.rs:
    • validate() rejects a repo complete_zero child unless production_files > 0, and a repo no_current_scope child unless production_files == 0.
    • A conflicts set, excluded from the digest, records a label recorded twice when one row lets the aggregate claim completeness and the other blocks it. validate() fails on a conflict, except for the typescript and javascript labels, which legitimately differ between the two loop runs.
    • validate_selected(selected) requires a child for every selected language.
  • New language_outcome/reconcile.rs, reconcile(aggregate, selected, findings, outcome):
    • Runs the aggregate's own validate() plus the omitted-language check.
    • Child findings must equal the retained findings. When both TypeScript and JavaScript ids are selected, retained may exceed children but never fall below them (see the findings below).
    • AnalysisOutcome.counts.finding_count must equal the retained findings.
    • A partial, unavailable, invalid, failed or unsupported child cannot sit under a complete AnalysisOutcome.kind.
    • An unsupported child needs a top-level LanguageScopeUnsupported limitation.
  • Pipeline: the diff and repo pipelines call reconcile inside their existing debug_assert! sites. Repo mode passes no outcome. Release builds are unchanged.

Proof

  • Twelve hostile hand-built tests, one per invariant, plus a clean nonempty / valid empty positive control. The language_outcome tests pass at 51 under default features and under --no-default-features --features lang-rust.
  • Nine removal experiments were run for real (mutate, see red, restore): the construction rule, the validate() discovery check, a partial child counted as complete, the omitted-language check, the count-union check, the outcome finding_count check, the hard-blocker-versus-kind check, the unsupported-limitation check, and conflict recording. Each turned the intended test red.
  • cargo xtask precommit passes. The full pipeline suite runs through reconcile in debug without any abort.
  • Independent fresh-context review of e9edee6 returned REVIEW_READY. Its one finding, that the TS/JS conflict-exemption test was vacuous, is fixed in c539a87: the test now holds a complete and a failed typescript row, and dropping the exemption turns it red.

Real findings from running reconcile over the suite

  1. With both TS ids selected, retained findings are duplicated (the shared adapter runs twice). That is a pre-existing analyzer-output behavior change outside this slice, filed as Diff mode with both TypeScript and JavaScript enabled retains duplicate findings #10013. reconcile only tolerates it for that selection.
  2. Configured Perl that is not compiled in is legitimately recorded twice (an unavailable adapter row and a not_selected advisory row). The conflict rule is narrowed to the dangerous case, so this is not a conflict.
  3. not_selected children are not tied to the outcome kind, because uncompiled preview adapters are aggregate-only (slice(#5546 PR C): implement deterministic mixed-language diff-mode aggregation without sibling evidence loss #6468) with no top-level limitation. The module doc says so.

Deliberate non-claims (left open on #6473)

  • The diff complete_zero touched-fact re-check in validate() (needs a new child field).
  • Stale identity (no pipeline producer; staleness lives in LSP and app layers).
  • Cancellation and timeout (the statuses are constructor-less; no producer exists).
  • Per-project and package accounting (no architecture(multi-lang): define shared project, package, source-role, and test-environment facts #5541 owner in the tree).
  • Release-build enforcement. This is a deterministic internal check with hostile-input tests, not a runtime refusal.
  • No gate policy, public projection, analyzer semantics, schema or support-tier change.

Generated by Claude Code

…tcome (#6473)

Internal, deterministic, debug-asserted invariant; no public projection,
gate, analyzer-semantics or support-tier change.

- validate(): repo complete_zero needs production_files > 0; repo
  no_current_scope needs exactly 0; a label recorded twice where one row
  would allow completeness and another blocks is a visible conflict (the
  TypeScript family is exempt: bridge-profile Rust-line findings make its
  two loop runs legitimately differ). validate_selected(): every selected
  language has a child.
- reconcile(): child findings equal retained findings (relaxed to >= only
  when both TypeScript ids run, a pre-existing retained-list duplication);
  AnalysisOutcome finding_count equals retained findings; a complete kind
  cannot sit over a partial/unavailable/invalid/failed/unsupported child;
  an unsupported child needs a top-level LanguageScopeUnsupported limitation.
- Pipelines call reconcile at the existing debug_assert sites.
- Deferred: diff complete-zero touched re-check, stale identity,
  cancellation/timeout, per-project accounting, not_selected vs kind.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cuuiz4GRfXbHkeQuoNnjcz
…scriminating (#6473)

A typescript label recorded twice with one complete and one failed row is a
recorded conflict that only the family exemption lets validate() accept.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cuuiz4GRfXbHkeQuoNnjcz
@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 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 140 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: dc77a8da-7ade-4dd5-820d-451b454cdb30
📥 Commits

Reviewing files that changed from the base of the PR and between 6e162bd and e4ef916.

📒 Files selected for processing: 5
  • crates/ripr/src/analysis/language_outcome.rs
  • crates/ripr/src/analysis/language_outcome/diff_aggregate.rs
  • crates/ripr/src/analysis/language_outcome/reconcile.rs
  • crates/ripr/src/analysis/language_outcome/reconcile_tests.rs
  • crates/ripr/src/analysis/pipeline.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copy link
Copy Markdown
Member Author

Required check failed on check-traceability, not from this PR: main's .ripr/traceability.toml has a malformed RIPR-SPEC-0288/0289 boundary (merge of #8990 x #8993). Fix is in #10018; I'll merge main here and re-request CI once it lands.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Update: #10018 is superseded by #10019, which repairs main's traceability, protocol golden and Perl ledger omissions. I'll merge main into this branch and re-request CI once #10019 lands.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Required check failed on three mcp::repair::freshness_tests::root_tests::durable_selected_* lib tests, which this PR does not touch. They fail identically on main (37dc4ae; reproduced locally) since #10011. Fix is #10027 (test-only). I'll merge main here and re-request CI once it lands.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants