Skip to content

fix: resolve CI failures from v4 launch#2

Merged
hyp3rd merged 1 commit intomainfrom
feat/v4
Apr 10, 2026
Merged

fix: resolve CI failures from v4 launch#2
hyp3rd merged 1 commit intomainfrom
feat/v4

Conversation

@hyp3rd
Copy link
Copy Markdown
Owner

@hyp3rd hyp3rd commented Apr 10, 2026

  • Change test baseTime from Jan 1 to Jun 3 to prevent januaryFirstOffsetSpec from firing unexpectedly (negative WaitGroup)
  • Handle missing go.sum in tidy-check CI steps (no dependencies)
  • Increase chain_test timing constants for race-detector stability

- Change test baseTime from Jan 1 to Jun 3 to prevent
  januaryFirstOffsetSpec from firing unexpectedly (negative WaitGroup)
- Handle missing go.sum in tidy-check CI steps (no dependencies)
- Increase chain_test timing constants for race-detector stability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 10, 2026 07:20
@hyp3rd hyp3rd merged commit f14d9d8 into main Apr 10, 2026
8 of 9 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Addresses CI instability introduced around the v4 launch by making fake-clock tests less date-sensitive, improving go mod tidy checks when no go.sum is present, and relaxing timing constants to reduce race-detector flakiness.

Changes:

  • Move fake-clock baseTime from Jan 1 to Jun 3 to avoid month-specific cron specs firing unexpectedly in tests.
  • Update CI “tidy check” steps to not hard-fail when go.sum doesn’t exist.
  • Increase timing constants in chain-related tests to improve stability under the race detector.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
cron_test.go Adjusts fixed fake-clock anchor date and updates related test comment to avoid month-specific spec interactions.
chain_test.go Increases sleep/duration constants to reduce timing flakiness (esp. with -race).
.github/workflows/lint.yml Tweaks tidy-check diffing to handle absence of go.sum.
.github/workflows/go.yml Mirrors tidy-check adjustment in the main Go workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

go mod tidy
git diff --exit-code go.mod go.sum
git diff --exit-code go.mod
test ! -f go.sum || git diff --exit-code go.sum
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The test ! -f go.sum || ... guard will skip the diff check when go mod tidy removes a previously-tracked go.sum (file no longer exists), so CI could pass even though the deletion wasn’t committed. Consider guarding on whether go.sum is tracked (e.g., via git ls-files --error-unmatch go.sum) and then always running git diff --exit-code -- go.sum to catch modifications and deletions, while still supporting repos that don’t track go.sum.

Suggested change
test ! -f go.sum || git diff --exit-code go.sum
if git ls-files --error-unmatch go.sum >/dev/null 2>&1; then
git diff --exit-code -- go.sum
fi

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/go.yml
go mod tidy
git diff --exit-code go.mod go.sum
git diff --exit-code go.mod
test ! -f go.sum || git diff --exit-code go.sum
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

Same issue as in lint.yml: checking file existence will miss the case where a tracked go.sum gets deleted by go mod tidy (since the file won’t exist and the diff check is skipped). Prefer checking whether go.sum is tracked, then diff it (which will report deletions), while skipping entirely when it’s not tracked in the repo.

Suggested change
test ! -f go.sum || git diff --exit-code go.sum
if git ls-files --error-unmatch go.sum >/dev/null 2>&1; then
git diff --exit-code go.sum
fi

Copilot uses AI. Check for mistakes.
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.

2 participants