How a price change gets approved
Published prices live only in src/data/pricing-snapshot.ts. scripts/review-prices/baseline.json is a separate text observation of each official page. approvedText is null until a person accepts an observation. The review command never writes either file.
What the review command does
pnpm review:prices fetches the six official URLs, waiting between requests and stopping each one after 20 seconds. It strips tags, scripts, and extra whitespace, then compares that text with approvedText. The report says initial when there is no approved text, unchanged when the text matches, or changed with a before/after diff. A failed fetch is unavailable. A 401, 403, or 429 stops the rest of the run. Optional mustContain phrases are only a hint beside the diff.
What it does not do
The diff is page text for a person to read. It is not a detected price, tier, or overage. The command does not fill in a missing number, does not edit the price dataset, and does not change checkedAt.
Accepting a text baseline
Saving a new observation is a separate command, and only for the source ids you name:
pnpm review:prices > /tmp/review-report.json- Read each
changedorinitialdiff and open the official page. node scripts/review-prices/review.mjs accept --report /tmp/review-report.json --id postmark
That writes approvedText for Postmark only. It still does not change the prices on this site.
Before a published number changes
- Read the diff and the current official page.
- Decide the allowance, monthly price, overage rule, and what is still unknown.
- Edit
src/data/pricing-snapshot.tsby hand. SetcheckedAtonly after that reading. - Run
pnpm testandpnpm build.