Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions docs/strategic/WITHDRAWN_CLAIMS_REGISTER.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": "Claims that were withdrawn or refuted after verification. scripts/check_withdrawn_claims.py fails any pull request that adds a line repeating one of them. A line is allowed when it cites the claim as withdrawn or corrected (see allow_line_markers), or sits on a verbatim or archive path (see allow_paths). Each claim carries must_match and must_not_match. The script refuses to run when a pattern misses a must_match form or matches a must_not_match correction. Add a claim here the day it is withdrawn, with both lists.",
"updated": "2026-11-03",
"mirror_of": "cogpy/ad-res-j7 docs/strategic/WITHDRAWN_CLAIMS_REGISTER.json (2026-11-03). ad-res-j7 is canonical: add claims there first, then copy.",
"updated": "2026-11-12",
"mirror_of": "cogpy/ad-res-j7 docs/strategic/WITHDRAWN_CLAIMS_REGISTER.json (2026-11-12). ad-res-j7 is canonical: add claims there first, then copy.",
"allow_line_markers": "(?i)withdrawn|refuted|\\bfalse\\b|corrected|correction|superseded|do not plead|don.t plead|do not cite|do not repeat|not established|\\bnot a director|struck|~~|⛔|if .{0,20}does(n.t| not) use|not (?:shown to be )?an extraction",
"exemption_must_not_match": [
"The R10.6M extraction was restated by counsel."
Expand Down Expand Up @@ -390,14 +390,16 @@
},
{
"id": "rwd-7700-2887676-aje",
"pattern": "(?i)2,887,676\\.80[^\\n]{0,60}(written|to zero|to nil|→ ?0|to R0)|\\bwritten (?:down )?to (?:zero|nil|R0)\\b(?:(?!\\d{1,3}(?:,\\d{3})+\\.\\d{2})[^\\n]){0,120}2,887,676\\.80",
"pattern": "(?i)2,887,676\\.80[^\\n]{0,60}(written|to zero|to nil|→ ?0|to R0)|\\bwritten (?:off|(?:down )?to (?:zero|nil|R0))\\b(?:(?!\\d{1,3}(?:,\\d{3})+\\.\\d{2})[^\\n]){0,120}2,887,676\\.80",
"must_match": [
"| RWD finished goods written to zero (FY2020 AJE — different year, genuinely additive) | R2,887,676.80 | Strong (this audit, Appendix C) |",
"RWD 7700/000 Finished Goods: R2,887,676.80 written down to R0"
"RWD 7700/000 Finished Goods: R2,887,676.80 written down to R0",
"RWD finished goods were written off: R2,887,676.80."
],
"must_not_match": [
"The AJE wrote RWD finished goods of R141,163.95 to nil; R2,887,676.80 is in the first column pair.",
"written to zero: R141,163.95 (the R2,887,676.80 sits in the first column)"
"written to zero: R141,163.95 (the R2,887,676.80 sits in the first column)",
"Finished goods written off: R141,163.95; the R2,887,676.80 is the opening balance."
],
"correction": "RWD's FY2020 AJE wrote 7700/000 Finished Goods of R141,163.95 to nil; R2,887,676.80 is in the workbook's first column pair.",
"withdrawn": "2026-10-27",
Expand Down Expand Up @@ -448,7 +450,7 @@
},
{
"id": "r10-6m-extraction",
"pattern": "(?i)(?:extract\\w*|seiz\\w*|strip\\w*|stole|stolen|theft|loot\\w*|siphon\\w*|misappropriat\\w*|plunder\\w*|embezzl\\w*|divert\\w*|diversion)[^.\\n|]{0,80}R\\s?10(?:\\.6\\d*\\s?(?:M\\b|m\\b|million)|[ ,]624[ ,]131(?:\\.18)?)\\+?|R\\s?10(?:\\.6\\d*\\s?(?:M\\b|m\\b|million)|[ ,]624[ ,]131(?:\\.18)?)\\+?[^.\\n|]{0,80}(?:extract\\w*|seiz\\w*|strip\\w*|stole|stolen|theft|loot\\w*|siphon\\w*|misappropriat\\w*|plunder\\w*|embezzl\\w*|divert\\w*|diversion)",
"pattern": "(?i)(?<!not )(?<!never )(?<!no )(?<!n.t )(?:extract\\w*|seiz\\w*|strip\\w*|stole|stolen|theft|loot\\w*|siphon\\w*|misappropriat\\w*|plunder\\w*|embezzl\\w*|divert\\w*|diversion)[^.\\n|]{0,80}R\\s?10(?:\\.6\\d*\\s?(?:M\\b|m\\b|million)|[ ,]624[ ,]131(?:\\.18)?)\\+?|R\\s?10(?:\\.6\\d*\\s?(?:M\\b|m\\b|million)|[ ,]624[ ,]131(?:\\.18)?)\\+?[^.\\n|]{0,80}(?<!not )(?<!never )(?<!no )(?<!n.t )(?:extract\\w*|seiz\\w*|strip\\w*|stole|stolen|theft|loot\\w*|siphon\\w*|misappropriat\\w*|plunder\\w*|embezzl\\w*|divert\\w*|diversion)",
"must_match": [
"5. Use the court order to extract R10.6M+ from the company accounts",
"| 04 | Timeline of Financial Sabotage | March SARS request through September R10.6M extraction |",
Expand All @@ -460,7 +462,9 @@
"must_not_match": [
"On 3 and 11 Sep 2025, R10,624,131.18 was moved from four current accounts to savings accounts.",
"SLG sales of about R9-10.6M.",
"| R10.6M | transfers to savings |"
"| R10.6M | transfers to savings |",
"R10.6M was not stolen; it stayed in the companies' own savings.",
"The R10,624,131.18 was never extracted from the companies; it went to their savings accounts."
],
"correction": "The four transfers of 3 and 11 Sep 2025 (R10,624,131.18) moved money from each company's FNB current account to savings: RST R3,090,000.00 to RST savings 62134839127, SLG R640,000.00 to SLG savings 62593375829, VVA R1,730,000.00 to VVA savings 62812835744 (FNB print of 11 Sep 2025), and RWD R5,164,131.18 out of RWD current 62323196362 'to savings' on 3 Sep (arrival not held). None is shown to have left its company. State them as transfers to savings, not as an extraction, seizure or theft.",
"withdrawn": "2026-10-28",
Expand Down
35 changes: 30 additions & 5 deletions scripts/check_withdrawn_claims.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
- A claim hard-wrapped across the lines of one prose paragraph, or across the
lines of a fenced diagram, is caught too (.md/.txt/.html). A fence is a diagram
when it contains a box-drawing character (the form agents copy). Plain code
stays one statement per line. A diagram is not joined with the prose outside it
stays one statement per line. A diagram is not joined with the prose outside it.
In a box row (text between two vertical borders) the borders are dropped, and
a row joins the one above only when it continues it (starts in lower case)
- A wrapped claim whose joined lines carry an allow marker (a correction split
across a line break) is allowed, like the same correction on one line
- --root DIR / --register FILE: scan another repository against this (or another) register
"""
import argparse
Expand Down Expand Up @@ -148,6 +152,7 @@ def violations(path, lines, claims, allow):

BLOCK_START = re.compile(r"\s*([-*+]|\d+[.)]|#+)\s") # a list item or heading starts a new unit
BOX_DRAWING = set("│┌┐└┘├┤┬┴┼▼▲►◄─") # a fenced diagram, as opposed to a code sample
BOX_ROW = re.compile(r"^\s*[│┃║]\s*(.*?)\s*[│┃║]\s*$") # a row inside a drawn box: │ text │


def joinable(text):
Expand All @@ -173,6 +178,17 @@ def flush_fence():
if any(any(ch in BOX_DRAWING for ch in text) for _, text in fence):
sub = []
for no, text in fence:
row = BOX_ROW.match(text)
if row:
# 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):
paragraphs.append(sub)
sub = []
Comment on lines +186 to +188
if content:
sub.append((no, content))
continue
if not joinable(text) or BLOCK_START.match(text):
paragraphs.append(sub)
sub = []
Expand Down Expand Up @@ -209,8 +225,10 @@ def wrapped_violations(path, wanted, claims, allow, struck):
Each paragraph from `prose_runs` that holds a line in `wanted` is joined with
spaces and searched once per claim; only a match that crosses a join is reported,
at its first line. It is skipped when a line it touches carries an allow marker,
is struck through, or repeats the claim on its own (the per-line check already
reports that), and reported only when it touches a line in `wanted`.
when the touched lines carry one once joined ("... to savings, not" / "an
extraction."), when a line is struck through, or when a line repeats the claim
on its own (the per-line check already reports that). It is reported only when
it touches a line in `wanted`.
"""
paragraphs = prose_runs(read_lines(path))
for group in paragraphs:
Expand All @@ -228,6 +246,8 @@ def wrapped_violations(path, wanted, claims, allow, struck):
continue
if any(no in struck or allow.search(t) or c["rx"].search(t) for no, t in touched):
continue
if allow.search(" ".join(t for _, t in touched)):
continue
yield path, touched[0][0], c, " / ".join(t for _, t in touched)


Expand All @@ -253,11 +273,16 @@ def tracked_files():


def prefilter_pattern(pattern):
"""Loosen a claim pattern so it also matches when hard-wrapped (a superset, for ripgrep -U only)."""
"""Loosen a claim pattern so it also matches when hard-wrapped (a superset, for ripgrep -U only).

A space may also be a line break inside a drawn box, so box borders count as spacing.
Spaces inside a character class such as [ ,] are left as they are.
"""
pattern = re.sub(r"\(\?<[!=][^)]*\)", "", pattern) # lookbehinds would no longer be fixed-width
# the checks strip indentation before joining lines, so allow for it in bounded gaps
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)


def candidate_files(reg, claims):
Expand Down
Loading