wal: pause

This commit is contained in:
pqhuy1987
2026-08-07 17:37:03 +07:00
parent 40914682b1
commit b8d22741c7
25 changed files with 1733 additions and 99 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": 53,
"last_ticked_session": "S179",
"last_ticked_head": "b99c1879f150f965527ab71fdd87b47fb468a5b1",
"counter": 54,
"last_ticked_session": "S180",
"last_ticked_head": "55894a04d0ee350df5ec0fa97626e8ca47580f0a",
"last_ticked_at": "2026-08-07",
"last_audit": {
"light_at_counter": 53,
@ -271,6 +271,11 @@
"at": "2026-08-06",
"session": "S178",
"event": "CLEAN tick (session-counter-tick.ps1 M2): counter 51-\u003e52, session S177-\u003eS178, head d081681-\u003eee21056. Classify-before-tick: no regression (n=178 \u003e= stored n=177); 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-08-07",
"session": "S180",
"event": "squash-benign (session-counter-tick.ps1 M2, contract fail_loud_on_regress trigger-2 BENIGN branch): counter 53->54, session S179->S180, head b99c187->55894a0. last_ticked_head b99c187 object EXISTS (cat-file=commit) but NOT reachable (merge-base --is-ancestor exit!=0), counter not regressed => a closeout squash lifted the ticked wal:/session commit out of history (expected drift, not tamper). Trace appended, continue, no owner alarm. Written atomically (temp + Move-Item -Force)."
}
]
}