Repository navigation
Mirror the withdrawn-claims guard fixes from ad-res-j7 - #17
Merged
Merged
Conversation
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
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
There was a problem hiding this comment.
🟡 Changes recommended
The checker can silently miss wrapped allegations due to overly narrow prefiltering and incorrect continuation handling, while also falsely flagging a valid multiline correction.
3 open issues
What changed in this PR
Mirrors upstream withdrawn-claims guard fixes into ChainLex while preserving repository-specific path exemptions. The changes refine claim detection without adding new claim IDs.
Changes:
- Updates wrapped-correction handling and fenced-diagram row grouping.
- Adjusts prefilter whitespace handling for box borders and character classes.
- Expands write-off matching and adds negated-verb exclusions with regression examples.
| File | Description |
|---|---|
scripts/check_withdrawn_claims.py |
Refines wrapped-text exemptions, diagram grouping, and prefilter patterns. |
docs/strategic/WITHDRAWN_CLAIMS_REGISTER.json |
Updates mirror metadata, claim patterns, and matching examples. |
Review effort: Balanced
| # Rows of a box are separate labels ("│ Salco: Cape Town │" / "│ SOLO: UK │") | ||
| # unless a row continues the sentence above it, which starts in lower case. | ||
| content = row.group(1) | ||
| if not (content[:1].islower() and 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) |
Comment on lines
+249
to
+250
| if allow.search(" ".join(t for _, t in touched)): | ||
| continue |
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.


Copies
scripts/check_withdrawn_claims.pyanddocs/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:This repository's own
allow_pathsare kept. No claim was added, so no banners change. The withdrawn-claims guard passes on the diff.Generated by Claude Code