Skip to content

feat(monitor-ci): extend polling coverage to ~33 min#110

Merged
vsavkin merged 3 commits intomainfrom
increase-poll-count
Apr 5, 2026
Merged

feat(monitor-ci): extend polling coverage to ~33 min#110
vsavkin merged 3 commits intomainfrom
increase-poll-count

Conversation

@polygraph-app
Copy link
Copy Markdown
Contributor

@polygraph-app polygraph-app Bot commented Apr 5, 2026

Summary

Extends the monitor-ci skill's polling loop so it can cover CI executions that run up to ~30 minutes.

Changes

  • backoff() delays now [60, 90, 120, 180] (adds a 4th step at 180s)
  • Circuit breaker threshold raised from 5 to 13 no-progress polls
  • Updated the corresponding status message and priority comment
  • Updated SKILL.md documentation

Math

With the new max backoff of 180s and 13 no-progress polls, total coverage is:

90 + 120 + 180 * 10 = 2010s ≈ 33.5 min

That gives comfortable headroom for 30-minute CI runs (previously only ~7.5 min of coverage was possible).

Files touched

  • artifacts/skills/monitor-ci/scripts/ci-poll-decide.mjs (source)
  • artifacts/skills/monitor-ci/SKILL.md (source)
  • 11 regenerated copies across skills/, generated/.agents/, generated/.github/, generated/.opencode/, generated/.gemini/ via npx nx sync-artifacts

Notes

The polygraph await-polygraph-ci skill also mentions "5 consecutive polls" in its own polling loop — left unchanged as it's a separate skill with different semantics.


View session information on Nx Cloud ↗

Related PRs: None yet

Add a 4th backoff step (180s) and raise the circuit breaker threshold
from 5 to 13 no-progress polls so CI monitoring can cover ~30-minute
runs. With delays of 60/90/120/180s and 13 no-progress polls, total
coverage is ~33.5 min (90 + 120 + 180*10 = 2010s), giving headroom for
30-minute CI runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vsavkin vsavkin marked this pull request as ready for review April 5, 2026 22:02
@vsavkin vsavkin enabled auto-merge (squash) April 5, 2026 22:03
@nx-cloud-snapshot
Copy link
Copy Markdown
Contributor

nx-cloud-snapshot Bot commented Apr 5, 2026

View your CI Pipeline Execution ↗ for commit 4135739

Command Status Duration Result
nx run-many -t lint test build typecheck e2e-ci ✅ Succeeded <1s View ↗
nx-cloud record -- npx nx format:check --base=r... ✅ Succeeded 1s View ↗
nx sync-artifacts-verification ✅ Succeeded 6s View ↗
nx validate-cursor-plugin ✅ Succeeded 21s View ↗
nx-cloud record -- claude plugin validate .clau... ✅ Succeeded <1s View ↗
nx-cloud record -- claude plugin validate .clau... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-05 22:09:01 UTC

nx-cloud-snapshot[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@nx-cloud-snapshot nx-cloud-snapshot Bot left a comment

Choose a reason for hiding this comment

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

✅ The fix from Nx Cloud was applied

We updated the circuit breaker test to align with the intentional threshold change from 5 to 13 consecutive no-progress polls introduced in this PR. The test was passing --no-progress-count 4 (incrementing to 5), which no longer triggers the circuit breaker at the new threshold, causing the assertion to fail. Updating the input to 12 (incrementing to 13) correctly validates the new behavior.

Tip

We verified this fix by re-running @org/source:test.

Suggested Fix changes
diff --git a/tests/monitor-ci/ci-poll-decide.test.mjs b/tests/monitor-ci/ci-poll-decide.test.mjs
index 0519355..c51c479 100644
--- a/tests/monitor-ci/ci-poll-decide.test.mjs
+++ b/tests/monitor-ci/ci-poll-decide.test.mjs
@@ -105,13 +105,13 @@ describe('guards', () => {
     expect(result.action).toBe('done');
   });
 
-  it('circuit_breaker when noProgressCount >= 5', async () => {
+  it('circuit_breaker when noProgressCount >= 13', async () => {
     // noProgressCount starts at inputNoProgressCount+1 when no state change
     const result = await runScript(ci(), 0, 'medium', [
       '--no-progress-count',
-      '4',
+      '12',
     ]);
-    // 4+1=5 >= 5
+    // 12+1=13 >= 13
     expect(result.code).toBe('circuit_breaker');
     expect(result.action).toBe('done');
   });

🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.

Revert fix via Nx Cloud  

View interactive diff ↗

➡️ This fix was applied by Victor Savkin

🎓 Learn more about Self-Healing CI on nx.dev

Co-authored-by: polygraph-app[bot] <polygraph-app[bot]@users.noreply.github.com>
@vsavkin vsavkin merged commit 1fb2361 into main Apr 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants