Public: anyone can read this; the crew can change it.

The v1 proof passes #11141: a public read states what each plan does at its CPU ceiling and when a lapsed forge sleeps #12576

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Each plan's offer on /pricing now states its CPU ceiling and the lapse rule, and the #11141 probe reads them. I wrote the CPU words differently from the issue's wording, because "slows rather than stopping" is not true everywhere. The offers' JSON-LD, the probe change and the tests are on the branch, pushed.

Notes

shipped production is serving it deploy 77d0004

opened this

Each plan's offer on /pricing now states its CPU ceiling and the lapse rule, and the #11141 probe reads them. I wrote the CPU words differently from the issue's wording, because "slows rather than stopping" is not true everywhere. The offers' JSON-LD, the probe change and the tests are on the branch, pushed.

CPU wording differs from the issue. The billing code has no single "slows at the ceiling" rule. src/spawn/cores.ts slows a busy build where the kernel quota or CPU pinning holds the cores. Where neither does, src/apps/cpu_rule.ts stops a build above 2× its cores for 5 minutes, after a 10-minute safe window. Saying "slows, never stops" for every plan would invent a rule. The offers say both cases, built from CPU_STOP_FACTOR, CPU_STOP_HOLD_MS and CPU_STOP_GRACE_MS. Say so if you want the stronger sentence.

What changed:

  • Offers: each offer in the JSON-LD gets three properties: "At its CPU ceiling", "Days of grace after a lapsed payment" and "After the grace" (the forge sleeps and keeps its data). The days come from lapseRule, so they are the billing.grace_days setting, not a copy. The CPU words come from the new ceilingWords(cpus) in src/spawn/cores.ts, wired through src/web/offer.ts and src/web/pages/pricing.ts.
  • Probe: the #11141 probe in scripts/v1-proven.ts still checks that /settings/billing is gated. It now also requires every offer to say what its CPU ceiling does, to carry a grace-day count equal to the page's data-grace-days, and to say the forge sleeps.
  • Tests:

- test/v1-proven.test.ts fails #11141 when an offer drops the ceiling line, the grace days or the sleep line, and when the days disagree with the page. The healthy-forge test now expects no unproven probes, and the exit-3 test uses the schedules probe instead. - test/offer-lapse.test.ts checks that the offers are made from the constants. - The two existing #11140 breakage cases and the #11138 one now list #11141 as failing too, because it reads the same /pricing page.

Checks: tsc --noEmit is clean, design-lint is clean, and v1-proven, pricing-order and offer-lapse pass. I did not run scripts/gate.ts or scripts/fast.ts.

Not done: the "run against production after release prints pass" item can only be checked once this is released. Plans without a public price still say "Ask the operator" as before. I added no dependency.

Try it: bun scripts/v1-proven.ts https://lab--12560--forge-trevato-apps.open-platform.sh once the preview is up. It should print pass #11141.

Closes #12560

2 earlier comments · 1 event
commented

Each plan's offer on /pricing now states its CPU ceiling and the lapse rule, and the #11141 probe reads them. I wrote the CPU words differently from the issue's wording, because "slows rather than stopping" is not true everywhere. The offers' JSON-LD, the probe change and the tests are on the branch, pushed.

CPU wording differs from the issue. The billing code has no single "slows at the ceiling" rule. src/spawn/cores.ts slows a busy build where the kernel quota or CPU pinning holds the cores. Where neither does, src/apps/cpu_rule.ts stops a build above 2× its cores for 5 minutes, after a 10-minute safe window. Saying "slows, never stops" for every plan would invent a rule. The offers say both cases, built from CPU_STOP_FACTOR, CPU_STOP_HOLD_MS and CPU_STOP_GRACE_MS. Say so if you want the stronger sentence.

What changed:

  • Offers: each offer in the JSON-LD gets three properties: "At its CPU ceiling", "Days of grace after a lapsed payment" and "After the grace" (the forge sleeps and keeps its data). The days come from lapseRule, so they are the billing.grace_days setting, not a copy. The CPU words come from the new ceilingWords(cpus) in src/spawn/cores.ts, wired through src/web/offer.ts and src/web/pages/pricing.ts.
  • Probe: the #11141 probe in scripts/v1-proven.ts still checks that /settings/billing is gated. It now also requires every offer to say what its CPU ceiling does, to carry a grace-day count equal to the page's data-grace-days, and to say the forge sleeps.
  • Tests:

- test/v1-proven.test.ts fails #11141 when an offer drops the ceiling line, the grace days or the sleep line, and when the days disagree with the page. The healthy-forge test now expects no unproven probes, and the exit-3 test uses the schedules probe instead. - test/offer-lapse.test.ts checks that the offers are made from the constants. - The two existing #11140 breakage cases and the #11138 one now list #11141 as failing too, because it reads the same /pricing page.

Checks: tsc --noEmit is clean, design-lint is clean, and v1-proven, pricing-order and offer-lapse pass. I did not run scripts/gate.ts or scripts/fast.ts.

Not done: the "run against production after release prints pass" item can only be checked once this is released. Plans without a public price still say "Ask the operator" as before. I added no dependency.

Try it: bun scripts/v1-proven.ts https://lab--12560--forge-trevato-apps.open-platform.sh once the preview is up. It should print pass #11141.

commented

This push fixes the three gate failures. The gate and tsc --noEmit now pass locally, and test/offer-lapse.test.ts passes (1 test, 4 assertions). I did not run the wider suite; the forge runs the full check on this push.

  • Test cast: test/offer-lapse.test.ts now builds a typed Plan (it was missing the forges field) instead of casting as never.
  • Comment width: I rewrapped the over-long comment in src/spawn/cores.ts to fit 100 columns.
  • Looks rule: the commit carries a "No look:" line. The /pricing change only adds the CPU-ceiling and lapse words to the offers' JSON-LD, so nothing visible changes. If you would rather have before/after pictures, name the app.looks page for /pricing in a "Looks:" line and I'll amend.
Approved

Preview /pricing JSON-LD carries all three properties on every offer (checked at this head); days come from lapseRule, CPU words from the cores/cpu_rule constants. The CPU wording is honest (slowed where the kernel/pinning holds, stopped by the watch otherwise) rather than the issue's blanket 'slows, never stops'; I accept that. No visible change, so no design finding. Two things next: 1) in test/offer-lapse.test.ts drop the odd "small" as keyof typeof SIZES cast and use plan.size typed; 2) after release, run scripts/v1-proven.ts against production and confirm pass #11141 (box 4), then note it on the issue.

commented

Left #12560 open: 1 unticked item remain (Run against production after release, the #11141 line prints pass.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs