Skip to content

fix(jobs): bound compliance heartbeat execution - #7556

Merged
bokelley merged 1 commit into
mainfrom
juba
Sep 16, 2026
Merged

bokelley merged 1 commit into
mainfrom
juba

Conversation

@bokelley

@bokelley bokelley commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add an opt-in execution timeout and cooperative AbortSignal to scheduled jobs
  • cap the compliance heartbeat at two hours, slightly above its documented ~115-minute worst case
  • stop an aborted heartbeat batch without recording false agent failures or continuing with an aborted transport
  • expose shared scheduler activeJobs, queuedJobs, and maxConcurrency through the jobs status API
  • preserve existing runners whose second argument is a test/dependency-injection seam

Closes #7546.

Why two hours

A batch of ten agents can each consume the 600-second suite budget plus two 30-second discovery budgets, with five minutes of lock headroom. The resulting worst case is about 115 minutes. A two-hour ceiling permits that bound but guarantees a wedged batch eventually releases its global scheduler slot.

Validation

  • 55 focused scheduler/heartbeat tests pass
  • timeout abort, slot release, queue diagnostics, pre-aborted heartbeat, and legacy second-argument behavior have regression coverage
  • npm run typecheck -- --pretty false
  • git diff --check

No changeset: this is server-only operational behavior.


Open workspace in Conductor

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — server-only operational PR bounding compliance-heartbeat execution with an opt-in scheduler timeout and cooperative AbortSignal.

Checked:

  • Timeout/slot-release semantics and timer hygiene.
  • Cooperative abort correctness (throwIfAborted at entry, loop-top, and first catch — batch timeouts release the fence without recording false agent failures).
  • Observability via consecutiveFailures paging; worker-only exposure of getPoolStatus.
  • Legacy-runner backward compat — all test-covered.
  • Changeset correctly omitted (operational scope, no published protocol surface touched).

Decision-table trace:

  • No critical/high findings (row 1 n/a).
  • gated_paths=false (row 2 n/a).
  • high_risk=true but reasons are all (modified) with NO medium-or-higher findings, so rows 3–5 n/a.
  • No prior decision (row 6 n/a).
  • No no-auto-approve team match (row 7 n/a).
  • Zero medium findings (row 8 n/a).
  • Falls through to row 9 → approve.

Note: review_decision=REVIEW_REQUIRED does not block since gated_paths is false and no other gate applies. high_risk is a heuristic-look signal only; all matches are modifications with no medium+ concerns, presumed safe per the change-kind guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heartbeat scheduler has effectively stopped registry-wide — ~26 runs/day to 1, no heartbeat anywhere in 14 hours

1 participant