feat(healthcheck): heartbeat before the security-gate stage (cap tick silence at ~30m, not ~55m) #360
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Total time spent: 4 minutes 23 seconds
Due date
igor
4 minutes 23 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#360
Loading…
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?
Why
The dead-man's-switch heartbeat (
hc_ping heartbeat, added in #348 for #297) fires only at the top of each tick. But a tier-1 tick runs two bounded model calls back-to-back — the build (TICK_TIMEOUT= 30m) then the security-gate review (claude_call … 1500= 25m) — with no overall tick cap. So a perfectly healthy tick can go ~55 minutes between heartbeats, which forces the healthchecks.io grace window wide (~60m) and delays detection of a real stoppage. Goal: never more than one long stage (~30m) of silence.What
Emit
hc_ping heartbeatat the start of each long model-call stage that currently follows another long call in the same tick — concretely, immediately before eachsecurity_gateinvocation (find them by the call signature, line numbers drift):security_gate "$WORKTREE" "$PR_BASE" "security-gate-issue"(~bin/tick.sh:4300)security_gate "$PR_WORKTREE" "$PR_HEAD" "security-gate-pr-review"(~bin/tick.sh:3589)That makes the max gap between heartbeats the longest single stage (~30m) instead of the sum (~55m). General rule: if any other stage can run a full-length model call after a prior long call in the same tick (e.g. a
derive_pr_bodyfallback), ping before it too.Must / must-not
hc_pingalready no-ops silently whenHEALTHCHECK_HEARTBEAT_URLis unset (lib/healthcheck.sh), so this is safe whether or not the check is configured. Keep it fire-and-forget — a ping must never affect the tick's exit or timing.hc_ping heartbeatcall; don't invent a new ping type or URL.Done when
hc_ping heartbeatprecedes eachsecurity_gatecall in the tier-1 and PR-review paths.make testpasses. Nice-to-have: a lightweight source-assertion inbin/test-*.sh(in the spirit ofcheck-sync's tick.sh greps) verifying a heartbeat precedes each long stage, so the guarantee can't silently regress.security_gatecall, capping tick silence at ~30m instead of ~55m #362