Skip to content

Restructure StoreKit transaction handling documentation#4

Merged
lynnswap merged 4 commits into
mainfrom
docs/readme-restructure
Jul 17, 2026
Merged

Restructure StoreKit transaction handling documentation#4
lynnswap merged 4 commits into
mainfrom
docs/readme-restructure

Conversation

@lynnswap

Copy link
Copy Markdown
Owner

Purpose

Make the README a practical integration guide and make DocC the canonical description of transaction ownership, entitlement readiness, failure reporting, and lifecycle behavior.

Changes

  • Restructure the README around requirements, setup, a process-owned SwiftUI composition root, entitlement rendering, and callback contracts.
  • Add a dedicated transaction-handling DocC article and refine the package landing page.
  • Document reconciliation, verification, retry, and close semantics against the current implementation.
  • Distinguish failure delivery from readiness state and clarify that joined work is reported once by its physical owner.
  • Document the serial, backpressured reportFailure contract and callback reentrancy restrictions.

Testing

  • xcodebuild docbuild -scheme StoreTransactionKit -destination 'generic/platform=macOS' -derivedDataPath .build/docc-audit
  • Compiled the README SwiftUI ownership example in a standalone consumer package with swift build --build-system swiftbuild
  • xcrun swift-format lint --strict Sources/StoreTransactionKit/TransactionStore.swift Sources/StoreTransactionKit/StoreTransactionSession.swift Sources/StoreTransactionKit/StoreTransactionFailure.swift
  • git diff --check
  • Codex review completed with no remaining actionable findings

Deployment

Publish the DocC archive through the repository's existing manual documentation workflow after merge.

lynnswap and others added 4 commits July 17, 2026 15:42
The README had accreted normative contract prose across audit fixes,
mixing the adoption guide with the contract reference and duplicating
symbol documentation. Restructure it as an adoption funnel: ownership
split, quick start, the handler contract, entitlement behavior summary,
and short recipes, each stating a rule once with a link to its source
of truth.

Move the detailed delivery, reconciliation, and failure-reporting model
into a new DocC article, Understanding transaction handling, linked
from the README, the DocC landing page Topics, and the TransactionStore
symbol documentation, so the contract text lives in one place.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codex review found two overclaims in the new article: the
reconciliation guarantee does not cover transactions already finished
on another device (they never appear in Transaction.unfinished), and an
unverified purchase result passed to process(_:) throws to the caller
rather than reaching the failure callback. State both boundaries
explicitly and align the README verification bullet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
List platform and toolchain requirements as a scannable README section.
Replace the unresolved StoreKit/StoreKitError/userCancelled symbol links
with plain code voice, matching the existing convention for StoreKit
symbols and silencing the docbuild warning.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lynnswap
lynnswap merged commit b3dd83f into main Jul 17, 2026
2 checks passed
@lynnswap
lynnswap deleted the docs/readme-restructure branch July 17, 2026 08: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