Repository navigation
correct: Redact worksheet correction addends - #133
Conversation
WorksheetCorrection had the same repr leak as CorrectionEdit: for an erasure the worksheet filled with q, the addend is the recovered character itself, and for any other position it is the true character XOR the written one. Leave addend out of the generated repr; field access, equality and the CLI's explicit display are unchanged. Tighten the regression to compare exact reprs and to check that the repaired payload text does not appear. Refs #129 Claude-Session: https://claude.ai/code/session_01T233rKgZqE5wzDm3EVTHL1
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
BenWestgate
left a comment
There was a problem hiding this comment.
AI-assisted current-head review: ACK 58addc6. WorksheetCorrection.addend can itself be a recovered share character, so excluding only that field from the generated dataclass repr closes the accidental-rendering leak without changing field access, equality, hashing, correction behavior, or the CLI's explicit display. The regression checks both the exact redacted repr and absence of recovered payload text. Exact-head Python-package CI is green and there are no unresolved review threads. No correctness or security blocker found.
Before:
repr(correct_worksheet_residue(...))printed eachWorksheetCorrection.addend. For an erasure that the worksheet filled withq, the addend is the recovered character itself, so the repr leaked recovered share characters. #132 fixed the same leak inCorrectionEdit.After: the generated repr shows only
reverse_index. Field access, equality and the CLI's explicit display are unchanged.How:
addendusesfield(repr=False). The #132 regression test now compares exact reprs for both types and checks that the repaired payload text doesn't appear.Security review (focused, on BIP-93 vector 2 and the test residue):
repr,str, f-strings,%r, logging,pprintand traceback locals of both types and ofCorrectionCandidateno longer show recovered characters. Equality, hashing, pickling and the CLI display atcli.py:590are unchanged. Private helpers (indel._Target,indel._Variant,_alignment._View,bip93._ShareSet) still render share symbols, but only reach output through traceback locals, where plain string locals in the same frames would show them anyway, so they are left alone.Refs #129. Follows #132.
🤖 Generated with Claude Code
https://claude.ai/code/session_01T233rKgZqE5wzDm3EVTHL1