feat(ha-commit-barrier-rollout): wal_classify + classified hook dispatch (task 1.2)

Verified table implemented (STOP/RESUME/UPDATE/FAIL RETAIN per
supersession; WORKER detail switch; CHECKPOINT LOCAL); unknown type =
ERROR + XCE_TESTING abort + production RETAIN fallback. All three
hooks route through wal_hook_append_classified (zero bare async
appends); RETAIN registers with the engine lock-free; facts propagate
local append rc only. 8/8 group tests green; full suite 465/465.
This commit is contained in:
Rongsong Shen 2026-06-12 04:43:50 +00:00
parent fec9519960
commit e8ecc87551
4 changed files with 138 additions and 20 deletions

View file

@ -9,6 +9,7 @@
<!-- How the user likes things done. Code style, tools, patterns, communication. -->
## Key Learnings
- `commit_submit(COMMIT_MODE_RETAIN)` is fully lock-free: it returns 0 BEFORE `pthread_mutex_lock(&ce->lock)` (commit.c:233-239), so it is safe to call from hook functions even while entity write locks are held — only WAIT mode takes ce->lock. (barrier-rollout task 1.2, 2026-06-12)
- ha-commit-engine: once repl.c references commit_* symbols (task 5.2), commit.c MUST be in controller_src (meson.build) or the production xce_controller link fails — the "linkage lands with 5.3" note in tasks.md only held while repl.c had no engine references. Lock order ce->lock → r->lock: repl.c calls engine hooks only AFTER releasing r->lock.
- Use `clang-format` for C/C++ formatting; shared config lives at `xce/.clang-format`.