Repository navigation
test: make retrospective timing deterministic - #1945
1 commit merged into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ✅ | CI passing | All checks passing |
Files Changed (1 file, +22 −1)
| File | +/− |
|---|---|
test/cli/watch-capabilities.test.ts |
+22 −1 |
Total: +22 −1
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🟢 Impact Analysis — PR #1945Risk tier: 🟢 LOW 📊 Summary
🎯 Risk Factors
📦 Modules Affectedtests (1 file)
This report is generated automatically for every PR. See #733 for details. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes are isolated to tests, correctly scope/restore fake timers, and add deterministic coverage for the intended Friday-afternoon behavior.
Review tier: Lite
Findings: None
What changed in this PR
This PR makes RetroCapability tests deterministic by freezing time to a known non-Friday instant, ensuring they no longer fail during the intentional “Friday after 14:00 UTC” retrospective window, and adds an explicit regression test for that Friday-afternoon behavior.
Changes:
- Freeze timers/system time for the
RetroCapabilitytest scope and restore real timers after each test. - Add a test asserting that Friday after 14:00 UTC forces a retrospective even if one exists for the same day.
| File | Description |
|---|---|
| test/cli/watch-capabilities.test.ts | Uses fake timers + fixed system time for deterministic RetroCapability tests and adds explicit Friday-after-14:00 UTC coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
RetroCapabilitytests at a known non-Friday instant.Why
The tests derived their fixture date from the real clock while expecting
retro not due. Production intentionally forces a retrospective every Friday after 14:00 UTC, so unrelated PRs failed during that weekly window.Validation
SKIP_BUILD_BUMP=1 npm run buildnpm exec -- vitest run test/cli/watch-capabilities.test.ts -t RetroCapabilityCloses #1944