Repository navigation
Fix flaky TestRateLimits; drop stale /v1 paths from the planning docs - #66
Merged
Merged
Conversation
- TestRateLimits sent 11 logins and expected the 11th to hit the 10-per-minute limit, but limits count per clock minute, so a run that crossed a minute boundary saw its counter reset and got 401. The API's clock in this test now starts at the top of a minute (testenv gains an Options.Now), so all 11 land in one window however slow CI is, and the test gets its own database so repeated runs don't share counters. - remaining_manual_steps.md: root paths (/health, /auth/login, /applications, /roles, /api-keys, /webhooks) and the Substratal-Version header on the sign-in curl and the app-registration calls. - plan-remaining.md: Phase 0 is checked at /health (200 on 2026-10-22; /v1/health is 404). - migrations/0008_scim_tokens.sql: the comment said it came after 0005–0007, which were renumbered 0009–0011 to follow it. Comment only; the runner tracks versions, not checksums. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
terraform plan (production)This is exactly what merging will change in AWS. Plan |
Adron
added a commit
that referenced
this pull request
Oct 22, 2026
Conflicts: keep remaining_manual_steps.md deleted (moved to [bespoke] issues in #29); keep the Phase 0 line without the /v1 mention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up from reviewing #58, #60, and #61 against the header-versioned API.
Flaky
TestRateLimitsIt failed on #60's push run with
got 401 "invalid_credentials", want 429while the PR run of the same commit passed. The test sends 11 logins and expects the 11th to hit the 10-per-minute limit. Limits count per clock minute (nowtruncated to the minute), so a run that crossed a minute boundary reset its counter partway through.testenv.OptionsgainsNow, which replaces the API's clock.TestRateLimitsstarts the API's clock at the top of a minute, offset from real time, so all 11 logins share one window however slow CI is. It also gets its own database, so repeated runs don't share counters.go test -count=15 -run TestRateLimits: 15 of 15 pass. Before this change, repeats failed.Stale
/v1in the docsremaining_manual_steps.mdnow uses root paths throughout, and addsSubstratal-Version: 1to the sign-incurland the app-registration steps./healthis exempt from the header.plan-remaining.md: Phase 0 is checked at/health. I confirmed production returns200there and404at/v1/health(2026-10-22).migrations/0008_scim_tokens.sql: the comment said it ran after0005–0007, but those were renumbered0009–0011to follow it. This changes the comment only; the runner tracks versions, not checksums, so the applied migration is unaffected.Left as-is on purpose: FCM's
/v1/projects/…(Google's path), andversioning_test.go's check that/v1/…returns 404.The full integration and contract suite and gen-check pass.
🤖 Generated with Claude Code