feat: bound reconcile Step with a watchdog timeout #13

Closed
opened 2026-07-03 12:33:54 +00:00 by a73x · 1 comment
a73x commented 2026-07-03 12:33:54 +00:00 (Migrated from git.a73x.sh)

[claude 2026-07-03] Fixes af3fa887. Engine.StepTimeout (zero = disabled) wraps Step's ctx with WithTimeout at entry; agent wires --step-timeout default 15m — deliberately above imagecache's 10m HTTP timeout so a legitimate first-time image download is never aborted. A wedged op now fails the create with DeadlineExceeded and retries next tick instead of silently freezing all reports for the host. TDD: TestStepTimeoutBoundsSlowOperations (watched hang -> fail at 2s guard pre-fix) and TestStepTimeoutZeroDisablesWatchdog.


Migrated from git-collab patche 9dafc98585787cbc3703c501ef791ba16a567b8f.

Original author: a73x dev@a73x.sh.

Fixes git-collab issue af3fa887

Historical merged patch. The original head and merge commits were not recorded. Forgejo cannot display a pull request without a head commit, so this record is preserved as a closed issue. The original diff is unavailable; no commit was guessed.

Original branches: fix/step-watchdog → main.

[claude 2026-07-03] Fixes af3fa887. Engine.StepTimeout (zero = disabled) wraps Step's ctx with WithTimeout at entry; agent wires --step-timeout default 15m — deliberately above imagecache's 10m HTTP timeout so a legitimate first-time image download is never aborted. A wedged op now fails the create with DeadlineExceeded and retries next tick instead of silently freezing all reports for the host. TDD: TestStepTimeoutBoundsSlowOperations (watched hang -> fail at 2s guard pre-fix) and TestStepTimeoutZeroDisablesWatchdog. --- Migrated from git-collab patche `9dafc98585787cbc3703c501ef791ba16a567b8f`. Original author: a73x <dev@a73x.sh>. Fixes git-collab issue `af3fa887` **Historical merged patch.** The original head and merge commits were not recorded. Forgejo cannot display a pull request without a head commit, so this record is preserved as a closed issue. The original diff is unavailable; no commit was guessed. Original branches: `fix/step-watchdog` → `main`.
a73x commented 2026-07-03 12:44:22 +00:00 (Migrated from git.a73x.sh)

Original review: comment (revision not recorded)

[claude 2026-07-03] Fresh-context reviewer verdict: needs-changes on one Important finding — a fired watchdog burned CreateAttempts for every VM the expired ctx touched (three wedged steps could terminal-fail healthy VMs; randomized map order made the victim vary). Fixed in 0938180 (TDD, watched fail): create() skips the attempt on a dead ctx; failCreate() refunds when ctx expired mid-op. Reviewer minors applied: per-step framing in docs/flag help; reap-pass ctx-free Kill/SIGTERM assumption recorded in a comment. Options-struct suggestion skipped (consistent with existing style). Reviewer confirmed: tick pile-up impossible (single worker, dropped ticks), post-watchdog report well-formed (level-triggered server), tests race-clean at -count=20. make ci green. Merging per session goal.

**Original review: comment** (revision not recorded) [claude 2026-07-03] Fresh-context reviewer verdict: needs-changes on one Important finding — a fired watchdog burned CreateAttempts for every VM the expired ctx touched (three wedged steps could terminal-fail healthy VMs; randomized map order made the victim vary). Fixed in 0938180 (TDD, watched fail): create() skips the attempt on a dead ctx; failCreate() refunds when ctx expired mid-op. Reviewer minors applied: per-step framing in docs/flag help; reap-pass ctx-free Kill/SIGTERM assumption recorded in a comment. Options-struct suggestion skipped (consistent with existing style). Reviewer confirmed: tick pile-up impossible (single worker, dropped ticks), post-watchdog report well-formed (level-triggered server), tests race-clean at -count=20. make ci green. Merging per session goal.
Sign in to join this conversation.
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
a73x/eitri#13
No description provided.