myxce/src/scheduler
Rongsong Shen 7494542a60
feat(scheduler-core): implement periodic snapshot checkpointing (task 9.3)
Periodic checkpointing hooks into sched_record_write_events(): once per
call, when record_snapshot_interval > 0 and record_event_count crosses a
multiple of it, writes a fresh SnapshotEntry via the same
write_snapshot_entry() helper sched_record_start() already uses (made
non-static, zero duplication). Safe from the session_active precondition
because this call site is only ever reached from
xce_sched_driver_translate_pending_events(), which always runs strictly
between sessions.

Confirmed the write-failure error-handling half (AC 10) was already
complete from task 9.2's sched_record_abort_on_error() -- added the
missing end-to-end test using a genuine closed-fd write failure rather
than a mocked return code, proving the driver keeps processing sessions
afterward.

25/25 scheduler suite, clang-format clean. Two non-blocking follow-ups
logged in tasks.md: --record-snapshot-interval has no CLI wiring yet
(AC 11's own struct-field mechanism is fully tested, but nothing sets it
in production), and test_record_lifecycle.c has grown past this suite's
prior size precedent with a natural future split point identified.
2026-08-05 10:02:16 +00:00
..
include feat(scheduler-core): implement periodic snapshot checkpointing (task 9.3) 2026-08-05 10:02:16 +00:00
src feat(scheduler-core): implement periodic snapshot checkpointing (task 9.3) 2026-08-05 10:02:16 +00:00
testsuite feat(scheduler-core): implement periodic snapshot checkpointing (task 9.3) 2026-08-05 10:02:16 +00:00
CLAUDE.md enhance xce-build skill 2026-05-30 08:13:59 +08:00
meson.build feat(scheduler-core): implement record start/stop lifecycle (task 9.2) 2026-08-05 09:07:51 +00:00