Public: anyone can read this; the crew can change it.
The v1 proof can read the lapse rule: /pricing states the grace period and that a lapsed forge sleeps, in text a probe can match #12514
Check · Review · Land · Live done — Landed and live in production.
/pricing now says how many days of grace a lapsed payment has and that the forge then sleeps and keeps its data. GET /api/v1/plans carries the same two facts as graceDays and lapse: "sleep". tsc, the gate, design-lint and the 871 tests in the pricing, plans, billing, contract and v1-proven files pass.
shipped production is serving it deploy d73d768
4 earlier comments · 1 event
/pricing now says how many days of grace a lapsed payment has and that the forge then sleeps and keeps its data. GET /api/v1/plans carries the same two facts as graceDays and lapse: "sleep". tsc, the gate, design-lint and the 871 tests in the pricing, plans, billing, contract and v1-proven files pass. I did not run the full suite; the forge runs it on push.
- Page: under the plans, one
<p data-lapse="sleep" data-grace-days="N">reads "If a payment lapses, you have N days of grace. After that your forge sleeps and keeps its data." - Source of the number: a new
src/billing/lapse_rule.tsreadsbilling.grace_daysthroughlimitValue. The page and the API both use it, so there is no second constant. - API:
graceDaysandlapsesit besideitemsin the/api/v1/plansresponse, and the OpenAPI summary names them. - Probe: the #11140 probe in
scripts/v1-proven.tsnow passes only if three things hold:
- The attribute is present.
- The sentence is present and its number equals the attribute.
- /api/v1/plans says lapse: "sleep" with the same graceDays.
If one is missing or the numbers differ, it fails. #11141 is still unproven.
- Tests:
- test/pricing-order.test.ts checks that the page and the API follow the setting, and that changing billing.grace_days to 11 changes both.
- test/v1-proven.test.ts has probe-failure cases for a missing sentence, a missing field, a number that differs between page and API, and sentence against attribute.
- The "all unproven" expectations now name only #11141.
Left out: the probe reads the lapse rule, not the sleeping itself, so it proves what the page says rather than what the forge does when it sleeps. The #11141 CPU-slowing and plan-change reads are untouched.
I added an empty "Try:" commit because the pre-push hook required one.
To try: open /pricing and read the line below the plans. Run bun scripts/v1-proven.ts <url> against a preview.
/pricing and /api/v1/plans now state the lapse rule: after the grace days from the setting, the forge sleeps. The v1 #11140 probe can read it under the plans on /pricing.
The last check failed only on the gate rule "before/after looks", because src/web/pages/pricing.ts changed. /pricing isn't in app.looks in forge.json, so there is no page to take pictures of. I added an empty commit carrying a "No look:" line that says so. The gate now passes locally and the branch is pushed. I didn't run tsc or any tests, since no code changed since the last push.
I left /pricing out of app.looks. Adding it would be a separate decision for a person.
To try it, open /pricing on the preview and read the line under the plans about a lapsed payment.
/pricing and GET /api/v1/plans now state the lapse rule, so the v1 #11140 probe can read it. The check on the last push failed in cell and egress tests, and I found no cause in this change. I have not reproduced those failures, so a red check on the new push would mean they are real.
What changed
src/billing/lapse_rule.ts(new) reads the grace days from thebilling.grace_dayssetting and says that after that the forge sleeps and keeps its data.- /pricing prints that sentence and carries the number in
data-grace-days. /api/v1/plansaddsgraceDaysandlapse: "sleep"beside the plans.scripts/v1-proven.tsnow checks that the page's words, its attribute and the API all agree, and that the lapse is "sleep".test/pricing-order.test.tsandtest/v1-proven.test.tscover the sentence, the attribute and the API fields.
The red check
- The change touches no spawn, cell or egress code. The
kid--forge.testandparent.examplerefusals in the log come from the cell tests. - The failing
spawn-stranger-cell,spawn-cellandtrusted-hoststests, plus pricing-order and v1-proven, pass here: 0 fail, but the unix-socket cell tests are skipped in this sandbox. The forge's check does run them. mainhad moved 11 commits, and the check had that tip in view, so I mergedmaininto the branch rather than rebasing, since force pushes are refused.scripts/gate.tsandbun x tsc --noEmitcame back clean after the merge.scripts/fast.tssaid the diff is too broad to name tests (exit 2). I ran only the four test files above and then pushed, not the whole suite.
Left out
- No before/after look for /pricing, as recorded in the earlier commit.
To try it
Open /pricing and read the line under the plans, then curl /api/v1/plans.
Works in the preview: /pricing prints the sentence with data-grace-days=7 and /api/v1/plans carries graceDays and lapse. The number comes from billing.grace_days, and the tests and probe cover page, attribute and API. One fix is needed: docs/features/plans.md still says /api/v1/plans answers only the plans (line 19). It does not mention graceDays or lapse, or the new line on /pricing. Add both there (not in README).
docs/features/plans.md now covers the lapse rule, which was the one fix you asked for. I changed no code and ran no tests, since this is a docs-only commit that I pushed to the same branch.
GET /api/v1/plans: the paragraph that said it answers only the plans now also namesgraceDaysandlapse: "sleep". It saysgraceDaysis thebilling.grace_dayssetting, and that after the grace the forge sleeps and keeps its data./pricing: a new paragraph quotes the lapse sentence and says the element carriesdata-grace-days. It also says the number comes from thebilling.grace_dayssetting throughsrc/billing/lapse_rule.ts, so the page and the API change together.
The paragraph quotes the sentence with "7 days", which is the default I saw in the preview. If an admin changes the setting, the page shows the new number and the doc's example no longer matches it.
I merged main into the branch and pushed it. The only conflict was in test/v1-proven.test.ts, and the 23 tests in that file pass. bun scripts/gate.ts and bun x tsc --noEmit came back clean. I did not run the rest of the suite here; the forge runs it on the push.
main had moved the schedule probe's test data into a health() helper. My branch still had the older sched helper, which nothing uses any more, so I dropped it. I kept the rule() helper for the lapse sentence and main's health().
In the "exits 3" test I took main's plain stub() call and rewrote its comment. With the lapse rule now proven, /pricing no longer counts as unproven, so only one item is left, which is what the existing "1 of 12 unproven" assertion expects.
Earlier ask met: the how-to is now in docs/features/plans.md, not README. The preview shows the sentence with data-grace-days=7 and /api/v1/plans carries graceDays 7 and lapse sleep. The number comes from the billing.grace_days setting in one module. One plain muted line under the plans, no new component or accent. Tests cover the sentence, the field and the setting change; probe cases cover each mismatch.
/pricing now says how many days of grace a lapsed payment has and that the forge then sleeps and keeps its data.
GET /api/v1/planscarries the same two facts asgraceDaysandlapse: "sleep".tsc, the gate, design-lint and the 871 tests in the pricing, plans, billing, contract and v1-proven files pass. I did not run the full suite; the forge runs it on push.<p data-lapse="sleep" data-grace-days="N">reads "If a payment lapses, you have N days of grace. After that your forge sleeps and keeps its data."src/billing/lapse_rule.tsreadsbilling.grace_daysthroughlimitValue. The page and the API both use it, so there is no second constant.graceDaysandlapsesit besideitemsin the/api/v1/plansresponse, and the OpenAPI summary names them.scripts/v1-proven.tsnow passes only if three things hold:- The attribute is present. - The sentence is present and its number equals the attribute. -
/api/v1/planssayslapse: "sleep"with the samegraceDays.If one is missing or the numbers differ, it fails. #11141 is still
unproven.-
test/pricing-order.test.tschecks that the page and the API follow the setting, and that changingbilling.grace_daysto 11 changes both. -test/v1-proven.test.tshas probe-failure cases for a missing sentence, a missing field, a number that differs between page and API, and sentence against attribute. - The "all unproven" expectations now name only #11141.Left out: the probe reads the lapse rule, not the sleeping itself, so it proves what the page says rather than what the forge does when it sleeps. The #11141 CPU-slowing and plan-change reads are untouched.
I added an empty "Try:" commit because the pre-push hook required one.
To try: open
/pricingand read the line below the plans. Runbun scripts/v1-proven.ts <url>against a preview.Closes #12513