Broaden dCDH by_path R-parser caveat to cover negative integers (re-audit follow-up to #401)#419
Merged
Conversation
R's `did_multiplegt_by_path` uses `substr(path, 1, 1)` to derive the
per-path baseline from the comma-separated path string. The caveat
previously only documented `D >= 10` as the breaking regime (where
`"12,12,..."` collapses to `"1"`), but the same single-character
truncation also affects negative integer baselines such as `-1`
(`"-1,-1,..."` collapses to `"-"`) - both regimes mis-allocate R's
per-path control-pool subset.
Python's tuple-key matching is correct in both regimes; the per-path
point estimates we compute remain bit-correct. R-parity scenarios
already stay in nonnegative single-digit `D in {0, 1, 2}` to avoid
the R bug. Negative-integer baseline support is regression-tested
on the Python side only.
Updated both surfaces that carried the original `D >= 10`-only
caveat: CHANGELOG.md (unreleased entry) and the Phase 3 by_path
Note in docs/methodology/REGISTRY.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
R0 review on the prior commit surfaced two actionable P3s:
1. The registry sentence "R-parity for D in {0..9} is asserted"
overstated evidence: the cited scenario only exercises D in
{0, 1, 2}. Narrow the claim to match what's actually tested and
separately note that single-digit nonnegative D shares the same
string encoding (no parity scenario currently runs outside
{0, 1, 2}).
2. The TestDCDHDynRParityByPathNonBinary class docstring still
used the narrower "breaks for D >= 10" wording. Align with the
broader "multi-character baseline states (D >= 10 or negative D)"
wording used in CHANGELOG and the registry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Review based on diff/source inspection only; I did not run tests. |
R1 review on the prior commit flagged that the prose said
"negative-integer baseline support is regression-tested in Python only"
but the visible regression only exercises paths with negative D values
in non-baseline positions (e.g. `(0, -1, -1, -1)`), not negative-
baseline paths like `(-1, 0, 0, 0)` - which is the exact regime that
would trigger R's `substr(path, 1, 1)` parser bug.
Narrow the doc claim to match what's actually tested ("negative-D
treatment-state support in non-baseline positions") and add a TODO
entry to track the deferred negative-baseline regression so the gap
is explicit and the doc claim is accurate.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment ✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Review based on diff/source inspection only; I did not run tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code