Title: fix(credential-groups): pin the clock in the enrollment tests by waleedlatif1 · Pull Request #6812 · simstudioai/sim · GitHub
Open Graph Title: fix(credential-groups): pin the clock in the enrollment tests by waleedlatif1 · Pull Request #6812 · simstudioai/sim
X Title: fix(credential-groups): pin the clock in the enrollment tests by waleedlatif1 · Pull Request #6812 · simstudioai/sim
Description: Summary apps/sim/lib/credential-groups/enrollments.test.ts had a time bomb that has now gone off. It blocks CI on every branch, not just this one. ENROLLMENT.invitationExpiresAt was hardcoded to 2026-08-18T12:00:00.000Z, and completeCredentialGroupEnrollment compares it against the wall clock. Before that instant the invitation was valid and the suite passed; after it, the invitation is expired, the function returns null, and two tests fail. The evidence is a single unchanged commit running twice: Run Time enrollments.test.ts First 2026-08-18T07:21Z 11 passed Re-run 2026-08-18T14:55Z 11 tests, 2 failed Same SHA, same base, no code change between them — only the clock moved past 12:00Z. Confirmed locally: on clean origin/staging the two tests fail deterministically; re-dating the fixture to 2027 makes all 11 pass. Fix Pin the clock to a point inside the invitation window rather than re-dating the fixture: const NOW = new Date('2026-08-11T12:10:00.000Z') beforeEach(() => { vi.useFakeTimers({ shouldAdvanceTime: true }) vi.setSystemTime(NOW) }) afterEach(() => { vi.useRealTimers() }) Every existing date literal keeps its meaning, and the suite stops depending on when it runs. Bumping the date to a later instant would only re-arm the same failure. Type of Change Bug fix (broken CI) Testing lib/credential-groups — 63 tests across 13 files pass. type-check clean, lint clean. Verified the cause by moving the fixture date forward and back. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary apps/sim/lib/credential-groups/enrollments.test.ts had a time bomb that has now gone off. It blocks CI on every branch, not just this one. ENROLLMENT.invitationExpiresAt was hardcoded to 20...
X Description: Summary apps/sim/lib/credential-groups/enrollments.test.ts had a time bomb that has now gone off. It blocks CI on every branch, not just this one. ENROLLMENT.invitationExpiresAt was hardcoded to 20...
Opengraph URL: https://github.com/simstudioai/sim/pull/6812
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:202f8503-4bc0-8cb5-47cf-04a1e3cfa4df |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A954:1A169A:26289A:35A64E:6AFB5288 |
| html-safe-nonce | bcb6c0e4c03cd1d5ff7bde390e8e72675830abded80efd3ffae9b5e8ace0e2aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTU0OjFBMTY5QToyNjI4OUE6MzVBNjRFOjZBRkI1Mjg4IiwidmlzaXRvcl9pZCI6IjEwMzMxMDAwMjM0NDY1OTAwODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e638fa8670d5ee2d22cd05609c34952fe4d74d7482a714fc924881e93608aca5 |
| hovercard-subject-tag | pull_request:4305802733 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6812/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary apps/sim/lib/credential-groups/enrollments.test.ts had a time bomb that has now gone off. It blocks CI on every branch, not just this one. ENROLLMENT.invitationExpiresAt was hardcoded to 20... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cbf66c024bb6d10e6955baa7413c54cf13a201bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width