Skip to content

fix(agent): stub rewrite idempotency and truthful grip wording (wave 2, Lane X) - #8990

Merged
EffortlessSteven merged 14 commits into
mainfrom
fix/agent-stub-rewrite-clarity
Oct 23, 2026
Merged

EffortlessSteven merged 14 commits into
mainfrom
fix/agent-stub-rewrite-clarity

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #8891
Acceptance delta (one sentence): second --write for the same seam reports the existing stub instead of writing a _2 duplicate, and the strongly_gripped refusal on the stub path names the real reason (the seam is already exposed) instead of falsely claiming it is configured off.

What changed

Idempotent second --write (#8891 item 1).

  • crates/ripr/src/analysis/test_stub.rs: rust_test_stub_for_target now renders the base-named test function and compares it against the stub's uniqueness scope (modulo line endings, which the write adapts to CRLF files) before honoring the unique_test_name suffix. A byte-identical recompute sets the new RustTestStub.already_present flag and keeps the base test_name; a genuinely different test that happens to share the generated name still suffixes (_2, …) and writes as before.
  • crates/ripr/src/cli/commands/agent_stub.rs: --write skips the file edit when already_present and human output says Stub already written at <file>:<line> ... (still followed by the run command); the rust_test_stub JSON document (schema 0.2) gains the additive already_present boolean while written stays false (nothing was appended this run).

Truthful strongly_gripped disclosure (#8891 item 2).

  • stub_grip_disclosure no longer reuses the agent packet/brief omission wording verbatim. For strongly_gripped the warning now reads seam <id> is strongly_gripped: existing tests already discriminate it, so a stub would add nothing — the real reason. The old "configured off" text came from AgentBriefPolicy::omission_reason_for_class matching SeverityConfig::for_seam(StronglyGripped) == ConfigSeverity::Off, but that Off is the built-in default in SeamSeverityConfig (agent-brief rendering policy: exposed seams are not brief repair targets), not user configuration, and the seam is omitted precisely because its tests already discriminate it (classification counterpart exposed). A class a user severity actually disables (e.g. weakly_gripped = "off" in ripr.toml) keeps the packet "configured off" wording on the stub path.
  • Help and docs updated to the new contract: crates/ripr/src/cli/help/agent.rs, docs/AGENT_WORKFLOWS.md, docs/OUTPUT_SCHEMA.md (new already_present field documented).

Tests (match sibling style):

  • analysis/test_stub/tests.rs: recomputed_stub_for_the_same_seam_is_flagged_already_present, same_named_but_different_test_still_suffixes.
  • cli/commands/agent_stub.rs: second_write_for_the_same_seam_reports_already_written (real scratch-crate collision through run_agent_stub), strongly_gripped_stub_names_the_real_reason, config_disabled_class_stub_keeps_the_configured_off_wording.
  • tests/agent_stub_at_disclosure.rs: second_write_reports_already_written_instead_of_a_duplicate (end-to-end binary: human + JSON second-write pins); the grip-warning wording pin in off_line_predicate_note_precedes_the_grip_class_warning updated.
  • tests/agent_stub_compiles.rs::at_kind_stub_discloses_strongly_gripped_classification updated to the reasoned wording.

Spec wiring: new docs/specs/RIPR-SPEC-0288-agent-stub-rewrite-clarity.md, README table row (after 0284), policy/doc-artifacts.toml artifact, .ripr/traceability.toml behavior (RIPR-SPEC-0288, unit_test_pass_rate), changelog.d/8891-agent-stub-rewrite-clarity.md. Both TOML files validated with python tomllib (parse + unique ids).

Deviations / notes

  • Skipped stretch item, different authority: the OutsideInlineTestRegion ... unparseable terminal refusal (missing fix-the-syntax hint in its CRLF-oriented recovery paragraph) lives in the edit-cage attempt authority (crates/ripr/src/edit_cage/inline_test_region/, rendered via evaluate_edit_cage), not the stub path, so it is intentionally not changed here; the hint belongs to a separate lane.
  • The agent packet/brief surfaces keep their own omission vocabulary unchanged; only the stub path's disclosure is reworded.
  • A repeated --write whose placement is a new integration file still fails loudly at create_new ("failed to create ... already exists") rather than reporting "already written"; content-based already-written detection covers inline and existing-integration placements (the reported _2 case).

Test plan

  • cargo fmt -p ripr -- --check — clean.
  • cargo check -p ripr --lib — green.
  • cargo check -p ripr --test agent_stub_at_disclosure and --test agent_stub_compiles — green.
  • tomllib validation of policy/doc-artifacts.toml and .ripr/traceability.toml — unique ids, 0288 present.
  • CI-delegated: the lib-unit and full integration test run (the lib-test binary does not finish locally); hosted PR CI owns the merge-gate matrix.

Closes #8891


Devin Review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 135 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: 9480d780-e8a5-455d-a4bc-87e234077a17
📥 Commits

Reviewing files that changed from the base of the PR and between 7db52ff and 44d5c05.

📒 Files selected for processing: 17
  • .ripr/traceability.toml
  • changelog.d/8891-agent-stub-rewrite-clarity.md
  • crates/ripr/src/analysis/syntax/mod.rs
  • crates/ripr/src/analysis/syntax/ra.rs
  • crates/ripr/src/analysis/test_stub.rs
  • crates/ripr/src/analysis/test_stub/tests.rs
  • crates/ripr/src/app/test_stub.rs
  • crates/ripr/src/cli/commands/agent_stub.rs
  • crates/ripr/src/cli/help/agent.rs
  • crates/ripr/tests/agent_stub_at_disclosure.rs
  • crates/ripr/tests/agent_stub_compiles.rs
  • docs/AGENT_WORKFLOWS.md
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/README.md
  • docs/specs/RIPR-SPEC-0288-agent-stub-rewrite-clarity.md
  • policy/doc-artifacts.toml
  • policy/process_allowlist.txt

Summary by CodeRabbit

  • New Features

    • Repeated ripr agent stub --write runs now recognize identical existing stubs, avoid duplicate _2 names, and report already_present with written: false.
    • Different tests with the same base name continue receiving suffixed names.
    • Stub placement is rechecked before skipping writes, allowing updates when files change.
    • Strongly gripped seam messages now explain that existing tests already provide discrimination, while “configured off” remains for disabled severity classes.
  • Documentation

    • Updated help, workflow, output-schema, and specification documentation to describe the revised behavior.

Walkthrough

ripr agent stub --write detects identical existing tests and avoids writing a suffixed duplicate. The command revalidates existing stubs before skipping writes, reports the already_present JSON field, and uses updated disclosure wording for strongly gripped seams.

Changes

Agent stub rewrite clarity

Layer / File(s) Summary
Stub identity and placement detection
crates/ripr/src/analysis/syntax/ra.rs, crates/ripr/src/analysis/test_stub.rs, crates/ripr/src/analysis/test_stub/tests.rs
Placement scopes and test-name checks use parsed source. Identical generated tests are recognized, while different tests with the same name retain suffix handling.
Write revalidation and command output
crates/ripr/src/app/test_stub.rs, crates/ripr/src/cli/commands/agent_stub.rs, crates/ripr/src/cli/help/agent.rs, crates/ripr/tests/agent_stub_*
Already-present stubs are revalidated before writes are skipped. Command output reports their state. Strongly gripped seams receive stub-specific disclosure wording; configuration-disabled classes retain “configured off.”
Specification and supporting documentation
docs/specs/RIPR-SPEC-0288-agent-stub-rewrite-clarity.md, docs/specs/README.md, docs/AGENT_WORKFLOWS.md, docs/OUTPUT_SCHEMA.md, changelog.d/*, .ripr/traceability.toml, policy/*
The specification, documentation, changelog, and policy records describe the repeated-write contract, collision suffixing, JSON field, and disclosure wording.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Sequence Diagram(s)

sequenceDiagram
  participant AgentStubCLI
  participant StubRevalidation
  participant StubWriter
  AgentStubCLI->>StubRevalidation: Revalidate an already-present stub
  StubRevalidation-->>AgentStubCLI: Return current status or a fresh resolution
  AgentStubCLI->>StubWriter: Write only if the stub is no longer present
  AgentStubCLI-->>AgentStubCLI: Report already_present and written state
Loading

Possibly related PRs

Merge Risk: 🟡 Moderate · up to 7db52

Fix the failing test and the cases that can skip a distinct stub or report an outdated location before merging. Align the specification and schema documentation with the resulting behavior.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description gives detailed change, deviation, and test information, but it does not follow most required template sections. It omits or leaves unclear the swarm/source boundary, source-of-truth li… Add the required template headings and complete the missing sections. State the repository boundary, proposal/spec/plan links, candidate relationships, scope and non-goals, support and policy impact, claim boundary, rollback plan, traceabil…
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 9 files. (8 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the two primary changes: idempotent stub rewriting and truthful grip wording. The parenthetical lane information is extra but does not make the title unclear.
Linked Issues check Passed Issue #8891 is directly linked and remains open. The implementation detects an identical existing test in the placement scope, sets already_present, skips the second write, preserves `written: false…
Out of Scope Changes check Passed The changes stay within issue #8891. Parser-backed scope checks and has_test_attribute visibility support correct duplicate detection. Revalidation supports safe idempotent writes. CLI, JSON schema,…
Full details: Linked Issues check

Explanation

Issue #8891 is directly linked and remains open. The implementation detects an identical existing test in the placement scope, sets already_present, skips the second write, preserves written: false, reports Stub already written at, and keeps the run command. The collision tests verify that a different test still receives a suffix. The stub disclosure now explains strongly_gripped as existing-test discrimination. A user-disabled class retains the configured-off wording. The added unit, CLI, and end-to-end tests cover these requirements. The excluded edit-cage refusal remains outside this issue's required scope.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #8891. Parser-backed scope checks and has_test_attribute visibility support correct duplicate detection. Revalidation supports safe idempotent writes. CLI, JSON schema, help, documentation, specification, traceability, changelog, and test-policy updates document or verify the requested behavior. No unrelated functional change is demonstrated. The edit-cage refusal wording is explicitly unchanged and remains out of scope.

Full details: Description check

Explanation

The description gives detailed change, deviation, and test information, but it does not follow most required template sections. It omits or leaves unclear the swarm/source boundary, source-of-truth links, candidate relationships, scope classification, support-tier impact, policy impact, claim boundary, rollback, static-language check, CI economics, engineering checks, and gate results.

Resolution

Add the required template headings and complete the missing sections. State the repository boundary, proposal/spec/plan links, candidate relationships, scope and non-goals, support and policy impact, claim boundary, rollback plan, traceability mapping, static-language status, CI economics or n/a, engineering-check results, and gate results. Preserve the existing detailed change summary and test evidence.

Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 9 files. (8 skipped: 8 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • 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 once more,
The same small stub stays by the door.
No _2 sprouts when bytes agree,
A different test keeps its suffix free.
Strongly gripped seams get words that fit,
The rabbit hops, content with it.

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

@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 implements RIPR-SPEC-0288 to improve the clarity of agent stub rewrites (resolving issue #8891). It introduces an already_present detection mechanism that prevents a second run of 'ripr agent stub --write' for the same seam from writing a duplicate test with a '_2' suffix, instead reporting that the stub is already written. Additionally, it updates the disclosure for 'strongly_gripped' seams on the stub path to truthfully state that existing tests already discriminate the seam, rather than claiming it is 'configured off'. These changes are accompanied by updated documentation, a new specification file, and comprehensive unit and integration tests. There are no review comments, and I have no additional feedback to provide.

@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 3 potential issues.

Devin Review

Comment thread crates/ripr/src/analysis/test_stub.rs Resolved
Comment thread crates/ripr/src/analysis/test_stub.rs Resolved
…se the uniqueness scope (#8891)

PR #8990 review X1: when another test owns the base name, the first
--write creates a _2 stub and the second run created a _3 duplicate,
because already_present compared only the base-named rendering. The
candidate search now renders each generated name (base, _2, _3, ...)
up to the first free one and reports already_present under the matched
name when the on-disk #[test] fn is byte-identical; a genuinely
different body under the candidate name still suffixes.

PR #8990 review X2: scope_contains_test_fn and unique_test_name searched
raw scope text, so a copy of the rendered stub inside a block comment or
raw string both blocked the base name and flagged the stub present while
Cargo discovers no such test. Both checks are now parser-backed over the
scope's parse unit and byte range, reusing has_test_attribute from the
syntax owner; scopes that do not parse keep the previous lexical
fallback, which errs toward suffixing. Comment lines and indentation are
normalized out of the comparison so the check depends only on the
executable fn text.

The collision test now applies the write twice and asserts the second
run is flagged already_present with the file unchanged; a commented-stub
negative control covers both the block-comment and raw-string shapes.
…nt write skip (#8891)

PR #8990 review X3: the already_present branch bypassed write_test_stub,
so a concurrent edit that removed the stub after resolution left the
second --write reporting success from bytes the resolver read earlier.
The CLI now re-resolves from current bytes before trusting the skip: an
unchanged placement keeps the no-op report, a vanished stub falls
through to the normal guarded write with the fresh resolution, and a
workspace that no longer resolves the seam refuses with the same rerun
message shape write_test_stub uses for a changed owner file.

A CLI test drives the transition directly: resolve while the stub is on
disk, remove it, and assert the revalidation hands back a fresh
not-present stub that the guarded write restores.

@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

  • The new allowlist entry for crates/ripr/tests/agent_stub_at_disclosure.rs records the wrong command. It says the tests spawn agent repair --phase before, but second_write_reports_already_written_instead_of_a_duplicate (and the helper stub_write) spawn ripr agent stub --write (sometimes with --json). Allowlist entries are audited against spawned commands, so a wrong command+wrong allowed count will silently pass audit while the real spawn is underdocumented. Update the allowed command to agent stub --write and recount (the helper uses one Command::new plus a second test that also issues one Command::new — current Command::new\|2 count is plausible but only if the test bodies each spawn exactly once). (policy/process_allowlist.txt:43).
  • crates/ripr/src/analysis/test_stub.rs:471 — scope_contains_test_fn compares normalized texts (line endings, indent, comment lines, blanks stripped). normalize_test_fn_text drops comment lines via starts_with("//") only; block comments attached to the fn item are stripped by the parser's text() call, but doc-comments (///) are also stripped, which is fine. However, the comparison ignores intra-line whitespace differences inside expressions only via outer trim; 'fn test() { x }' vs 'fn test() { x }' would not match. Worth a small dedicated equality-via-AST test (or pin the contract in the spec).
  • Revalidation error path uses CommandError::Failure for a 'workspace changed after the stub was computed; rerun ripr agent stub' shape that does not carry the standard refusal envelope (refusal/kind). run_agent_stub only routes refusal-shaped errors through split_refusal_envelope. Agent consumers that key off refusal.kind to decide retry budget (#8726) cannot distinguish "changed workspace" from operational failures. (crates/ripr/src/cli/commands/agent_stub.rs:120).
  • scope_contains_test_fn does not match the placement offset to the chosen module's item_start. inline_placement sets StubScope.range = body_start..offset (up to where the resolver itself sits), and a test fn whose text range starts at offset may be silently counted as already-present while its full body extends past the seam. Tighten to body_start..(module.close_brace_start) so the parsed fn must lie inside the chosen module. (crates/ripr/src/analysis/test_stub.rs:460).
  • second_write_for_the_same_seam_reports_already_written and already_present_write_revalidates_the_placement_file both call scratch_crate then std::fs::remove_dir_all only on some error arms; an early panic between cleanup steps can leak /tmp dirs. Low risk; not a correctness issue.

Verification questions

  • Confirm run_agent_stub inserts the 'Stub already written at' line via println before printing Test stub / Wrote lines; ordering relative to warnings and the AT note is the same code path used by non-already-present runs. The new test pins the 'Run it:' follow-up, but no test pins the relative ordering of warnings vs the 'Stub already written' line in the already-present human path.
  • Confirm revalidate_already_present_stub delegates to resolve_test_stub on each re-check; tests only verify Current and Rewrite outcomes. A refusal outcome from the fresh resolve is mapped to an error, but no test exercises a seam that refuses on the second resolve (e.g. signature changed or seam disappeared) to assert the 'workspace changed; rerun' wording contract.
  • Confirm policy/process_allowlist.txt newly added entry's standalone_reason text mentions 'agent repair --phase before' twice while the integration test executes agent stub ... --write. Read-only cosmetic inconsistency; command count 2 and 'agent-stub-disclosure-proof' kind remain accurate, so the allowlist gate is satisfied.

Refuted

  • The advisory pointer arithmetic card is inapplicable: StubScope uses checked UTF-8 string slicing and fallback behavior.
  • The unsafe-review card at agent_stub.rs:122 represents an actionable pointer-arithmetic safety defect.; refuted because: No unsafe operation is present on that route. Source access uses checked str::get; absent parser-backed scope handling falls back to empty text or lexical matching, so the card is advisory noise rather than a PR defect.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • The allowlist note for agent_stub_at_disclosure.rs says the binary is exercised via agent repair --phase before; that command is not the one this PR's new integration test runs (the test spawns ripr agent stub --write). Note accuracy is a policy/audit drift, not a behavior bug, but it should be updated before merge.

…llowlist entry (#8891)

The merge of origin/main left two entries for
crates/ripr/tests/agent_stub_at_disclosure.rs|Command::new: the sorted
#8891 entry and main's older #8444 copy further down, which tripped
check-process-policy. Remove the duplicate and keep the sorted entry;
its count of 2 matches the two Command::new sites in the test file.
cargo xtask check-process-policy: pass.
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 20, 2026 23:36

Copy link
Copy Markdown
Member Author

Bounded review/integration coordination (2026-10-20): candidate 3bba46e remains with the existing Lane X writer. Returned to Draft because the current unresolved Graphite finding r4331075447 is source-confirmed: same_named_but_different_test_still_suffixes inserts nonempty second.text despite already_present, then asserts unchanged bytes. Independent targeted verification is running; no candidate edits or competing writer were created.

Please repair this oracle in the owning branch and cover the actual CLI collision flow: first write chooses _2, second human/JSON write retains that name, reports already present/written=false, and preserves the entire file bytes (ideally metadata too). Keep the genuine different-body suffix discriminator. New head requires refreshed independent review.

Integration evidence: current GitHub merge subject 44f40cd has parents a816499 and this head, tree e613d44a2508f9653ba4c72218333f3124426f81. A nonpublishing git merge-tree --write-tree of this head with #8989 d8b352f reports conflicts in agent_stub.rs, cli/help/agent.rs, specs/README.md and policy/doc-artifacts.toml. Preserve both writers; after one lands, the other owner must reconcile these conflicts and refresh affected proof/review. No merge/qualification requested.

)

Merge-gate clippy (-D warnings) reported five lints on the X3
revalidation code and its tests:

- three manual_inspect sites in the already-present revalidation test
  where a map_err closure only cleaned up the scratch crate and
  returned the error unchanged: two now use inspect_err, and the pure
  identity adapter on the selector parse is dropped entirely;
- nonminimal_bool in scope_contains_test_fn: !name().is_some_and(..)
  becomes name().is_none_or(..), clippy's suggested spelling;
- large_enum_variant on AlreadyPresentRevalidation: the Rewrite
  variant now boxes the fresh TestStubResolution (272 bytes vs the
  data-less Current variant).

Behavior is unchanged everywhere; error values that map_err genuinely
replaces keep map_err. cargo clippy -p ripr --lib is clean, and the
lib compiles under --cfg test with no diagnostics in the touched files
(only the 12 pre-existing dev-dependency-gated errors elsewhere, which
the forced flag surfaces on any commit).

Copy link
Copy Markdown
Member Author

Existing hosted proof now independently inspected (reused, no rerun requested): https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/39509296271/job/118925999740 . The checkout log explicitly records merge commit 44f40cd (candidate 3bba46e into a816499; fetched subject tree e613d44a2508f9653ba4c72218333f3124426f81). Rust-only feature lane actually fails analysis::test_stub::tests::same_named_but_different_test_still_suffixes at tests.rs:189:5, as r4331075447 predicts. Lib summary: 9947 passed, 1 failed, 1 ignored, exit 101. This is a candidate oracle defect, not infrastructure or inherited main drift. Keep Draft and repair through the existing writer; new-head focused proof and independent rereview are required before a new qualification request.

@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 — independent review of current head 7db52ff, with prior-head findings refreshed against the complete 3bba46e..7db52ff delta. Existing Lane X remains the repair writer; this review does not change candidate files.

Blocking test/oracle defect: analysis/test_stub/tests.rs::same_named_but_different_test_still_suffixes still splices the nonempty second.text into rewritten and asserts byte equality (lines 183–192). The producer deliberately returns the identical function text even when already_present == true; only the CLI write gate skips the write. The assertion therefore appends a second _2 function and fails. This is the same still-open finding as discussion_r4331075447. The new 7db52ff commit changes Clippy shapes and boxes Rewrite, but changes neither this test nor the nonempty-text contract.

Observed/reused runtime evidence: job 118925999740 ran the earlier merge subject 44f40cd (parents a816499 and 3bba46e; tree e613d44). Its Rust-only lib result was 9947 passed / 1 failed / 1 ignored, with this assertion failing at line189, exit101. This is reused earlier-subject failure evidence, not a current-head pass. The affected test and insertion behavior persist at the current head. An independent local default-feature targeted build was intentionally interrupted/reaped (exit130) once that exact failure evidence was recovered; no local test pass is claimed.

Repair direction: keep the resolver assertion for matching the existing suffixed name and already_present flag, then exercise two actual CLI --write calls against a genuinely different base-named test. Capture the file bytes after the first _2 write and compare after the second human and JSON calls; assert exit0, _2 retained, no _3, already_present:true and written:false. The existing unsuffixed CLI test counts names after a call but does not assert full byte equality, and the current suffix test never reaches the real CLI skip. This supplies the required no-write discriminator without changing the producer text contract.

Inspected surfaces/owners: all17 changed paths from base ca2b342, #8891 and RIPR-SPEC-0288; parser-backed scope/name/presence detection, inline/existing integration placement, app revalidation, CLI write/JSON/human/help consumers, grip wording, spec/docs/traceability and process allowance. Prior comment/raw-string and suffix defects have concrete source repairs. The historical automated offset complaint is refuted: range ends at the selected module close brace and requires whole-function containment. The historical allowlist-command complaint is fixed in3bba46e2. Exact rendered-text identity deliberately does not promise AST-equivalent whitespace matching.

Remaining evidence: current-head focused runtime and integration/hosted qualification after the existing writer repairs the oracle; independent review must refresh for that final head. No Ready or merge clearance is given.

Copy link
Copy Markdown
Member Author

Independent targeted runtime receipt for current head 7db52ff: actual CLI suffix correctness and true no-write behavior pass.

Built this exact detached head with cargo build --locked -p ripr --bin ripr (Rust1.95.0, Linux, default features, CARGO_BUILD_JOBS=2): exit0, 1m52s. Binary SHA256 babbf14004c4c0872af786f3d814108ec2cffef159844035b3f0f27259639082.

Four isolated crate cases: no pre-existing generated name / genuinely different base-named test, each with LF / CRLF source. Each case ran the actual binary three times: first agent stub --root <scratch> --at src/lib.rs:2 --kind predicate --write; second the same human call; third with --json. All12 calls exit0. The eight repeat calls preserve complete file SHA256/size and inode, nanosecond mtime and ctime; the first call changes bytes. Collision cases retain exactly one generated _2 and never append _3. JSON repeats say state:ready, already_present:true, written:false, with the matched test name. Human repeats say Stub already written at. CRLF sources retain only CRLF newlines.

This independently establishes the production CLI skip and suffixed lookup, beyond the existing name-count assertions. It does not fix or clear the false resolver-unit splice oracle in review5593162243: disposition remains REPAIR_REQUIRED until Lane X repairs that test, retains the actual CLI byte/no-write discriminator, and obtains final-head proof/review. No candidate files changed and no qualification campaign was requested.

EffortlessSteven pushed a commit that referenced this pull request Oct 24, 2026
…sent (#8990 x #8989 semantic merge)

Same one-line fix as #10030 so this PR is a self-sufficient carrier for the current main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cuuiz4GRfXbHkeQuoNnjcz
EffortlessSteven pushed a commit that referenced this pull request Oct 24, 2026
Main's #8727 and #8990 each compiled alone; together the lib tests did not.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUS4vFoCEv5DiNwucKqSbC
EffortlessSteven pushed a commit that referenced this pull request Oct 24, 2026
#8989 and #8990 composed on main: the new next_repair test builds a
RustTestStub without the already_present field #8990 added, so the lib-test
target (default and Rust-only lanes) does not compile. Surfaced by the #9205
convergence merge of main.

Proof: cargo test -p ripr --no-default-features --features lang-rust --lib
(next_repair, keyword_probe, durable_selected): 16 passed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X6PpvQbrLxYbxRjHqJ4Aby
EffortlessSteven pushed a commit that referenced this pull request Oct 24, 2026
…main's #8989 test vs #8990 field)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
EffortlessSteven added a commit that referenced this pull request Oct 24, 2026
* test(mcp): compare the CLI restart display against the literal-backslash-preserving root rendering (#10011)

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

* test(app): construct the repair-journey witness stub with already_present (#8990 x #8989 semantic merge)

Same one-line fix as #10030 so this PR is a self-sufficient carrier for the current main.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Oct 24, 2026
… inherited from main

ad1e3bb (#8990) landed the RIPR-SPEC-0288 block with its outputs list
unclosed and the RIPR-SPEC-0289 header swallowed; check-traceability fails on
main's own tip. Close the outputs list, restore the metrics list and the
0289 [[behavior]] header. Local-gate repair routed here because this PR
edits the same authored map.
EffortlessSteven added a commit that referenced this pull request Oct 24, 2026
…d unterminated

#8990 landed the 0288 entry without its outputs closing bracket and
metrics list, so .ripr/traceability.toml fails to parse and
check-traceability fails on every open merge ref (main heads 5950c91,
ad1e3bb and 280e020 all ran red). Close the array and add the standard
unit_test_pass_rate metrics list. cargo xtask check-traceability passes
with this.
EffortlessSteven added a commit that referenced this pull request Oct 24, 2026
main's required check (Ripr Rust Small Result on 0285907, run 40041202217)
fails with E0063: #8990 added RustTestStub.already_present but missed the
initializer in next_repair_start_preserves_a_literal_backslash_unix_root.
This merge inherits that break; add the field (false, matching the sibling
initializers). The same gate run also carries a Windows-only unused_mut in
output::doctor (the unix-only case pushes need it); bind the mutable
binding under cfg(unix) so both platforms lint clean.
EffortlessSteven pushed a commit that referenced this pull request Oct 24, 2026
EffortlessSteven added a commit that referenced this pull request Oct 24, 2026
)

* feat(python): emit row-owned missing_input for RelatedTestMiss (#5491)

A strong related-test row on a predicate-boundary finding gains
missing_input only when its own owner calls all bind and resolve both
compared operands off the boundary. no_call_path stays withheld.

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

* fix(python): make row missing_input fail-closed on indirect reach and unknown operands (#5491)

Require direct owner calls only (no helper, alias, map/partial, fixture,
dynamic or foreign-receiver reach), a readable old equality pair, unrebound
compared parameters, an unchanged relational operand pair, and same-kind
comparable literals.

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

* fix(python): withhold row missing_input when implicit setup can reach the owner (#5491)

Fail closed by existence: autouse fixtures, pytestmark, setup/teardown hooks,
module-level calls, test-module rebinding of the owner name, decorated owners
and conftest fixtures or hooks on the directory chain.

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

* fix(python): withhold row missing_input for inherited/decorated test classes and conftest top-level effects (#5491)

Class bases and decorators, module and conftest top-level calls or attribute
assignments count as implicit reach; the variable-receiver branch is removed;
the spec states the visible-evidence-only limits.

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

* fix(python): close subscript/decorator/constructor/hook reach for row missing_input (#5491)

The row guard is a closed-world allowlist: subscript or call-result callees,
non-inert test decorators, pytest_* hooks in the test module and rebound import
aliases withhold the claim; instance methods are never claimed.

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

* fix(python): restrict row missing_input to the real assertion API and direction-preserving changes (#5491)

Only the unittest.TestCase assertion API and pytest raises/warns/approx are
safe callees; assert/check/verify helpers, non-test class methods and star
imports withhold the claim; a relational change must keep its direction.

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

* fix(python): withhold row missing_input for recursive owners and widened condition edits (#5491)

An owner that calls its own name, another project function or a same-class
callee keeps no miss; a relational change must leave the rest of the line
identical, and an equality change must be the whole condition.

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

* fix(python): bind a call keyword only to a declared parameter for row missing_input (#5491)

A keyword captured by **kwargs no longer stands for a body local of the same
name when resolving the compared operands.

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

* fix(python): trust builtins and framework APIs for row missing_input only with established identity (#5491)

A bare builtin is inert only while the test and module do not rebind it, and
raises/warns/approx/assert* are trusted only on self in a unittest.TestCase
class or the real pytest import; any other receiver withholds the claim.

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

* fix(python): vet the arguments of trusted calls for row missing_input (#5491)

A project callable passed by reference to a trusted call (pytest.raises,
assertRaises, sorted/max key=) or a test that mentions builtins withholds the
claim; arguments may only be literals, unshadowed builtins and exceptions,
plain locals and nested calls.

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

* Close plain_locals leaks with a closed-world rule; re-bless fixtures with the tool

A name is a plain local only if assigned once on one balanced physical line from closed words and every other occurrence is a bare operand. Fixture goldens regenerated via cargo xtask goldens bless.

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

* Repair traceability.toml after the merge: reapply the missing_input entries and close main's truncated RIPR-SPEC-0288 entry

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

* Remove stray traceability.toml.orig merge artifact

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

* Track bracket depth in plain_locals: a continuation line is never an assignment

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

* Fix merged-tree compile: RustTestStub literal gains already_present (main's #8989 test vs #8990 field)

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

* Require a whole-token def/class statement head before skipping a call as a definition

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

* Drop the duplicate already_present initializer left by two main fixes

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Oct 24, 2026
) (#9995)

* fix(analysis): facade crate reach and doctest name-token relation (#9982)

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

* fix(analysis): tie facade reach to the owner and manifest crate name (#9982)

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

* fix(traceability): close the unterminated RIPR-SPEC-0288 block from main

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

* fix(analysis): tie facade reach to owner visibility, module chain and test (#9982)

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

* docs(spec): facade reach limits, linked issue and tests (#9982)

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

* fix(test): set already_present in the next-repair backslash stub test

Main's #8727 and #8990 each compiled alone; together the lib tests did not.

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

* fix(analysis): tie method owners to their type and own file; spec and docs (#9982)

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

* fix(analysis): require the method owner's impl at the file root; tighten tests and spec (#9982)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Oct 25, 2026
…ained value (#9833) (#9868)

* feat(python): credit a guarded self-field write when every call enters the guard (#9833)

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

* fix(python): bind guarded field credit to safe execution and retained value

* fix(python): preserve nested formal and non-code indentation positives

* test(python): pin guarded field honesty and native syntax controls

* fix(python): distinguish retained field reads from native stores

* test(python): pin native retention counterexamples and read positives

* style(python): retain literal refusal predicate as match guard

* test(python): complete guarded-write honesty and human projections

* docs(python): keep fixture traceability spec IDs machine-readable

* fix(ci): restore omitted main golden and gate metadata

* test(python): refresh guarded-write Summary legend projections

* test(mcp): compare the CLI restart display against the literal-backslash-preserving root rendering (#10011)

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

* fix(agent-stub): repair main test compilation after the #8989/#8990 semantic merge

#8990 (ad1e3bb) added `already_present` to `RustTestStub`; #8989
(0285907) added `next_repair_start_preserves_a_literal_backslash_unix_root`
constructing the stub without the new field. Each PR's CI ran against a
base that lacked the other change, so main has not compiled the lib test
target since the two landed. The witness constructs a fresh stub, which
is by definition not already present: `already_present: false`.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Steven Zimmerman <steven@effortlesssteven.com>
EffortlessSteven added a commit that referenced this pull request Oct 25, 2026
… pins (#9496) (#10145)

* fix(typescript): skipped describe registrations are not a partial extraction

A registration inside describe.skip/todo or a describe with a skip option never
runs and is not a dropped one; stop disclosing it as language_scope_unsupported.

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

* fix(typescript): credit done-settled callbacks and old-value boundary pins

Rule 5 collects assertions of a callback that must call done() for a mocha test
to pass. Rule 6 keeps the boundary witness when the expectation pins the
unchanged value (fails against the changed code). Flips mocha-done-callback-value
and mocha-nested-describe-boundary.

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

* chore(typescript): drop known_false entries for fixed rows and stale entries

Removes mocha-done-callback-value and mocha-nested-describe-boundary (fixed here)
and the six rows #9591 also removes.

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

* docs: name changelog fragment for PR 9627

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

* fix(typescript): require done named once; skip only literal skip/todo suites

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

* fix(typescript): todo suites stay active; a later spread or computed key voids skip:true

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

* chore(typescript): delete known-false rows for the two fixed cases

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

* docs: cite the issue and PR in the changelog fragment

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

* fix(typescript): a skipped suite bound to a variable is not walked for dropped registrations

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

* docs: rule 7 in test comment

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

* fix: restore closing brace after merge

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

* chore: raise the spec-example floor to 134

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

* fix(repo-ops): close the RIPR-SPEC-0288 traceability entry main merged unterminated

#8990 landed the 0288 entry without its outputs closing bracket and
metrics list, so .ripr/traceability.toml fails to parse and
check-traceability fails on every open merge ref (main heads 5950c91,
ad1e3bb and 280e020 all ran red). Close the array and add the standard
unit_test_pass_rate metrics list. cargo xtask check-traceability passes
with this.

* Re-measure missed_credit_ceiling on main (perl 23, python 30, rust 134)

Perl case PRs landed after #9628 measured 21, so verdict-corpus check
--language perl fails on main. Python and Rust fell; ceilings must equal
the blessed count.

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

* Raise TypeScript spec-example floor to 154

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Oct 25, 2026
… two comparisons treat differently (#9437) (#9783)

* fix(typescript): ternary-condition comparison edit needs an input the two comparisons treat differently (#9437)

Adds RIPR-SPEC-0246 rule 7. Moves shape-template-plural-boundary from false exposed to gap.

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

* fix(tests): compile repairs main's red gate needs

main's required check (Ripr Rust Small Result on 0285907, run 40041202217)
fails with E0063: #8990 added RustTestStub.already_present but missed the
initializer in next_repair_start_preserves_a_literal_backslash_unix_root.
This merge inherits that break; add the field (false, matching the sibling
initializers). The same gate run also carries a Windows-only unused_mut in
output::doctor (the unix-only case pushes need it); bind the mutable
binding under cfg(unix) so both platforms lint clean.

* fix(typescript): rule 9 rides the ladder's unexercised-arm demotion (#9437)

Merging main brings #9497's RIPR-SPEC-0243 rule 18, which demotes a
same-outcome returned expression at the ladder before the post-ladder
rule 9 hook can fire, so the plural fixture kept weakly_exposed but with
the generic changed-arm note. Keep both behaviors: rule 18 still owns the
demotion, and when the comparison witness proves every observed call
passes a literal the two comparisons treat alike, the ladder limitation
names the condition and the differing value (the rule 9 wording, now
built by ComparisonEdit::limitation and shared with the post-ladder hook).
An argument only rule 18's evaluator can read (1 + 1) keeps the generic
note; its pin moves to its own test. Spec rule 9 and example 17 describe
the interaction; traceability lists the new test.

* fix(typescript): differing_value refuses literals beyond i64 instead of overflowing (#9437)

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

* fix(typescript): drop needless borrow in rule 9 hook (#9437)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Oct 26, 2026
* fix(check): treat pure reformats as behavior-neutral so they seed no probes (#9450)

* fix(check): fail closed on position macros, whitespace literals, and joint puncts in rewrap neutrality (#9450)

* test(check): pin selector joint-punct control for rewrap squeeze (#9450)

* fix(check): keep joint puncts, unicode whitespace literals, and comma wraps out of rewrap neutrality (#9450)

* docs(check): record joint-punct guards and track_caller residual in RIPR-SPEC-0310 (#9450)

* fix(check): register RIPR-SPEC-0310 in verdict-corpus spec coverage (#9450)

* fix(check): drop blank line at EOF in corpus coverage files (#9450)

* fix(check): register RIPR-SPEC-0310 in TypeScript corpus coverage (#9450)

* fix(corpus): drop three Rust known_false entries stale on main (#9441 cases fixed upstream)

* fix(corpus): take upstream rust coverage ledger as truth, keep only the RIPR-SPEC-0310 entry (#9450)

* fix(check): guard whole-file position-macro spans so split line!/column! names stay probed (#9450)

Review thread PRRT_kwDOSiSx0c6vO9PB: observes_position judges one physical
line, and the caller's whole-file prose_lines set carried only token-macro
spans, so a rewrap or reindent of an invocation whose name and ! sit on
different lines (line / !()) read as a pure reformat and seeded no probe
while the expansion's value changed. prose_lines now extends the
invocation-span scan over POSITION_MACROS too (macro_invocation_lines,
shared with token_macro_lines), vetoing both neutrality paths from either
side of the diff. Spec RIPR-SPEC-0311 Rule 3 and Test Mapping updated.

* fix(traceability): rebuild traceability map from main and map the split-position-macro regressions

The first main merge duplicated the gap-bound TypeScript behavior block and
dropped others; the map is restored to main's exact bytes with the
RIPR-SPEC-0348 pure-reformats block (plus the two new split-position-macro
tests) appended.

* style(check): rustfmt the split-position-macro fix

* fix(traceability): complete the truncated stub-rewrite behavior block inherited from main

ad1e3bb (#8990) landed the RIPR-SPEC-0288 block with its outputs list
unclosed and the RIPR-SPEC-0289 header swallowed; check-traceability fails on
main's own tip. Close the outputs list, restore the metrics list and the
0289 [[behavior]] header. Local-gate repair routed here because this PR
edits the same authored map.

* fix(test-stub): keep one already_present field after merging main's repair

The main merges delivered #8989's initializer without the field and then
live main's version of the same initializer with it, at two positions;
keep the single field in main's order. File is byte-identical to origin/main.

* fix: preserve numeric-dot wrap token boundaries (#9462 contribution)

Bounded Git-object handoff to the existing canonical PR; no branch ref update.
Reviewed-source-head: 829b32427030b2da7a2698679aa02d0f060ff4a4
Reviewed-tree: 2b6b964
Canonical-base: 1d8463d
Patch-blob: 885047b
Proof-blob: 7e44593
Proof-SHA256: 6de4f56168d783293df7cd7ffe4e08980ed0633b52c84ce3f1a3dbeec1f8715a

Local locked build and 19 real CLI controls passed; numeric guard removal
fails four numeric checks while formatting passes. Independent exact-source
and receipt review completed. Unit execution remains unverified: unrelated
unchanged test initializer E0063. No full or hosted qualification claim.

* test(check): cover both sides of numeric-dot wraps through probe seeding

---------

Co-authored-by: Steven Zimmerman, CPA <steven@effortlessmetrics.com>
EffortlessSteven added a commit that referenced this pull request Oct 31, 2026
…10224)

* fix(typescript): skipped describe registrations are not a partial extraction

A registration inside describe.skip/todo or a describe with a skip option never
runs and is not a dropped one; stop disclosing it as language_scope_unsupported.

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

* fix(typescript): credit done-settled callbacks and old-value boundary pins

Rule 5 collects assertions of a callback that must call done() for a mocha test
to pass. Rule 6 keeps the boundary witness when the expectation pins the
unchanged value (fails against the changed code). Flips mocha-done-callback-value
and mocha-nested-describe-boundary.

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

* chore(typescript): drop known_false entries for fixed rows and stale entries

Removes mocha-done-callback-value and mocha-nested-describe-boundary (fixed here)
and the six rows #9591 also removes.

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

* docs: name changelog fragment for PR 9627

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

* fix(typescript): require done named once; skip only literal skip/todo suites

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

* fix(typescript): todo suites stay active; a later spread or computed key voids skip:true

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

* chore(typescript): delete known-false rows for the two fixed cases

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

* docs: cite the issue and PR in the changelog fragment

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

* fix(typescript): a skipped suite bound to a variable is not walked for dropped registrations

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

* docs: rule 7 in test comment

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

* fix: restore closing brace after merge

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

* chore: raise the spec-example floor to 134

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

* fix(repo-ops): close the RIPR-SPEC-0288 traceability entry main merged unterminated

#8990 landed the 0288 entry without its outputs closing bracket and
metrics list, so .ripr/traceability.toml fails to parse and
check-traceability fails on every open merge ref (main heads 5950c91,
ad1e3bb and 280e020 all ran red). Close the array and add the standard
unit_test_pass_rate metrics list. cargo xtask check-traceability passes
with this.

* Re-measure missed_credit_ceiling on main (perl 23, python 30, rust 134)

Perl case PRs landed after #9628 measured 21, so verdict-corpus check
--language perl fails on main. Python and Rust fell; ceilings must equal
the blessed count.

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

* Raise TypeScript spec-example floor to 154

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

* test(typescript): discriminate skipped suite binding identity

* fix(typescript): resolve skipped suite declaration bindings

* fix(typescript): retain notices across uncertain mutation and evaluation

* fix(typescript): preserve hoisted aliases and evaluated callees

* fix(typescript): retain default carriers and wrapper evaluation

* fix(typescript): memoize possible runner mutation by binding

* docs(typescript): use static policy vocabulary for runner imports

* test(typescript): expose escaped runners and evaluated constructors

* fix(typescript): retain escaped-runner and evaluated invocation notices

* fix(typescript): preserve block rebindings in evaluated invocations

* fix(typescript): keep nested lexical rebindings inside their scope

* fix(typescript): scope loop catch and switch registration bindings

* test(typescript): discriminate for-in binding scope entry

* fix(typescript): preserve evaluation mode through control flow

* fix(typescript): scope global-object writes and arrow returns precisely

Review of the published head identified two dormancy defects:

1. A bare ambient global-object write (globalThis.fetch = mock) pushed
   the global alias into member_writes, where root_value resolves it to
   GlobalObject and mutated_runner stripped dormancy from every skipped
   suite in the file. An unshadowed global-object write now withdraws
   only the written property name via global_writes; a shadowed local of
   the same name remains a whole-file mutation risk.

2. An expression-bodied arrow (const get = () => describe) returned the
   runner without recording an escape, so get().skip = custom stayed
   invisible and a genuinely mutated runner kept its dormant verdict.
   Arrow expression bodies now record their operand as an escape.

New grouped discriminator skipped_suite_bindings_treat_ambient_global_
writes_precisely covers both directions; traceability and the
RIPR-SPEC-0243 escape list follow.

* fix(typescript): reject qualified reads of globally written runners

A global-object write withdraws the written runner name, but resolve only consulted global_writes for the bare root name, so globalThis.describe.skip (or window.describe.skip) after globalThis.describe = custom still resolved to a dormant skipped root and dropped the nested registration notice. GlobalObject members now reject names in global_writes; Namespace members are unchanged.

Controls: qualified dormant/retained reads in skipped_suite_bindings_treat_ambient_global_writes_precisely, and new skipped_suite_bindings_treat_x_spelled_suites_as_dormant pinning xdescribe/xcontext/xsuite dormancy named in RIPR-SPEC-0243.

* style: rustfmt the merged TypeScript tests

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

* fix(typescript): bind only runtime function parameters in declaration bindings

Type-only parameter lists (TSFunctionType, TSMethodSignature, declare
functions, overload signatures) share the FormalParameters AST node, so
visiting FormalParameters bound their identifiers into the enclosing
runtime scope. A top-level 'type Fn = (test: T) => void' shadowed the
runner for the whole file and dormant skipped suites produced spurious
partial-extraction notices. Bind parameters from the Function (bodied
only) and ArrowFunctionExpression arms instead.

Regression test: detect_partial_none_when_type_only_parameters_name_the_runner.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Steven Zimmerman <steven@perllsp.org>
Co-authored-by: Steven Zimmerman, CPA <steven@effortlessmetrics.com>
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.

ux(agent stub): second --write writes a _2 duplicate and prints a confusing "configured off for strongly_gripped seams" stderr line

2 participants