Skip to content

Build PrivateHeaderKit rewrite foundation#30

Draft
lynnswap wants to merge 49 commits into
codex/rewrite-final-basefrom
codex/rewrite-review-base
Draft

Build PrivateHeaderKit rewrite foundation#30
lynnswap wants to merge 49 commits into
codex/rewrite-final-basefrom
codex/rewrite-review-base

Conversation

@lynnswap

@lynnswap lynnswap commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Purpose

  • Provide the final review branch for the PrivateHeaderKit rewrite against codex/rewrite-final-base, which was created from main at dc744389e9e2c03c4d647491ec06aafc9a9a3d57.
  • Replace the old public dump-command architecture with one public privateheaderkit command and a Core-owned, resume-safe generation pipeline.

Changes

  • Add the new generation model in PrivateHeaderKitCore: source labels, output/state layout, target discovery/resolution, resume decisions, manifest/run JSON, managed artifact cleanup, run locking, and raw-dump invocation contracts.
  • Make privateheaderkit the primary user-facing entry point. Running it without arguments starts interactive generation; automation passes generation flags directly to privateheaderkit without a public generate subcommand.
  • Keep install as a hidden/bootstrap path for swift run -c release privateheaderkit install; it is not listed as a normal installed command choice.
  • Keep user-facing target selection as comma-separated target queries instead of stable target IDs, while preserving structured ambiguity/no-match results for UI flows.
  • Consolidate public execution to one installed privateheaderkit command. Old command names are intentionally rejected, and low-level extraction is hidden behind privateheaderkit __raw-dump.
  • Add iOS simulator generation support through the internal privateheaderkit-sim-helper, installed under libexec, with simctl spawn execution and runtime/device resolution.
  • Rename and retain the raw dump engine as internal PrivateHeaderKitRawDumpCore / PrivateHeaderKitRawDumpRuntimeObjC modules, removing legacy public dump targets and stale orchestration code.
  • Adapt Swift interface generation to upstream SwiftIndexEvents and switch Mach-O dependencies back to upstream MxIris sources where possible, including direct upstream MachOSwiftSection.
  • Delete Docs/RewriteRequirements.md after applying the rewrite decisions.

Testing

  • swift test --force-resolved-versions
  • git diff --check
  • swift run -c release privateheaderkit install
  • privateheaderkit --help
  • printf '14\n\n' | privateheaderkit to verify the interactive flow shows the default output directory without asking for an output path

Notes

  • This remains a draft PR for final user review.
  • Intermediate implementation PRs merged into this branch include simulator support, runtime bound handling, state locking, and upstream Swift index event adaptation.
  • codex-review is intentionally held until requested by the user.

lynnswap added 2 commits June 18, 2026 16:24
Add rewrite requirements, core generation skeleton, source discovery, state/resume contracts, target resolution, and managed artifact cleanup foundations.
@lynnswap lynnswap changed the base branch from main to codex/rewrite-final-base June 18, 2026 13:26
@lynnswap lynnswap force-pushed the codex/rewrite-review-base branch from 0e2319e to 5ab9361 Compare June 22, 2026 08:32
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