Skip to content

test(roster): pin the clock in the give-away test so it stops failing every run - #3541

Merged
BigSimmo merged 1 commit into
mainfrom
fix/roster-give-away-test-pin-clock
Oct 14, 2026
Merged

BigSimmo merged 1 commit into
mainfrom
fix/roster-give-away-test-pin-clock

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

User description

Summary

  • tests/roster-team-calendar-manager.dom.test.tsx ("reads requests, manage and the roster again after a give-away is sent") started failing on every run from 09:00 Perth on 14 Oct 2026 (about 01:00 UTC). It turned Unit coverage red on any new CI run, including CI: let only main's tip run open or close the pinned main-failure issue #3539 and Chore(deps): bump the npm-production group with 8 updates #3471.
  • Cause: the give-away sheet reads the real clock, and the fixture shift (Thu 15 Oct, 09:00 Perth) counts as urgent inside 24 hours, which replaces the "Offer to 1 person" button with "I can't make it". The test only passed while the real date was more than a day before the shift.
  • Fix: pin Date to two days before the shift for that one test. Test-only change; no product code touched.

Areas touched: Delivery and assurance
RAG impact: no retrieval behaviour change — one roster UI test

Verification

  • Checks run: npx vitest run tests/roster-team-calendar-manager.dom.test.tsx gave 36 passed (twice). Before the change the same command failed on main at 6f3712c with "Unable to find role=button and name /^Offer to 1 person/". Prettier check clean.

Risk and rollout

  • Risk: none to the product; test only.
  • Rollback: revert the commit.
  • Provider or production effects: None

Notes

  • Open PRs need this change on their branch (or an up-to-date merge of main) for Unit coverage to go green again.

🤖 Generated with Claude Code

https://claude.ai/code/session_015r3N1AdnrkQEPgiP4DuJdN


Generated by Claude Code


Summary by cubic

Pins the clock in the roster give-away test so it stops failing on every CI run once the fixture shift falls within 24 hours.

  • The give-away sheet reads the real clock, so the fixture shift (Thu 15 Oct, 09:00 Perth) was treated as urgent and swapped "Offer to 1 person" for "I can't make it".
  • Pins Date to two days before the shift for that one test; no product code touched.

Written for commit 80b2c9e. Summary will update on new commits.

View guided diff Turn on auto-fix


CodeAnt-AI Description

Keep roster give-away coverage stable across run dates

What Changed

  • The give-away test fixes the clock so it continues to check the standard offer flow after the fixture shift enters the 24-hour urgent window.

Impact

✅ Fewer date-dependent roster test failures
✅ Stable unit coverage across run dates

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

The give-away sheet reads the real clock, and the fixture shift (Thu 15 Oct,
09:00 Perth) counts as urgent inside 24 hours, which swaps "Offer to 1 person"
for "I can't make it". The test passed only while the real date was more than a
day before the shift. From 09:00 Perth on 14 Oct 2026 it failed on every run,
turning Unit coverage red on main and on every PR. Date is now pinned to two
days before the shift for that one test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015r3N1AdnrkQEPgiP4DuJdN
@supabase

supabase Bot commented Oct 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 1f693ffb-4074-4bb8-b794-183420cbb316
📥 Commits

Reviewing files that changed from the base of the PR and between 6f3712c and 80b2c9e.

📒 Files selected for processing: 1
  • tests/roster-team-calendar-manager.dom.test.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codeant-ai

codeant-ai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 80b2c9e9
Scan Time: 2026-10-14 04:07:38 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED No IAC issues

View Full Results

@gitar-bot

gitar-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Code Review ✅ Approved

🟢 Low risk · Pins the clock only in one roster UI test, stabilizing its fixture timing without changing product behavior.

Pins Date to two days before the fixture shift in the give-away test in tests/roster-team-calendar-manager.dom.test.tsx, so the test no longer fails once the shift falls within 24 hours. The change is test-only and no issues were found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Approved

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@codspeed

codspeed Bot commented Oct 14, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 2 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 8 untouched benchmarks


Comparing fix/roster-give-away-test-pin-clock (80b2c9e) with main (6f3712c)

Open in CodSpeed

@codeant-ai

codeant-ai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 80b2c9e Oct 14, 2026 · 03:55 03:58

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@codeant-ai

codeant-ai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T03:58:07.602036Z 80b2c9e Draft marked ready
ℹ️ 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.

@claude

claude Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Oct 14, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Pin the clock in the roster give-away test

🐞 Bug fix 🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Pins the test clock before the fixture shift so the give-away remains non-urgent.
• Restores reliable coverage of offering a shift and refreshing roster data.
Diagram

graph TD
  Clock["Pinned Date"] --> Sheet["Give-away sheet"] --> Check{"Urgent shift?"} -->|No| Offer["Offer shift"] --> Reload["Refresh roster"]
  Shift["Fixture shift"] --> Check
  Check -->|Yes| Urgent["Urgent action"]
Loading
High-Level Assessment

Keep the Date-only clock pin scoped to this test. Passing the page's pinned time into the give-away sheet would alter product code to solve a test-fixture problem, while faking only Date preserves the test's existing timeout behavior.

Files changed (1) +6 / -0

Tests (1) +6 / -0
roster-team-calendar-manager.dom.test.tsxStabilize the calendar give-away test against the real date +6/-0

Stabilize the calendar give-away test against the real date

• Pins Date to 13 October 2026 before rendering the give-away flow, keeping the 15 October fixture shift outside the urgent window. The existing assertions continue to verify the offer and subsequent roster reads.

tests/roster-team-calendar-manager.dom.test.tsx

@codeant-ai

codeant-ai Bot commented Oct 14, 2026

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; it pins the clock so this test exercises the intended give-away flow deterministically.

Assessed commit: 80b2c9e93868

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo Fixer

No findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR.

@BigSimmo
BigSimmo merged commit da469b1 into main Oct 14, 2026
70 of 71 checks passed
@BigSimmo
BigSimmo deleted the fix/roster-give-away-test-pin-clock branch October 14, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🕐 Less than 10 minutes size:XS This PR changes 0-9 lines, ignoring generated files 🟡 Small blast radius

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants