chore(wolf): sync anatomy/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-24 15:14:56 +00:00
parent c5aa64da71
commit 2a24551542
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
4 changed files with 1676 additions and 23 deletions

View file

@ -1,7 +1,7 @@
# anatomy.md
> Auto-maintained by OpenWolf. Last scanned: 2026-08-24T14:15:54.179Z
> Files: 715 tracked | Anatomy hits: 0 | Misses: 0
> Auto-maintained by OpenWolf. Last scanned: 2026-08-24T15:06:08.548Z
> Files: 723 tracked | Anatomy hits: 0 | Misses: 0
## ../../../../../../tmp/
@ -943,7 +943,7 @@
## src/controller/
- `apiserver.c` — include <errno.h> (~6392 tok)
- `apiserver.c` — include <errno.h> (~5966 tok)
- `CLAUDE.md` — XCE Controller (~4776 tok)
- `cluster.c` — include "config.h" (~24998 tok)
- `commit.c` — Declares is (~13741 tok)
@ -1041,6 +1041,9 @@
## src/frontend/apiserver/backend/
- `convert_pure.go` — Struct: rawStartInfo (~3599 tok)
- `convert_test.go` — TestRawJobToModel_BasicFields, TestRawJobToModel_FromHost_EmptySafe, TestRawJobToModel_NilSubmit, Te (~7115 tok)
- `convert.go` — go:build cgo (~3606 tok)
- `handler_test.go` — TestOnHostConfigUpdated_UnregisteredHostIgnored, TestOnHostConfigUpdated_DefaultPseudoHostIgnored, T (~5356 tok)
- `handler.go` — Struct: DefaultHandler (~2878 tok)
- `integration_test.go` — go:build !cgo (~4494 tok)
@ -1053,11 +1056,11 @@
## src/frontend/apiserver/controllers/
- `jobs_test.go` — TestPreCheckJobRequest_LostAndFound, TestJobsListFieldValidation_UsesJobInfoNotSubmitRequest, TestPr (~1292 tok)
- `jobs.go` — Struct: JobController (~30739 tok)
- `jobs.go` — Struct: JobController (~30746 tok)
## src/frontend/apiserver/models/
- `jobs.go` — Struct: JobArrayID (~6743 tok)
- `jobs.go` — Struct: JobArrayID (~6787 tok)
## src/frontend/xcecli/
@ -1068,11 +1071,19 @@
- `main_test.go` — dirty-content-fingerprint task 4.5: table-driven `TestComposeVersionDisplay` (6 cases incl. anchored-suffix regression), mirrors apiserver's task-4.4 test (~594 tok)
- `main.go` (~1172 tok)
## src/frontend/xcecli/cmd/jobs/
- `submit.go` — Struct: JobSubmitter (~6572 tok)
## src/frontend/xcecli/common/request/
- `request_test.go` — TestExtractErrorMessage, TestAuthHeaderConsistency (~377 tok)
- `request.go` — Struct: APIResponse (~2824 tok)
## src/frontend/xcecli/models/
- `jobs.go` — Struct: JobsResponse (~5211 tok)
## src/frontend/xcecli/router/
- `router.go` — Execute(cm, version string); build-time-versioning task 4.5: signature extended with `version string` param, sets `rootCmd.Version = version` before `rootCmd.Execute()` so Cobra's native `--version` handling prints/exits (~900 tok)
@ -1085,16 +1096,18 @@
## src/include/xce/
- `types.h` — < NULL. (~5431 tok)
- `types.h` — < NULL. (~5439 tok)
## src/lib/
- `group.c` — include <errno.h> (~2635 tok)
- `jobj.c` — include <errno.h> (~6130 tok)
- `utils.c` — dirty-content-fingerprint task 3.1: `xce_compose_version_ex()` added after xce_compose_version() -- when dirty_fingerprint empty, delegates straight to xce_compose_version() (byte-identical); when non-empty, strips a literal trailing "-dirty" off the commit field (anchored suffix check, not blind substring) and appends "-<dirty_fingerprint>" before composing. commit_id/xce_compose_version() itself untouched (~7035 tok)
## src/lib/testsuite/
- `test_group.c` — include <stdio.h> (~1659 tok)
- `test_jobj.c` — include <stdio.h> (~3856 tok)
- `test_utils.c` — dirty-content-fingerprint task 3.1: 5 new tests for xce_compose_version_ex() (strip-and-append with fingerprint, empty+clean, empty+dirty unchanged, NULL fingerprint, and a direct byte-for-byte regression proof against xce_compose_version()); all 5 pre-existing compose/version_field tests untouched and still passing (~2708 tok)
## src/nixSupport/
@ -1180,6 +1193,10 @@
- `test_sim_startup.c` — Declares char (~5535 tok)
- `test_sim_verify.c` — Declares mismatch; task 3 (Req 5.2) adds append_job_state_change_event()/append_replay_session_with_dispatch_and_pend() + test_verify_with_already_resolved_job_reports_no_mismatch(): --sim-verify against a recording with an already-resolved job reports zero mismatches now that reconciliation compacts decoded_session before the verify drain loop; task 4.2 (Req 5.1/5.2, check (b) extension) adds append_replay_session_with_two_dispatches_and_pend()/append_replay_session_with_two_pends() + test_verify_with_multiple_already_resolved_jobs_across_rounds_reports_no_mismatch(): TWO already-resolved jobs (A/C) in one round with a still-genuinely-PEND job's (B) own recorded PEND sandwiched BETWEEN the two DISPATCH entries (exercises non-adjacent memmove compaction, unlike task 3's single-leading-entry case), followed by an ordinary round 2 -- caught a real test-authoring gap live: builtin_fcfs's pendJobs discipline re-offers a still-PEND job EVERY subsequent round (not just its arrival round), so round 2's recorded fixture had to include B's recurring PEND too, not just the fresh job D's (~13500 tok)
## src/schema/
- `controller.capnp` — Declares OPCode (~14664 tok)
## src/tools/
- `deploy-ha.sh` — auto-detects real `xcecd` vs `xcecd_virtual` (XCE_REAL_WORKER / /run/systemd/system), generates sudo-wrapped start-worker.sh for real (~8000 tok)