Skip to content

Build PrivateHeaderKit rewrite foundation - #30

Merged
lynnswap merged 79 commits into
mainfrom
codex/rewrite-review-base
Aug 11, 2026
Merged

Build PrivateHeaderKit rewrite foundation#30
lynnswap merged 79 commits into
mainfrom
codex/rewrite-review-base

Conversation

@lynnswap

@lynnswap lynnswap commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Purpose

Establish the rewrite foundation around one user-facing privateheaderkit command, with generation orchestration owned by Core and raw dumping kept internal.

Changes

  • Replace the legacy dump-command products with one public CLI, a separate installer entry point, and internal host and simulator helpers.
  • Add source and target discovery, generation state, resume decisions, execution, publication seams, and structured progress and result rendering.
  • Run iOS generation through the simulator helper and rename the retained raw-dump implementation under PrivateHeaderKit-owned modules.
  • Separate display labels from versioned source storage identities, using a normalized, filesystem-safe encoding for every durable path and owner key.
  • Bind an explicit iOS system root that resolves to the selected simulator runtime to that runtime's concrete build in the durable source identity.
  • Keep .headers artifact namespaces collision-free by preserving non-framework bundle suffixes.
  • Move the Mach-O dependencies from maintained forks to their upstream MxIris repositories.

Testing

  • Final-stack swift test (310 tests in 32 suites).
  • iOS Simulator cross-builds for PrivateHeaderKitCore and PrivateHeaderKitCoreTests.
  • Host and booted iOS Simulator loaded-cache inventory and libobjc.A.dylib dump smoke tests.
  • git diff --check.

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

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

ℹ️ 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 Sources/PrivateHeaderKitCLI/PrivateHeaderKitMain.swift Outdated
Comment thread Sources/PrivateHeaderKitCLI/PrivateHeaderKitMain.swift Outdated
Comment thread Sources/PrivateHeaderKitCore/PrivateHeaderGenerationExecutor.swift
Comment thread Sources/PrivateHeaderKitInstall/PrivateHeaderKitInstallMain.swift Outdated
Derive the effective iOS source from the resolved runtime when build and system root are implicit, then reuse the Core plan for resume and failure paths.\n\nRemove the unsupported PH_OUT_DIR documentation so --out remains the single output owner.
Propagate product build and bin-path failures instead of falling back to stale files. Preflight the public command and both helpers before mutating an existing installation.
Use the helper process loaded dyld cache as the single inventory and lookup owner. Bind raw dumps to the discovered cache UUID, reject runtime-root cohort mismatches, and route MachOImage through the existing Objective-C and Swift renderers without requiring dlopen.
Preserve the loaded-cache identity boundary by failing when an exact cache miss cannot be loaded from disk, while keeping unsupported CPU slices as the sole intentional nil result. Canonicalize runtime roots through symlinks before validating cache cohort identity.
Decode schema-v1 execution records that predate cache UUID tracking while continuing to encode explicit nulls. Materialize exact SwiftPM helper paths once for interactive resume and carry canonical runtime-root identity into generation.
Treat only owned regular-file leaves as completed resume artifacts and propagate inspection failures instead of converting them to stale state. Preflight cleanup paths and clean stale artifacts before regeneration without following descendant symlinks.
Distinguish missing artifact parents from occupied path components and reject unsafe cleanup before mutating any candidate. Preserve stale artifacts and stop before raw dumping when non-empty directories cannot be safely removed.

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

ℹ️ 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 Sources/PrivateHeaderKitCLI/PrivateHeaderKitMain.swift Outdated
Comment thread Sources/PrivateHeaderKitInstall/PrivateHeaderKitInstallMain.swift
Comment thread Sources/PrivateHeaderKitCLI/PrivateHeaderKitMain.swift
Comment thread Sources/PrivateHeaderKitCore/PrivateHeaderGenerationExecutor.swift
Comment thread Sources/PrivateHeaderKitCore/PrivateHeaderGenerationExecutor.swift

@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. 👍

Reviewed commit: f0d18758dc

ℹ️ 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 1f4be58 into main Aug 11, 2026
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