Skip to content

feat(domain): guarded test edit precondition DTOs; ADR 0026 proposed (#1902, carries #12649) - #12962

Merged
EffortlessSteven merged 13 commits into
mainfrom
guarded-edit-precondition-1902-carrier
Nov 4, 2026
Merged

EffortlessSteven merged 13 commits into
mainfrom
guarded-edit-precondition-1902-carrier

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Swarm / Source Boundary

  • 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

Spec: RIPR-SPEC-0320, RIPR-SPEC-0069 (amended non-goal)
ADR: 0026 (proposed)
Governing issue or accepted claim: #1902
Acceptance delta (one sentence): Types the versioned ExactTestEditPrecondition / GuardedEditUnavailable fail-closed boundary with corpus-backed minting and records ADR 0026 as a proposal, without emitting or applying LSP edits.

Candidate Relationships

Candidate branch: guarded-edit-precondition-1902-carrier
Proposed replacement of PR (if any; not yet accepted): supersedes #12649 (closed in favour of this carrier)
Acceptance retained from a replaced candidate (if any): all #12649 content, plus the three fragment moves and the architecture exemption

Scope

  • Domain DTOs, spec, ADR, fixture corpus, identity catalog entry, registrations.

Scope Classification

  • One public contract

Production delta: new domain::guarded_edit module (no consumers yet).
Evidence/support delta: corpus fixture, unit tests, spec/ADR.
Single acceptance criterion: the precondition builder fails closed on every corpus negative row and mints only the two positive classes.
Non-goals: no TextEdit, no LSP advertisement, no source mutation; #1903 / #8183 out of scope.

Support-tier Impact

  • none

Policy Impact

  • doc artifacts
  • generated artifact

Ledger or exception notes: policy/architecture.txt serde_json exemption for the cfg(test) corpus loader (#1902).

Proof

rustfmt --edition 2024 --check crates/ripr/src/domain/guarded_edit.rs   # clean
git apply --check of the resolved patch against main 075e4e8c            # clean

Result, failures, or skipped proof: no Rust build on the authoring box; hosted CI is the compiler. Not yet run: cargo xtask check-architecture, check-traceability, check-doc-artifacts, check-spec-format, check-identity-registry.

Claim Boundary

May claim: the boundary is typed and fail-closed in the domain layer. Must not claim: ADR 0026 accepted, any edit emitted or applied, or replacement correctness.

Rollback

Revert the squash commit; nothing consumes the module yet.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0320
  • Tests: domain::guarded_edit::tests::fix_instruction_guarded_edit_*
  • Code: crates/ripr/src/domain/guarded_edit.rs
  • Golden outputs: fixtures/boundary_gap/expected/guarded-edit-precondition/corpus.json
  • ADR/learning: ADR 0026 (proposed)

Static Language Check

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

CI Economics

n/a


Generated by Claude Code

…sed (#1902)

Carrier for #12649 on current main. Registrations moved to the per-PR
fragments (.ripr/traceability.d, policy/doc-artifacts.d, docs/spec-index.d)
instead of appending to shared tails. check-architecture exempts the
cfg(test) corpus loader's serde_json like next_action.rs. ADR 0025 is
proposed, not accepted (#1902 keeps acceptance a pending design decision).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
@coderabbitai

coderabbitai Bot commented Nov 4, 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 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 152 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: eff523be-1465-4efe-96ff-08386957facd
Commits

Reviewing files that changed from the base of the PR and between e32323a and 54cfc6d.

Files selected for processing: 20
  • .ripr/traceability.d/guarded-test-edit-precondition-1902.toml
  • changelog.d/guarded-edit-precondition-1902.md
  • crates/ripr/src/domain/guarded_edit.rs
  • crates/ripr/src/domain/identity/catalog.rs
  • crates/ripr/src/domain/mod.rs
  • docs/adr/0026-guarded-test-only-edit-boundary.md
  • docs/adr/README.md
  • docs/identity/REGISTRY.md
  • docs/identity/registry.v1.json
  • docs/spec-index.d/RIPR-SPEC-0320.md
  • docs/specs/RIPR-SPEC-0069-lsp-agent-feedback-use-case.md
  • docs/specs/RIPR-SPEC-0320-guarded-test-edit-precondition.md
  • fixtures/boundary_gap/expected/guarded-edit-precondition/corpus.json
  • fixtures/perl-verdict-corpus/spec-scopes/RIPR-SPEC-0320.toml
  • fixtures/python-verdict-corpus/spec-scopes/RIPR-SPEC-0320.toml
  • fixtures/rust-verdict-corpus/spec-scopes/RIPR-SPEC-0320.toml
  • fixtures/typescript-verdict-corpus/spec-scopes/RIPR-SPEC-0320.toml
  • policy/architecture.txt
  • policy/doc-artifacts.d/RIPR-SPEC-0320.toml
  • policy/public_api.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request proposes ADR 0025 and introduces RIPR-SPEC-0320, establishing a guarded, opt-in, test-only assertion replacement edit class. It implements the versioned source-precondition contract (ExactTestEditPrecondition and GuardedEditUnavailable) in crates/ripr/src/domain/guarded_edit.rs with comprehensive unit tests and a corpus-backed validation fixture. The PR also updates the identity registry, changelog, and architectural policies to accommodate these changes. No review comments were provided, so there is no feedback to address.

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

REPAIR_REQUIRED (technical COMMENT, not approval)

Reviewed head: c5827c7
Integration basis: main 075e4e8
Scope: source/contract review of the guarded-edit DTO, minting, validation, corpus, API visibility and #12926 overlap. No edit emission or runtime consumer is present, so these findings concern the proposed boundary, not an observed applied-edit incident.

  1. Snapshot identity is not bound. guarded_edit.rs:533–559 omits document_version, instruction_instance_id and all snapshot identity fields from the ID hash. Changing only document version or instruction instance preserves the ID, contrary to identity/catalog.rs:233–248. Repair direction: bind the governed inputs and test each identity/version perturbation independently. The corpus's expected ID is copied from the actual result at lines 719–739, so its drift comparison cannot detect this defect. Confidence: high.

  2. Missing validation evidence passes minting. guarded_edit.rs:388–397 rejects only Failed, while omitted parse/format fields default to NotRun (lines 189–190 and serde(default)). An otherwise valid positive input still mints without either validation having run. Repair direction: require Passed for the exact precondition, with missing-field and NotRun negatives for both fields. Confidence: high.

  3. Decoded DTO validation is weaker than builder validation. guarded_edit.rs:442–485 accepts a previously valid DTO changed to test_file = src/lib.rs and allowed_edit_surface = [src/lib.rs]. Failed parse/format status, an empty selector and disabled required capabilities are also unchecked. Repair direction: centralize the final invariant checks and test decoded/mutated DTOs, not only builder inputs. Confidence: high.

  4. Test-path recognition admits traversal and non-Rust targets. guarded_edit.rs:301–306 returns true for tests/../src/lib.rs, tests/readme.md and ../other/tests/demo.rs. normalize_path only replaces separators; matching the sole allowed surface does not establish containment. Repair direction: require a contained normalized Rust test source, using the repository's source-role authority where applicable; cover traversal, non-Rust extensions and outside-root paths. Confidence: high from source and mechanical evaluation of this predicate, not compiled Rust execution.

  5. The documented Rust contract is inaccessible. domain/mod.rs:21 declares a private guarded_edit module and adds no re-exports. The documented domain::guarded_edit::EditInstructionId path and DTOs cannot be imported by external consumers or sibling adapters. Repair direction: settle intended visibility and the matching public-API policy, or explicitly retain a staged internal contract. Potential dead_code/-D warnings consequences remain unexecuted; no compiler failure is claimed. Confidence: high for privacy.

  6. Digest-only DTOs disagree with the source verifier. validate() permits original text absent when a digest exists (lines 451–465), consistent with the ADR's passive representation, but verify_source_text:502–517 unconditionally requires text. Repair direction: support comparison against the current text's SHA-256 when only a valid digest is retained, with positive/negative tests for both representations. Confidence: high.

Integration concern: #12926 at 81b2750 independently assigns ADR 0025 to lockstep support crates, deletes domain/mod.rs and relocates identity/catalog.rs. Composition needs unique ADR numbering and refreshed module/catalog mappings. guarded_edit depends on InstructionSemanticId/InstructionInstanceId from fix_instruction, which stays facade-hosted in ripr; moving it blindly into ripr-contract would invert that dependency.

Validation limits: no Rust build/test was run in this review. The inspected CI run was skipped; the successful Windows gate skipped its execution job. No integration or final merge clearance is asserted. Focused repair verification should include cargo test -p ripr --lib fix_instruction, relevant DTO counterexamples, workspace Clippy, and identity/public-API/architecture/traceability gates.

@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_READY — head c5827c7

Independent review against current main (05b9f30; the PR's base is 075e4e8). A trial merge of this head into main applies cleanly with no conflicts. No unresolved review threads. Built and executed on the merged tree.

The four findings from the earlier carrier (#12649) are all closed.

  • Traceability collision. The entry is now a fragment, .ripr/traceability.d/guarded-test-edit-precondition-1902.toml, so nothing is appended to the shared monolith. check-traceability exits 0 on the merged tree.
  • Architecture gate. policy/architecture.txt gains one exemption for crates/ripr/src/domain/guarded_edit.rs with its reason (cfg(test) corpus loader). I checked the claim in that reason: the only serde_json use in the file is at line 692, inside the #[cfg(test)] module that starts at line 583, so production precondition code does not touch it. check-architecture exits 0.
  • Text conflicts. docs/identity/REGISTRY.md carries the single EditInstructionId row change, registry.v1.json matches, and no shared-file edit remains for doc-artifacts.toml (the spec registers through policy/doc-artifacts.d/RIPR-SPEC-0320.toml, docs/spec-index.d/RIPR-SPEC-0320.md and the traceability fragment). check-identity-registry exits 0.
  • ADR status. ADR 0025 is Status: proposed; its row in docs/adr/README.md and the doc-artifact entry say proposed and name acceptance as a pending design decision on #1902; RIPR-SPEC-0069's non-goal now says the ADR and spec "propose" the exception; RIPR-SPEC-0320 line 59 says "once accepted". Nothing in the diff claims the read-only default has changed. Accepting the ADR stays the owner's call.

Executed on the merged tree.

  • cargo test -p ripr --lib guarded_edit: 6 passed, 0 failed.
  • cargo test -p ripr --lib identity: 565 passed, 0 failed (covers the catalog change).
  • xtask gates, all exit 0: check-spec-format, check-spec-numbering, check-doc-artifacts, check-doc-index, check-traceability, check-identity-registry, check-architecture, check-support-tiers, check-output-contracts, check-public-api, check-fixture-contracts, check-generated-clean, check-static-language, check-file-policy and check-capabilities.

Scope. The module adds typed DTOs, a fail-closed builder and apply-time checks, with a corpus fixture; it emits no TextEdit and advertises nothing in the LSP. The classified output does not change, so I expect no cache bump for this PR.

Not run: the full lib suite, goldens, clippy and the hosted Ripr Rust Small Result.


Generated by Claude Code

EffortlessSteven and others added 7 commits November 4, 2026 11:04
Bind the edit instruction id to document version, instruction identities
and snapshot identity; require passed parse/format evidence; hold decoded
DTOs to the builder's rules through one validate(); admit only contained
Rust test sources; make the documented module reachable and record it in
public_api.txt; verify digest-only sources against the digest. Corpus ids
are literals from an independent reference.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
…h literal (#1902)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
…ed-edit path check (#1902)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
…ded-edit ADR to 0026 (#1902)

Main took ADR 0025 for the Go parser substrate. Keep main's 0025 row and
rename this PR's ADR to 0026-guarded-test-only-edit-boundary, updating every
reference (README row, RIPR-SPEC-0320, RIPR-SPEC-0069, spec index fragment,
traceability fragment, changelog fragment). Status stays proposed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
@EffortlessSteven EffortlessSteven changed the title feat(domain): guarded test edit precondition DTOs; ADR 0025 proposed (#1902, carries #12649) feat(domain): guarded test edit precondition DTOs; ADR 0026 proposed (#1902, carries #12649) Nov 4, 2026

@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_READY — head f9d9b8b

Integration basis: main e32323a (merge-base equals main; the diff is the 16 intended files).

Scope: full source review of guarded_edit.rs, the identity catalog and registry, public_api.txt, the corpus, RIPR-SPEC-0320, ADR 0026 and the registrations, compared against main. The six findings from the earlier review of c5827c7 were each checked against the repaired code:

  1. The edit ID now derives from the precondition's own governed inputs: document version, instruction identities, snapshot, config, base revision, workspace, head, input, target, original digest, replacement and range. Sixteen independent perturbation cases, plus an empty-vs-absent case, show the ID changing.
  2. NotRun or Failed parse/format evidence refuses to mint, including omitted serde-default fields.
  3. validate() is the single invariant check, called by the builder and by decoded DTOs. Fifteen decoded mutations are rejected.
  4. The test path must be contained and a .rs file under a tests directory segment. Traversal, non-Rust and outside-root paths are rejected. Dropping the _test.rs naming rule is consistent with RIPR-SPEC-0153.
  5. #[doc(hidden)] pub mod guarded_edit with 20 public_api.txt lines follows the existing precedent; hosted check-public-api remains the confirmation.
  6. verify_source_text handles text plus digest, digest-only, and neither.

The corpus IDs and digests were reproduced independently with ref_id.py (99ad9b7b…, 95d57931…). That checks implementation fidelity; the perturbation test is the discriminating check. ADR numbering is 0026 throughout (README, traceability, spec, changelog, RIPR-SPEC-0069 wording) and main's 0025 Go parser ADR is untouched. There are no unresolved review threads. ADR 0026 remains Proposed.

Follow-ups, none affecting this change, tracked in #12986: document the (None, _) behaviour of verify_document_version, assert reasons in the mutation test, require normalized test_file in validate(), and consider binding must_not_change and command refs in the ID.

Not established by this review: hosted CI on this head (no Rust build was run here). The merge-ready label requests the Ripr Rust Small Result; it must be green on this exact head before merge.


Generated by Claude Code

Comment thread crates/ripr/src/domain/guarded_edit.rs Resolved
…#1902)

Absent version on the precondition or the current document now refuses with
document_version_mismatch; adds a test for both None cases and one spec
sentence in RIPR-SPEC-0320. Resolves the Graphite finding and closes the
#12986 item 1 note (spec states the (None, _) outcome).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG

@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_READY — head ce72f78

Delta review of f9d9b8b..ce72f78 (one commit). Integration basis is unchanged: main e32323a. The earlier full review of f9d9b8b still stands for every unaffected dimension; only the document-version check, its test and one spec sentence changed.

  • verify_document_version now returns Ok only for (Some(expected), Some(actual)) with expected == actual. An absent version on either side returns document_version_mismatch, which is fail-closed and consistent with the other apply-time helpers.
  • The new test covers current None against a versioned precondition, and an unversioned precondition against both None and Some(3). The existing document_and_source_checks test uses a versioned sample (Some(3)) and still holds: match on 3, mismatch on 4.
  • verify_document_version has no consumer outside this module and its tests, so the tightening affects nothing else.
  • The RIPR-SPEC-0320 sentence matches the code.
  • The single review thread (graphite, guarded_edit.rs:609) is resolved, with a reply, and there are no other threads.

Not established by this review: hosted CI on this head (no Rust build was run here). The Ripr Rust Small Result must be green on this exact head before merge.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Rust-only feature lane (ci.yml run 41820189616, head ce72f78) failed on one lib test: cli::commands::cache_command::tests::export_preserves_relative_analysis_root_identity (inspect export root: No such file or directory; 13789 passed, 1 failed). This PR adds only domain::guarded_edit (no consumers) plus spec/ADR/fixture, and touches nothing under cli::commands::cache_command, so the failure looks like a relative-root or cwd race outside this PR. The required routed run (Ripr Rust Small Result) is still in progress on the same head; I am waiting on it and will not change the head or cycle the label while it runs.


Generated by Claude Code

verdict-corpus check-all required a spec-scopes fragment for every corpus
(perl, python, rust, typescript) because the spec has numbered acceptance
examples. It is a domain precondition DTO, not an analyzer verdict.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but no qualification run exists for head 081d6e2f: it was pushed after the label was applied, or the label event was dropped. Remove and re-apply merge-ready to request it 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.

Confirmed findings

  • Digest-only validation admits a precondition whose ID cannot distinguish two original source texts having the same digest field but different retained text.
  • The identity registry describes EditInstructionId as source-bound, but the implementation binds source through a caller-supplied digest rather than a canonical source value.

Verification questions

  • Confirm the new public helper routes are centralized in domain::guarded_edit, but the PR states there are no production consumers.
  • Confirm the corpus's two positive cases omit document_version, although apply-time verification rejects every absent version.
  • Confirm the claimed independent reference for corpus identity literals is not independently evidenced, so corpus drift detection is weaker than the spec asserts.

Evidence gaps

  • No scheduled cargo-test receipt was available in this packet, so active-view assertions remain unconfirmed by a completed test run.
  • Broad repository-wide sibling coverage is not established because the Rust sensor failed and the late cargo-test receipt is absent.
  • The corpus has positive identity literals and negative reason rows, but the scheduled cargo-test receipt is absent, leaving execution status unverified in this lane.
  • The new Rust unit tests and corpus-backed behavior lack a completion receipt in this packet.
  • The cargo-test receipt was absent in the supplied packet, while the ripr sensor failed.
  • Model proof intent was rejected by deterministic validation.
  • Successful compilation and test execution are not established by the available.

…ty (#1902)

Case 2 now carries document_version 3 (matching case 1); its edit-instruction
id is re-derived with the reference transliteration (b0aad19c46de8d3e; source
digest unchanged). Spec: a version-less precondition mints but never verifies;
the reference is described as a transliteration, not an independent oracle.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG

@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_READY — head 5f30a7e

Delta review of 081d6e2..5f30a7e (3 files). The earlier full review of f9d9b8b and the deltas at ce72f78 and 081d6e2 stand for every unaffected dimension. Integration basis: main e32323a at the time of review; main has since moved ahead and a trial merge was clean.

  • The boundary_value_equality_replacement positive now carries document_version 3, so a precondition minted from it can pass verify_document_version.
  • Its expected edit_instruction_id changed to edit-instruction:b0aad19c46de8d3e. I reran ref_id.py on the committed corpus: it reproduces that ID for case 2 and 99ad9b7b… for case 1, and the digests are unchanged. The ID changing while the digest holds is what the document-version binding predicts.
  • RIPR-SPEC-0320 now says the corpus ids come from a transliteration of the paragraph (fidelity, not an independent oracle) and that a precondition without a document_version mints but can never verify. The test comment matches. This addresses the overstatement noted in the previous round.
  • The single review thread is resolved, and there are no other threads.

Not established by this review: hosted CI on this head (no Rust build was run here). The Ripr Rust Small Result must be green on this exact head before merge.


Generated by Claude Code

Comment thread crates/ripr/src/domain/guarded_edit.rs Resolved
)

Builder and validate now refuse (source_text_mismatch) a range that does not
cover original_source_text: LSP convention, 0-based, UTF-16 units, end
exclusive; multi-line ranges check line count and last-line width. Corrects
all 15 corpus ranges and sample_input, re-derives both edit-instruction ids
with ref_id.py, adds one-short and one-long negative rows, a covers_text unit
test and two decoded-DTO mutations, and a spec clause.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG

@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_READY — head 54cfc6d

Delta review of 5f30a7e..54cfc6d (guarded_edit.rs, RIPR-SPEC-0320, corpus.json). Earlier reviews stand for every unaffected dimension. Main has moved ahead since the last full comparison; the earlier trial merge was clean.

  • Width math: covers_text counts UTF-16 units. A single-line range must satisfy end_character - start_character == width(text); a multi-line range must span one line per \n and end at the UTF-16 width of the last line, ignoring start_character on the final line as LSP does. I checked it by hand on assert!(result.is_err()); (25 units, 4..29), on U+1D11E plus U+00E9 (2+1 = 3, so 0..3 passes and 0..2 fails), and on a(\n b,\n); (lines 1..3, end 2). segments.len() - 1 can't underflow because split always yields one segment. Checked-sub comparisons reject reversed ranges.
  • It runs in the builder and in validate() after the earlier refusals, and reports source_text_mismatch. The digest-only representation skips it, since there is no retained text to cover. That matches the spec wording.
  • Corpus: I recomputed coverage independently for all 17 rows. Both positives and every earlier negative cover their text, and the new range_one_short_of_text and range_one_long_of_text rows do not. ref_id.py reproduces the new IDs from the committed corpus: 99aa357ba1136b76 and b0a4059c46d8c6ec, with unchanged digests. The corpus literals match.
  • Tests include the non-BMP, accented and multi-line cases, the builder in both directions, and two decoded mutations. The perturbation test keeps each case valid, since it moves the range along with the text.
  • Residual, not affecting this change: a lone \r is a line break in LSP but is not counted here, and CRLF text keeps \r in earlier lines only, which is harmless. It's worth a note in #12986.
  • Both review threads (guarded_edit.rs 395 and 644) are resolved, and there are no unresolved or outdated threads.

Not established by this review: hosted CI on this head (no Rust build was run here). The Ripr Rust Small Result must be green on this exact head before merge.


Generated by Claude Code

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

Confirmed findings

  • Digest-only behavior is tested in Rust but not represented as a corpus case, weakening repository-level evidence for an explicitly documented passive representation.
  • The positive corpus identity literals exercise implementation/spec fidelity but cannot independently detect a shared hashing-oracle error; add an independent fixture-generation oracle or a fixed algorithm reference with separately reviewed expected values.

Verification questions

  • Confirm the corpus exercises full text-and-digest preconditions, but its committed positives do not independently cover the digest-only representation.
  • Confirm the corpus ID check is not an independent red/green oracle because expected IDs were generated by transliterating the same FNV algorithm used by the implementation.

Refuted

  • Serialized preconditions are decoded into ordinary owned Rust values, so there is no separate active-view region whose length can become stale relative to a backing store.

Evidence gaps

  • No completed cargo-test receipt is available in this packet, so the new module's exercised behavior is established by source inspection and seeded prior reviews rather than a fresh local witness.
  • The advertised fail-closed behavior is not independently witnessed in this packet because cargo-test has no receipt and the Rust sensor failed.
  • The Rust behavior changed, but no completed cargo-test receipt is present in this review packet.
  • The changed Rust behavior lacks a completed scheduled cargo-test receipt, while the ripr sensor failed with exit code 2.
  • Compiled test execution remains unconfirmed because the cargo-test receipt is absent and the ripr sensor failed.
  • The scheduled cargo-test receipt is absent, so this packet does not establish that the new module compiles or that its unit/corpus tests pass.
  • Model proof intent was rejected by deterministic validation.

Copy link
Copy Markdown
Member Author

Required qualification receipt for unchanged head 54cfc6d8d42b903fafe34e68d9dbbed3f3a644b9.

Request 41828681365, attempt 1, failed in gate job 126570288828. At 13:55:46 UTC the PR-evidence producer reported ripr check for PR evidence timed out after 3600 seconds; review-comment production was withheld. Earlier canonical base (e32323aabce8d2a467d1606412f442bf4779fd8a) and head snapshots also timed out after about 124 seconds each and were recorded as unavailable.

The actual gate checkout was 180549274d35c268db43f284cb5ef17d31b7d341, tree a2ae416c6e3d1f33e5f6a22232da905ca12f21fc, with parents 7c4e2095f2c7f267d10640cae9e031c48a55fae5 and this head. Earlier gate steps passed; no required test shards were admitted after the gate failure. Final Result also failed.

This establishes incomplete qualification due to the producer timeout, not a guarded-edit test failure or a complete zero-finding analysis. No new campaign or source change was launched for this diagnostic report; existing branch ownership is unchanged.

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.

1 participant