Skip to content

test(github): pin the clock for repo grant refresh tests - #554

Merged
viktormarinho merged 1 commit into
mainfrom
fix/github-grant-test-clock
Sep 21, 2026
Merged

viktormarinho merged 1 commit into
mainfrom
fix/github-grant-test-clock

Conversation

@viktormarinho

@viktormarinho viktormarinho commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Seven GitHub repo-grant tests started failing after September 8, 2026: their seeded grants expire on that date, but the refresh calls defaulted to the real clock. They returned invalid_grant before reaching permission fallback, token minting or upstream error handling. Some invalid-grant tests also passed for the wrong reason.

Pass the fixture's June 10 clock through the existing now parameter in every refresh test that omitted it. Production code and grant expiry behavior are unchanged.

This failure reproduced on unchanged main at b30f645, independently of the catalog changes in #553. The catalog PR was merged separately as requested.

Validation:

  • Before: bun test github/server/lib/repo-grant.test.ts produced the same seven CI failures on both the catalog branch and unchanged main.
  • After: all 34 grant tests pass; the full GitHub suite passes all 133 tests.
  • bun run check github, formatting, lint and git diff --check pass. The repository type-check command filters dependency-source diagnostics; a direct tsc --noEmit reports those dependency errors. Lint has warnings in existing MCP implementations.
  • Registry generation check and 19 registry/auth tests pass on the merged catalog baseline.

@viktormarinho
viktormarinho merged commit 2e1b8a3 into main Sep 21, 2026
2 checks passed
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.

1 participant