Skip to content

PROMO-001 — Disable unmodeled Stripe price adjustments #102

Open

Description

@daliu

Problem

Race and merchandise Checkout enabled Dashboard promotion codes while local records stored list price only. A discounted, taxed, or shipping-adjusted Stripe total could therefore disagree with local payment, refund, and reporting state.

Outcome

Disable promotion entry and quarantine every unknown or nonzero discount, tax, or shipping charge until server-approved monetary snapshots and policy exist.

Status

Source merged through #144 as 2e3228acc7be649e0b154b450f7bac362e8dfb83; exact pull-request and post-merge CI passed. Firebase deployment, Stripe/provider inventory and readback, and production behavior remain unproven. This issue is blocked on the named owner/external evidence below and must remain open.

Scope

  • functions/createCheckoutSession.js
  • functions/createMerchCheckout.js
  • Promotion/tax/shipping validation hunks and focused tests in the webhook files
  • Additive schemaVersion: "1" metadata on newly created Sessions/PaymentIntents; legacy metadata stays accepted and PAY-003B still owns allowlisting/migration
  • No future discount, tax, or shipping feature design

Acceptance criteria

  • Both current Session creators set allow_promotion_codes: false and automatic tax explicit-off.
  • Unknown or nonzero discount, tax, or shipping amounts never mark a business record paid/fulfilled.
  • Complete all-zero race and merchandise payments remain valid.
  • Anomalies create durable review evidence; definitive failed/expired Sessions still cancel without erasing an earlier warning.
  • Exact creator-payload and signed webhook tests pass under Node 20.
  • A Stripe owner privately inventories outstanding pre-change Sessions/provider adjustment settings, and a reviewed three-Function protected plan deploys and verifies the exact merged source.

Dependencies

None for the merged fail-safe source default. Any future enablement depends on PAY-001, PAY-002, MERCH-002, and approved owner policy.

Remaining owner action

  • Keep Session URLs, code values, provider identifiers, and customer data out of GitHub and AI.
  • Record only redacted private counts, mode/date range, and approved disposition for pre-change Sessions/settings.
  • Do not use production customers or payments for testing.
  • Expand the protected release only through a separately reviewed immutable plan naming createCheckoutSession, createMerchCheckout, and stripeWebhook together.
  • Record Firebase deployment/readback, Stripe-owner readback, and observed behavior separately.

Coordination

The source claim is released after merge 2e3228acc7be649e0b154b450f7bac362e8dfb83. A future owner/provider evidence update does not authorize unrelated source edits or production changes.

Activity

  1. added
    priority:P0Launch blocker or urgent security risk
    type:securitySecurity or privacy boundary
    size:SSmall focused issue
    status:readyDependencies complete and ready to claim
    area:stripeStripe payments and financial lifecycle
    on Jul 12, 2026
  2. self-assigned this
    on Jul 12, 2026
  3. daliu commented on Jul 12, 2026

    @daliu
    ContributorAuthor

    CLAIMED by Codex agent /root at 2026-07-12T20:50:15Z; branch codex/issue-102-disable-stripe-adjustments.

    Existing shared working-tree implementation predates issue publication. I will isolate this outcome onto the named branch serially before opening a PR; no unrelated dirty path is included.

  4. added
    status:in-progressClaimed and actively being implemented
    status:proposedDesigned but dependencies or decisions remain
    and removed
    status:readyDependencies complete and ready to claim
    status:in-progressClaimed and actively being implemented
    on Jul 12, 2026
  5. daliu commented on Jul 12, 2026

    @daliu
    ContributorAuthor

    CLAIM RETAINED / EXTRACTION QUEUED at 2026-07-12T21:53:37.334Z. Assignment and the original timestamped CLAIMED marker remain authoritative. No issue-specific extraction has begun. Dependency: #101 must merge first; #102 then rebases onto it. In stripeWebhook.js, #102 exclusively owns reading discount/tax/shipping totals, adjustment-aware missing-subtotal refusal, nonzero-adjustment and total-breakdown guards, and adjustment evidence fields. In stripeWebhook.test.js it owns total_details fixtures, zero-adjustment assertions, discount quarantine, and tax/shipping quarantine tests. It also owns all dirty hunks in createCheckoutSession.js and createMerchCheckout.js. Creator-payload tests, a 100% discount fixture, and provider/outstanding-Session inventory evidence remain required before closure. Do not duplicate this outcome.

  6. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    EXTRACTION STARTED by /root at 2026-07-13T10:41:09Z; branch codex/issue-102-disable-stripe-adjustments-v2; exact base 87bd121.

    #101 is merged, post-merge CI is green, and its shared webhook claim is released. This fresh isolated worktree owns only both Checkout creators, adjustment-policy webhook hunks/tests, new exact creator-payload tests, and minimum status documentation after any live doc claims are checked.

    The original shared dirty checkout and old placeholder branch remain untouched. No real Stripe/Firebase call, outstanding Session inspection, secret, production data, provider setting, public asset, Rules file, package file, or sitemap is in scope. Provider/outstanding pre-change Session inventory remains an explicit owner/external evidence gate rather than being guessed from source.

  7. added
    status:in-progressClaimed and actively being implemented
    and removed
    status:proposedDesigned but dependencies or decisions remain
    on Jul 13, 2026
  8. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    EXTRACTION FINISHED — 2026-07-13T11:03:59Z

    • Branch: codex/issue-102-disable-stripe-adjustments-v2
    • Base: 36b531c8e741442af7c688c23a780d2dcd4ed374
    • Source commit: f944aaffb1eff745b708ea53d1e15f71bc401d0e
    • Pull request: PROMO-001: disable unmodeled Stripe adjustments #144
    • Exact scope: the two Checkout creators, PROMO-001 adjustment validation/tests in the webhook, one new exact creator-payload test, and minimum engineering/officer status documentation
    • Node 20 proof: Functions lint passed; full Functions suite 159 passed with 1 emulator-only skip
    • Review: two independent reviewers approved exact staged SHA-256 391778bcfb54df137a2e5cb1ff9959a91e153bd99558658c7166eb0757a589c9

    Source is reviewable. This does not prove merge, Firebase deployment, Stripe/provider configuration, website publication, or production behavior. Keep #102 open after source merge: the private pre-change Session/provider inventory and a separately reviewed three-Function protected release plan remain required. Do not paste Session URLs, promotion values, provider IDs, or customer data into this issue.

  9. added and removed
    status:in-progressClaimed and actively being implemented
    on Jul 13, 2026
  10. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    SOURCE MERGED — 2026-07-13T11:06:13Z

    Deployment evidence: no protected release was requested. The current release plan cannot deploy these three Stripe Functions. Firebase was not deployed or read back. Stripe/provider settings and outstanding Sessions were not inventoried, changed, or verified. No website production publication or live payment behavior was verified.

    The source-file claim is released. Status is now status:blocked-owner; keep this issue open for the private redacted provider inventory and a separately reviewed exact-commit three-Function release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:stripeStripe payments and financial lifecyclepriority:P0Launch blocker or urgent security risksize:SSmall focused issuestatus:blocked-ownerRequires an owner or external decisiontype:securitySecurity or privacy boundary

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions