Skip to content

test(omk-provider): assert x-should-retry=false on quota 429 - #458

Merged
dmae97 merged 1 commit into
feat/omk-providerfrom
test/omk-provider-should-retry-assert
Nov 16, 2026
Merged

dmae97 merged 1 commit into
feat/omk-providerfrom
test/omk-provider-should-retry-assert

Conversation

@dmae97

@dmae97 dmae97 commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Test-only follow-up to QA's 11/18 checklist item 2. Existing tests already show a monthly quota 429 (quota_exceeded + x-omk-retryable: false) is sent once and not retried, but they did not assert that the rewritten response carries x-should-retry equal to "false".

Adds packages/coding-agent/test/omk-provider-retry-header.test.ts only. No source, golden, or models.generated.ts changes.

The new file asserts:

  • Inside the OMK capture, a gateway 429 with x-omk-retryable: false is rewritten with x-should-retry equal to "false".
  • The 429 the SDK sees on a monthly quota error has the same header, and the request is still sent only once.

The inverse — a non-OMK call with x-omk-retryable: false does not get x-should-retry added — is already covered in omk-provider-fetch-wrapper.test.ts (and the "leaves other fetch callers alone" case in omk-provider-gateway-errors.test.ts) and is not repeated here.

Test plan

  • Node 22: npx vitest --run test/omk-provider* in packages/coding-agent — 18 files, 169/169 passed (was 17 files / 167 tests before this file).
  • Confirmed the new assert fails if the x-omk-retryable: false → x-should-retry: false mapping is removed, then restored the source without committing that break.

Follow up on QA's 11/18 checklist item 2: existing tests already show a
quota 429 is sent once and not retried, but they did not assert that the
rewritten response carries x-should-retry equal to "false".

dmae97 commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Reviewed head 0d25be889a0dd1866687ad96c62aca73bd97a8ca against the reported base ddc5e3ff0e728405fc7e09cecb340da82571d629.

  • The diff adds only the 73-line retry-header test file. Both assertions exercise the existing gateway-capture.ts response-header rewrite; the SDK-path case also checks one request despite maxRetries: 3. Fetch is stubbed and globals/mocks are restored after each test. No production code, dependencies, workflows, or credentials are changed.
  • Verified CI job 132967551351: npm run check completed successfully and the new file passed 2 tests. The coding-agent suite reports 10,581 passed / 62 skipped. secret-scan also passed. This is CI-log verification, not a new independent local run or a live gateway test; I did not independently repeat the mutation check described in the PR.
  • No blocking defect found in this narrow test diff. Merge is still held: feat/omk-provider has since advanced to 87e977d9745cb0fb200666b7acf92f7cbf878642 via docs(omk-provider): note gateway per-request output caps #457, so the passing run is not evidence for that exact latest combined tree. Branch-protection details also return 403 to the integration, leaving required-check/review policy unverified.

No workflow rerun or merge was initiated.

@dmae97
dmae97 merged commit 7ad0050 into feat/omk-provider Nov 16, 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