Skip to content

refactor(contract): lower analysis outcome (#12726 slice 2c) - #13782

Draft
EffortlessSteven wants to merge 2 commits into
repair/12726-language-outcome-narrowfrom
repair/12726-analysis-outcome-narrow
Draft

EffortlessSteven wants to merge 2 commits into
repair/12726-language-outcome-narrowfrom
repair/12726-analysis-outcome-narrow

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Move analysis_outcome into the existing ripr-contract crate behind explicit crate-private facade reexports. This is #12726 sub-slice 2c, stacked on #13781 (language-outcome sub-slice 2b).

Swarm / Source Boundary

  • ordinary architectural implementation in ripr-swarm; no package publication or release.

Source-of-truth Links

Proposal: #12726 TypeScript dependency extraction graph.
Spec: docs/specs/RIPR-SPEC-0147-analysis-outcome-projection.md; docs/specs/RIPR-SPEC-0368-verification-erased-edits-disclose-not-probe.md.
ADR: docs/adr/0027-one-user-facing-package-lockstep-support-crates.md.
Plan item: #12726 sub-slice 2c, after language-outcome sub-slice 2b.
Governing issue or accepted claim: #12726, sub-slice 2c only.
Acceptance delta (one sentence): analysis_outcome compiles below the future TypeScript adapter with its validation, digest, recovery, serialization and test semantics unchanged.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): repair/12726-analysis-outcome-narrow.
Stack parent or prerequisite PR (if any): #13781; this PR targets its branch to show only the 2c delta.
Proposed replacement of PR (if any; not yet accepted): none.
Acceptance retained from a replaced candidate (if any): not applicable.
Accepted winner and losing candidate disposition (when decided): existing narrow stacked candidate retained; no rival implementation.

Published head: f344bb4.
Source-tested head: 254f094.
Identical tree: 9182295721318739a939b724aa8f4e07a8f39e90.
The sole new commit carries [skip ci] and changes no files. Source proof is preserved; current-main integration is not established.

Current parent composition: #13781 at 1a72c43. This child remains at its original head and currently conflicts with the updated parent. Preserve the five later-main owner additions and updated traceability mappings documented in the integration repair receipt. Land 2b first, then refresh this branch against the accepted main; preparation does not establish execution or qualification.

Scope Classification

  • One architectural seam

Production delta: relocate the complete analysis_outcome module, changing required cross-crate visibility while keeping private helpers private. Preserve the private ripr module and explicit crate-private facade reexports. Constructor and deserialization validation, digest bytes, recovery wording and both serde-skipped run-local fields remain unchanged. The schema-version constant remains crate-private in the contract crate. The 2b immutable reconciliation projection is untouched.

Evidence/support delta: relocate 14 unchanged tests; update actual source/spec/traceability paths and add a changelog fragment. The two xtask changes are comments only.

Single acceptance criterion: the existing analysis-outcome contract remains intact across the lower crate boundary.

Non-goals: behavior or public facade changes, new dependencies/packages, profile or feature changes, TypeScript adapter extraction, memory or CI-time claims, package publication.

Test identity conservation

Each old (ripr, analysis_outcome::tests::) maps exactly once to (ripr_contract, analysis_outcome::tests::):

  • limitation_plain_labels_are_words_not_schema_tokens
  • empty_scope_cause_sentences_and_mcp_routes_are_byte_stable
  • closed_outcome_kinds_round_trip
  • typed_limitation_tokens_match_the_wire_contract
  • no_behavioral_candidates_requires_positive_producer_facts
  • complete_outcome_cannot_hide_a_limitation
  • complete_no_findings_requires_a_behavioral_subject
  • limitations_are_sorted_deduplicated_and_digest_stable
  • adding_a_limitation_changes_semantic_identity
  • unsupported_input_and_producer_failure_remain_distinct
  • portable_paths_reject_absolute_and_parent_traversal
  • limitation_paths_preserve_whitespace_identity_through_round_trip
  • limitation_text_and_affected_counts_are_bounded
  • deserialization_revalidates_schema_claims_and_paths

All assertions, inputs and guards are unchanged. Test-module SHA-256: 965beedad35c98e405b02e048e970176b6a358bbdc8a474e96c6a2cfcd3f20d6. The unchanged relative schema fixture expression resolves to the same repository file from either crate; this is not standalone packaged-test proof.

Support-tier Impact

  • none

Policy Impact

  • package boundary
  • doc artifacts

Ledger or exception notes: existing ADR 0027 package, no new dependency or workflow.

