fix(review): App Store 2.1 remediation + accounts/billing plan (B0)#259
Merged
Conversation
…401, review-notes rewrite (B0) The 2026-07-13 App Store rejection (Guideline 2.1, 'unable to sign in when we entered the code') traced to three stacked causes; this lands the immediate fixes plus the accounts/billing plan doc that the follow-up PRs implement. - iOS Settings: Cloud 'Connect' / Mac 'Apply pairing' / QR scan now probe the server (verifyConnection) before declaring success — the old parse-only 'Connected.' hid a bad token until the first Chat message. - server: presented tokens from cookie/query are trimmed (paste artifacts); 401 body is structured JSON (token_missing / token_mismatch / server_not_configured) instead of a bare 'unauthorized'. - RELEASE.md: App Review notes rewritten — explicit 'no username/password' callout, exact paste steps, ASC field guidance, pre-submission curl check. - deploy.sh: Cloud Run sizing for the account era (2 vCPU / 4Gi, timeout 3600). - docs: PLAN_ACCOUNTS_BILLING_v1.0.md — centralized accounts as the primary flow, 12h session quota + paid tiers, consumable IAP, inference gateway (design v1.1, decisions locked). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
🤖 Automated review — ✅ SAFE TO MERGEApp Store 2.1 remediation (B0). Verified:
Nits (non-blocking):
|
oratis
added a commit
that referenced
this pull request
Jul 22, 2026
Post-merge hardening from the batch review of the accounts/billing epic (PRs #259–#272). One blocker found in review + three low-risk fixes: - [BLOCKER, #265] Enforce StoreKit `environment` on the cloud IAP endpoint. Sandbox transactions are Apple-signed with the SAME cert chain as Production and cost the buyer $0, so /api/billing/iap accepting them = free real credit for anyone with a sandbox tester Apple ID. The endpoint now rejects any non-Production transaction in the cloud edition (LISA_IAP_ALLOW_SANDBOX=1 re-opts a non-prod/staging deploy back in). The JWS signature verification itself was already sound. - [#263] costMicroUSD: clamp a non-finite token count (NaN/Infinity) -> 0, so it can't poison the usage ledger, balance.json, or the budget breaker. - [#263] GET /api/billing/usage: on cloud, a shared-demo-token caller (no account) no longer reads the GLOBAL home's aggregate usage; mirrors /quota. - [#260/#269] Session cookies gain the Secure attribute on the cloud (HTTPS) edition (HttpOnly + SameSite=Strict already present); local/mac http path is unchanged. typecheck + full test suite (1089 pass / 0 fail) + build all green. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The 2026-07-13 rejection (Guideline 2.1, submission
cb80235c) said the reviewer was unable to sign in when entering the code. Investigation found three stacked causes — all addressed here, so this can be resubmitted without waiting for the full accounts work:What
verifyConnectionand report the real outcome (401 → actionable message; unreachable → hint). Spinner + disabled state while probing.token_missing/token_mismatch/server_not_configured).see-review-notes/ token), pre-submissioncurlcheck that reproduces the reviewer's path.--timeout 3600so SSE streams aren't cut). min=max=1 stays until B2.PLAN_ACCOUNTS_BILLING_v1.0.md(design v1.1, decisions locked) — centralized accounts as the primary flow on all surfaces, 12h $5 session quota + paid tiers, consumable IAP, inference gateway for key-free local Macs. Follow-up PRs (B1–B7) implement it.Verification
npm run typecheckclean;npm test1018 pass / 0 fail.build.sh): BUILD SUCCEEDED.Operator actions (not in this PR)
deploy/deploy.shto apply the new sizing.🤖 Generated with Claude Code