Commit graph

368 commits

Author SHA1 Message Date
e83d207afd
fix(wolf): log bug-1678, gitea #43 IS reproducible -- corrects earlier false negative
The prior verification pass (commit 1c9cfc1, same session) restarted
controller+scheduler+worker but left the apiserver running, so it only
ever saw the apiserver's stale, still-correct in-memory job cache from
before the restart -- never the controller's actual post-recovery
state. Repeating the test with the apiserver also restarted (matching
the original report's "restart all daemons" exactly) reproduces the
bug immediately: EXEC_HOST stays permanently blank across 15 polls/30s
while STATUS correctly shows RUN throughout.

Root cause fully traced: dispatch_a_job_() (job.c:1343-1372) sets
job.allocs in memory at dispatch-commit time but the durable
WAL_JOB_DISPATCH fact (persist_submit_job_fact, wal_jobstate_t
{jobid,state}) never carries the allocation. On a full restart,
restore_job() replays only the pre-dispatch WAL_JOB_SUBMIT payload
(allocs empty by construction) and apply_committed_entry()'s
WAL_JOB_DISPATCH case routes through apply_job_update_transition(),
which by design "only ever touches state" -- job.allocs is never
reconstructed. Controller log corroborates: recovery trace shows the
WAL_JOB_DISPATCH replay applying silently (no log on the APPLIED
path), followed by each job's WAL_JOB_START fact correctly logging a
now-redundant "duplicate UPDATE ... no-op".

Fix direction confirmed with the user: WAL_JOB_DISPATCH's payload
needs to carry the scheduler's resource allocation, not just
{jobid, state}, with a corresponding decode/apply path in
apply_committed_entry() -- not implemented here, this is a
reproduce-and-root-cause pass only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
2026-08-24 13:52:07 +00:00
1c9cfc1f10
fix(wolf): log 4 reproduced Gitea issues (#40-42, #44) + 1 discovered gitea-sync bug
Live-reproduced and root-caused on branch scheduler-framework via a
single-node deploy:

- bug-1673 (gitea #40): apiserver hosts-list MAX_SLOT stuck at 0 for
  workers not exact-name-matched in hosts.yaml -- display-only, C-side
  scheduling correctly uses the wildcard 'default' entry's slot count.
  Reporter's secondary "hard 8-job cap" claim did NOT reproduce.
- bug-1674 (gitea #41): `xcecli jobs list -l` fails outright (not just
  missing timestamp fields as reported) -- two call sites validate
  field lists against JobSubmitRequest instead of JobInfo.
- bug-1675 (gitea #42): connection-refused right after apiserver
  startup surfaces a raw OS error string instead of a friendly message.
- bug-1676 (gitea #44): FROM_HOST always blank -- capnp schema has no
  from_host field, and OnJobUpdated's blind store overwrite wipes the
  apiserver-local value set at creation on the first controller push.

Gitea issue #43 (EXEC_HOST lost after daemon restart) was NOT
reproduced after two restart cycles with WAL-preserving state --
EXEC_HOST/state recovered correctly in every poll. Not logged as a bug;
a related design gap (WAL_JOB_DISPATCH only carries {jobid, state}, not
allocs) was flagged as an unconfirmed latent risk, not a live finding.

bug-1677: scripts/gitea-sync.py's sync_bugs() reads buglog.json as a
bare list but the real format is the {version, bugs: [...]} wrapper --
would crash on any real run. Found via static review while checking
the gitea_issue cross-reference field convention; not executed live.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
2026-08-24 13:40:47 +00:00
0f2ca9ebb5
chore(wolf): sync anatomy/memory/hooks bookkeeping
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
2026-08-24 13:04:24 +00:00
755976fcf2
fix(wolf): renumber 40 buglog entries that collided after Aug 13-17 counter restart
39 duplicate IDs (one tripled: bug-909) in the bug-875-bug-949 range,
where a restarted counter re-used IDs already held by June 21-22
entries. Kept each original (earliest timestamp) untouched and
renumbered the 40 later collisions to bug-1633..bug-1672 (new global
max, up from 1632), preserving array order. Verified no related_bugs
reference pointed at a renumbered entry -- the 10 existing references
to bug-924 all predate the Aug 17 collision and correctly resolve to
the original ENOSPC/overlayfs entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
2026-08-24 13:04:04 +00:00
f2b5f9c916
chore: untrack .wolf/dashboard-token, gitignore it going forward
Committed at 90be04bd. Dashboard is LAN-only and never exposed
externally, so no history scrub -- just stop tracking the token file
so it's not re-added on the next wolf bookkeeping commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
2026-08-24 13:00:55 +00:00
5573ae22c1
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
2026-08-24 12:56:39 +00:00
548ad9b2e2
chore(wolf): checkpoint buglog.json (1013 bugs) 2026-08-23 22:04:06 +00:00
5591f3603f
chore(wolf): checkpoint buglog.json (1013 bugs) 2026-08-23 21:17:20 +00:00
d4ada4474b
chore(wolf): checkpoint buglog.json (1012 bugs) 2026-08-23 19:35:33 +00:00
65390fb111
chore(wolf): checkpoint buglog.json (1011 bugs) 2026-08-23 18:02:38 +00:00
f756c4b09f
chore(wolf): checkpoint buglog.json (1011 bugs) 2026-08-23 17:21:12 +00:00
d87f4bb333
chore(wolf): checkpoint buglog.json (1011 bugs) 2026-08-23 10:13:25 +00:00
006b1b6aea
chore(wolf): checkpoint buglog.json (1011 bugs) 2026-08-23 08:36:15 +00:00
0649050ae8
chore(wolf): checkpoint buglog.json (1010 bugs) 2026-08-23 08:16:37 +00:00
018c1a818c
chore(wolf): checkpoint buglog.json (1009 bugs) 2026-08-23 08:04:48 +00:00
5e34f1f571
chore(wolf): checkpoint buglog.json (1008 bugs) 2026-08-23 04:50:57 +00:00
f8b24a993f
chore(wolf): checkpoint buglog.json (1007 bugs) 2026-08-23 04:10:48 +00:00
45acce4184
chore(wolf): checkpoint buglog.json (1005 bugs) 2026-08-23 02:56:14 +00:00
5d194db9b1
chore(wolf): checkpoint buglog.json (1004 bugs) 2026-08-22 12:48:23 +00:00
75edb7a329
chore(wolf): checkpoint buglog.json (1003 bugs) 2026-08-22 09:50:28 +00:00
c38207458f
chore(wolf): checkpoint buglog.json (1002 bugs) 2026-08-22 08:24:41 +00:00
76ca61547e
chore(wolf): checkpoint buglog.json (1001 bugs) 2026-08-22 07:13:00 +00:00
230083ae5d
chore(wolf): checkpoint buglog.json (1001 bugs) 2026-08-22 03:24:37 +00:00
5f7e1e98be
docs(scheduler): document driver-equivalence invariant, scope decision-parity fix spec
Elevates the normal-mode/simulation-mode driver equivalence guarantee
from a one-line architectural description in CLAUDE.md to an enforced
steering constraint (scheduler-driver-equivalence.md), backed by
bug-1611/bug-1613 as concrete evidence of violation. Scopes the fix as
its own spec (scheduler-sim-decision-parity, requirements + design)
rather than reopening the closed scheduler-core spec or folding it
into scheduler-sim-repl-verbosity's explicitly narrower boundary.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 03:07:05 +00:00
5d25925a01
merge working 2026-08-22 02:57:19 +00:00
20dbf35b8c
chore(wolf): sync anatomy/memory/hooks/token-ledger bookkeeping
Routine OpenWolf/harness bookkeeping drift since the last sync (94fd150) --
no source changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 02:53:38 +00:00
25e35bacaf
docs(scheduler): document driver-equivalence invariant, scope decision-parity fix spec
Elevates the normal-mode/simulation-mode driver equivalence guarantee
from a one-line architectural description in CLAUDE.md to an enforced
steering constraint (scheduler-driver-equivalence.md), backed by
bug-1611/bug-1613 as concrete evidence of violation. Scopes the fix as
its own spec (scheduler-sim-decision-parity, requirements + design)
rather than reopening the closed scheduler-core spec or folding it
into scheduler-sim-repl-verbosity's explicitly narrower boundary.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 02:52:00 +00:00
94fd1504e9
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>
2026-08-22 02:48:22 +00:00
811b5a11ec
chore(wolf): checkpoint buglog.json (1001 bugs) 2026-08-21 16:10:59 +00:00
044846c773
chore(wolf): checkpoint buglog.json (1001 bugs) 2026-08-21 15:58:38 +00:00
b58311f85f
chore(wolf): checkpoint buglog.json (1000 bugs) 2026-08-21 15:20:27 +00:00
7d47b8fe2a
chore(wolf): checkpoint buglog.json (1000 bugs) 2026-08-21 10:54:52 +00:00
fd53525651
chore(wolf): checkpoint buglog.json (996 bugs) 2026-08-21 09:40:27 +00:00
eeb7a9b4db
chore(wolf): checkpoint buglog.json (995 bugs) 2026-08-21 09:00:26 +00:00
995673e7cf
chore(wolf): checkpoint buglog.json (994 bugs) 2026-08-21 07:26:41 +00:00
5c8edda64c
chore(wolf): checkpoint buglog.json (993 bugs) 2026-08-21 07:00:03 +00:00
340c5a83e8
chore(wolf): checkpoint buglog.json (992 bugs) 2026-08-21 06:47:59 +00:00
13fc840f8c
chore(wolf): checkpoint buglog.json (991 bugs) 2026-08-21 04:19:26 +00:00
176f0cf835
chore(wolf): checkpoint buglog.json (989 bugs) 2026-08-20 16:24:02 +00:00
43c7384fd6
chore(wolf): checkpoint buglog.json (986 bugs) 2026-08-20 15:07:27 +00:00
bc5c669b94
feat(build-time-versioning): worker --version and startup log
Worker uses plain getopt_long(), not argp, so it has no free --version
handling like controller/scheduler. Adds a long-only OPT_VERSION=257
option and a handling case that computes xce_compose_version() into a
static buffer and returns before any startup work (check_user()/
xcecd_init/xcecd_start). Both startup INFO log branches (--peers and
no-peers) extended to log the identical buffer.

Live-verified: --version and both startup-log branches are
byte-identical (captured via a real daemon run under sudo).

Also updates bug-1519 (pre-existing, unrelated ASAN "Joining already
joined thread" abort during worker shutdown): independently reproduced
under real root during this task's review, refining its prior "never
reproduced under real root" note -- not a userns/unshare artifact, still
unfixed, does not affect this task's code path.

Task 3.3/13 of build-time-versioning. This closes out the "Core: C
daemon version display" phase (tasks 3.1-3.3).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-20 11:47:12 +00:00
854f776733
chore(wolf): checkpoint buglog.json (986 bugs) 2026-08-20 10:50:08 +00:00
afc3f4a4f3
chore(wolf): checkpoint buglog.json (986 bugs) 2026-08-20 10:38:28 +00:00
dc574abf54
chore(wolf): checkpoint buglog.json (984 bugs) 2026-08-20 09:21:42 +00:00
12408a384b
chore(wolf): checkpoint buglog.json (983 bugs) 2026-08-20 08:10:26 +00:00
8abab049f4
feat(scheduler): show event time/session in sim echo, total sessions on replay load
repl_print_event_summary() (interactive REPL event echo) now prefixes
each echoed event with "[sim] t=<ns> (<human>) session=<N>", using the
same xce_core_now()/repl_format_ts_human()/session_count sources "info
session" already reports. Uses session_count+1, not the raw count:
events stream in and are echoed individually before the ReplaySession/
begin_round message that increments session_count is even read (file
order is event, event, ..., ReplaySession), so an echoed event always
belongs to the session about to begin.

Add sim_prescan_session_count() (sim.c): scans the replay file from the
current position via shape-only classification (mirroring sim_loop.c's
own ReplayEvent/ReplaySession/SnapshotEntry dispatch), counts
ReplaySession messages, then rewinds via fseek back to the exact ftell()
position -- same rewind technique sim_locate_and_load_snapshot() already
uses. Wired into sched_sim_driver_start(): prints "[sim] replay file
contains N sessions" once at load, non-fatal on scan failure.

Add test_replay_load_reports_total_session_count; extend
test_step_echoes_events_before_session_decisions with t=/session=1
assertions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-20 07:48:43 +00:00
4e3e6332c5
chore(wolf): checkpoint buglog.json (982 bugs) 2026-08-20 07:33:10 +00:00
51063c1dc8
chore(wolf): checkpoint buglog.json (981 bugs) 2026-08-20 04:25:28 +00:00
5147396d0e
fix(controller): job start_time/finish_time/run_time never set by apply-pump
apply_committed_entry()'s shared WAL_JOB_START/FINISH/STOP/RESUME/RUSAGE/
CKPT/PREASON dispatch case only ever called the generic, state-only
apply_job_update_transition(j, state) -- start_time/finish_time/run_time
were never touched, so `xcecli joblist` always showed StartTime=0 for
RUN/DONE/EXIT jobs and FinishTime=0 for DONE jobs (EXIT jobs got a
finish_time only via the separate, richer WAL_JOB_FAIL dispatch path).

Fix is additive: stamp time(NULL) keyed on wal_type right after
apply_job_update_transition() succeeds, still under the same
lock(j, RTTI_LOCK_WRITE) -- WAL_JOB_START sets start_time, WAL_JOB_FINISH
sets finish_time and derives run_time. No change to
apply_job_update_transition()'s signature or the dispatch structure.

Add test_ace_job_start_sets_start_time and
test_ace_job_finish_sets_finish_time_and_run_time to
test_apply_committed_entry.c, following the existing tace_seed_job
fixture pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-20 04:24:44 +00:00
008553e982
chore(wolf): checkpoint buglog.json (981 bugs) 2026-08-20 04:10:26 +00:00