Skip to content

test(updates): make coordinator deadlines independent of CI load - #510

Merged
andrebrait merged 1 commit into
mainfrom
fix/coordinator-test-clock
Nov 16, 2026
Merged

andrebrait merged 1 commit into
mainfrom
fix/coordinator-test-clock

Conversation

@andrebrait

@andrebrait andrebrait commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Advance the coordinator fixture clock by one millisecond per mocked host-status poll instead of consuming its artificial 30 ms deadline with real CI scheduling and filesystem overhead.
  • Keep the 30 ms deadline and all existing behavioral assertions unchanged.
  • Add a bounded timeout regression proving an unacknowledged host still expires without authorizing commit or server cutover.

Verification

  • All 19 coordinator tests passed.
  • Targeted ESLint passed.

Fixes the five coordinator timeout failures in publication attempt 2: https://github.com/ompweb-dev/ompweb/actions/runs/43824447300/attempts/2. Production code is unchanged. The compatible omp integration package now passes runner typecheck.

Summary by CodeRabbit

  • Tests
    • Added coverage confirming that upgrade plans fail safely when a host does not acknowledge an update within the allotted time, without proceeding to the commit phase.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The coordinator test fixture now uses a controllable clock that advances on software-update status reads. A new test checks that an unacknowledged host times out, does not enter the commit phase, and leaves the plan failed.

Changes: Host upgrade timeout test

Layer / File(s) Summary
Clock and timeout assertions
lib/upgrade-plan-coordinator.test.mjs
The hub mock advances the fixture clock on status reads. The new test checks for host_upgrade_timeout after 30–32 polls, confirms that no commit phase was dispatched, and verifies that the plan is marked failed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to fe402

This change only makes the host upgrade timeout tests independent of CI load and adds coverage for an unacknowledged host. It has no production impact and is ready to merge.

Security architecture risk: Minimal · up to fe402

The change makes coordinator tests independent of CI scheduling and checks an existing timeout outcome. No introduced or worsened architecture-level security risk is established.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change as test-only (test(updates) prefix) and states its goal: making coordinator deadlines independent of CI load. The summary confirms the fixture now advances a logical clock p…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change as test-only (test(updates) prefix) and states its goal: making coordinator deadlines independent of CI load. The summary confirms the fixture now advances a logical clock per mocked host-status poll instead of relying on real time, which matches that goal. The title does not mention the new bounded-timeout regression test, but it does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7b2d5d51-47ee-455a-b2b2-11117b70ac54
Commits

Reviewing files that changed from the base of the PR and between 040bb2b and fe402f3.

Files selected for processing: 2

  • graphify-out/graph.json
  • lib/upgrade-plan-coordinator.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@andrebrait
andrebrait merged commit 988d82c into main Nov 16, 2026
5 checks passed
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.

1 participant