fix(deploy): stop stale pending deployments from blocking agent self-update #142
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gmackie/ForgeGraph!142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/stale-deploy-selfupdate"
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?
Closes the recurring zombie-deployment problem (testgame → labnuc, offline since Jun 7; blocked the 0.1.36 rollout on master).
Server —
reapStaleDeploymentsnow also expirespendingdeployments whose target node has not heartbeated for 10+ minutes (row must also have waited 10+ min), journal: node offline, re-create when it returns. 10 min > CF_CLAIM_TTL_MS (5 min), so re-claimable CF Workers rows migrate to an online node before expiry.Agent —
runCyclesetdeployingwhenever the poll returned any deployment, including rows it skips every cycle (unhandleable CF Workers, empty flake ref), so the end-of-cycle self-update check deferred indefinitely. The flag is now set lazily viawillExecuteDeployment, which mirrors the dispatch loop skip conditions (unit-tested).TDD: red-first tests for both sides (
deployment-reaper.test.ts,deploy_gate_test.go). Full agentgo test ./...,go vet, andapps/webtypecheck green.Note: the current live zombie (
6d363980, testgame development → labnuc, pending since Jul 25) should be reaped automatically by the next poll after this deploys — will verify post-merge.🤖 Generated with Claude Code