wal: pause

This commit is contained in:
pqhuy1987
2026-07-31 08:37:43 +07:00
parent 43b57b5641
commit e5f53d0545
7 changed files with 198 additions and 12 deletions

View File

@ -1,4 +1,4 @@
{
{
"_note": "Harness-24 (S121, 2026-07-15, wave adap-6-broadcast W2) session counter for lead-self-audit cadence. THIS FILE HOLDS STATE ONLY - every cadence NUMBER lives in .claude/agent-memory/memory-budget.json -\u003e h24_cadence (single-source, H24 section 2(3)). Never copy the digits here.",
"_why_content_based_not_blind_increment": "Owner-decisions-15-07-2026 Q2, trap found by lane E: the Stop-hook .claude/hooks/wal-flush.ps1 auto-commits on EVERY turn-boundary. A blind counter++ would therefore tick many times per real session and the cadence would be meaningless. So a tick is CONTENT-ADDRESSED: it is keyed on the repo HEAD sha at tick time. Ticking twice on the same HEAD is a NO-OP, which is what makes running /session-start twice in a row safe (acceptance: 2x /session-start on the same HEAD =\u003e +1, not +2).",
"_why_this_path": "Deliberately .claude/governance/ and NOT .claude/agent-memory/. The hook covers exactly four paths (.claude/WAL.md, agent-memory/, workflows/runs/, sessions/ - the 4th added S146 together with the session-model logic-session folder); .claude/governance/ is OUTSIDE all four, so this file is never swept into a \u0027wal:\u0027 commit as a side effect. Compare .claude/agent-memory/.mfe-state.json, which IS inside the hook\u0027s reach - a counter must not live there. RE-VERIFIED at S146 when the 4th path landed: the claim is about the DIRECTORY, and .claude/sessions/ != .claude/governance/, so widening the hook did NOT invalidate it - only the count changed. Any future widening of wal-flush.ps1 MUST re-check this sentence, not just bump the number.",
@ -11,9 +11,9 @@
},
"_tick_invariant_note": "Tick invariant (hub dede7ec5 Delta-1, verbatim): moi LAN-CHOT +1; mot cap dung-noi tang DUNG +1, khong +2, khong +0. SE form = tick-at-entry-gate idempotent-per-label (hub Delta-2 recovery-gate +1 = permitted form) - NET +1/session-label EQUIV hub +1/cap on CLOSED pairs; an OPEN pair is transiently +0 until its entry gate fires (hub blessed, 9a35405b block-1 phep dung-noi). Guard song-con = label-convention (session-start 2.1.8: new conversation = new S\u003cnn\u003e label, NEVER reuse). history[] is append-unbounded BY DESIGN =\u003e absence of a marker = never-happened (safe semantics); IF a FIFO cap is ever added, eviction MUST be handled explicitly (absence-vi-bi-day != absence-vi-chua-xay-ra - log-BOUNDED design-note dede7ec5).",
"_seed_honesty": "Seeded UNTICKED on purpose. counter=0 and last_ticked_* = null mean \u0027no tick has ever happened\u0027, which is the truth at S121 - the ritual that performs the tick lands in W3. Seeding a fake first tick here would make the very first cadence reading a lie, and H24 exists to catch exactly that kind of invented number.",
"counter": 36,
"last_ticked_session": "S162",
"last_ticked_head": "2554845b7f98b30fc980289cde4760a55b6ee600",
"counter": 37,
"last_ticked_session": "S163",
"last_ticked_head": "6ba5cfe74709fd4aab42b1c255195ddbea99cbdb",
"last_ticked_at": "2026-07-30",
"last_audit": {
"light_at_counter": 36,
@ -188,6 +188,11 @@
"at": "2026-07-30",
"session": "S162",
"event": "CLEAN tick (session-counter-tick.ps1 M2): counter 35-\u003e36, session S161-\u003eS162, head 8f37910-\u003e2554845. Classify-before-tick: no regression (n=162 \u003e= stored n=161); last_ticked_head reachable (merge-base --is-ancestor exit 0). 4 fields updated, 1 history entry appended, written atomically (temp + Move-Item -Force)."
},
{
"at": "2026-07-30",
"session": "S163",
"event": "CLEAN tick (session-counter-tick.ps1 M2): counter 36->37, session S162->S163, head 2554845->6ba5cfe. Classify-before-tick: no regression (n=163 >= stored n=162); last_ticked_head reachable (merge-base --is-ancestor exit 0). 4 fields updated, 1 history entry appended, written atomically (temp + Move-Item -Force)."
}
]
}