Skip to content

Read only what the docs use from /v1/pricing - #119

Merged
batuhan merged 1 commit into
mainfrom
pricing-schema-tolerant
Nov 9, 2026
Merged

batuhan merged 1 commit into
mainfrom
pricing-schema-tolerant

Conversation

@batuhan

@batuhan batuhan commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The docs fetch GET /v1/pricing on every build and validate it against a vendored copy of the API's schema, which rejects any unknown key or new enum value. Plans and prices now come from scripts/pricing-next.mjs, so the only values the docs still read from that document are the unclaimed-Space timings (anonymous.*), used by the Publish without an account and Limits pages.

So this PR:

  • validates just revision and the five anonymous durations, and accepts everything else
  • removes the old plan, limit, capability and usage tables and variables nothing renders any more
  • removes the vendored schema file and its drift test, which guarded those removed tables
  • adds a test that a document with a new plan code, an empty usage list and an unknown top-level key still parses

This lets the API add the new plans and limits to /v1/pricing without breaking the docs build.

Checked locally: bun run check, bun run build (route and SEO verification pass), bun run test:docs (37 pass), bun run validate, verify:prose and verify:public-safety.

🤖 Generated with Claude Code


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…lds can't break a build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@spacefast
spacefast Bot temporarily deployed to preview/pricing-schema-tolerant November 9, 2026 13:29 Inactive
@indent

indent Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Issues

1 potential issue found:

  • README.md (lines 16-33) still says the build prepares one pricing snapshot for all tables, that the vendored pricing schema is checked against the API contract, and that prices change by editing the API catalog. This PR deletes the schema and its drift test, and plans and prices now come from scripts/pricing-next.mjs.
    Found by Indent Review Agent

↑ Select any checkbox above to have Indent auto-fix the issue

CI Checks

All required checks passed. The only failure is the non-required Spacefast Builds check, which reports "The runtime API hit a fatal error."

Failing Spacefast Builds
  • This is the Spacefast hosting build, not a repo workflow, and it isn't required. The check output only says "The runtime API hit a fatal error." It has no annotations or logs, which points to a platform-side error rather than a problem in the PR's changes. Re-running the check would confirm.

Review agents

Select any unchecked box below to run or rerun that agent.

Found issues (1)
  • Indent Review Agent · One nit: README still describes old pricing flow
Full results

Indent Review Agent

  • Summary: One nit: README still describes old pricing flow
  • Last ran on commit: 61dbef5c
  • Latest result
    {
      "summary": "One nit: README still describes old pricing flow",
      "findings": [
        {
          "fix": "Update the README to say the build reads only `revision` and the `anonymous.*` timing from /v1/pricing, that plan and price tables come from scripts/pricing-next.mjs (edit that file to change docs prices), and drop the sentence about the vendored schema check.",
          "line": 31,
          "path": "README.md",
          "issue": "README lines 16-33 still say the build prepares one pricing snapshot for all tables, that the vendored pricing schema is checked against the generated API contract, and that you change prices by editing the catalog the API serves. This PR deletes schemas/pricing-document.schema.json and its drift test, and plans and prices now come from scripts/pricing-next.mjs, so a contributor who follows the README to change a price will edit the wrong place.",
          "title": "README still describes the removed schema check and API-sourced prices",
          "severity": "nit"
        }
      ]
    }

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T13:29:57.010760Z
We couldn’t complete this review. Comment @codex review to try again.
61dbef5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 93 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5424e3a4-1f7b-4e6c-ab3c-7192568c19dd
Commits

Reviewing files that changed from the base of the PR and between b3853c5 and 61dbef5.

Files selected for processing: 5

  • schemas/pricing-document.schema.json
  • scripts/prepare-pricing.mjs
  • scripts/pricing-schema.test.mjs
  • scripts/pricing.mjs
  • scripts/pricing.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@batuhan
batuhan merged commit baf0503 into main Nov 9, 2026
6 of 7 checks passed
@batuhan
batuhan deleted the pricing-schema-tolerant branch November 9, 2026 13:35

This branch was previously deployed

1 inactive deployment
preview/pricing-schema-tolerant — 61dbef5c Deployed Nov 9, 2026 by spacefast[bot]
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