Skip to content

test(deploy): allow a CI clock step in the UUIDv7 time check - #397

Merged
samuelmbabhazi merged 1 commit into
mainfrom
fix/uuid7-test-clock-step
Nov 21, 2026
Merged

samuelmbabhazi merged 1 commit into
mainfrom
fix/uuid7-test-clock-step

Conversation

@samuelmbabhazi

@samuelmbabhazi samuelmbabhazi commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

What

The installer test checks that a generated UUIDv7 holds the current time. It now allows the id to be up to one second ahead of the time read after it. It still requires the id within a minute of now.

Why

CI run 44887353778 failed on an unrelated PR (#395): the id was stamped 08:58:47.922, while the runner logged the failure at 08:58:47.105. The runner's clock stepped back between the two reads. new_uuid7 was right; the test was too strict for a clock that NTP can step.

How it was tested

deploy/control-plane/install_test.sh passes locally. shellcheck reports no issue.

Security considerations

Test only. The installer is unchanged.

Summary by CodeRabbit

  • Tests
    • Updated timestamp checks to compare against a single captured current time. They now accept timestamps up to one second in the future while continuing to require them to be less than 60 seconds old. No end-user functionality changes are included.

The check refused an id stamped 0.8 s after the time read just after
it: the runner's clock stepped back between the two reads (CI run
44887353778). The id is still required within a minute of now, and
at most a second ahead.

Signed-off-by: samuel mbabhazi <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The UUIDv7 timestamp test now captures the current time once in milliseconds. It allows the generated timestamp to be up to 1,000 ms ahead and still requires it to be less than 60,000 ms old.

Changes: UUIDv7 timestamp test

Layer / File(s) Summary
Timestamp comparison
deploy/control-plane/install_test.sh
The test uses one captured current time for both comparisons and accepts up to 1,000 ms of future skew. It retains the 60,000 ms age limit.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: iyuzhang

Merge Risk: Minimal · up to 31969

This only loosens a UUIDv7 timestamp check in the installer test so it tolerates small CI clock steps. Production behavior is unchanged and no actionable merge risk remains.

Architecture risk: Low · up to 31969

The change affects 1 system.

Changed systems: deploy

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — deploy (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in deploy/control-plane/install_test.sh: The UUIDv7 time check now uses one captured millisecond timestamp for both comparisons and allows the UUID timestamp to be at most 1,000 ms in the future; the prior check sampled the clock twice and allowed no future skew. It still requires the timestamp to be less than 60,000 ms old.
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: a test-only adjustment that lets the UUIDv7 time check in the installer test accept a timestamp up to one second ahead, which is the CI clock step case. It matches the summ…
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: a test-only adjustment that lets the UUIDv7 time check in the installer test accept a timestamp up to one second ahead, which is the CI clock step case. It matches the summary, objectives, and commit message. It omits the one-minute age limit that still applies, which is an acceptable level of detail for a title.

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

Commits

Reviewing files that changed from the base of the PR and between 674052a and 3196945.

Files selected for processing: 1

  • deploy/control-plane/install_test.sh

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

@samuelmbabhazi
samuelmbabhazi merged commit af0977f into main Nov 21, 2026
24 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the fix/uuid7-test-clock-step branch November 21, 2026 09:22
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