Skip to content

Handle unrecognized subscriptions with explicit policies - #7

Merged
lynnswap merged 7 commits into
mainfrom
codex/unrecognized-subscription-delegate
Jul 23, 2026
Merged

Handle unrecognized subscriptions with explicit policies#7
lynnswap merged 7 commits into
mainfrom
codex/unrecognized-subscription-delegate

Conversation

@lynnswap

Copy link
Copy Markdown
Owner

Purpose

Allow an installed binary to handle valid auto-renewable subscriptions that were added to its App Store Connect group after the binary shipped, without conflating them with declared or out-of-group products.

Changes

  • Add UnrecognizedSubscriptionDelegate and UnrecognizedSubscriptionPolicy with leaveUnfinished, finish, and treatAs decisions.
  • Reuse successful decisions for an exact transaction revision during the store session while keeping thrown decisions retryable.
  • Preserve raw entitlement readiness and expose StorePurchaseOutcome.leftUnfinished when the framework intentionally does not finish a delivery.
  • Keep upgraded undeclared subscriptions under TransactionStoreDelegate ownership and reject true catalog metadata contradictions.
  • Add deterministic StoreTransactionKitTesting factories and delivery APIs for unrecognized subscriptions, including admission and replay-ordering coverage.
  • Update the external consumer fixture, README, public API comments, and DocC guidance.

Testing

  • swift test — 125 tests passed
  • swift test --package-path Fixtures/ExternalConsumer — 2 tests passed
  • xcodebuild docbuild -scheme StoreTransactionKit -destination 'generic/platform=macOS' — passed
  • xcrun swift-format lint --recursive --strict Sources Tests Tools/TestApp Package.swift — passed
  • git diff --check — passed
  • Codex review against origin/main — no findings

lynnswap added 6 commits July 23, 2026 15:57
Add a dedicated delegate that can leave, finish, or project valid undeclared subscriptions in the catalog group. Reuse successful decisions by exact transaction revision and keep thrown decisions retryable.

BREAKING CHANGE: StorePurchaseOutcome adds leftUnfinished, and AutoRenewableSubscriptionCatalogError no longer includes undeclaredProduct.
Expose registered synthetic unrecognized subscriptions through the scoped test harness and return semantic delivery outcomes. Prove delegate policy behavior through package tests and the external consumer fixture.

@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: 66ab673090

ℹ️ 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 README.md

@lynnswap lynnswap left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 2d62ba4e47

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

@lynnswap
lynnswap merged commit ceedde3 into main Jul 23, 2026
5 checks passed
@lynnswap
lynnswap deleted the codex/unrecognized-subscription-delegate branch July 23, 2026 09:11
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