Repository navigation
fix(python): a trailing-comment or spacing-only edit emits no probe (#10706) - #11210
Conversation
…10706) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUYrSBDZfXJv1kQzXY
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 3 seconds. View limit details
Comment |
…10706) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUYrSBDZfXJv1kQzXY
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the new fixtures assert empty findings, but they do not contain a red/green old-versus-new comparison that would demonstrate the changed behavior is observationally equivalent.
- Confirm the Rust unit test verifies finding presence but does not assert the discriminator, gap-id content, or that old and new versions produce equivalent observable behavior.
- Confirm the classifier invokes the token-equality guard before structural Python analysis, so only comment/spacing-only changes reach the new early return.
- Confirm the helper preserves changed-token behavior by comparing token source spelling rather than normalized values, and fails closed on lexer errors.
- Confirm the PR claims broad Python behavior coverage, but the supplied evidence does not demonstrate sibling classifier entry points or a successful repository-wide test run.
- Confirm the helper compares raw source-spelled token lists, so the claimed whitespace-only equivalence depends on lexer token boundaries being stable; the added tests do not cover whitespace inserted between adjacent token characters.
- Confirm indentation equality is checked as a raw byte prefix, so equivalent visual indentation using different whitespace is treated as changed, while any identical byte prefix is accepted even when token semantics depend on indentation.
Refuted
- The fixtures provide end-to-end proof that the new guard suppresses findings.; refuted because: The fixtures contain expected zero-finding outputs and the PR describes negative experiments, but the ripr sensor failed and the cargo-test receipt is absent in the available packet.
- The new guard is documented as covering whitespace between tokens, but the tests exercise only trailing spaces/tabs and one spacing-only rewrite of a call.
Evidence gaps
- The fixture goldens are static expected outputs and the reported ripr sensor failed; cargo-test is scheduled late, so execution evidence for the new fixture behavior is currently unavailable.
- Model proof intent was rejected by deterministic validation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUYrSBDZfXJv1kQzXY
|
Independent fresh-context review of the PR (read-only agent, two passes) at head
Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…m diff --check (#10706) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUYrSBDZfXJv1kQzXY
There was a problem hiding this comment.
Refuted
- The tests do not distinguish token changes from comment/spacing changes.; refuted because: The Rust unit test covers both outcomes: None for comment/spacing edits and Some for changed-token edits.
- The PR body says a line that does not lex alone stays analyzed, but the implementation uses the new-file whole-file lex to identify multiline strings; this is a safer superset but the wording understates that behavior.
- The new no-op behavior needs a separate architecture-level abstraction rather than a localized classifier guard.; refuted because: Rejected: the helper is confined to the Python preview adapter, consumes existing context, and avoids cross-language or public API changes.
Evidence gaps
- The PR's broader correctness and merge-readiness claims depend on repository-wide test/golden evidence, while the ripr sensor failed and the scheduled cargo-test receipt was not available in this lane packet.
- Model proof intent was rejected by deterministic validation.
- Repository-wide success remains unproven because the ripr sensor failed and cargo-test evidence was only scheduled at packet time.
- Repository-wide execution evidence is unavailable because ripr failed with exit code 2; the fixtures provide route expectations, but a successful late cargo-test receipt is still needed before relying on the claimed suite result.
- Repository-wide test success is not currently established by the review packet because the ripr sensor failed and cargo-test is only scheduled late.
|
CI on Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- The no-op guard checks multiline-string membership only on the new side, so an old string-content line that becomes ordinary code can be suppressed as a whitespace/comment-only edit.
Verification questions
- Confirm the new early return is reachable from classify_change_full and compares old/new token spellings, but it can suppress a change when the old line was multiline-string content and the current source does not identify that context.
- Confirm the token predicate fails closed for standalone lexical errors, while the separate whole-file string-range helper returns None on whole-file lex errors; the current-file range is the only protection against multiline-string false negatives.
Refuted
- The new helper changes token values or treats string content as comments.; refuted because: Rejected: token source spellings are compared, and lexer failures return false; the string-content path is handled separately by the whole-file range check.
- The guard should be generalized into a cross-language abstraction.; refuted because: Rejected: the behavior is Python-preview-specific, and the helper remains confined to the Python adapter without public API changes.
- The change weakens changed-token detection by comparing token values rather than source spelling.; refuted because: The implementation compares each token's original source slice, preserving distinctions such as 0x1 versus 1 and differing quote styles; changed-token and indentation cases have direct negative tests.
Parked follow-ups
- The implementation protects only against the new-file string context; an old-side-only multiline-string context could still be misclassified.
Evidence gaps
- Repository-wide test and golden success is not established by this packet.
- Model proof intent was rejected by deterministic validation.
- Repository-wide success is not established in the supplied packet: ripr failed, and cargo-test was scheduled rather than available during lane review.
- Repository-wide correctness remains unproven because the required ripr sensor failed and cargo-test was scheduled rather than available.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUYrSBDZfXJv1kQzXY
|
Addressing the github-actions review finding (old-side string context, also my own reviewer's residual #1): Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- The shared review packet lacks successful repository-wide execution evidence; the failed ripr sensor should be explained before treating the change as fully verified.
Refuted
- The new guard bypasses established structural Python analysis or broadens a cross-language abstraction.; refuted because: It is a localized Python-preview early return after existing no-op guards, with no public API or cross-language change.
- The helper must compare normalized token values, which could incorrectly treat respellings as no-ops.; refuted because: The implementation compares source spelling strings from lexer ranges, so 0x1 versus 1 and requoted strings remain different; the unit test explicitly covers these negatives.
- The no-op behavior needs a separate shared architecture-level abstraction rather than a localized Python classifier guard.; refuted because: Rejected: the behavior is preview-language-specific, confined to the Python adapter, uses existing context, and does not alter shared or public interfaces.
- The helper treats changed tokens, respellings, string contents, or indentation changes as equivalent.; refuted because: Token source spellings are compared exactly, indentation is checked, and lex failures return false; unit tests cover these negatives.
Parked follow-ups
- The change adds a local classifier policy and helper rather than a reusable cross-language abstraction, limiting scope but leaving equivalent no-op semantics to be implemented independently elsewhere.
Evidence gaps
- Repository-wide success is not established by this packet: the ripr sensor exited with code 2 and cargo-test evidence was scheduled rather than present when the lane packet was assembled.
- Model proof intent was rejected by deterministic validation.
- Repository-wide success is not yet established by available deterministic receipts.
- Repository-wide correctness and merge-readiness are not established by this packet because the ripr sensor failed and cargo-test remained scheduled rather than receipted.
- Repository-wide test success is not established by the available evidence.
|
CI on Generated by Claude Code |
|
Update on Generated by Claude Code |
…g human verify line (#11210) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUDFA3cS1NVbf3sPQL
…re-bless (#11210) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUDFA3cS1NVbf3sPQL
…g verify-command line (#11210) (#11301) * test(goldens): re-bless python_trailing_whitespace_in_multiline_string human verify line (#11210) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUDFA3cS1NVbf3sPQL * docs(goldens): record python_trailing_whitespace_in_multiline_string re-bless (#11210) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUDFA3cS1NVbf3sPQL --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…crete literals (#11255) (#11284) * fix(typescript): all-literal object and array expected values are concrete literals (#11255) An expected object or array built only from scalar literals, nested objects and nested arrays (including [] and {}) is a concrete expected value for Jest/Vitest toEqual, toStrictEqual and toMatchObject. One identifier, call, spread, hole, computed or shorthand key, accessor, template or wrapped expression keeps it dynamic. Empty or all-zero containers do not witness a field update, an object expectation is a dead witness against scalar branches and arms, and a nested container earns no rejection-literal credit. The shared packet validator is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLStjTeXK7R7aoSnBBq * test(typescript): avoid panic-family macro in literal container test (#11255) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLStjTeXK7R7aoSnBBq * fix(typescript): gate the literal-container packet tests on lang-typescript (#11255) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLStjTeXK7R7aoSnBBq * test(goldens): re-bless python_trailing_whitespace_in_multiline_string human verify line (#11210) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUDFA3cS1NVbf3sPQL * docs(goldens): record python_trailing_whitespace_in_multiline_string re-bless (#11210) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUDFA3cS1NVbf3sPQL --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Steven Zimmerman — Python follow-through thread.
Governing issue or accepted claim: #10706 (Python half; the TypeScript half stays open)
Acceptance delta (one sentence): A Python line whose only change is a trailing
#comment or spacing between tokens emits no finding, so no gap id or discriminator can embed comment text.What changed
A Python edit like
return pricetoreturn price # fallbackproduced aweakly_exposedfinding with a gap id containing the comment text. A new guard inclassify_change_full(is_comment_or_whitespace_only_changeinno_behavior.rs) lexes the old and new line and compares each token's source spelling, so it fails closed:#inside a string, a respelling (0x1to1, a requoted string), a changed token and a changed indentation are all still edits.Proof
trailing_comment_tests.rs: no probe for comment/whitespace edits, a probe kept for changed tokens, and the predicate's negatives.python_noop_trailing_commentandpython_noop_trailing_whitespace, expected empty findings. Negative experiment: with the guard removed, both flip toexposed; with it, the goldens check shows no drift for them.owner_return_pin_*fixtures that need network-fetched dependencies this sandbox cannot download; hosted CI covers those..ripr/traceability.tomlandchangelog.d/10706-python-trailing-comment-noop.mdupdated.Not in this PR: the TypeScript trailing-comment and trailing-whitespace cases.
Generated by Claude Code