Skip to content

Mirror the withdrawn-claims guard fixes from ad-res-j7 - #16

Merged
drzo merged 2 commits into
mainfrom
claude/review-bom-docs-uMY6H
Nov 13, 2026
Merged

drzo merged 2 commits into
mainfrom
claude/review-bom-docs-uMY6H

Conversation

@drzo

@drzo drzo commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Copies scripts/check_withdrawn_claims.py and docs/strategic/WITHDRAWN_CLAIMS_REGISTER.json (updated 2026-11-12) from cogpy/ad-res-j7#5134, which fixed the five gaps Copilot found on cogpy/discosys#9:

  • a correction wrapped across lines is no longer flagged;
  • a negated verb ("not stolen", "never extracted") is no longer flagged;
  • "written off: R2,887,676.80" is caught again;
  • in fenced diagrams, box borders are dropped before rows are joined, and a row joins the one above only when it continues it;
  • the prefilter treats box borders as spacing and leaves spaces inside character classes alone.

This repository's own allow_paths are kept. No claim was added, so no banners change. The withdrawn-claims guard passes on the diff.


Generated by Claude Code

Wrapped corrections and negated verbs are no longer flagged; 'written off' is caught again; box rows in fenced diagrams are joined only when one continues the other, with borders dropped; the prefilter treats box borders as spacing and leaves spaces inside character classes alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDB1UaJwokY8cw2E1M2fvp
Comment thread scripts/check_withdrawn_claims.py Fixed
CodeQL flagged the character-class branch: a backslash could match both '\\.' and '[^\]]', so '[' followed by many backslashes backtracked exponentially. Backslash is now excluded from the second branch (from cogpy/ad-res-j7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDB1UaJwokY8cw2E1M2fvp
@drzo
drzo marked this pull request as ready for review November 13, 2026 12:05
Copilot AI balanced review requested due to automatic review settings November 13, 2026 12:05
@drzo
drzo merged commit 0f626fa into main Nov 13, 2026
6 checks passed

Copilot AI 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.

🟡 Changes recommended

The checker can miss withdrawn claims because its prefilter excludes line breaks within space-bearing character classes and its continuation logic drops uppercase or numeric follow-on text.

2 open issues
What changed in this PR

Mirrors upstream withdrawn-claims guard updates into this repository, retaining its local path exemptions and adding no new claims or banners.

Changes:

  • Updates wrapped-correction handling, fenced-diagram grouping, and prefilter spacing.
  • Adjusts claim patterns for negated extraction wording and “written off” amounts, with supporting examples.
  • Refreshes the register’s mirror date and provenance.
File Description
scripts/​check_withdrawn_claims.py Updates correction exemptions, diagram row handling, and prefilter transformation.
docs/​strategic/​WITHDRAWN_CLAIMS_REGISTER.json Revises two claim patterns and their examples; updates mirror metadata.

Review effort: Balanced

Comment on lines +186 to +188
if not (content[:1].islower() and sub):
paragraphs.append(sub)
sub = []
pattern = re.sub(r"\{(\d+),(\d+)\}", lambda m: "{%s,%d}" % (m.group(1), int(m.group(2)) + 200), pattern)
return pattern.replace("(?i)", "").replace("[^.\\n|]", "[^.|]").replace("[^.\\n]", "[^.]").replace("[^\\n]", "[\\s\\S]").replace(" ", "\\s*")
pattern = pattern.replace("(?i)", "").replace("[^.\\n|]", "[^.|]").replace("[^.\\n]", "[^.]").replace("[^\\n]", "[\\s\\S]")
return re.sub(r"\\.|\[(?:\\.|[^\]\\])*\]| ", lambda m: "[\\s│┃║]*" if m.group() == " " else m.group(), pattern)
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.

5 participants