Skip to content

Make timezone tests race-safe and complete smoke verification reproducible - #642

Merged
robzolkos merged 1 commit into
mainfrom
fix/main-test-reliability
Nov 11, 2026
Merged

robzolkos merged 1 commit into
mainfrom
fix/main-test-reliability

Conversation

@robzolkos

@robzolkos robzolkos commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix the intermittent timezone-test race seen while verifying cookie-auth removal #641, and make the complete live-test setup reproducible without skipping checks.

  • Stop assigning process-global time.Local in tests. HTTP transport goroutines can read that global through time.Now, so the old test setup/cleanup raced with unrelated work.
  • Pass locations explicitly to the private event-day/sort/boundary helpers. Production still supplies time.Local; command behavior is unchanged. Keep command-level ordering coverage and independently test positive/negative date crossings and unshifted all-day dates.
  • Document the Elasticsearch 8, configured Hotcell, local SMTP capture and custom-sender prerequisites. The five reported baseline smoke failures all pass unchanged when these prerequisites are present.
  • Give the full SMTP/browser suite a bounded ten-minute deadline. The old five-minute run expired while a healthy test had been running only 11 seconds; SMTP verification alone takes about 90 seconds. Strict mode and every assertion remain unchanged.

Rebased onto main after #641 merged, inheriting cookie-auth removal and Go 1.27.4. git range-diff confirms the patch is unchanged apart from README context adjustments. Fresh verification is complete on d9753b9 with Go 1.27.4: CI is green (21 checks pass, 4 skipped, none failing or pending), and local checks, three full shuffled race repetitions, and all 147 strict live tests pass.

This does not implement the broader account-timezone/day-window feature in #563. No CLI commands/flags, SDK or API contracts change.

Verification

  • make check: pass.
  • go test -race -shuffle=on -count=3 ./...: pass across the whole repository.
  • Timezone helper cases: 7/7 across 20 shuffled race repetitions. Three deliberate regressions (UTC timed-day comparison, shifted all-day dates, UTC timed rendering) each make the relevant test fail; mutations restored.
  • Four unchanged search/contact/attachment/photo smoke checks: pass with ES8 and the configured cell.
  • Full SMTP sender-selection/read-back/capture check: pass with the documented disposable sender and loopback-only Mailpit. No external mail relay was used.
  • Complete strict make test-smoke: 147/147 top-level tests pass, zero skips, including SMTP capture and browser checks, in 343.0 seconds on the rebased head. The default ten-minute deadline is used; no tests or assertions are disabled.
  • Independent read-only review of the CLI and companion bootstrap changes: no actionable findings (8 changed files across both repositories). Second automated review round after rebasing: Copilot approves; Codex has no findings; cubic reports zero issues across the five-file patch. No open review threads.

Related bootstrap fix / limits

Haystack's own setup currently starts Elasticsearch 7 even though its configuration expects ES8 on port 29208, then suppresses search-indexing errors. Companion haystack PR #9325 corrects that prerequisite, waits for service health and makes indexing failures visible; it does not change API behavior.

The previous Go security blocker is resolved by the Go 1.27.4 fix merged in #641 and inherited by this rebase; this PR's fresh Security check passes. No security gate is disabled or waived. This PR remains unmerged; no release or deployment performed.

@robzolkos
robzolkos requested a review from a team as a code owner November 11, 2026 21:58
Copilot AI balanced review requested due to automatic review settings November 11, 2026 21:58
@robzolkos

Copy link
Copy Markdown
Contributor Author

🤖 @codex review

Please focus on preserving local-day/all-day behavior while removing global timezone mutation from tests. Production still passes the machine's location. The longer whole-suite smoke deadline retains strict mode and every assertion; full SMTP verification made the old global five-minute budget expire during an otherwise healthy test.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T22:56:42.737689Z d9753b9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 74fa58782f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 5 files

View guided diff | Turn on auto-fix | Re-trigger cubic

Copilot AI previously approved these changes Nov 11, 2026

Copilot AI 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.

🟢 Approved

No active review issues remain for the timezone-test isolation and smoke-suite documentation changes.

No open issues 🎉

What changed in this PR

Removes the timezone-test race exposed during cookie-auth removal verification and documents how to run the complete live smoke suite. Production timezone behavior remains unchanged; the broader account-timezone feature stays out of scope.

Changes:

  • Pass explicit locations to private event helpers instead of mutating time.Local in tests.
  • Preserve command-level ordering coverage and add east/west date-crossing and all-day cases.
  • Document smoke-test prerequisites and extend the suite deadline from five to ten minutes without relaxing assertions or strict mode.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
tests/​smoke/​README.md Documents search, image-processing, SMTP, and sender prerequisites.
Makefile Extends the smoke-test deadline to ten minutes.
internal/​cmd/​events.go Accepts an explicit location for timed boundary formatting.
internal/​cmd/​events_period.go Threads locations through sorting and day helpers; production uses time.Local.
internal/​cmd/​events_period_test.go Removes global timezone mutation and expands timezone regression coverage.

Review effort: Balanced

@robzolkos
robzolkos force-pushed the fix/main-test-reliability branch from 74fa587 to d9753b9 Compare November 11, 2026 22:53
@robzolkos

Copy link
Copy Markdown
Contributor Author

🤖 @codex review

Second review round: #641 is merged and this PR is rebased onto the updated main, inheriting cookie-auth removal and Go 1.27.4. The five-file patch is unchanged; range-diff shows only README context adjustments around the newly merged documentation. Please check the integration and retained timezone coverage. CI, local checks, shuffled race tests and the full strict live suite are rerunning. This PR remains unmerged.

@robzolkos
robzolkos requested a balanced review from Copilot November 11, 2026 22:55
Copilot AI dismissed their stale review, a newer Copilot review was requested November 11, 2026 22:55
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: d9753b914b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI 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.

🟢 Approved

No active review issues remain for the calendar-test and smoke-verification changes.

No open issues 🎉

Review effort: Balanced

@robzolkos
robzolkos merged commit e6d5bcb into main Nov 11, 2026
26 checks passed
@robzolkos
robzolkos deleted the fix/main-test-reliability branch November 11, 2026 23:03
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