chore: sync harness/session state and OpenWolf bookkeeping

- .claude/settings.json: worktree.baseRef = "head"
- .kiro/specs/scheduler-core/.solomd: session tracking state
- .wolf/{anatomy,cerebrum,memory,token-ledger}.json, hooks/_session.json:
  accumulated OpenWolf bookkeeping (includes this session's fmt_jobid work)
- .gitignore: ignore Python __pycache__/*.pyc (scripts/gitea-sync.py) and
  .agent-shell/ (session transcripts can capture raw env dumps/secrets --
  one already had a live-looking ANTHROPIC_API_KEY in a captured `env`
  output; excluded from this commit entirely, never checked in)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-08-22 02:46:12 +00:00
parent 979cd24f6c
commit 94fd1504e9
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
8 changed files with 97789 additions and 602 deletions

View file

@ -1,7 +1,7 @@
# anatomy.md
> Auto-maintained by OpenWolf. Last scanned: 2026-08-20T03:02:21.623Z
> Files: 593 tracked | Anatomy hits: 0 | Misses: 0
> Auto-maintained by OpenWolf. Last scanned: 2026-08-22T02:45:24.121Z
> Files: 663 tracked | Anatomy hits: 0 | Misses: 0
## ../../../../../../tmp/
@ -28,14 +28,59 @@
- `trap_repro.sh` (~301 tok)
- `xtest_script.txt` (~52 tok)
## ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-scheduler-framework/0334ebbe-8d9c-4931-871d-87c678f83a79/scratchpad/
- `dryrun_funcs.sh` — Dry-run harness: extracts and exercises the pure functions from the new (~1407 tok)
- `fix_bug1604.py` (~813 tok)
- `log_bug_1602.py` (~1054 tok)
## ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-scheduler-framework/0334ebbe-8d9c-4931-871d-87c678f83a79/scratchpad/dfp-4.3-remediation/fakebin/
- `git` — Wrapper: fail ONLY `git diff` (and any `git diff ...` invocation), pass (~55 tok)
## ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-scheduler-framework/0334ebbe-8d9c-4931-871d-87c678f83a79/scratchpad/dfp_test/
- `Makefile.after` (~441 tok)
- `Makefile.before` (~376 tok)
## ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-scheduler-framework/2455e81b-dd7c-4f96-b2cd-548167b22732/scratchpad/
- `close_out_bug1588.py` — Declares parameter (~1202 tok)
- `update_buglog.py` (~1058 tok)
## ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-scheduler-framework/fe2ba1fe-c8fb-4d72-986e-1c8e2406aa3a/scratchpad/
- `strstr_probe.c` — define _GNU_SOURCE (~236 tok)
## ../../../../../claude/.claude/plugins/claude-hud/
- `config.json` (~310 tok)
## ../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/
- `MEMORY.md` (~83 tok)
- `project_bug_tracker_buglog.md` (~369 tok)
## ../../xce/.claude/worktrees/fix-bug-1613/.kiro/specs/scheduler-sim-decision-parity/
- `brief.md` — Brief: scheduler-sim-decision-parity (~2018 tok)
- `design.md` — Design Document (~5778 tok)
- `requirements.md` — Requirements Document (~1652 tok)
- `research.md` — Research & Design Decisions (~2663 tok)
- `spec.json` (~133 tok)
## ../../xce/.claude/worktrees/fix-bug-1613/.kiro/steering/
- `scheduler-driver-equivalence.md` — Scheduler Driver Equivalence (~1520 tok)
## ../../xce/.claude/worktrees/fix-bug-1613/src/scheduler/
- `CLAUDE.md` — XCE Scheduler (~1264 tok)
## ./
- `.clang-format` (~226 tok)
- `.gitignore` — Git ignore rules (~217 tok)
- `.gitignore` — Git ignore rules (~249 tok)
- `.mcp.json` (~7 tok)
- `.opencode.json` (~7 tok)
- `CLAUDE.md` — OpenWolf (~1484 tok)
@ -51,7 +96,7 @@
## .claude/
- `settings.json` (~706 tok)
- `settings.json` (~718 tok)
## .claude/rules/
@ -291,6 +336,14 @@
- `spec.json` (~1040 tok)
- `tasks.md` — Implementation Plan (~9416 tok)
## .kiro/specs/build-time-versioning/
- `design.md` — Design Document (~5779 tok)
- `requirements.md` — Requirements Document (~1680 tok)
- `research.md` — Research & Design Decisions (~2236 tok)
- `spec.json` (~129 tok)
- `tasks.md` — Implementation Plan (~4349 tok)
## .kiro/specs/clusterconfig-schema-split/
- `design.md` — Overview (~7542 tok)
@ -329,6 +382,14 @@
- `spec.json` (~1011 tok)
- `tasks.md` — Implementation Plan (~5073 tok)
## .kiro/specs/dirty-content-fingerprint/
- `design.md` — Design Document (~6899 tok)
- `requirements.md` — Requirements Document (~2326 tok)
- `research.md` — Research & Design Decisions (~5146 tok)
- `spec.json` (~130 tok)
- `tasks.md` — Implementation Plan (~5390 tok)
## .kiro/specs/election-iomgr-refactor/
- `design.md` — Design Document: election-iomgr-refactor (~8505 tok)
@ -642,6 +703,16 @@
- `brief.md` — Brief: scheduler-sim-diagnostics (~1333 tok)
## .kiro/specs/scheduler-sim-repl-verbosity/
- `design.md` — Design Document: REPL continue-mode output (event echo gate, round rollup + collapse-range flush interface, jobid range compression, sim_print_decision gate) (~6900 tok)
- `requirements.md` — Requirements Document: 5 EARS requirement areas (mode-aware echo, per-round summary, collapsing, jobid ranges, no regression) (~1852 tok)
- `research.md` — Research & Design Decisions, incl. the flush-interface gap found/fixed during task-graph sanity review (~3600 tok)
- `spec.json` — phase: tasks-generated, ready_for_implementation: true (~220 tok)
- `spec.json` (~131 tok)
- `tasks.md` — Implementation Plan: 5 major tasks / 9 sub-tasks, TDD-paired, tasks 3-4 parallel-safe after task 2 (~1900 tok)
- `tasks.md` — Implementation Plan (~1962 tok)
## .kiro/specs/worker-join-refactor/
- `design.md` — Design Document: worker-join-refactor (~4709 tok)
@ -672,7 +743,7 @@
- `ha-async-io.md` — HA Protocol & Async I/O (~4721 tok)
- `persistence.md` — WAL & Persistence Durability (~3007 tok)
- `product.md` — Product Overview (~1509 tok)
- `roadmap.md` — Roadmap (~15027 tok)
- `roadmap.md` — Roadmap (~15496 tok)
- `security.md` — Security Standards (~1636 tok)
- `structure.md` — Project Structure (~1348 tok)
- `tech.md` — Technology Stack (~1500 tok)
@ -709,9 +780,9 @@
## src/
- `flake.nix` (~571 tok)
- `meson.build` (~628 tok)
- `meson.options` (~90 tok)
- `flake.nix` (~1301 tok)
- `meson.build` (~672 tok)
- `meson.options` — dirty-content-fingerprint task 1: sibling `dirty_fingerprint` string option (default '') added next to commit_id/build_time (~135 tok)
## src/.claude/
@ -865,14 +936,14 @@
- `ha.h` — ifndef HA_H (~36503 tok)
- `job.c` — include <errno.h> (~26846 tok)
- `join.c` — include "config.h" (~2994 tok)
- `main.c` — include <argp.h> (~5107 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` (~3386 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 (~88956 tok)
- `persist.c` — define _GNU_SOURCE (~89221 tok)
- `queue.c` — include <errno.h> (~1554 tok)
- `repl.c` — include <assert.h> (~9240 tok)
- `reply.c` — include "config.h" (~590 tok)
@ -903,7 +974,7 @@
- `snapdiff.h` — pragma once (~610 tok)
- `snapverify.c` — define _GNU_SOURCE (~4322 tok)
- `snapverify.h` — pragma once (~1339 tok)
- `test_apply_committed_entry.c` — Declares directly (~11854 tok)
- `test_apply_committed_entry.c` — Declares directly (~11605 tok)
- `test_apply_correctness_verification.c` — Declares driving (~19199 tok)
- `test_apply_pump_integration.c` — Declares hook (~18120 tok)
- `test_apply_pump.c` (~22429 tok)
@ -928,15 +999,58 @@
- `test_sched_admin_dispatch.c` (~7510 tok)
- `test_sched_worker_change.c` — Declares bug (~3893 tok)
- `test_term_safety_adapter.c` — define _GNU_SOURCE (~29920 tok)
- `test.c` — include <argp.h> (~39556 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)
## src/frontend/
- `Makefile` — XCE project — test targets (~2823 tok)
## src/frontend/apiserver/
- `meson.build` — frontend/apiserver — Go REST API server with CGO backend integration. (~613 tok)
## src/frontend/apiserver/backend/
- `handler.go` — Struct: DefaultHandler (~1883 tok)
## src/frontend/apiserver/cmd/
- `main_test.go` — dirty-content-fingerprint task 4.4: `TestComposeVersionDisplay`, table-driven, 6 cases covering strip-and-append, clean/no-fingerprint passthrough, degraded-dirty passthrough (`unknown`), append-with-nothing-to-strip, and an anchored-suffix (non-blind-substring) regression case; mutation-tested live (swapping the `"-dirty"` literal for `"-clean"` correctly fails 2/6 subtests) (~550 tok)
- `main.go` (~1611 tok)
## src/frontend/xcecli/
- `meson.build` — frontend/xcecli — Go CLI tool (~195 tok)
## src/frontend/xcecli/cmd/
- `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/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)
## src/include/
- `persist.h` — pragma once (~24461 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)
## src/lib/
- `group.c` — include <errno.h> (~2635 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_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/
- `default.nix` — threads myCommitId AND (dirty-content-fingerprint task 2.2) myDirtyFingerprint to xce.nix/xcecli.nix callPackage calls; myBuildTime removed, no longer eval-time (~286 tok)
- `xce.nix` — mesonFlags has `-Dcommit_id=` and (task 2.2) `-Ddirty_fingerprint=` (both eval-time, plain mesonFlags entries); a separate `preConfigure` hook computes `date -u +%Y-%m-%dT%H:%M:%SZ` at build time and appends `-Dbuild_time=` to `mesonFlagsArray` (fixes bug-1603: builtins.currentTime broke pure-eval) -- untouched by task 2.2 (~1190 tok)
- `xcecli.nix` — same `preConfigure` build-time pattern as xce.nix, plus (task 2.2) `-Ddirty_fingerprint=` in mesonFlags (~292 tok)
## src/scheduler/
@ -954,10 +1068,10 @@
- `core_events.c` — include <errno.h> (~10963 tok)
- `core.c` — include <errno.h> (~4310 tok)
- `driver.c` — include <errno.h> (~9230 tok)
- `main.c` — CLI entry (argp table); bug-1585 added --record-snapshot-interval, wired to sched.record_snapshot_interval (~4650 tok)
- `main.c` — build-time-versioning task 3.2 (argp_program_version runtime-composed into static `version_buf[128]`, both mutually-exclusive startup INFO lines read that buffer) PLUS dirty-content-fingerprint task 3.2 (2026-08-21): same split-buffer pattern as controller/main.c -- new static `version_display_buf[128]` via `xce_compose_version_ex()` feeds `argp_program_version`; `version_buf`/startup INFO lines untouched (Req 3.2). Live-verified: `--version` -> `7ebcba6d-cdb7cc7d`, startup log -> `7ebcba6d-dirty` (~5186 tok)
- `recording_session.c` — include <stdint.h> (~2706 tok)
- `repl_break.c` — include <stdio.h>; task 12.5 added unconditional repl_print_event_summary() in xce_repl_on_event() (bug-1595), 790/800 lines (~8861 tok)
- `repl_info.c` — include <stdio.h> (~8894 tok)
- `repl_break.c` — include <stdio.h> (~7907 tok)
- `repl_info.c` — include <stdio.h> (~9489 tok)
- `repl_internal.h` — if !defined(_REPL_INTERNAL_H_); task 12.5 added replay_complete field + repl_job_state_name extern (~3602 tok)
- `repl_params.c` — include <errno.h> (~4299 tok)
- `repl.c` — include <ctype.h>; task 12.5 added xce_repl_on_replay_complete(), replay_complete guard on step/continue, quote-stripping in repl_split_tokens() (bug-1594/1596) (~6611 tok)
@ -966,7 +1080,7 @@
- `sim_loop.c` — include <errno.h> (~9926 tok)
- `sim_picker.c` — include <errno.h> (~1374 tok)
- `sim_verify.c` — include <stdio.h> (~4694 tok)
- `sim.c` — include <errno.h> (~5100 tok)
- `sim.c` — include <errno.h> (~6106 tok)
- `snapshot_load.c` — include <errno.h> (~4005 tok)
- `snapshot_wire.c` — include <errno.h> (~2611 tok)
@ -983,7 +1097,7 @@
- `test_core_isolation.c` — Declares char (~4069 tok)
- `test_driver_translate.c` — Declares field; full_val/delta_val fixtures now set ->which=XCE_VAL_NUMERIC (bug-1585 dup_val fix exposed the gap) (~9580 tok)
- `test_no_bare_printf.c` — Declares char (~1702 tok)
- `test_repl_breakpoints_inspection.c` — Declares and (~17207 tok)
- `test_repl_breakpoints_inspection.c` — Declares and (~19229 tok)
- `test_repl_equivalence.c` — Declares char (~7554 tok)
- `test_repl_execution_control.c` — Declares directly (~8798 tok)
- `test_resval_ownership.c` — bug-1585 regression: RESVALS_FULL/RESVALS_DELTA heap-use-after-free, with a REAL (non-stubbed) kill_sched_resval to actually catch it (~5471 tok)
@ -996,12 +1110,29 @@
## 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)
- `xce-build.sh` — Declares of (~2508 tok)
- `go_build` — dirty-content-fingerprint task 4.1: reads `XCE_DIRTY_FINGERPRINT` (empty-safe like GitCommit/BuildTime), but falls back to plain `""` (NOT `"unknown"`, unlike the other two) and appends `-X main.DirtyFingerprint=$_dirty_fingerprint` to the existing `-ldflags` alongside GitCommit/BuildTime, unaffected (~730 tok)
- `test-build-version-regression.sh` — build-time-versioning task 6.1: standalone regression script (follows `test-commit-durability.sh`/`test-heartbeat-tolerance.sh` precedent in this dir) running a REAL `nix develop $SRC_DIR --command bash xce-build.sh scheduler <asan|debug> <dedicated build dir>` for both profiles, then `xce_scheduler --version`, failing loudly if the parsed commit id is empty/`unknown`/mismatched vs `git rev-parse --short HEAD` (+`-dirty`). Also runs a detection-capability demonstration (deliberately-wrong hash / synthetic-empty / synthetic-`unknown` commit id must all be rejected; genuine match must pass). Tolerates xce-build.sh's own non-zero exit from its bundled scheduler-suite `meson test` (bug-1560, unrelated pre-existing flake) via `cmd || rc=$?` so that doesn't mask the version check. Dedicated build dirs cleaned up on exit unless `--keep-build-dirs` passed. Live-verified passing both profiles (~3373 tok)
- `test-dirty-fingerprint-distinguishability.sh` — dirty-content-fingerprint task 6.1 (2026-08-21): standalone regression script (follows test-build-version-regression.sh's convention) proving the 4 required --version states hold via a real `xce-build.sh scheduler debug` build cycle. ISOLATION TECHNIQUE (the key design decision): since this shared repo is under continuous concurrent editing, `git status` on the ambient tree can't reliably represent "clean" -- creates its own throwaway `git worktree add --detach <tmp> HEAD` first (genuinely clean by construction), then invokes THAT worktree's own copy of xce-build.sh -- which works because xce-build.sh resolves SRC_DIR from `$0`'s location and `cd`s there itself, so every git command inside it auto-scopes to the isolated worktree with zero extra `-C`/`cd` bookkeeping. Edits `README.md` inside the isolated worktree only (`git checkout --` between edits for byte-exact reverts); shared tree's own README.md never touched (asserted via `git status --porcelain` at the end). 4 states: clean (`meson setup` fresh) -> edit-A -> edit-B (`--incremental` reconfigure for speed, safe since same single component/dir reused throughout) -> revert-to-A. `check_capture()` is the single function both the real per-state checks AND `demonstrate_detection_capability()` exercise (mirrors check_result/check_consistency precedent). Found+fixed bug-1615 live (a same-statement `local a=... b="$a/..."` cross-reference silently unbound under `set -u` -- split into two `local` statements). Live-verified: 2 full passing runs reproduce IDENTICAL fingerprints across independent runs (determinism proof); a 3rd run with edit-B deliberately forced to reproduce edit-A's content correctly FAILs (exit 1, differs-check catches the unexpected match) (~5200 tok)
- `test-dirty-fingerprint-distinguishability.sh` — test-dirty-fingerprint-distinguishability.sh — dirty-content-fingerprint (~6112 tok)
- `test-dirty-fingerprint-nix-production-path.sh` — test-dirty-fingerprint-nix-production-path.sh — dirty-content-fingerprint (~7683 tok)
- `test-dirty-fingerprint-nix-production-path.sh` — dirty-content-fingerprint task 6.3 (2026-08-21, LAST task in spec): standalone regression script proving the NIX production path (`nix build ./src#xcecore_debug`, no `--impure`) carries task 2.2's `myDirtyFingerprint` into a real build attempt, not just `nix eval`. Reuses the family's isolated `git worktree add --detach` technique, but edits `flake.nix` itself (inside `src/`, the flake's own source) rather than README.md -- the exact edit target task 2.2's own research.md already validated for `self.narHash` sensitivity. SANDBOX FINDING (new, beyond task 2.2): `nix build` here dispatches to a REMOTE builder (`ssh://.../172.31.109.18`); `--keep-failed`'s leftover build dir (containing a real, linked `scheduler/xce_scheduler`) sits on that unreachable remote host (SSH connection times out), so unlike the dev-loop scripts this one can't extract-and-run a compiled binary -- mirrors task 2.2's own accepted technique instead: `nix eval --json <flake>#packages.x86_64-linux.xcecore_debug.mesonFlags` (fast, eval-time) cross-checked against the REAL build log's `mesonConfigurePhase flags:` line (via `-L --keep-going --keep-failed`, ~1-2 min per attempt thanks to ccache reuse across edits since only flake.nix's comment changes, not C/Go source). Treats the known bcctool/goproxy.cn failure as the expected PASSING outcome (`check_reached_known_limitation()` asserts every `FAILED: [code=` line -- nix's error epilogue reprints the same one 3x for xcecore_debug's 2 outputs -- references bcctool, not a new regression) and asserts `scheduler/xce_scheduler` was actually linked before that failure. States: clean (nix eval only, empty fingerprint) -> edit-A (eval+real build) -> edit-B different content (eval+real build, differs from A in BOTH eval and real build log) -> revert-to-A (eval only, matches A exactly). Found+fixed 3 live bugs: the same bug-1615 same-statement `local` cross-reference gotcha (in `extract_flag_from_json`), BusyBox `mktemp` rejecting a `.log` suffix after `XXXXXX` (GNU-only feature -- dropped the suffix), and a `git checkout -- flake.nix` pathspec bug (`-C "$ISO_DIR"` doesn't see `src/flake.nix` as `flake.nix` -- fixed to `-C "$ISO_SRC"`). Also caught and fixed a self-check false-positive: grepping the whole script for the literal string `--impure` matched its own header prose explaining the Observable -- narrowed to only lines beginning a real `nix eval/build/develop/log` invocation. Live-verified passing end-to-end (~1m54s total, well under the 10-min-per-build budget); zero leftover worktrees/tmp dirs/logs; shared repo's `src/flake.nix` confirmed untouched (~14000 tok)
- `test-dirty-fingerprint-startup-log-unchanged.sh` — dirty-content-fingerprint task 6.2 (2026-08-21): standalone regression script proving the fingerprint (task 3.1-4.4) never leaks into either xce_scheduler's or xce_apiserver's startup log, even on a dirty tree where `--version`/`-version` clearly does show one. Reuses task 6.1's isolated `git worktree add --detach` technique (one controlled dirty edit to README.md inside the isolated worktree only) to build scheduler for real via `xce-build.sh scheduler debug`; builds apiserver via a direct `go build -ldflags` invocation (mirrors test-version-startup-consistency.sh's bug-1597 workaround) injecting the REAL fingerprint extracted from the scheduler's own `--version` output (not a second independent hash computation -- simpler and more faithful to a real single-session `xce-build.sh` run). `assert_version_shows_fingerprint()` confirms `--version`/`-version` shows `<commit>-<fingerprint>` (never the old `-dirty` format); `assert_startup_log_unchanged()` confirms the startup log's commit field is byte-identical to the original build-time-versioning format (`<commit>-dirty`) AND that the fingerprint string is absent anywhere in the line (not just the commit field). `demonstrate_detection_capability()` proves both functions reject: fingerprint leaking straight into the commit field, fingerprint leaking via an unrelated field while the commit field looks fine, and a commit-field format drift with no fingerprint involved at all -- plus a sanity pass on genuinely unchanged lines. Cleanup kills daemons by PID first, then scans `/proc/*/exe` (not cmdline text, to avoid bug-1576's self-match hazard) for any leftover process pointing at the built binaries before removing the isolated worktree. Live-verified passing twice end-to-end (real scheduler + apiserver builds and daemon starts each run); zero leftover processes/worktrees; shared repo's README.md confirmed untouched both times (~9800 tok)
- `test-version-startup-consistency.sh` — test-version-startup-consistency.sh — build-time-versioning task 6.2 (~6131 tok)
- `test-xceadmin-build-install-version.sh` — build-time-versioning task 6.3 (LAST task in spec): real `nix develop $SRC_DIR --command bash xce-build.sh xceadmin release <dir>` (meson-driven: schema sync, pinned venv install, pytest, wheel build), then installs the wheel into one fresh scratch venv and does `pip install -e src/xceadmin` into a second fresh scratch venv (both venv creation/pip install/`xceadmin --version` runs happen inside `nix develop` -- confirmed live that pycapnp's prebuilt PyPI wheel needs the nix devshell's libstdc++.so.6 resolution, absent on the bare host). Extracts the `(<commit>, <build_time>)` suffix from `xceadmin --version`'s "xceadmin, version <pkgver> (...)" output (isolating that line first via `VERSION_LINE_ANCHOR` grep before parsing parens, since captures are `2>&1` and include `nix develop`'s own "Git tree is dirty" stderr noise) and asserts: wheel install = real (non-`unknown`) fields; editable install = `unknown`/`unknown` (task 5.2 stub); the two DIFFER. `demonstrate_detection_capability()` proves synthetic unknown-in-wheel / real-in-editable / identical-outputs are all rejected. Cleanup always sweeps `.egg-info`/`__pycache__`/`.pytest_cache` left in the real `src/xceadmin` tree by the editable install (even with `--keep-artifacts`), plus the scratch venvs and meson build dir. Live-verified passing twice, `git status --porcelain` on `src/xceadmin` clean after each run (~4900 tok)
- `test-xceadmin-build-install-version.sh` — test-xceadmin-build-install-version.sh — build-time-versioning task 6.3 (~5819 tok)
- `xce-build.sh` — build-time-versioning task 2.1 computes commit_id (git rev-parse --short HEAD [+ -dirty]) + build_time (date -u) once per invocation, appended to MESON_OPTS for every profile. dirty-content-fingerprint task 2.1 (2026-08-21) adds a NEW, independent `dirty_fingerprint` computation right after that block (commit_id/build_time untouched): empty on a clean tree; sha256 (8 hex chars) over `git diff HEAD` + sorted raw content of `git ls-files --others --exclude-standard` when dirty; empty (never fabricated) if the hash computation itself fails (e.g. sha256sum missing) -- every intermediate command is guarded via explicit `if`/`elif` so a failure degrades gracefully instead of tripping the script's own `set -euo pipefail`. Uses two `mktemp` scratch files (cleaned up unconditionally), zero working-tree/index mutation. Appended as `-Ddirty_fingerprint="$dirty_fingerprint"` on the same MESON_OPTS line as commit_id/build_time, so it reaches every profile (asan/debug/release) identically. Live-verified via real `nix develop ... xce-build.sh scheduler debug`+`lib asan`+`lib release` builds against `compile_commands.json`'s `-DVERSION_DIRTY_FINGERPRINT=`: edit-A -> hash X, edit-B -> different hash Y, revert-to-A -> hash X again exactly, `.bak`-gitignored file added -> hash unchanged; `commit_id`'s `-dirty` suffix confirmed unaffected throughout. `set -euo pipefail` means its bundled scheduler-suite `meson test` failing (bug-1560) makes the WHOLE invocation exit non-zero even when compile succeeded (~4400 tok)
## src/worker/src/
- `controller_connector.c` — include "client.h"; jobid-readability (2026-08-21): 21 job-id `%lu` log sites across 10 functions (`dump_startjob_request`, `job_start_remote_task`, `job_start_local_task`, `handle_startjob`, `handle_runtasks`, `handle_fetchfile`, `handle_jobcontrol`, `xcecd_job_remote_start`, `xcecd_jobrusage_update`) now render via `fmt_jobid()` into a local `jobidStr[64]` instead of raw uint64; `handle_fetchfile`'s `offset=%lu` byte-offset field is NOT a jobid and was left raw (~18100 tok)
- `main.c` — include "sqlite3.h"; jobid-readability (2026-08-21): 4 job-id `%lu` log sites (`master_disconnect_callback`, `master_job_status_callback`, `master_ckpt_result_callback`, `master_rusages_callback`) now render via `fmt_jobid()` into a local `jobidStr[64]` instead of raw uint64 (~6282 tok)
- `resource_sync.c` — include "resource_sync.h" (~3926 tok)
- `xcecd_dbus_manager.c` — include "xcecd_dbus_manager.h"; dbus_workers_update() (bug-1589 FIX): worker-list `while` loop now captures `next = worker->next` up front and every early continue/return advances to it, instead of re-testing the same worker forever or `return true`-aborting the whole scan on the first WORKER_DONE/EXITED node (~3755 tok)
- `uv_ipc.c` — include "uv_ipc.h" (~12231 tok)
- `xcecd_cgroups.c` — include "xcecd_cgroups.h"; jobid-readability (2026-08-21): `collect_job_rusages()`'s rusage TRACE log job-id `%lu` -> `fmt_jobid()`/`jobidStr[64]`; the `xcecd-worker-%lu.service` unit-name snprintf (line ~1406) deliberately left untouched (behavioral, not log formatting) (~13889 tok)
- `xcecd_dbus_manager.c` — include "xcecd_dbus_manager.h"; jobid-readability (2026-08-21): `dbus_stop_all_workers()`'s "Job %lu killed" log -> `fmt_jobid()`/per-iteration `jobidStr[64]` (~3777 tok)
- `xcecd_worker_utils.c` — include "xcecd_worker_utils.h"; jobid-readability (2026-08-21): 9 job-id `%lu` log sites across `update_worker_status()` (6, shared one `jobidStr[64]` populated once after `job->job_id` is set), `find_worker_by_jobid()`, `resend_job_status()` (per-iteration buffer), `check_worker_sleep_time_elapsed()` -> all now `fmt_jobid()` (~4658 tok)
- `xcecd_worker.c` — include "inter_job_utils.h"; jobid-readability (2026-08-21): 30 job-id `%lu` log sites (31 conversions, `worker_signal_callback`'s "Signal for job X but current job is Y" line has two) across `on_rusage_timer`, `xjob_start_vnc`/`xjob_stop_vnc`, `worker_job_callback` (11, shared one `jobidStr[64]` populated once after `jobid = info->job_id`), `worker_signal_callback` (`jobidStr` for param `job_id` + separate `curJobidStr` for global `jobid`), `do_criu_ckpt`, `worker_ckpt_callback` -> all now `fmt_jobid()`; `snprintf(ckpt_dir, ..., "%s/%lu", CKPT_BASE, job_id)` (on-disk path, not a log) intentionally left raw (~12812 tok)
- `xcecd.c` — fake pids used in virtual cluster; jobid-readability (2026-08-21): `xcecd_process_command()`'s "No startinfo provided, job %lu" log -> `fmt_jobid()`/`jobidStr[64]` (~5154 tok)
## src/worker/testsuite/
@ -1011,13 +1142,15 @@
## src/xceadmin/
- `meson-build.sh` — Meson-driven xceadmin build: install + test out-of-tree, in the meson (~1044 tok)
- `meson-build.sh` — Meson-driven xceadmin build: install + test out-of-tree, in the meson; dirty-content-fingerprint task 5.1 (2026-08-21): reads new $8 positional `dirty_fingerprint` (independent empty-string fallback, NOT "unknown"), writes `DIRTY_FINGERPRINT` as a third field into generated `_build_info.py`. Live-verified: dirty tree -> real hash matching compile_commands.json's `-DVERSION_DIRTY_FINGERPRINT=`; `-Ddirty_fingerprint=` explicit empty -> `DIRTY_FINGERPRINT = ""` while GIT_COMMIT/BUILD_TIME still fall back to "unknown" independently; 261 tests pass in all scenarios (~2100 tok)
- `meson.build` — xceadmin (admin-config-tool): Python package, no C compilation; dirty-content-fingerprint task 5.1: custom_target gains a third positional arg `get_option('dirty_fingerprint')` after commit_id/build_time (~1140 tok)
- `pyproject.toml` — XCE cluster configuration admin CLI (config build / config push) (~662 tok)
## src/xceadmin/src/xceadmin/
- `cli.py` — xceadmin command-line entry point (design.md, ``xceadmin.cli``; (~3290 tok)
- `_build_info.py` — Committed fallback build-info stub (build-time-versioning task 5.2; (~360 tok)
- `cli.py` — xceadmin command-line entry point (design.md, ``xceadmin.cli``; (~4225 tok)
## src/xceadmin/tests/
- `test_cli.py` — Tests for the xceadmin CLI (design.md, ``xceadmin.cli``; task 1.1's (~6916 tok)
- `test_cli.py` — Tests for the xceadmin CLI (design.md, ``xceadmin.cli``; task 1.1's (~8975 tok)