fix(r8): silent-handler ratchet compliance in fault seam — log instead of pass
CI Pipeline / best-practices (push) Successful in 5s
CI Pipeline / documentation (push) Successful in 3s
CI Pipeline / canary (push) Successful in 31s
CI Pipeline / lint (push) Successful in 38s
deploy / deploy (push) Skipped
CI Pipeline / type-check (push) Successful in 27s
CI Pipeline / gitea-offline (push) Successful in 16s
CI Pipeline / unit-tests (push) Successful in 4m27s
CI Pipeline / required-checks (push) Successful in 1s
CI Pipeline / CI Pipeline / notify-event-bridge (push) Successful in 3s

The two catch-all handlers added in dac6e97 (r8_fault.record evidence
write, notify_event_bridge seam probe) tripped the #126 silent-handler
ratchet (S110 75 -> 77), which cascaded to the lint-baseline contract
test. Both handlers now log to stderr/stdout and continue — the seam
stays fail-open but is no longer silent. S110 back to 75=75.
This commit is contained in:
conductor committed 2026-09-19 06:12:38 +01:00
1 parent e03ad9aad9
commit c6c18ae041
2 files changed
+6 -4

No files matched your search

+3 -2
View File
@@ -62,8 +62,9 @@ def main() -> int:
return 0
r8_fault.record(payload["operation_id"], "delivered_normally",
{"sha": sha, "rule_active": False})
except Exception: # noqa: BLE001 — fault seam must never break delivery
pass
except Exception as exc: # noqa: BLE001 — fault seam must never break delivery
print(f"notify-event-bridge: R8 fault-seam probe failed ({exc}); "
"continuing with normal delivery", flush=True)
# R3 durable delivery: write the completion file FIRST — it works even
# if the bridge daemon is down, and the atomic rename means any waiter
# (inotify-watching or starting later) sees a complete file or none.
+3 -2
View File
@@ -22,6 +22,7 @@ from __future__ import annotations
import json
import os
import sys
import time
from pathlib import Path
@@ -78,5 +79,5 @@ def record(operation_id: str, stage: str, extra: dict | None = None) -> None:
FAULT_LOG.parent.mkdir(parents=True, exist_ok=True)
with FAULT_LOG.open("a") as f:
f.write(json.dumps(entry, sort_keys=True) + "\n")
except Exception: # noqa: BLE001 — evidence logging must never break CI
pass
except OSError as exc: # noqa: BLE001 — evidence logging must never break CI
print(f"r8_fault: evidence log write failed: {exc}", file=sys.stderr)