chore(wolf): sync anatomy/cerebrum/memory/hooks/token-ledger bookkeeping

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
This commit is contained in:
Rongsong Shen 2026-08-25 10:53:49 +00:00
parent f7b732a300
commit b2a8fe4ce9
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
5 changed files with 4226 additions and 41 deletions

View file

@ -1,7 +1,7 @@
# anatomy.md
> Auto-maintained by OpenWolf. Last scanned: 2026-08-25T09:38:59.283Z
> Files: 735 tracked | Anatomy hits: 0 | Misses: 0
> Auto-maintained by OpenWolf. Last scanned: 2026-08-25T10:38:09.375Z
> Files: 736 tracked | Anatomy hits: 0 | Misses: 0
## ../../../../../../tmp/
@ -957,16 +957,16 @@
- `ha_convergence.c` — Declares char (~8389 tok)
- `ha.c` — define _GNU_SOURCE (~126128 tok)
- `ha.h` — ifndef HA_H (~34172 tok)
- `job.c` — include <assert.h>; bug-1689: adds restore_job_finish_state(), record_job_finish_fact() now calls persist_submit_job_finish_fact() carrying receipt-time finish_time+exit_code (~35694 tok)
- `job.c` — include <assert.h> (~36630 tok)
- `join.c` — include "config.h" (~2994 tok)
- `main.c` — build-time-versioning task 3.2 (argp_program_version runtime-composed into static `version_buf[128]`, "My name is..." startup INFO reads that buffer) PLUS dirty-content-fingerprint task 3.2 (2026-08-21): new static `version_display_buf[128]` composed via `xce_compose_version_ex()` (adds `STR(VERSION_DIRTY_FINGERPRINT)`) feeds `argp_program_version` instead; `version_buf`'s composition + the startup INFO log are byte-identical/untouched (Req 3.2). Live-verified: `--version` -> `7ebcba6d-cdb7cc7d`, startup log -> `7ebcba6d-dirty` (~5346 tok)
- `meson.build` (~3488 tok)
- `meson.build` (~3499 tok)
- `misc.c` — include <errno.h> (~1359 tok)
- `myapp.c` — define _GNU_SOURCE (~6287 tok)
- `myconf.c` — define _GNU_SOURCE (~1180 tok)
- `opget.c` — include "config.h" (~1730 tok)
- `opupd.c` — include "config.h" (~714 tok)
- `persist.c` — define _GNU_SOURCE; bug-1689: adds decode_jobexitinfo()/persist_submit_job_finish_fact(), splits WAL_JOB_FINISH into its own apply_wal_entry() case + extends apply_committed_entry()'s inline branch to decode wire finish_time/exit_code (~97521 tok)
- `persist.c` — define _GNU_SOURCE (~98160 tok)
- `queue.c` — include <errno.h> (~1554 tok)
- `repl.c` — include <assert.h> (~9240 tok)
- `reply.c` — include "config.h" (~590 tok)
@ -989,7 +989,7 @@
- `clean_failover_preservation.sh` — clean_failover_preservation.sh — ha-term-safety task 5.2 live integration test. (~5327 tok)
- `configcompare.c` — define _GNU_SOURCE (~2273 tok)
- `configcompare.h` — pragma once (~1186 tok)
- `controller_test.c` — include <argp.h> (~2395 tok)
- `controller_test.c` — include <argp.h> (~2417 tok)
- `ctrlstatus_fmt.h` — ifndef _CTRLSTATUS_FMT_H_ (~631 tok)
- `resval_typeresolve.c` — resval_resolve_type(): resource-name -> Value_u_which table lookup (14 known names unchanged) + task 2.1's numeric-default fallback / `-t` type_override for unrecognized names (~499 tok)
- `resval_typeresolve.h` — declares resval_resolve_type()/RESVAL_TYPE_UNKNOWN; task 2.1 fallback now implemented (~676 tok)
@ -1033,6 +1033,7 @@
- `test_term_safety_adapter.c` — define _GNU_SOURCE (~29920 tok)
- `test_wal_job_dispatch_fact.c` — Declares in (~5222 tok)
- `test_wal_job_finish_fact.c` — Declares as (~6904 tok)
- `test_wal_job_rusage_fact.c` — bug-1690 regression suite: WAL_JOB_RUSAGE restart-drop fix for job.run_usage. 8 tests covering both apply seams, backward compat, restart replay via the real persist_job_hook_fun(), and (key test) a merge-safety proof using a real makeString()'d host_name to confirm the fix never frees a live/xstring-backed pointer (~9250 tok)
- `test_wal_job_start_fact.c` — Declares as (~6378 tok)
- `test.c` — include <argp.h>. jobid-%lu-to-fmt_jobid task (2026-08-21): all 10 remaining raw `%lu` jobid printfs (cmd_jobkill, cmd_jobckpt, run_task_local, handle_notify x3, handle_runtasks x2, check_run_jobs, check_run_tasks) converted to `fmt_jobid(buf, sizeof(buf) - 1, ...)` + `%s`, matching this file's existing convention (buf/jobidStr/wantStr precedents at ~1559/1980/2405-2422); no new #include needed. Loop-scoped buffers repopulated fresh per iteration where the jobid varies (check_run_jobs, check_run_tasks, handle_notify's per-case union fields); reused a single populate when the jobid is loop-invariant (handle_runtasks: same runmsg->jobid across the task loop) (~40184 tok)
@ -1101,7 +1102,7 @@
- `persist.h` — pragma once; bug-1689: declares persist_submit_job_finish_fact() (~26004 tok)
- `utils.h` — dirty-content-fingerprint task 3.1: new `xce_compose_version_ex()` extern decl (--version-only sibling of xce_compose_version(), adds optional `dirty_fingerprint` param); startup-log call sites keep calling the untouched xce_compose_version() (~2720 tok)
- `wal_types.h` — pragma once; bug-1689: documents WAL_JOB_FINISH's new native trailing payload (finish_time+exit_code) (~3178 tok)
- `wal_types.h` — pragma once (~3360 tok)
## src/include/xce/
@ -1210,7 +1211,7 @@
## src/schema/
- `controller.capnp` — Declares OPCode (~14664 tok)
- `controller.capnp` — Declares OPCode (~15094 tok)
## src/tools/