Files
solution-erp/.claude/governance/.session-counter.json
pqhuy1987 010d12c5f8 [CLAUDE] Docs: S125 adap tien-de-vong4 — relabel token CAN-TREN + hash-verify byte-safe + dinh-chinh hub + fable-real review/invest checklist
- adap broadcast phuong-phap-dem-token (type:new): negative-control tai lap 3-probe (notice-N = heuristic char-dem, KHONG phai token that) -> relabel STATUS:41 + HANDOFF:5 x2 + do-token report ADDENDUM (dai [31K byte/4 - 70,9K notice] => lead-share [8,2-18,7]%)
- false-TAMPER RCA: PS5.1 Get-Content -Raw doc UTF-8-no-BOM bang ANSI -> va check-email/send-email byte-safe + verifier-suspect-first; stamp hub verify OK bang stamp_verify.py (exit-0)
- email dinh-chinh hub (58f5afd8, selftest exit-0 x2) + adap-report + adap-request hash-verify-byte-safe-decode + FYI 2 broadcast no-stamp
- STAGE-2: git mv 7 broadcast processed -> inbox/ai_infra/ (root sach)
- fable-real review+invest (vai compound reviewer+inv-cb): run-trace + spec 3-muc + checklist A-D cho hmw @Opus 4.8 MAX; va stale all-inherit fable-real.md:37 + fable-clone.md:43
- hook-curate inv-cb MEMORY 23,9->16,9KB moved-not-cut (14 dong + 2 digest -> archive/2026-07.md)
- h18 memory +sibling-test-2-chieu; monitor self-compact S125-start + counter tick=4

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 13:29:43 +07:00

27 lines
3.7 KiB
JSON

{
"_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 -> 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 => +1, not +2).",
"_why_this_path": "Deliberately .claude/governance/ and NOT .claude/agent-memory/. The hook covers exactly 3 paths (.claude/WAL.md, agent-memory/, workflows/runs/); .claude/governance/ is OUTSIDE all three, so this file is never swept into a 'wal:' commit as a side effect. Compare .claude/agent-memory/.mfe-state.json, which IS inside the hook's reach - a counter must not live there.",
"_contract": {
"tick": "tick(session, head): if head == last_ticked_head -> NO-OP (idempotent, same HEAD = same real session state). Else counter = counter + 1, last_ticked_session = session, last_ticked_head = head, last_ticked_at = date.",
"fail_loud_on_regress": "If an incoming counter is LOWER than the stored counter, or last_ticked_head names a commit not reachable from HEAD, DO NOT silently reset: report to owner. A counter that moves backwards means the state file was rolled back or hand-edited, and a silent reset would hide the cadence gap.",
"overdue": "OVERDUE(light) when (counter - last_audit.light_at_counter) >= h24_cadence.light_every. Same shape for deep_every. Skipping sessions does NOT lose the debt - the gap is measured from the counter, not from wall-clock, so a missed session surfaces as OVERDUE rather than vanishing.",
"jump": "jump_on_class_repeat (h24_cadence): if ONE flag class from lead_self_audit.flag_classes repeats N times, pull the next audit forward regardless of the counter.",
"writer": "Lead is single-writer. Wired at /session-start (W3 owns the ritual; W2 owns this file + its shape)."
},
"_seed_honesty": "Seeded UNTICKED on purpose. counter=0 and last_ticked_* = null mean 'no tick has ever happened', 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": 4,
"last_ticked_session": "S125",
"last_ticked_head": "3aacdf9d1cb36865695f1df9b420316e744a9885",
"last_ticked_at": "2026-07-16",
"last_audit": {
"light_at_counter": 3,
"deep_at_counter": 3,
"_note": "Counter value at which the last light/deep self-audit actually ran. S124 (2026-07-15): FIRST-EVER real run of both H24 vai (owner-triggered dogfood at counter=3) — full 2-vai coverage (view + omission), 0-garble. Credited as BOTH light+deep (thorough audit) so next light~counter 9, next deep~counter 18. lead-view: 9 flag; lead-omission: 4 flag+1 INFORM (carry-age structurally vacuous — escalated owner)."
},
"class_repeat": {
"_note": "Rolling tally per flag class from lead_self_audit.flag_classes (memory-budget.json). Key = class name, value = consecutive-audit repeat count. S124 first audit = SEED (fired-once), not repeats yet (per lead-view-auditor honest-note). jump_on_class_repeat=3.",
"counts": { "view-residual-asym": 1, "view-stale-count": 1, "gap-carry-dropped": 1, "gap-decision-sunk": 1 }
},
"history": []
}