Skip to content

correct: Redact worksheet correction addends - #133

Merged
BenWestgate merged 1 commit into
reviewability-v1from
claude/redact-worksheet-addend
Oct 8, 2026
Merged

BenWestgate merged 1 commit into
reviewability-v1from
claude/redact-worksheet-addend

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Before: repr(correct_worksheet_residue(...)) printed each WorksheetCorrection.addend. For an erasure that the worksheet filled with q, the addend is the recovered character itself, so the repr leaked recovered share characters. #132 fixed the same leak in CorrectionEdit.

After: the generated repr shows only reverse_index. Field access, equality and the CLI's explicit display are unchanged.

How: addend uses field(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, pprint and traceback locals of both types and of CorrectionCandidate no longer show recovered characters. Equality, hashing, pickling and the CLI display at cli.py:590 are 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

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
@BenWestgate BenWestgate self-assigned this Oct 7, 2026
@BenWestgate
BenWestgate marked this pull request as ready for review October 7, 2026 04:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T04:15:55.121390Z 58addc6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@BenWestgate
BenWestgate merged commit 753cf61 into reviewability-v1 Oct 8, 2026
23 checks passed
@BenWestgate
BenWestgate deleted the claude/redact-worksheet-addend branch October 8, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant