Skip to content

API-GIFT-01: add paid report gifting contract - #3448

Merged
fermatmind merged 26 commits into
mainfrom
codex/api-gift-01-paid-report-gifting
Jul 31, 2026
Merged

API-GIFT-01: add paid report gifting contract#3448
fermatmind merged 26 commits into
mainfrom
codex/api-gift-01-paid-report-gifting

Conversation

@fermatmind

@fermatmind fermatmind commented Jul 31, 2026

Copy link
Copy Markdown
Owner

What changed

  • added owner-created, high-entropy hash-only MBTI report gift requests and safe public summaries
  • added friend-owned WeChat mini virtual-payment order reservation without weakening ordinary order ownership
  • grant the recipient only after verified payment, with idempotent webhook/repair and gift-safe refund behavior
  • keep one viable gift payment action at a time, replace released canceled reservations on same-key retry, and preserve intentional/manual revocation plus unrelated grants
  • sanitize gift-payer order reads so recipient attempt and delivery/report details never appear
  • added OpenAPI, focused contracts, and an exact changed-line plus zero-context hunk-coordinate runtime-freeze predicate for the shared repair service

Why

API-GIFT-01 requires a real paid gifting model instead of invite completion. The payer must not gain report access or recipient delivery metadata, sharing/opening must never unlock, IQ and unavailable rollout/provider states must fail closed, and recovery must not double-charge or reactivate refunded/revoked access.

Validation

  • focused commerce/report/schema suite: 58 tests, 717 assertions
  • gift contract: 14 tests, 228 assertions
  • OpenAPI diff: 2 tests, 6 assertions
  • exact runtime-freeze classifier: 3 tests, 13 assertions
  • scoped Pint passed
  • route:list: 98 v0.3 routes including 5 gift routes
  • Composer strict, YAML/JSON, diff, and exact 13-path scope passed
  • complete scripts/ci_verify_mbti.sh exited 0 before the final narrow privacy/retry repair (Big Five 1655 tests / 196111 assertions, Personality authority 95 / 5917, plus downstream gates); fresh exact-head required checks remain mandatory

Deferred items

  • no production provider activation, secrets, SKU writes, real order/payment, deploy, publish, or mini-program upload
  • Apple IAP and rewarded-ad channels remain dependency-blocked
  • LOCAL-GIFT-01 remains local-only and starts only after this PR merges

@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: 6c1328394f

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php Outdated
Comment thread backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Services/Commerce/ReportGiftService.php Outdated
@fermatmind
fermatmind force-pushed the codex/api-gift-01-paid-report-gifting branch from e73a18f to b9d98e8 Compare July 31, 2026 03:48
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review

@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: b9d98e85bb

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Services/Commerce/Webhook/WebhookEntitlementService.php
@fermatmind
fermatmind force-pushed the codex/api-gift-01-paid-report-gifting branch from b9d98e8 to 7f7e4b6 Compare July 31, 2026 04:02
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review

@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: 7f7e4b6bd9

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Http/Controllers/API/V0_3/ReportGiftController.php Outdated
Comment thread backend/app/Services/Commerce/ReportGiftService.php Outdated
Comment thread backend/app/Services/Commerce/EntitlementManager.php Outdated
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head c8e3ffb. Please review the complete PR for correctness, payment/gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund/revocation behavior, and scope compliance.

@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: c8e3ffbab0

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php Outdated
Comment thread backend/app/Services/Commerce/ReportGiftService.php Outdated
Comment thread backend/app/Services/Commerce/EntitlementManager.php
Comment thread backend/app/Services/Commerce/EntitlementManager.php
Comment thread backend/app/Services/Commerce/ReportGiftService.php
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 4063293. Please review the complete PR for correctness, payment and gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund and revocation behavior, repair selection, and exact scope compliance.

@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: 40632932f7

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Services/Commerce/Repair/OrderRepairService.php
Comment thread backend/app/Services/Commerce/ReportGiftService.php
@fermatmind
fermatmind force-pushed the codex/api-gift-01-paid-report-gifting branch from 4063293 to c18fae7 Compare July 31, 2026 05:15
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head c18fae7. Please review the complete PR for correctness, single-payable gift lifecycle safety, authorization boundaries, refund and repair concurrency, intentional revocation handling, idempotency, and exact scope compliance.

@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: c18fae70eb

ℹ️ 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 backend/app/Http/Controllers/API/V0_3/ReportGiftController.php Outdated
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 3a21604. Please review the complete PR for correctness, per-order payment-action serialization, single-payable gift lifecycle safety, authorization boundaries, refund and repair concurrency, intentional revocation handling, idempotency, and exact scope compliance.

@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: 3a216046f5

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Http/Controllers/API/V0_3/ReportGiftController.php Outdated
@fermatmind
fermatmind force-pushed the codex/api-gift-01-paid-report-gifting branch from 3a21604 to 1a3997f Compare July 31, 2026 05:58
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 1a3997f. Please review the complete PR for correctness, locked gift binding revalidation before payment action, replacement order and attempt terminalization before cancellation, single-payable gift lifecycle safety, authorization boundaries, refund and repair concurrency, idempotency, and exact scope compliance.

@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: 1a3997f94d

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Services/Commerce/EntitlementManager.php
@fermatmind
fermatmind force-pushed the codex/api-gift-01-paid-report-gifting branch from 1a3997f to 3afd9f4 Compare July 31, 2026 06:21
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 3afd9f4306f23b3188fb41f3f4c951f8ff61c9d7. Please review the complete PR for correctness, duplicate gift settlement prevention, manual revocation isolation, payment and gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund and repair behavior, and exact scope compliance.

@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 3afd9f4. Please review the complete PR for correctness, duplicate gift settlement prevention, manual revocation isolation, payment and gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund and repair behavior, and exact scope compliance.

@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: 3afd9f430d

ℹ️ 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 backend/app/Services/Commerce/EntitlementManager.php
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 2766bb9. Please review the complete PR for correctness, intentional gift revocation preservation across fallback rebinding, duplicate settlement prevention, manual revocation isolation, payment and gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund and repair behavior, and exact scope compliance.

@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: 2766bb9f28

ℹ️ 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".

@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 9661db1. Please review the complete PR for correctness, exact shared OrderRepairService runtime-freeze classification, intentional gift revocation preservation, duplicate settlement prevention, payment and gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund and repair behavior, and exact scope compliance.

@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: 9661db1939

ℹ️ 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 backend/app/Services/Commerce/Webhook/WebhookEntitlementService.php
@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head b08560c. Please review the complete PR for correctness, preservation of intentional gift revocation on callback replay, exact changed-line and hunk-coordinate binding for shared OrderRepairService runtime-freeze classification, duplicate settlement prevention, payment and gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund and repair behavior, and exact scope compliance.

@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: b08560cc8b

ℹ️ 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 backend/app/Services/Commerce/ReportGiftService.php
Comment thread backend/app/Services/Commerce/ReportGiftService.php
@fermatmind
fermatmind force-pushed the codex/api-gift-01-paid-report-gifting branch from b08560c to 74f7fca Compare July 31, 2026 07:06
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@fermatmind

Copy link
Copy Markdown
Owner Author

@codex review exact head 74f7fca. Please review the complete PR for correctness, gift-payer order-response privacy, same-key retry after released canceled reservations, intentional revocation preservation, exact changed-line and hunk-coordinate runtime-freeze binding, duplicate settlement prevention, payment and gift lifecycle safety, authorization boundaries, concurrency, idempotency, refund and repair behavior, and exact scope compliance.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@fermatmind

Copy link
Copy Markdown
Owner Author

Merge gate blocked: exact head 74f7fca passed all nine GitHub checks, mergeStateStatus is CLEAN, and all existing review threads are resolved. The requested exact-head Codex review was not executed because the GitHub Codex connector reported that code-review usage limits were reached and credits/code-review enablement are required. No merge, deployment, provider activation, secret, production order, real payment, or mini-program upload was performed.

@fermatmind
fermatmind merged commit 2f79c28 into main Jul 31, 2026
10 checks passed
@fermatmind
fermatmind deleted the codex/api-gift-01-paid-report-gifting branch July 31, 2026 13:36
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