8000 feat: add paid author and conference hosting with Stripe by tdurieux · Pull Request #916 · tdurieux/anonymous_github · GitHub
[go: up one dir, main page]

Skip to content

feat: add paid author and conference hosting with Stripe - #916

Merged
tdurieux merged 16 commits into
mainfrom
feature/paid
Nov 3, 2026
Merged

tdurieux merged 16 commits into
mainfrom
feature/paid

Conversation

@tdurieux
@tdurieux tdurieux commented Nov 2, 2026 •
Copy link
Copy Markdown
Owner

Growing hosting and backup costs need a sustainable source of income. This adds optional paid hosting for authors and conferences while keeping five active repositories free and reviewer access anonymous.

  • Add monthly/yearly author subscriptions, repository passes and conference packages through Stripe Checkout, with customer-portal billing management.
  • Apply owner-based quotas, preserve coauthor access, and give never-expiring repositories a 90-day grace period after a subscription ends.
  • Persist and retry webhook events, reconcile missed payments, prevent duplicate checkout attempts, and handle refunds and subscription cancellation.
  • Integrate hosting choices into the anonymization form with draft restoration. Refactor settings, add plan comparison beside the header user menu, retain donations, and explain plans in the FAQ.

Billing is disabled by default. Deployment requires Stripe configuration and the rollout/reconciliation steps in docs/paid-hosting.md. No production deployment or live payment is part of this PR. Earlier real Stripe sandbox validation and its limitations are recorded in docs/stripe-sandbox-validation.md.

Validation:

  • npm run build passed.
  • npm run lint passed with three warnings.
  • All 40 billing tests passed against disposable MongoDB.
  • npm test: 946 passed, 195 skipped, and one missing error translation found. Added that translation; the error-code coverage suite then passed. MongoDB billing tests were run separately as noted above.

This branch also contains the earlier runtime repair commit for worker entrypoints, URL validation and pull-request conference persistence.

@tdurieux
tdurieux commented Nov 2, 2026
Copy link
Copy Markdown
Owner Author

@codex review

Please review the paid hosting integration, particularly payment fulfillment and webhook recovery, authorization and owner/coauthor quota accounting, subscription expiry and the 90-day grace period, and checkout draft restoration. Also check the settings and header upgrade flows for regressions.

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Nov 2, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T08:37:32.010276Z c15811e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d7f95506a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/server/routes/repository-private.ts Resolved
Comment thread src/core/billing/quotas.ts Resolved
Comment t 8000 hread public/script/app.js Resolved
Comment thread src/core/Repository.ts Resolved
@tdurieux
tdurieux commented Nov 2, 2026
Copy link
Copy Markdown
Owner Author

@codex review

Addressed all four first-round findings in 036eddf: persisted expiration deadlines, filtered ledger seeding by actual funding scope, preserved checkout privacy options while loading conference defaults, and checked refresh capacity before replacing the published snapshot.

Please verify those fixes and review the remaining billing lifecycle and UI paths for further issues.

Validation: 41 billing tests passed against disposable MongoDB; five focused deadline, refresh and checkout regressions passed against the rebuilt application; the broader repository/UI run had 169 passing tests with the checkout test subsequently passing after rebuilding its bundle. Production build and targeted lint passed. No production changes or live payments.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 036eddfa0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/server/routes/repository-private.ts Resolved
Comment thread src/server/routes/repository-private.ts Resolved
Comment thread src/server/routes/user.ts Resolved
Comment thread src/core/Repository.ts Resolved
@tdurieux
tdurieux commented Nov 2, 2026
Copy link
Copy Markdown
Owner Author

Merged current main into this branch in ded6f90 and resolved the conflicts while retaining paid hosting and upstream access recovery, email alerts, repository suggestions and copy-link controls.

Validation: production build and lint passed; all 41 billing tests passed. Full application run: 1,408 passed, 328 skipped, with two access-guidance UI failures fixed afterward. Both failing cases and two checkout/configuration regressions passed against the rebuilt UI.

@tdurieux
tdurieux commented Nov 2, 2026
Copy link
Copy Markdown
Owner Author

@codex review

Addressed all four second-round findings in d7a5243: settings-only admission, replacement-tree admission before destructive source edits, funding-aware displayed quota, and resolved LFS storage accounting. The earlier four fixes remain in place, and latest main was merged in ded6f90.

Please verify these fixes and inspect remaining payment, quota, source-cache and lifecycle paths. Resolved-file reservations are conservative per-path high-water marks, with up to 1 MiB rounding per file; existing cached objects are not retroactively measured.

Validation: 43 billing tests and 54 repository activity/refresh tests passed, along with the streaming quota regression. Production build and targeted lint passed. No production changes or live payments.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7a5243054

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests i 8000 n this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/billing/quotas.ts Resolved
Comment thread src/core/billing/expiration.ts Resolved
@tdurieux
tdurieux commented Nov 2, 2026
Copy link
Copy Markdown
Owner Author

@codex review

Fixed both third-round findings in afd7a8f. Source replacement retains its reservation throughout REMOVING/PREPARING, and the extension endpoint validates its proposed date before saving.

Please verify these fixes and check for remaining payment, quota and lifecycle issues. Earlier fixes cover persisted grace deadlines, funding-aware quota seeding/display, checkout privacy settings, admission before refresh/source replacement, settings-only edits and resolved-file storage accounting.

Validation: 45 billing tests on disposable MongoDB, 80 route/lifecycle tests, TypeScript compilation and targeted lint passed. No production deployment or live payments.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afd7a8ff3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/server/routes/repository-private.ts Resolved
Comment thread src/server/routes/repository-private.ts Resolved
Comment thread src/core/billing/stripe.ts Resolved
@tdurieux
tdurieux commented Nov 2, 2026
Copy link
Copy Markdown
Owner Author

@codex review

Fixed all three fourth-round findings in 4dc4454: claim restoration before admission with failure recovery and reservation-ID fencing against stale cleanup; enforce conference admission before expired-repository extension; preserve accepted historical one-time prices independently of advertised offers.

Please verify those fixes and inspect remaining lifecycle, payment and quota paths. Earlier review fixes remain in place, including replacement snapshot admission, resolved-file accounting, settings-only saves, and the one-year extension limit.

Validation: 50 billing tests plus the added uncertain-checkout/retired-offer regression passed; 81 route/lifecycle tests passed; TypeScript and targeted lint passed. No production changes or live payments.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4dc4454459

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread public/script/app.js Resolved
Comment thread src/server/routes/conference.ts Resolved
@tdurieux
tdurieux commented Nov 2, 2026
Copy link
Copy Markdown
Owner Author

@codex review

Addressed both findings from review of 4dc4454 in 47a436e: dated repository submissions now attempt server admission before offering checkout, and existing conference settings can be saved after offer retirement while preserving locked plan/dates.

Validation: build passed; 173 UI tests and 8 billing policy/route tests passed; targeted lint passed. Please review the updated head for remaining issues.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 47a436ee4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

tdurieux commented Nov 3, 2026
Copy link
Copy Markdown
Owner Author

Verified the fixes for all 15 existing review threads and resolved them. Integrated current main in e71e6b6, retaining both CSS additions and regenerating the UI assets. Fixed a resulting quota gap in 70735bd: shared-cache fills, bypasses, hits, and legacy promotion now reserve resolved source bytes. Enabled the MongoDB billing suites in CI.

Local validation: 154 billing/backend regression tests, 175 UI tests, and 28 shared-cache HTTP tests passed. Build and TypeScript passed; lint passed with three warnings and no errors. The initial UI run started before asset regeneration finished and failed on conflict markers; the complete rerun passed after rebuilding. Fresh CI is running on 70735bd.

tdurieux commented Nov 3, 2026
Copy link
Copy Markdown
Owner Author

@codex review

Please review c15811e, including integration with merged #918. Billing admission now sums streamed source metadata, reserves before generation activation, and preserves the original persisted snapshot during replacement cleanup. Shared-cache quota enforcement remains included. The deployment script now stops all shared-cache writers before starting replacements, with COORDINATED_RESTART=1 for first activation.

Validation: 279 combined billing/tree/lifecycle tests, two additional streaming/admission regressions, and 11 deployment tests passed. TypeScript passed. Please focus on quota enforcement, source replacement/reactivation races, and deployment ordering. Preparing production deployment after clean review and CI.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: c15811e57f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

tdurieux commented Nov 3, 2026
Copy link
Copy Markdown
Owner Author

Deployment preparation complete. Fresh Codex review of c15811e is clean. The candidate production image passed compiled anonymization and SQLite shared-cache readback on Node 22.23.4. Combined integration tests, TypeScript and lint passed. Waiting for the Node 22/24 CI jobs before merge and production rollout; current production remains unchanged.

@tdurieux
tdurieux merged commit 77e22a8 into main Nov 3, 2026
4 checks passed
@tdurieux
tdurieux deleted the feature/paid branch November 3, 2026 08:48
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

0