Skip to content

P0 Stripe surface to 100% + coverage baselines + public polish - #77

Merged
midagedev merged 5 commits into
mainfrom
feat/p0-portal-items-coverage
Aug 29, 2026
Merged

P0 Stripe surface to 100% + coverage baselines + public polish#77
midagedev merged 5 commits into
mainfrom
feat/p0-portal-items-coverage

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Summary

  • Refreshes all coverage baselines to the re-measured inventory (Stripe OpenAPI 2026-04-22.dahlia, stripe/openapi v2261): 160/587 stale docs → real numbers.
  • Coverage chunks (+40 operations, 160 → 200 / 587, 27.3% → 34.1%):
    • billing_portal configurations CRUD → 5/5 (100%)
    • checkout session update + line_items → 6/6 (100%)
    • invoice update/delete/line mutation + attach_payment + migrate → 39/39 (100%)
    • all four P0 families now at 100%
    • subscription item list/retrieve/update, nested customer subscription discount, product delete, PaymentIntent update, credit-note lines
  • Fixes a latent bug: subscription discount deletion didn't clear discount metadata (merge-mode patch kept the old keys), and the nested customer subscription discount route wasn't customer-scoped.
  • Public polish: CI/license/GHCR badges, 1280x640 social preview image.

Verification

  • go test ./... passes (full suite, three consecutive runs)
  • go run ./cmd/billtap compatibility scorecardimported=50 skipped=1 unsupported=1 mismatch=0 error=0
  • go run ./cmd/billtap compatibility inventory --openapi <dahlia spec>operations=587 implemented=200 inventory_only=387 implemented_percent=34.1
  • gofmt -l . clean; registry claim-count guard updated to 206

Family deltas (generated inventory)

Family Before After
billing 12/39 (stale docs) 39/39 (100%)
billing_portal 1/5 5/5 (100%)
checkout 3/6 6/6 (100%)
catalog 19/54 28/54
payments 15/41 23/41
payment_history 13/30 14/30

Open risks

  • The migration route (POST /v1/subscriptions/{id}/migrate) and invoice attach_payment are evidence-level (metadata) implementations; risks documented in claims and COMPATIBILITY.md.
  • Remaining count growth needs the P1 families and the planned auxiliary L1/L2 waves (T3/T4).

Gate status

G13/G14 in progress; no gate regressions — evidence in docs/GATE_STATUS.md re-measured on 2026-08-29.

Re-measured the OpenAPI inventory against the pinned 2026-04-22.dahlia
snapshot (stripe/openapi v2261): 175/587 operations, 29.8% L1+. Updates
README, the 90% target family table, tracking docs, and gate evidence;
documents the tax-rate/tax-ID and invoice-depth surface in
COMPATIBILITY.md; and corrects stale subscription-item ID risk text in
the claim registry.
…ed discount routes

Adds billing portal configuration CRUD as local evidence (first
configuration becomes the run default), subscription item list/retrieve
and update (price/quantity with the shared proration path), and
customer-scoped nested subscription discount retrieve/delete.

Claims the already-tested invoice void, invoice mark_uncollectible, and
checkout expire routes, retiring the implementedWithoutCompatClaim
fallback carve-out. Fixes subscription discount deletion: the delete
patch removed discount metadata keys, but subscription metadata patches
merge, so the discount survived its own deletion.

OpenAPI inventory: 175/587 (29.8%) -> 187/587 (31.9%); billing_portal
closes to 5/5, billing 31/39, checkout 4/6.
…, product delete

GET /v1/checkout/sessions/{id}/line_items returns expanded Stripe item
objects, and POST /v1/checkout/sessions/{id} updates open sessions
(metadata merge plus line_items[N][quantity] overrides, prices immutable).
Checkout closes to 6/6 OpenAPI operations.

Draft invoices gain POST /v1/invoices/{id} (description, days_until_due,
default_payment_method, metadata), DELETE /v1/invoices/{id} (removes
attached lines and timeline evidence), and add_lines/update_lines/
remove_lines through the invoice-item path with subtotal/total/amount_due
recomputation. DELETE /v1/products/{id} removes local product evidence;
prices keep referencing the deleted id.

Repository gains DeleteInvoice, UpdateInvoiceItem, DeleteInvoiceItem, and
DeleteProduct; UpdateCheckoutSession now persists line_items so quantity
overrides survive reloads.

OpenAPI inventory: 187/587 (31.9%) -> 195/587 (33.2%); billing 36/39,
catalog 28/54.
POST /v1/invoices/{id}/lines/{line_item_id} updates one draft line
(amount/description/metadata) with the update_lines totals recomputation;
attach_payment records a customer-matched PaymentIntent or payment record
on a draft invoice as evidence while collection still runs through
finalize/pay; POST /v1/subscriptions/{id}/migrate records
billing_mode=flexible as subscription metadata evidence.

POST /v1/payment_intents/{id} merges metadata and an evidenced
description (amount/currency/status immutable), and
GET /v1/credit_notes/{id}/lines returns one line derived from the stored
note amount and memo/reason.

OpenAPI inventory: 195/587 (33.2%) -> 200/587 (34.1%). Billing closes
to 39/39, so all four P0 families (webhooks, checkout, billing,
billing_portal) are now at 100%.
@midagedev
midagedev merged commit c10df73 into main Aug 29, 2026
2 of 3 checks passed
@midagedev
midagedev deleted the feat/p0-portal-items-coverage branch August 29, 2026 08:41
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