rehearsal-cycle.sh release-path nudge: a freed drive slot re-dispatches the stalest repo's swarm (dev-factory #45 follow-up) #739
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#739
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Consumer follow-up from
Matou/dev-factory#45 (a freed host slot re-dispatches the stalest repo's swarm, not the loudest's). #45 fixed the factory side in two parts:schedule-backstop.sh order-reposorders repos stalest-first by their/tmp/matou-swarm-lastready-<owner>-<repo>stamp, andsession-runner.shfires one backstop nudge on its release path (host_capacity_release_heavy→SESSION_RUNNER_NUDGE) so a freed slot is consumed within ~a minute instead of up to a full backstop/cron window.The rehearsal drive's release path (
rehearsal-cycle.shin this repo) does NOT yet do the same nudge. When a rehearsal drive finishes and releases the host's exclusive capacity, nothing fires a backstop tick, so the freed capacity sits idle until the next clock-aligned probe — the same starvation #45 addressed for the session-runner path, on the drive path.Ask
After
rehearsal-cycle.shreleases the host capacity it held (its EXIT/release path), fire ONE non-blocking backstop tick (the host's<home>/factory-cron/backstop-tick.sh, which dev-factory #45 made dispatch stalest-first) so the stalest repo's swarm is dispatched onto the just-freed slot. Never camp, never queue: one non-blocking dispatch; a nudge that finds the slot already re-taken just loses like any other probe.Acceptance
rehearsal-cycle.sh's release path emits exactly one nudge per drive end (no nudge on a yielded/absorbed tick), mirroring dev-factorytests/session-runner-test.shcase 15.Filed by the dev-factory swarm while working dev-factory #45 (ask 3 — "file that ticket in idss, it's not factory-owned").
Redundancy check: searched
scripts/rehearsal-cycle.shfor any existing nudge/backstop dispatch on its release path — none exists. Its host-capacity release traps (host_capacity_drive_release, extended later todrive_status_clear "$root"; host_capacity_drive_release) only clear local reservation/status state; nothing fires a dispatch. Not already implemented. No.out-of-scope/entry matches (empty directory). Not a protected-path change — the release path lives underscripts/, not.sandcastle/or.forgejo/, so a swarm worker can take it directly (ready-for-agent, notready-for-session).Agent Brief
Category: enhancement
Summary: The rehearsal drive's release path should fire one non-blocking backstop nudge, mirroring dev-factory #45's session-runner release nudge, so a freed host slot is consumed promptly instead of sitting idle until the next clock-aligned probe.
Current behavior:
When a rehearsal drive finishes (completion or abandonment) and releases the host capacity it held, only its own reservation and drive-status record are cleared. Nothing signals the host's stalest-first backstop dispatcher that a slot just freed up, so the freed capacity sits idle until the next scheduled probe — the same starvation pattern dev-factory #45 fixed for the session-runner's release path, not yet mirrored here.
Desired behavior:
On release — but only for a tick that actually acquired host capacity and is now giving it back, never for a tick that yielded because capacity was busy — fire exactly one non-blocking dispatch of the host's stalest-first backstop tick (the same mechanism dev-factory's session-runner release path already invokes:
host_capacity_release_heavy→ a backstop nudge). The call must not block waiting on the backstop script's own dispatch decision; a nudge that finds the slot already retaken loses like any other probe, with no retry or camping.Key interfaces:
Acceptance criteria:
tests/session-runner-test.shcase 15 pattern) exercises the release path and asserts exactly one nudge invocation per drive that acquired capacity and then completed or was abandoned.Out of scope:
session-runner.shor backstop dispatch script — this ticket only wires the idss-side release path to call the existing mechanism.swarm-claim host=elitebook-distributed-server-03 run=9579
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #739 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
09ca7197d6is not reachable from origin/main (not landed)envelope
close-report for #739 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope