fix(wake): #932 stop reconciler re-enumerating already-CONSUMED detector state (#935)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful

Co-authored-by: jason.woltje <jason@diversecanvas.com>
Co-committed-by: jason.woltje <jason@diversecanvas.com>
This commit was merged in pull request #935.
This commit is contained in:
2026-07-26 15:48:40 +00:00
committed by Mos
parent 9becaf877f
commit 9e81ffd7fc
6 changed files with 244 additions and 5 deletions

View File

@@ -195,8 +195,35 @@
# tolerates on its observed.set-failure path. ON-DISK FORMAT UNCHANGED
# (read-compatible; a store written by older code reads identically). Only
# store.sh (+ test-wake-store-ack.sh T11) changed.
# 0.6.10 #932 reconciler RE-ENUMERATION of already-CONSUMED detector-observed
# state (wake-pilot finding #7 — safe-but-noisy G2a alarm-hygiene).
# After consume-truncation a consumed state matched NO accounting
# record (inbox truncated; the reconciler's seen-ledger only covers
# its OWN enumerations; the detector hash-file is correctly
# DISTRUSTED) -> the reconciler treated it as UNACCOUNTED and
# re-enumerated it: one DUPLICATE orientation wake + one SPURIOUS
# rc=1 CRITICAL per detector-active window per cycle (functionally
# safe — no lost obligation — but cry-wolf erosion of real alarms at
# fleet scale). FIX: (1) store.sh records the last-consumed
# observed_hash per (kind,id) at consume-truncation into a NEW
# store-owned durable record consumed-hashes.jsonl (atomic write;
# ADDITIVE — existing on-disk format unchanged/read-compatible; #908
# allocator untouched); (2) reconcile.sh adds a THIRD accounting
# source alongside the inbox and its seen-ledger: a detector-observed
# state whose observed_hash MATCHES the store's recorded last-consumed
# hash is ACCOUNTED (not re-enumerated — no dup wake, no spurious
# CRITICAL). TRUST BOUNDARY: the 3rd check consults ONLY the
# store-written record (its existence implies the state was durably
# enqueued+consumed, so it structurally cannot exhibit the §5
# hash-advance-without-enqueue swallow signature); trusting DETECTOR
# hash-files STAYS REJECTED. G3 is NOT weakened: only states the store
# RECORDED as consumed are suppressed — a genuinely-unaccounted state
# (enqueued-but-unconsumed, still in the inbox, OR a real gap) still
# re-enumerates + alarms. Changed: store.sh, reconcile.sh,
# _wake-common.sh (doc), test-wake-reconcile.sh (R10/R11),
# test-wake-store-ack.sh (T12).
component=wake
version=0.6.9
version=0.6.10
# Watch-list schema this component consumes, and the INCLUSIVE range of
# schema_version values it supports. A wake-watch-list.json whose schema_version