iConnect catalog snapshot helper provenance
Prepared 2026-10-16 in an isolated scratch tree. No installed app or user credential store was changed.

Base: public https://github.com/majd/ipatool
Exact fetched commit: 4484b55d366e177ae6c89758c61588712c572fad
Working source: helper-4484-snapshot/
This is a reconstructed, modified helper, not a byte-identical reproduction of the bundled +dirty binary.

Preserved custom feature:
- OwnedApps BundleID, Query, MobileOnly filters and their synthetic tests, from the existing vendor snapshot.
- They apply before local pagination; existing defaults and CLI/auth behavior stay intact.

Snapshot changes:
- Validated MaxOwnedAppsLimit increased from 100 to 100000.
- CLI/MCP boundary tests and MCP schema documentation updated.
- One synthetic 747-app acquisition test checks one bag/signer setup and exactly one history acquisition per storefront.
- A 100001-row fixture checks local output is bounded to 100000.
- Default CLI page size remains 10.

The vendor snapshot was not buildable as the Mac CLI: its keychain implementation had been replaced by a memory-only interface while cmd/common.go still required New/Args/Keyring. Unrelated vendor login/download/revoke modifications were not imported.
The reconstructed helper keeps exact upstream cmd/auth.go, cmd/common.go, cmd/root.go, cmd/state_directory.go, pkg/keychain implementation, login, download, and revoke code. Keychain service/config and trust semantics are unchanged.
Generated mock files are test scaffolding from identical upstream interfaces; keyring_mock.go was generated using the pinned go.uber.org/mock module. No credential values were read.

Toolchain:
- Official Go 1.25.0 darwin/amd64 archive, SHA256 5bd60e823037062c2307c71e8111809865116714d6f6b410597cf5075dfd80ef.
- go.mod/go.sum unchanged from the exact public commit.
- Modules prefetched with GOSUMDB=sum.golang.org, no checksum exemptions.
- Tests/build used GOTOOLCHAIN=local GOPROXY=off, task-local GOPATH/GOMODCACHE/GOCACHE.
- CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 CC=/usr/bin/clang.

Build:
  bash ../run-go-offline.sh build -trimpath -ldflags '-s -w -X github.com/majd/ipatool/v2/cmd.version=2.7.0+iconnect.snapshot.1' -o ../ipatool-snapshot-darwin-amd64 .
Raw unsigned binary size: 31549968
Raw unsigned binary SHA256: 78b55e42f217f9f80fc50a4f722be88b118137a160b8952ee6e0a479cf116bf9
No helper command, Apple request, authentication, export, or install was executed during this preparation. Sign the candidate with the release process before live evaluation; a new helper signature can require user Keychain trust confirmation.

Offline validation:
  bash ../run-go-offline.sh test -v ./pkg/appstore '-ginkgo.focus=OwnedApps|owned-app DMAP|owned-search'
    56/56 selected Ginkgo specs passed; 709 skipped. Seven additional top-level synthetic/fake HTTP tests passed (including subcases).
  bash ../run-go-offline.sh test -v ./cmd '-ginkgo.focus=List Purchases command|MCP server'
    70/70 selected Ginkgo specs passed; 73 skipped.
  bash ../run-go-offline.sh test -v ./pkg/keychain
    6/6 mock-keyring specs passed; zero skipped.
  Python snapshot tests: 14/14 passed on build Python.
  Adapted project appstore/access/profile/license tests: 10/10 passed on build Python.
  The old app_store.py fails the new snapshot regressions (35 subtest failures and 6 errors), demonstrating coverage of changed behavior.

Python companion:
- One page-1 helper call requesting max-results=100000 and platform=iphone.
- Preserves optional max_pages cap as a bounded single snapshot.
- Rejects inconsistent/malformed/truncated replies, duplicate IDs, totals over 100000.
- No retry/pagination fallback on old helper, timeout, or send error.
- Public field normalization retained; helper private metadata not returned.
- ClientCatalog account identity fences, purchase validation, entitlement checks unchanged.
- New Python module and new helper must ship together.

Known limitations:
- Over-100000 accounts are rejected by the Python companion.
- The helper must still acquire Apple's full history once; speed depends on Apple/VPN/network.
- Windows private --input-stdin and native credential-store design require a separate reviewed implementation; this Mac helper does not implement a Windows credential migration.
