Skip to content

fix(ci): warn instead of fail when a documented bound is narrower than the provider's - #1942

Merged
mattmillerai merged 1 commit into
mainfrom
matt/provider-schema-narrower-bounds
Oct 13, 2026
Merged

mattmillerai merged 1 commit into
mainfrom
matt/provider-schema-narrower-bounds

Conversation

@mattmillerai

Copy link
Copy Markdown
Contributor

ELI5

Since ~19:14 UTC on 2026-10-12, every PR that touches Router docs has failed the Code Pages Freshness / provider-schemas check (for example #1941). The cause isn't in those PRs. BFL changed its published API spec so safety_tolerance now goes up to 7. Our FLUX 3 Video and FLUX Video Upscale pages say 4, because 4 is the limit Comfy Router actually enforces (the Router schema in cloud). The checker required the two numbers to match exactly, so a limit we tightened on purpose counted as an error.

Change

  • In check-provider-schemas.ts, a documented minimum/maximum that is wider than the provider's is still an error, because it advertises values the provider rejects.
  • A narrower bound is now a warning, because Router may legitimately enforce a tighter range.
  • Added unit tests for narrower, wider and matching bounds.

Verification

  • bun test ./.github/scripts/snippets/: 120 pass, 0 fail
  • bun run code-pages:check-providers against live provider specs: 0 errors (was 2). The two safety_tolerance mismatches now appear as warnings.

Follow-up (not in this PR)

Whether Router should accept safety_tolerance up to 7 is a separate product/moderation decision on the cloud side. If it changes, the generated docs will pick it up through the normal spec sync.

Provenance

Investigated and written with Claude Code after a Slack report from Lin that CI was failing across many PRs.

🤖 Generated with Claude Code

…n the provider's

BFL raised safety_tolerance's maximum to 7 in its published spec; Router still
validates 4, so the documented 4 is correct. The provider-schemas check treated
any bound mismatch as an error, turning every router-docs PR red. Only a bound
WIDER than the provider's now fails; a narrower one warns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
comfy 🟢 Ready View Preview Oct 13, 2026, 3:07 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 51c6e3df-ad72-403c-bee6-729a328133aa
📥 Commits

Reviewing files that changed from the base of the PR and between 72601f0 and e814fda.

📒 Files selected for processing (2)
  • .github/scripts/snippets/check-provider-schemas.test.ts
  • .github/scripts/snippets/check-provider-schemas.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The provider schema checker now reports wider documented bounds as errors and narrower bounds as warnings. Tests cover narrower, wider, and matching safety_tolerance bounds.

Changes: Provider bound comparison

Layer / File(s) Summary
Compare documented and provider bounds
.github/scripts/snippets/check-provider-schemas.ts, .github/scripts/snippets/check-provider-schemas.test.ts
The checker reports wider documented minimum or maximum bounds as errors. It reports narrower bounds as warnings and ignores equal or missing bounds. Tests cover narrower, wider, and matching bounds for the provider’s 0–7 range.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to e814f

No actionable merge-blocking issue was identified; the bound-checking change is mergeable after normal checks.

Pre-merge checks · Passed 2
Passed Passed checks (2 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mattmillerai mattmillerai added the cursor-review Trigger Cursor automated review label Oct 13, 2026
@mattmillerai
mattmillerai merged commit 1fc0f12 into main Oct 13, 2026
10 of 11 checks passed
@github-actions
github-actions Bot deleted the matt/provider-schema-narrower-bounds branch October 13, 2026 03:13

This branch was successfully deployed

1 active deployment
staging — e814fda6 Deployed Oct 13, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cursor-review Trigger Cursor automated review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant