[FIX] The deferral checker silently skipped the governance register (REVIEWED-123)

Executing REVIEWED-123 conditions 2 and 3 surfaced a defect in the instrument
that was supposed to carry them.

PENDING.md had grown to 546,944 bytes, past the scanner's 400 KB guard, so EVERY
structured DEFERRED-DECISION block in the governance register was skipped —
silently — by the checker built to stop deferred conditions from being silently
missed. The 30-day review point placed under condition 2 was inert on arrival.

Worse than silent. The prose-deferral loop has no size guard, so PENDING.md's
prose count (70) still appeared in the report, making the file look examined
while its structured blocks were never read. Found only by placing a block and
noticing the tracked count did not move.

Both halves fixed:
- The two named governance files are exempt from the guard. The guard exists to
  bound the unbounded **/*.md globs; it was never meant for the files the scan
  reaches outside docs/ specifically to include.
- A size-skip is now REPORTED, not swallowed: "NOT SCANNED for structured blocks",
  named, with byte counts, and stated as "could not assess" rather than "nothing
  there" — REVIEWED-104's third outcome, applied to the instrument whose entire
  subject is conditions nobody is watching. Two legitimate skips now visible
  (Carruthers 1.6 MB, Yates 1.0 MB — scholarly texts, correctly out of scope).

Three controls added, derived from the PROPERTY rather than the guard's own
vocabulary: is the register actually scanned; is a real block in it parsed (the
live instance, not a fixture); and does the guard still apply to non-governance
files, so the exemption cannot quietly become "scan everything". A control asking
"does the guard work" would have passed throughout.

Result: 32/32 controls (was 29/29); deferred decisions 3 tracked (was 2), all
checkable. The ladder-freeze-30day-review trigger is live at date 2026-09-16.

Also under REVIEWED-123: N-now recorded (60 transcripts of 84, 24 remaining);
freeze scope stated as GENERAL per condition 1 and ladder file verified untouched;
owed-entries list ratified with each row naming its authorizing ruling per
condition 3 — OWED-1 under REVIEWED-122 cond. 9, OWED-2 explicitly NONE, queued
but not authorized and needing its own ruling before it joins the ladder.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Y6t6qx7cpaCu5xGdD36u4
This commit is contained in:
David F Glidden
2026-08-17 20:40:53 +02:00
co-authored by Claude Opus 5
parent d7d543cc77
commit d04c875054
2 changed files with 72 additions and 6 deletions
+41 -1
View File
@@ -350,7 +350,24 @@ _scan_targets = [(r, "*/docs/**/*.md") for r in SCAN_ROOTS] + EXTRA_SCAN_GLOBS
# READING task, and it is reported as owed rather than silently skipped.
_scan_targets += [(HOME / "dotfiles", "PENDING.md"), (HOME / "dotfiles", "PENDING-archive.md")]
PROSE_DEFERRAL_RE = re.compile(r"defer(?:red|ral)", re.I)
# The size guard bounds the unbounded `**/*.md` globs. It must NOT apply to the two
# governance files, which were added to the scan on purpose and are the whole reason
# the scan reaches outside docs/ at all.
#
# 2026-08-17 [FIX]: it did apply, and PENDING.md had grown to 546,944 bytes — so every
# structured DEFERRED-DECISION block in the governance register was skipped, silently,
# by the checker built to stop deferrals from being silently missed. Worse than silent:
# the prose-deferral loop below has no size guard, so PENDING.md's prose count appeared
# in the report and made the file look examined. Found by placing a block under
# REVIEWED-123 cond. 2 and noticing the tracked count did not move.
#
# Both halves are fixed here: the named governance files are never size-skipped, and a
# skip is now REPORTED rather than swallowed — the third outcome of REVIEWED-104's
# doctrine, on the instrument whose whole subject is conditions nobody is watching.
GOVERNANCE_FILES = {HOME / "dotfiles" / "PENDING.md",
HOME / "dotfiles" / "PENDING-archive.md"}
_seen_files: set = set()
skipped_too_large: list = []
for root, pattern in _scan_targets:
if not root.is_dir():
continue
@@ -359,7 +376,8 @@ for root, pattern in _scan_targets:
continue
_seen_files.add(f)
try:
if f.stat().st_size > 400_000:
if f.stat().st_size > 400_000 and f not in GOVERNANCE_FILES:
skipped_too_large.append(f)
continue
body = f.read_text(errors="replace")
except OSError:
@@ -389,6 +407,20 @@ control("transcripts trigger silent on an unreached threshold",
control("governance dir is inside the deferral scan",
any("claude/governance" in str(p) for p in _seen_files)
or not (HOME / "dotfiles/claude/governance").is_dir())
# 2026-08-17: PENDING.md passed 400 KB and every structured block in it went unscanned,
# silently, while its prose count still appeared in the report. These controls are derived
# from the PROPERTY (is the register's block actually parsed?), not from the guard's own
# vocabulary — a control asking "does the guard work" would have passed throughout.
control("the governance register is actually scanned for blocks, whatever its size",
(HOME / "dotfiles/PENDING.md") in _seen_files
and (HOME / "dotfiles/PENDING.md") not in skipped_too_large)
control("a real block IN the register is parsed [the live instance, not a fixture]",
any(d["file"].name == "PENDING.md" for d in deferrals)
or "DEFERRED-DECISION:" not in (HOME / "dotfiles/PENDING.md").read_text(errors="replace"))
control("the size guard still applies to non-governance files [negative control — "
"the exemption must not become 'scan everything']",
(HOME / "dotfiles/PENDING.md") in GOVERNANCE_FILES
and (HOME / "dotfiles/CLAUDE.md") not in GOVERNANCE_FILES)
control("trigger evaluator FIRES on a met condition",
_p_ok and trigger_fired(_p_ok[0]) is True)
control("trigger evaluator does NOT fire on an unmet condition "
@@ -564,5 +596,13 @@ if deferrals:
f"({', '.join(f'{k} {v}' for k, v in prose_counts.items())}) — these carry no")
print(" DEFERRED-DECISION block, so NO trigger is machine-checkable for any of them.")
print(" Counted, not classified. Whether any condition has fired is unestablished.")
if skipped_too_large:
print(f" ⚠ and {len(skipped_too_large)} file(s) were NOT SCANNED for structured blocks "
f"(over the 400 KB guard):")
for _s in skipped_too_large:
print(f" {_s.relative_to(HOME) if HOME in _s.parents else _s} "
f"({_s.stat().st_size:,} bytes)")
print(" Any DEFERRED-DECISION block in these is INERT. This is 'could not assess',")
print(" not 'nothing there' — the distinction REVIEWED-104 rules may not be collapsed.")
sys.exit(0)