Skip to content

fix(ledger): bind Python repair target lines to selected tests - #8142

Merged
EffortlessSteven merged 2 commits into
mainfrom
cursor/python-ledger-identity-5cfb
Oct 16, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
cursor/python-ledger-identity-5cfb

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

A Python repair card can skip an earlier related test whose file cannot produce a runnable verification selector. The ledger previously kept the selected card's file/name but borrowed the first related row's line. It now binds target_line to that same selected identity: a unique complete related-row match, or the selected suggested_test_line evidence when the rendered inventory is truncated. Missing, unmatched, blank, ambiguous, or truncated-without-evidence identity omits the precise line. Card file/name identity is compared without trimming, so a space-prefixed selected path still binds its line.

Closes #8132

Swarm / Source Boundary

This PR targets EffortlessMetrics/ripr-swarm, the normal development trunk for
trusted same-repo ripr work. Confirm the change belongs here:

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge,
    dependency, or repo-ops development for ripr-swarm
  • repair or follow-up for a same-repo swarm PR

Source-of-truth Links

Proposal: n/a
Spec: RIPR-SPEC-0028
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #8132
Acceptance delta: Python gap-ledger target_line follows the selected repair-test identity, or is withheld when that identity is not established.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): cursor/python-ledger-identity-5cfb
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): #8135
Acceptance retained from a replaced candidate (if any): selected-second / selected-first / withhold-boundary controls from #8135, plus the truncated-inventory custody case that made #8135 REPAIR_REQUIRED
Accepted winner and losing candidate disposition (when decided): this successor owns the claim; #8135 remains the earlier incomplete candidate until superseded

#8127 is the merged LSP consumer and is not edited. #7458 stays separate. #8096 touches an independent warning-grammar hunk in the same ledger file.

Scope

One production behavior in gap_record_from_python_repair_finding.

Scope Classification

This PR is scoped by:

  • One production behavior

Production delta:

  • Bind file, test name, and line to the same selected Python candidate.
  • Compare card file/name identity without trimming; reject only all-whitespace identity.
  • Withhold the line when identity is missing, unmatched, blank, ambiguous, or only a unique match in a truncated related_tests array without selected evidence.

Evidence/support delta:

  • Real parser → selector → card → check JSON → complete ledger-record tests for selected-second, selected-first, capped same-file namesake, space-prefixed identity, and ten withhold controls.
  • Changelog fragment and one RIPR-SPEC-0028 test registration.

Single acceptance criterion:

  • The projected ledger record's repair_route.target_line is the selected candidate's line, or absent when that identity is not established.

Non-goals:

Support-tier Impact

  • none

Claim/proof notes:

  • Advisory location precision only. No language, surface, or evidence-class promotion.

Policy Impact

  • none

Ledger or exception notes:

  • One traceability registration for the selected-second discriminator.

Proof

# Native red on exact base before the production edit:
cargo test -p ripr --lib output::gap_decision_ledger::python_identity_tests::python_selected_second_line_follows_runnable_card_identity
# failed: selected-second line must follow the runnable card, got 10

cargo test -p ripr --lib output::gap_decision_ledger::python_identity_tests
# 5 passed; 0 failed
cargo test -p ripr --lib related_tests::verify_command_tests
# 5 passed; 0 failed

What this establishes:

  • Real Python diff analysis plus ledger projection binds the selected second/first lines and withholds unmatched/truncated-without-evidence lines.
  • The eight-row JSON cap cannot promote a visible same-file namesake over the selected pytest line.
  • A space-prefixed selected path keeps its line; all-whitespace identity still withholds.

What this does not establish:

Claim Boundary

What may be claimed after this PR?

  • Python gap-ledger repair routes keep the selected test's line with its file and name, or omit the line when identity is not established — including when check-JSON related_tests is truncated, and without mutating selected path bytes.

What must not be claimed yet?

  • Runtime mutation outcomes or sufficiency
  • That every hover location is always present as relatedInformation
  • That the Python selector or LSP diagnostics changed

Exact candidate SHA: 33be7c306c147e3b862451891164d73b2faaea91

Rollback

Revert this commit. The ledger returns to first_related_test_line for Python cards.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0028
  • Tests: crates/ripr/src/output/gap_decision_ledger/python_identity_tests.rs
  • Code: python_selected_related_test_line in crates/ripr/src/output/gap_decision_ledger.rs
  • Golden outputs: unchanged
  • Metrics: n/a
  • ADR/learning: n/a

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

CI Economics

n/a — ordinary ledger unit-test change, no workflow or lane edits.

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.
  • New non-Rust programming files are allowlisted with owner, surface, and reason.
  • New generated, dependency, process-spawn, or network surfaces are allowlisted with owner and reason.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented.

Gates

  • focused cargo test -p ripr --lib output::gap_decision_ledger::python_identity_tests (5 passed)
  • Hosted required checks: after this head is qualified
Open in Web Open in Cursor 

The Python gap ledger now takes target_line from the selected card's
file/name, using a unique complete related-test row or the selected
evidence line. Truncated check-JSON inventories and unmatched or
ambiguous identities omit the precise line instead of borrowing the
first related row.

Closes #8132

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@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 15, 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: c1b8ca2c-f33d-4070-91e8-9bc9b5c5af67
📥 Commits

Reviewing files that changed from the base of the PR and between a7403a2 and 33be7c3.

📒 Files selected for processing: 2
  • crates/ripr/src/output/gap_decision_ledger.rs
  • crates/ripr/src/output/gap_decision_ledger/python_identity_tests.rs
🔗 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; 9 remain after this review.

Summary by CodeRabbit

  • Bug Fixes
    • Python gap-ledger repair routes now show the line associated with the selected test, rather than an unrelated test with the same name.
    • The line is omitted when test identity is missing, ambiguous, or unmatched, or when available information cannot confirm the selected test’s line. A complete test list can confirm a unique match; evidence for the selected test can also identify its line even if it is outside a truncated list.

Walkthrough

The Python gap-decision ledger now derives a repair route’s target line from the selected test’s identity. Integration tests cover selected-test line projection and cases where the ledger omits a precise line.

Changes

Python ledger target identity

Layer / File(s) Summary
Bind target lines to selected test identity
crates/ripr/src/output/gap_decision_ledger.rs
Python repair routes now use a line from matching evidence or a unique matching row in a complete related-test inventory. The ledger omits the line when the sources conflict.
Validate selected-line projection
crates/ripr/src/output/gap_decision_ledger/python_identity_tests.rs, crates/ripr/src/output/gap_decision_ledger.rs, .ripr/traceability.toml, changelog.d/8132-python-ledger-selected-location.md
Integration tests cover selected tests, same-name tests in different files, capped inventories, and missing or invalid identity data. The traceability list includes the selected-second-line test, and the changelog describes line retention and omission conditions.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 33be7

The selected test’s line can still be retained when duplicate test identities appear; no change is needed before merging.

### Architecture Summary

Architecture risk: 🔵 Low · up to 33be7

The change affects 2 systems.

Changed systems: crates, changelog.d

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 2 changed files map to changed impact.
  • observed — changelog.d (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in changelog.d/8132-python-ledger-selected-location.md: Adds a fixed changelog entry describing selected-test line retention and the conditions under which the precise line is omitted.
  • observed — Modified behavior in crates/ripr/src/output/gap_decision_ledger.rs: Python repair-card records now obtain the related test’s target line through python_selected_related_test_line rather than taking the first related-test row’s line.
  • observed — Modified behavior in crates/ripr/src/output/gap_decision_ledger.rs: Adds helpers that identify a selected Python test line from evidence only when its file and name match the repair card and its line is positive, and from related-test rows only when the inventory is complete and exactly one row matches. If both sources agree, that line is used; if they disagree, no line is returned; if only one source provides a line, that line is used.
  • observed — Modified behavior in crates/ripr/src/output/gap_decision_ledger.rs: Adds the python_identity_tests module behind the combined test and lang-python cfg condition.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 29.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 2 files. 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 The active linked issue is #8132. gap_record_from_python_repair_finding now calls python_selected_related_test_line. The helper matches the card file and test name without trimming, rejects blank …
Out of Scope Changes check Passed The changes remain within #8132. The production edit is limited to Python ledger target-line projection. The added tests verify complete projected ledger records. The changelog and traceability entry …
Title check Passed The title clearly and concisely describes the main production change: binding Python repair target lines to the selected tests.
Description check Passed The description is complete and directly aligned with the template. It documents scope, source links, candidate relationships, acceptance criteria, proof, claim boundaries, rollback, traceability, eng…
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the test’s own name,
And finds its line, not someone’s claim.
When paths agree, the mark stays true,
When clues conflict, it leaves line two.
The ledger keeps the route in view,
Then hops away through fields that grew.

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

@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.

review-pr (author self-review, COMMENT)

reviewed_head_sha: a7403a2d3b5319078ba9748fcd083cfff2c56cd8
integration_basis: origin/main at publish was f9005595a; live PR base is now ef12e0258 (behind-only; no content conflict on the ledger producer). #8096 still touches only the warning-noun hunk near build_gap_decision_ledger_report.
claim_boundary: #8132 — bind Python ledger target_file / related_test / target_line to one selected candidate, or withhold the line when identity is not established. Not #7458, not #8127 diagnostics, not the fenced Python selector.

changed_surfaces_and_semantic_owners_inspected

  • Owner: gap_record_from_python_repair_finding in crates/ripr/src/output/gap_decision_ledger.rs.
  • New helpers: python_selected_related_test_line, python_evidence_selected_line, python_unique_complete_related_line.
  • Consumers: ledger JSON/markdown, agent packets, LSP gap relatedInformation (consumes the route line as supplied; not edited).
  • Other-language first_related_test_line call sites left unchanged.
  • Fences held: no edits to classify/*, related_tests.rs, goldens, OUTPUT_SCHEMA.md, VS Code, check.rs, owner_pin, corpus, perl, or files held by other open PRs.
  • #8096 overlap is a different hunk; this patch does not touch it.

stimulus / oracle

Positive path reaches the retained producer: real Python diff analysis → runnable selector/card → check JSON → complete rendered ledger record.

Discriminators observed:

  • selected-second (test_checkout.v2.py:10 skipped, test_plain.py:60 selected): intended red on the pre-repair producer (got 10); green after the bind.
  • selected-first keeps line 10 beside a same-name other file.
  • capped inventory: related_tests_total=9, eight rendered rows, visible unittest namesake, selected pytest line 28 only in evidence; ledger emits 28, not the namesake.
  • nine withhold controls including truncated-without-evidence.

A first-row helper, or uniqueness over a truncated array, still fails those tests.

blocking_findings

none

non_blocking_suggestions

  • AnalysisOptions is constructed field-by-field in the test helper. A later field addition fails compile rather than silently; acceptable.
  • Full-record pins include pytest assertion-shape copy. That is the intended complete-output oracle, not a helper return.

refuted_or_stale_findings

  • #8135 P1 (capped uniqueness binds the visible namesake): repaired on this head by refusing truncated uniqueness unless selected suggested_test_line evidence matches the card file/name.
  • CodeRabbit temp-dir cleanup-on-panic: this candidate uses a Drop guard.

proof_and_ci_observed

  • cargo test -p ripr --lib output::gap_decision_ledger: 113 passed.
  • cargo test -p ripr --lib related_tests::verify_command_tests: 5 passed.
  • cargo xtask precommit on this exact head: pass; composition local_precommit; 4 changed records; selected Clippy -p ripr and -p xtask --all-targets -D warnings; digest sha256:bd63a2c8ffa0e314b03dc3fd735ecb5b15a353ec6bf379b73ccadeeb75da2704.
  • Draft hosted checks in flight / skipped-by-policy; rust-tests-junit and MSRV are skipped until Ready.

proof_or_review_missing

  • Hosted required merge-gate / Ripr Rust Small Result after Ready.
  • Combined-tree runtime with #8096 not established (textual apply of the warning hunk is clean).
  • External independent reviewer quota may be missing; this is an author COMMENT, not approval.

affected_currentness_dimensions

production implementation, test stimulus, test oracle, public claim (changelog), generated relationships (one traceability line), candidate head identity.

residual_assumptions_and_non_claims

  • suggested_test_line evidence is only populated when the selector saw same-file/same-name duplicates; ordinary different-file selection uses the complete related-row match.
  • No runtime mutation claim. No LSP diagnostic change. No selector change.

disposition

REVIEW_INCOMPLETE — source and local oracle are clean on this exact head; hosted required checks are not yet current. Keep Draft until Ready-triggered qualification exists, then re-enter review-pr on the unchanged published head before merge.

GitHub cannot request changes from the author; COMMENT is not approval.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 15, 2026 15:49
@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!

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 potential issues.

Devin Review

Reject blank card file/name without trimming, so a space-prefixed
selected path still binds its line.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>

@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

  • negative-line guard (*line > 0) is consistent but the test fixture uses line=0 for 'zero-line' case; a hostile negative line would parse to negative u64 and fail parse, so u64::parse handles it. No finding needed.
  • Truncated-inventory test case ('truncated-without-evidence') preserves related_tests_total as 9 but strips the suggested_test_line evidence. Withholding is correct, but no symmetric test covers a truncated inventory where the visible inventory contains no row at all matching the selected identity (i.e., the selected pytest line is off-screen and no namesake exists). Coverage of the empty-visible-row truncated case is not exercised.

Verification questions

  • Confirm python_unique_complete_related_line trusts u64_at semantics on related_tests_total; if total equals rows.len() but a later consumer appends a row, uniqueness collapses silently.
  • Confirm blank-name withhold branch relies on non_empty rejecting empty strings; the helper is not visible in the diff hunk so its exact predicate (whitespace? trim?) is unverified.

Refuted

  • Concern: identity match logic duplicates work that could live near the selector.; refuted because: Rejecting as out of scope; PR scope is explicitly the ledger projection, and Python selector/related_tests.rs is a listed non-goal. Keeping identity resolution at the ledger boundary matches the claim boundary.

Parked follow-ups

  • Evidence-line parser only matches the final 'suggested_test_line:' entry if multiple are present; ordering is deterministic today but not pinned by a test or comment.

Evidence gaps

  • Test module gated behind --features lang-python; default cargo test -p ripr will skip it. Late cargo-test phase may not have feature enabled.

@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.

Author self-review (33be7c306)

Disposition: REVIEW_INCOMPLETE — hosted required checks on this head are not yet current. Source/oracle dimensions refreshed after the Devin trim repair.

Surfaces inspected

  • python_selected_related_test_line and the two line-authority helpers in crates/ripr/src/output/gap_decision_ledger.rs
  • crates/ripr/src/output/gap_decision_ledger/python_identity_tests.rs
  • Producer normalized_path in crates/ripr/src/analysis/language/python/source_utils.rs (does not strip leading whitespace)

Claim

Python gap-ledger repair_route.target_line follows the selected card identity, or is omitted when that identity is not established. Card file/name bytes are compared as emitted; only all-whitespace identity is rejected.

Oracle challenge

  • Selected-second runnable card binds line 60, not the earlier non-runnable line 10.
  • Selected-first keeps line 10 when the same name exists in another file.
  • Truncated inventory cannot promote a visible same-file namesake over selected suggested_test_line evidence.
  • Space-prefixed selected path tests/test_plain.py keeps line 60 (Devin finding).
  • Ten withhold cases: absent/unmatched/blank/whitespace/ambiguous/truncated-without-evidence omit the line.

Residual

  • Hosted merge-gate results on 33be7c306 are missing.
  • Combined-tree interaction with #8096 is not established.
  • Devin threads replied and resolved after the repair landed.

Local proof: python_identity_tests 5 passed; cargo xtask precommit passed on this head.

@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.

Classification of github-actions review 5536038411

No source defect. No head change.

  • Negative-line guard: already classified as no finding.
  • Empty-visible-row truncated coverage: not a defect. python_truncated_inventory_does_not_bind_visible_namesake already keeps the selected pytest line off-screen and uses evidence as the only line authority. A visible namesake is the stronger P1 control; a no-namesake mutation would still bind from evidence and does not change the claim.
  • related_tests_total uniqueness: the helper reads the rendered finding. A later consumer appending a row is not this producer's path.
  • blank-name / non_empty: stale on 33be7c306. The helper rejects trim().is_empty() without changing identity bytes; blank-name and whitespace-file withhold.
  • lang-python gate: incorrect. Default crate features include lang-python; cargo test -p ripr --lib runs these tests.
  • Last suggested_test_line entry: parked. The producer writes one selected line.

Disposition remains REVIEW_INCOMPLETE until hosted required checks on this head are current. The one-check CI success notification is not the merge-gate matrix.

@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

  • The whole python_identity_tests module is gated on cfg(all(test, feature = "lang-python")); a default-feature build without lang-python silently drops these tests, so the new behavior is provably covered only under feature-gated runs.
  • Traceability registration in .ripr/traceability.toml only labels the selected-second test, omitting the 12 sibling tests in python_identity_tests.rs (10 withhold cases + capped + selected-first + space-prefixed). Recommend one row per #[test] for spec-test-code traceability parity.

Verification questions

  • Confirm withhold matrix (absent-name / unmatched-name / unmatched-file / absent-rows / duplicate-identity / missing-line / zero-line / blank-name / whitespace-file / truncated-without-evidence) is asserted by a single loop test plus a dedicated truncated-inventory and space-prefixed test, but only against the runnable selected-second fixture family. Capped-mixed-family withhold (e.g. capped inventory with absent pytest evidence and selected file missing the visible rows) is not separately exercised as a control.
  • Confirm test module is feature-gated to lang-python; default-feature cargo test will not execute it, matching prior python_preview posture. Traceability.toml registers only the selected-second discriminator; remaining 12 cases are still in the diff but unlabeled — this is a traceability hygiene gap, not a behavior risk.

Refuted

  • Duplication risk: python_selected_related_test_line overlaps with first_related_test_line and should be unified into one generic selected-or-first helper; refuted because: The new helper's policy is selected-identity-match; the existing helper is first-row-wins. Forcing one helper would either widen the existing one (changes TypeScript/Java behavior) or require a selector parameter that obscures intent. Two narrow helpers next to each other is the smallest complete fix.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 15, 2026 16:21

@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.

Classification of github-actions review 5536339481

No source defect on this claim. No head change for these notes.

  • lang-python cfg on python_identity_tests: intended. Default features include lang-python; cargo test -p ripr --lib runs the five #[test] functions. A rust-only build (--no-default-features --features lang-rust) must drop Python parser tests. That is not missing coverage of the claim.
  • Traceability: one RIPR-SPEC-0028 registration for the selected-second discriminator is the authorized fence. check-traceability passed. The review counted ten withhold loop cases as sibling #[test] items; the module has five test functions.
  • Capped-mixed withhold without evidence: weaker than the existing namesake P1 control; not a defect.
  • Helper unification: already refuted; selected-identity vs first-row-wins must stay distinct.

Hosted CI / Rust-only feature lane failed on structural_workspace_markers::scalar_marker_preserves_cargo_uv_git_and_unmarked_root_boundaries (uv pyproject.toml refused by a rust-only binary). The same test fails on base ef12e0258 / main run 38760312749. Inherited; not this producer. Out of #8132 scope.

Ripr Rust Small Result is missing on 33be7c306 because it admits only ready_for_review. The trim repair was a post-Ready push. Re-admitting that required check next.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 15, 2026 16:21
@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 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.

Separate comparative contract review: REVIEW_INCOMPLETE. No wrong selected line reproduced on valid current-producer output in this bounded matrix. Mutated-record robustness failures are confirmed below; they are not being relabeled as a valid-producer P1.

  • reviewed_head_sha: 33be7c306c147e3b862451891164d73b2faaea91; tree b0f6ab1bb5a9d21fa1f4a43410406de4304ca44c.
  • integration_basis: actual hosted merge e1f804a5c981ec69f906c2edcf9cf44459a38cb5, parents ef12e025… + reviewed head, tree 0ec38b46…. This review independently ran its pristine merge: 114 ledger + 5 selector + 11 gap-diagnostic tests passed, no ignored tests. New main a184e814… has only a TypeScript analysis/evidence/traceability delta; affected producer/consumer/manifests unchanged. Its clean composition is inspect-only.
  • claim_boundary / inspected owners: #8132 selected-candidate line custody; placement/evidence/card/check-JSON cap → the three ledger helpers → full rendered record and existing consumers. Current PR body/reviews/threads, changelog and traceability read. The real producer emits one selected file/name/line set for same-file namesakes; trusting it on valid output is credible. #8135's omission policy is not automatically mandatory here.
  • independent proof: additive experiment tree 6711ad8c1b2f5458d512bfd0f51598ddd25da329, unchanged production plus test module, passed 122 ledger tests: 114 submitted/existing + 8 review functions. Reused real parser/card/JSON/full-record fixtures cover 16 cap/order/namesake combinations, 11 lossy inventories, 16 complete-record controls and 16 extra evidence/corruption probes. All 67 retained serialized finding inputs are identical across candidate experiments.
  • valid precision: the native capped fixture selects pytest28 while visible unittest25 remains in eight JSON rows of nine. This head emits 28; #8135 withholds. Complete namesakes emit the selected line22 here. Both policies satisfy the issue. The space-prefixed identity repair passes. Matched absent/malformed/blank identities and negative/non-integer row lines withhold under the exercised controls; default features do execute Python tests.
  • confirmed robustness limitation: start with that real capped finding; remove only the selected-line evidence, then remove total or set it to null/text/negative/fraction/under-count. The complete ledger record emits 25, while the selected card/command still names the omitted pytest28. Separately, append a contradictory suggested_test_line: 25 to the intact capped finding: it emits25; prepend the same contradiction before the real line28: it emits28. Full input/output JSON and exact test-only patch are retained. These are mutated check-JSON/evidence results. The valid producer does not emit those damaged totals/duplicate triples in this inspected path. Ordinary lossy-input cases that still emit the correct60 are tolerance differences, not additional false-line results.
  • classification / fix direction if adopted: this measures a weaker damaged-record contract than #8135, not a reproduced original P1 on valid output. Before claiming general malformed-record fail-closed behavior, either state a validated-producer input boundary or harden row fallback with explicit total/identity integrity and coherent unambiguous evidence. Preserve valid selected-evidence precision. Duplicate identical line28 retains28 and is not inherently a false-line defect; unique row60 vs conflicting evidence99 correctly withholds. No competing source repair authored.
  • other concern dispositions: existing Drop cleanup improves the #8135 panic-hygiene concern. The later traceability review counted loop cases as sibling tests: this module has five test functions; only selected-second is registered. Wider mapping is hygiene, not demonstrated producer failure. Helper unification would conflate selected identity with other languages' first-row behavior. Full dispositions are in the packet.
  • CI / missing proof: run38764853670/job116525279809 actually checked out the named merge and failed Rust-only cli_smoke, 477/1, uv marker without lang-python at structural_workspace_markers line182, Cargo101. Existing #8114 d9b57ef…/#8144 owns that repair. Latest head check-run snapshot also shows newly admitted run38768377324 / job116538021623 in progress; this supersedes the earlier missing-admission statement, not the older failure. No terminal gate/actual-checkout clearance for that live run is claimed. No run was admitted/rerun here.
  • residuals / currentness: source/test/oracle/public claim/generated mapping and pinned integration inspected; no broad fixture/golden/dogfood, live pytest/editor, Windows, #8096 combined runtime, full required-matrix or release acceptance claim. Review5536109500 remains a separate author self-review, not approval.

Immutable raw packet, complete concern dispositions, paired full records, reconstruction patches/trees and commands/exits. Archive SHA-256 ff599a4ed526a8e951c96f490fa4033e72306b227ac72c72523f233c08fef563; fresh restore verified all 81 internal hashes.

Recommendation, not accepted ownership: keep repaired #8135 as primary candidate and preserve #8142 as the comparative/precision alternative until issue coordination records one selected-head disposition. This PR body's successor-ownership assertion does not establish a transfer. Neither submitted branch changed; no Ready/close/merge, thread resolution, bot contact, CI admission or destructive cleanup. COMMENT is not GitHub approval.

@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.

Response to comparative review 5536627394

Agreed on the valid-producer result: this head binds the selected line on real check JSON, including capped pytest28 vs visible unittest25. That is not a reproduced original P1.

Agreed on the mutated-record limitation: python_unique_complete_related_line treats a missing/u64_at failure as rows.len(), so a capped finding with evidence stripped and total removed/null/non-u64 can unique-match the visible namesake and emit 25. Conflicting trailing suggested_test_line last-wins. Those are damaged-input fail-open paths, not valid-producer output.

No head change from this note. I am not merging #8142 over repaired #8135 without an explicit selected-head disposition. This PR stays the precision alternative (valid truncated path keeps the selected evidence line). #8135 stays the conservative omit-on-truncate candidate.

Ripr Rust Small Result run 38768377324 is still the required hosted qualification on this head. Inherited rust-only cli_smoke uv failure remains #8114/#8144.

@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.

Published-head review-pr (33be7c306)

Disposition: REVIEW_READY for this head's implementation, oracle, and required hosted check. Merge remains blocked by the two-candidate selected-head ruling, not by this review.

Hosted evidence

  • Required Ripr Rust Small Result (run 38768377324) success on this exact SHA.
  • Rust gates on that run success.
  • CI / Rust-only feature lane still fails structural_workspace_markers uv/lang-python on the named merge. Same failure on base ef12e0258 / main run 38760312749. Owned by #8114/#8144. Not this producer.

Unchanged source/oracle (prior pass still binds this head)

  • Valid producer binds selected-second 60, selected-first 10, capped pytest 28 (not visible unittest 25), space-prefixed identity 60.
  • Withhold on missing/unmatched/blank/whitespace/ambiguous/truncated-without-evidence.
  • Damaged-total / conflicting-evidence fail-open remains a mutated-input limitation, not a valid-producer P1.

Residuals

  • #8135 7d246801 is the conservative omit-on-truncate primary recorded on #8132. This PR stays the precision alternative.
  • No squash-merge until an explicit selected-head disposition. Unresolved review threads: none material.
  • Combined-tree with #8096 and editor peek-UI still not established.

@EffortlessSteven
EffortlessSteven merged commit 20022bb into main Oct 16, 2026
44 of 45 checks passed
@EffortlessSteven
EffortlessSteven deleted the cursor/python-ledger-identity-5cfb branch October 16, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants