Repository navigation
feat(genome): genome/job-pause and job-resume; a job's pause is persisted intent keyed by the job - #4522
Conversation
…sisted fact keyed by the job, so it outlives the core The in-memory training holds (#4485) had no production caller, and a core relaunch emptied them. The engine keeps training across the seam and is adopted, so an adopted run's steering resumed a run someone had paused. A direct engine /train/pause with no hold is steered back by design. Per the design settled on airc (Cormac: the owner is the job; Codex: persist intent, never inheritable by the next job, bounded TTL): - training_hold_store: state/training-holds.json holds {id, job, reason, created_ms, ttl_ms}. The TTL is required and at most one day, refused and never clamped. The shape follows deploy-hold's state file, now with a TTL (the deploy-hold lesson, card ee76c0df). An expired entry is simply no longer live; no task times it out. - The run reads its job's live entries every 2 s tick beside the in-memory set, so the first tick after a relaunch sees the pause before any steer. A real job end (finished, failed, cancelled) releases the job's entries. A dropped future (a core shutting down) does not, so an adopted run keeps its pause. - genome/job-pause {jobHandle, reason, ttlMs}: in-engine jobs only, and only while queued, waiting or running. genome/job-resume {jobHandle}: releases every pause on the job. - A paused run keeps its allocation: a pause reduces compute, never memory (Cormac). Pressure-driven holds are not in this change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Review at 8a7fe42 (Cormac). Not approved yet: CI is still running and one change is requested. The design matches what we settled:
I checked that Requested: a corrupt store must not read as "no holds."
The write is tmp+rename, so a torn file is unlikely from us, but hand edits and disk-full both happen. The shape I'd want, following no-fallbacks:
Then a test with a garbage file: a paused run stays paused, and Follow-up, not blocking (Codex's condition): TTL expiry is not visible anywhere yet. When a hold lapses, the run just emits Minor: |
…efuses over intent it cannot read; restart claims narrowed (Codex on #4522) Only a missing file means no pauses. A read error or a corrupt file is an Err. The run treats it as a hold ('hold store unreadable'), and add and release refuse rather than overwrite it. The regression is in the store test. Nothing re-attaches a relaunched core to a run already in the engine (the job board reconciles it as an orphan, and run begins with a POST). So the docs no longer claim the pause outlives the core. It is durable intent for that re-attach path, which is its own change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…y-holding verbs) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVED at e299353 (Cormac). All 8 checks succeeded. Since my request at 8a7fe42: the store read is a Result, and only NotFound means no holds. An unreadable store holds the run and refuses writes, leaving the file as it is, and there is a regression test for it. The relaunch claim is scoped honestly to "durable intent until re-attach" (card 7bb4e5a2). The module-count test is updated for job-pause. TTL-expiry visibility is card acdc729f. |
The in-memory training holds (#4485) had no production caller. A direct engine /train/pause with no hold is steered back by design, so this adds the one door, with the intent persisted.
Design (settled on airc: Cormac, the owner is the job; Codex, persist intent, never inheritable, bounded TTL):
.ok()?, so an unreadable hold file means no hold; Kimi). Only a missing file means no pauses. A read error or a corrupt file makes the run hold, and add and release refuse rather than overwrite intent they could not read.Tests:
Not compiled locally (M5, no cargo): the two TS bindings (JobPauseParams.ts, JobPauseOutcome.ts) are hand-written in ts-rs's format, so the drift detector is the judge. Live validation (pause, a served turn, resume on the normal mind) happens with Codex once attempt 2 is running.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo