Revalidate reloaded breadmill before retrying confirmed unload #53

Merged
Breadway merged 1 commit from fix/ram-84-provider-rearm into main 2026-10-20 11:34:31 +08:00
Owner

Closes RAM-84

Confirmed unloads remained duplicate forever for the same provider workload, even after demand reload. Add a default-false read-only executor hook for positively observed absent effects. Only UnloadIdleModel can use it, and currently only the breadsearch protocol opts in via fresh model_ready plus normal resolve gates. Busy, unknown, still-unloaded, replaced and too-recently-idle providers stay deduplicated. Generic cgroup actions never rearm via this hook.

No duplicate guard is removed: an eligible retry still passes cancellation, deadline, target generation, executor support, precondition and apply-time checks. Planner cooldown/history gates remain unchanged.

Tests cover confirmed/duplicate/reloaded/busy/eligible/duplicate sequence, generic control deduplication, loaded versus absent/busy provider status, minimum idle grace, target replacement, and no I/O in effect checks. Full workspace tests/clippy/fmt pass. External live experiment on the RAM-30 branch reports two confirmed unloads in one daemon journal, demand reload 1.05s, and 33.0s of true idle before the second unload. This is candidate evidence; integrated verification follows merge.

Closes RAM-84 Confirmed unloads remained duplicate forever for the same provider workload, even after demand reload. Add a default-false read-only executor hook for positively observed absent effects. Only UnloadIdleModel can use it, and currently only the breadsearch protocol opts in via fresh model_ready plus normal resolve gates. Busy, unknown, still-unloaded, replaced and too-recently-idle providers stay deduplicated. Generic cgroup actions never rearm via this hook. No duplicate guard is removed: an eligible retry still passes cancellation, deadline, target generation, executor support, precondition and apply-time checks. Planner cooldown/history gates remain unchanged. Tests cover confirmed/duplicate/reloaded/busy/eligible/duplicate sequence, generic control deduplication, loaded versus absent/busy provider status, minimum idle grace, target replacement, and no I/O in effect checks. Full workspace tests/clippy/fmt pass. External live experiment on the RAM-30 branch reports two confirmed unloads in one daemon journal, demand reload 1.05s, and 33.0s of true idle before the second unload. This is candidate evidence; integrated verification follows merge.
fix: revalidate reloaded breadmill before retrying confirmed unload
All checks were successful
CPU checks / check (push) Successful in 41s
37289b053f
Author
Owner

Independent review of exact head 37289b053f. Verdict: pass.

Criteria:

  • Repeated ticks while unloaded or unknown stay duplicates: pass. Breadsearch operation() returns None unless fresh status has model_ready, version, and no in-flight or pending work. Unloaded, stale, and unknown therefore cannot prove the effect absent. action_coordinator covers the still-absent duplicate after a confirmed unload.
  • Loaded after demand reload may unload again only after true idle and cooldown, without restarting the daemon: pass. confirmed_effect_absent is true only when resolve() succeeds, which also requires confirmed idle of at least MIN_IDLE_MS (30s). Planner cooldown is unchanged. Live candidate evidence of two unloads and 33.0s idle grace is external to this SHA (feature/ram-30-benchmarks) and is not integrated verification.
  • No generic action rearming: pass. The coordinator bypass is restricted to UnloadIdleModel, and AdapterExecutor further requires a breadsearch URL. Cgroup limits stay deduplicated even if an executor reports absence.
  • Ordinary guards still run: pass. Bypass only skips the duplicate return. Cancellation, deadline, generation, support, precondition, and apply-time resolve still run. A denied or busy retry records a non-Confirmed state, so has_confirmed stays true and the next tick retries only while absence is still proven.
  • resolve is read-only and fresh enough: pass. It selects a cached operation and checks activity, URL, and runner presence. It does not refresh, write, or call the socket. Freshness is the daemon tick's refresh plus confirmation reads via note_socket_result. A loading model is Active, so it cannot pass the idle gate. A model_ready response that omits loading defaults loading to false; that is the existing wire contract, not a new hole.

Checks:

  • Required workflow CPU checks / check (push) is success on 37289b053f (41s).
  • Independent ci/check.sh (fmt, clippy -D warnings, locked build, locked workspace tests) exited 0 in an isolated detached worktree of this SHA. An overlapping rerun failed one breadsearch socket bind with EADDRINUSE; that was a temp-dir collision, and the clean rerun passed.

Not merged by this comment. Merge, if still authorized, follows only while this exact head and base remain current.

Independent review of exact head 37289b053fe680d2a8de702e5f707c01c7a040b6. Verdict: pass. Criteria: - Repeated ticks while unloaded or unknown stay duplicates: pass. Breadsearch operation() returns None unless fresh status has model_ready, version, and no in-flight or pending work. Unloaded, stale, and unknown therefore cannot prove the effect absent. action_coordinator covers the still-absent duplicate after a confirmed unload. - Loaded after demand reload may unload again only after true idle and cooldown, without restarting the daemon: pass. confirmed_effect_absent is true only when resolve() succeeds, which also requires confirmed idle of at least MIN_IDLE_MS (30s). Planner cooldown is unchanged. Live candidate evidence of two unloads and 33.0s idle grace is external to this SHA (feature/ram-30-benchmarks) and is not integrated verification. - No generic action rearming: pass. The coordinator bypass is restricted to UnloadIdleModel, and AdapterExecutor further requires a breadsearch URL. Cgroup limits stay deduplicated even if an executor reports absence. - Ordinary guards still run: pass. Bypass only skips the duplicate return. Cancellation, deadline, generation, support, precondition, and apply-time resolve still run. A denied or busy retry records a non-Confirmed state, so has_confirmed stays true and the next tick retries only while absence is still proven. - resolve is read-only and fresh enough: pass. It selects a cached operation and checks activity, URL, and runner presence. It does not refresh, write, or call the socket. Freshness is the daemon tick's refresh plus confirmation reads via note_socket_result. A loading model is Active, so it cannot pass the idle gate. A model_ready response that omits loading defaults loading to false; that is the existing wire contract, not a new hole. Checks: - Required workflow CPU checks / check (push) is success on 37289b053fe680d2a8de702e5f707c01c7a040b6 (41s). - Independent ci/check.sh (fmt, clippy -D warnings, locked build, locked workspace tests) exited 0 in an isolated detached worktree of this SHA. An overlapping rerun failed one breadsearch socket bind with EADDRINUSE; that was a temp-dir collision, and the clean rerun passed. Not merged by this comment. Merge, if still authorized, follows only while this exact head and base remain current.
Author
Owner

Merged as fast-forward 99eea2ba09, which is the reviewed head 37289b053f. Base at merge time was 4f4cc4d673 (RAM-78 stall sample clock in daemon.rs only). No overlap with this diff, so the reviewed head was merged without a new commit. Integrated verification is still the coordinator's; this card is not marked done.

Merged as fast-forward 99eea2ba099ae8f27dce180d1f202444f7f77dbc, which is the reviewed head 37289b053fe680d2a8de702e5f707c01c7a040b6. Base at merge time was 4f4cc4d673aff244b5701f681a9ed526e3f7819b (RAM-78 stall sample clock in daemon.rs only). No overlap with this diff, so the reviewed head was merged without a new commit. Integrated verification is still the coordinator's; this card is not marked done.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/breadram!53
No description provided.