Proof

Native Windows, pinned Rust 1.95.0, unchanged repository profiles/default features, jobs=1 and incremental disabled:

  • Frozen exact-2b facade witness: all 14 old tests passed without rebuilding. This is the baseline, not candidate facade execution.
  • Candidate contract suite: 334 passed, zero failed/ignored/filtered, zero doctests; guarded wall time 61.174 seconds.
  • Native listing and execution agree exactly: prior 320 contract identities plus the 14 moved tests, with no missing, extra or duplicate identities.
  • Strict contract all-targets Clippy and scoped formatting: exit 0.
  • Actual non-test ripr facade check: exit 0 in 244.439 seconds, exact source/tree bound at start and finish.
  • Public API, output contracts, traceability, spec format, workspace shape, architecture and changelog checks: exit 0 with retained PASS reports.

The seven policy checks use the frozen 2b xtask instrument against the clean 2c input. Independent review established unchanged implementations/dispatch and valid cwd-relative inputs, unchanged embedded architecture sources, and the complete tracked inventory. This is old-instrument/new-input validation, not a fresh candidate xtask build.

Full source/proof/review receipt

Frozen contract witness: 3,955,200 bytes; SHA-256 e388e0f2ca38199622abd82ce2c55c1299cf2519cd139c55e27ced2c4da11a25. Receipts, identity map, patch, instrument provenance and source are retained by the extraction owner.

Review and CI continuation

Independent exact-source review returned SOURCE_REVIEW_READY, with no blocking source, contract or oracle findings. Overall REVIEW_INCOMPLETE: no rebuilt candidate facade libtest, full-workspace execution/inventory, actual current-main integration qualification, required hosted checks or final published-head review.

This Draft uses GitHub-native [skip ci] deferral, as verified by #13514. Required checks remain missing/pending, not passed. No merge-ready label, dispatch, rerun, readiness transition or merge is requested. Complete hosted qualification remains constrained to 1,200 seconds.

Owner: existing #12726 extraction lane. Next: retain the stack, reconcile current integration after #13781, complete missing proof under admitted resources, then final review and ordinary protected merge. Do not reclassify the 2b facade runtime proof as 2c execution.

Claim Boundary

Dependency extraction only. No measured compiler-memory reduction, complete-CI improvement, 8,000,000,000-byte target or parent issue completion is claimed.

Rollback

Revert this extraction as one unit, keeping contract, facade and traceability paths consistent. No data migration.

Advances #12726.

EffortlessSteven and others added 2 commits November 7, 2026 04:24
No source change. Preserve the reviewed stacked extraction tree while publishing as Draft. Required qualification remains pending; no check is satisfied by this deferral.
@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 Nov 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

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: f81e00d2-c027-47a1-bc6c-5793e24b986a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exact-head review (head f344bb4)

Scope read: full diff via pulls/13782/files (12 files, +1406/-1392) against its stack base repair/12726-language-outcome-narrow (#13781), head source of crates/ripr-contract/src/analysis_outcome.rs and the 12-line facade crates/ripr/src/analysis_outcome.rs, from a fetch of pull/13782/head. Draft.

Verified

  • Body carries Governing issue or accepted claim: #12726, sub-slice 2c only and an Acceptance delta sentence. It also says plainly that the published head is a [skip ci] no-file commit over source-tested 254f094 (identical tree 91822957) and that current-main integration is not established.
  • Move fidelity (mechanical line accounting I ran, pub(crate)/pub(super) mapped to pub): of 1184 non-comment lines removed from ripr/src/analysis_outcome.rs, all but 4 are re-added in ripr-contract/src/analysis_outcome.rs. The 4 are the AnalysisRecovery::new(kind, detail: impl Into<String>) -> Result<Self, String> signature lines, reshaped at the crate boundary. Traceability and spec path updates (.ripr/traceability*.toml, RIPR-SPEC-0147/0368, two xtask readers) follow the moved file.

Findings

  1. Medium, integration drift: since this stack's merge-base 4bedb3d, main has added three items to crates/ripr/src/analysis_outcome.rs, none of which exists anywhere at this head (git grep):
    • RUST_NESTING_BUDGET_RECOVERY (b0d455b, #13728), read by analysis/language/rust/mod.rs, lsp/diagnostics.rs and lsp/lens.rs on main;
    • AnalysisOutcomeKind::EMPTY_SCOPE_MCP_LAST_COMMIT_RETRY_ROUTE and is_no_behavioral_candidates (a39b3c6, #13661), read by mcp/workspace.rs on main.
      A merge of main will conflict on the facade file. Taking the PR side drops those items and breaks compile, which is at least visible. Keeping main's hunks in the facade instead would split one owner across two crates, silently and in a way that compiles. The correct resolution is to port all three into ripr-contract/src/analysis_outcome.rs and re-export them through the facade. A move-fidelity check like the one above, rerun against the merged main, would confirm nothing was left behind.
  2. Medium, qualification: there is no hosted Rust build or test at any head of this composition (3 check runs at this head). As with #13781, proof exists only for the 4bedb3d composition.
  3. Low: AnalysisRecovery::new changed shape at the boundary (the 4 unmatched lines). Its validation (bounded detail, non-empty) is the fail-closed part of the recovery contract. A contract-side test asserting that the same inputs are refused as before would pin that the reshaping kept the refusal set.

Verdict: the extraction is faithful to its 4bedb3d base. Finding 1 must be handled when this is refreshed onto main, or the recovery and MCP retry contracts end up split across two owners. Land #13781 first, then refresh this stack onto main and port the three main-side additions.

EffortlessSteven commented Nov 9, 2026 •

Copy link
Copy Markdown
Member Author

Update, 2026-11-10: #13781 now contains the independently reviewed composition repair at 1a72c431319c3153bb681197b98c14e0f9113e31, based on frozen main 1d9f99375628d99e37b903207b078849db9fe7e1. This dependent branch remains unchanged at f344bb41adecea790946d870ccb67069477d0514, still targeting the same parent branch. Its newly false mergeability exposes the known integration work below; it is not a completed repair. Current main's analysis_outcome.rs blob is unchanged since that five-item review. Parent-first qualification and landing still apply. An unpublished reconciliation may be prepared without advancing this branch or requesting CI.

Integration follow-up against main 2a96d2f4484063fbc0576af2f66c78aee1e5c0b7: the later-main drift is larger than the three items in the preceding review. In addition to RUST_NESTING_BUDGET_RECOVERY, AnalysisOutcomeKind::EMPTY_SCOPE_MCP_LAST_COMMIT_RETRY_ROUTE and is_no_behavioral_candidates, merged #13572 (e9bc11f3428bab3df80eda6f3171a47c0b212218, for #13562) added AnalysisOutcome::incomplete_scope_sentence and its private MAX_INCOMPLETE_SENTENCE_LIMITATIONS helper. Current lsp/diagnostics.rs calls the new method. These additions are absent from this old stacked source and must be preserved during integration.

The safe resolution is to move the complete current upstream owner logic into ripr-contract/src/analysis_outcome.rs, retain the private helper there, and add the needed constant facade reexport. The associated methods/constants remain attached to the moved types. Do not keep a second implementation in the facade or take either conflict side wholesale. Retain the upstream LSP/MCP/Rust recovery tests and refresh the move-fidelity/identity comparison against the actual integration base.

The preceding review's AnalysisRecovery::new concern does not establish a behavior change: its body and bounded_nonempty_text call are unchanged; the four-line difference is visibility and rustfmt signature layout. The existing contract test limitation_text_and_affected_counts_are_bounded already checks an overlong recovery detail. Additional boundary tests may strengthen proof, but are not evidence that the move altered validation.

Independent read-only review confirmed this updated owner/consumer mapping. Existing ownership and stack order remain: qualify/land #13781 first, then refresh this dependent extraction against the actual accepted main and port every intervening owner change. This comment records a pending integration repair, not a completed repair or qualification. Both branches remain unchanged; no compiler or hosted CI was started. The complete-CI 1,200-second admission constraint remains.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Evidence-only sweep triage: this PR currently conflicts with main (merge state CONFLICTING, stale since mid-November). An evidence-only head-exact review at the current head would be wasted work — the head must change to resolve the conflict, which invalidates any review posted now. Please rebase onto current origin/main and push; the evidence review lane will pick the refreshed head up from the sweep queue automatically. No defect is asserted — this is a landing-order state, not a code finding.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Coordination note (evidence-only reviewer): this branch is now conflicted with main (mergeable=CONFLICTING at sweep time; main is at 5d5d57d617). Any review markers on this PR were scoped to their exact heads and stay valid only as evidence for those trees. A rebase/restack restarts review: push the rebased head (my push watch picks it up) and the native-Windows evidence lane will re-run at the new head before a fresh marker posts. No action needed from me in the meantime; no defect is asserted — this is a landing-order state, not a code finding.

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.

1 participant