Skip to content

feat(core): add state manifest models#28

Closed
lynnswap wants to merge 9 commits into
mainfrom
codex/rewrite-state-manifest
Closed

feat(core): add state manifest models#28
lynnswap wants to merge 9 commits into
mainfrom
codex/rewrite-state-manifest

Conversation

@lynnswap

Copy link
Copy Markdown
Owner

Purpose

Add the state and manifest foundation for the PrivateHeaderKit rewrite on top of main.

Changes

  • Add manifest and run record models for persisted rewrite state.
  • Add target, run-local, and phase status enums required by the rewrite flow.
  • Add validated relative artifact paths that reject absolute paths, empty paths, and traversal components.
  • Add pretty JSON encode/decode/read/write helpers with exact Date round-trip precision.
  • Preserve and validate required nullable JSON fields instead of silently omitting or accepting missing keys.
  • Record run execution metadata needed to distinguish simulator/runtime/device/helper context for resume and reproducibility.
  • Add run history retention logic for keeping the latest 10 runs.
  • Expose the documented top-level generatePrivateHeaders(...) forwarding entry point.
  • Cover manifest/run JSON round-trips, artifact path validation, exact timestamp preservation, required nullable keys, execution metadata, and retention ordering.

Verification

  • git diff --check
  • swift test (93 tests passed)
  • codex-review against main (clean, no findings)

Notes

This PR intentionally does not implement CLI wizard flow, cleanup/deletion executors, staging commits, simulator helpers, or legacy marker compatibility.

@lynnswap

Copy link
Copy Markdown
Owner Author

Superseded by #30. The useful state/manifest contracts from this slice are included in the final rewrite foundation PR.

@lynnswap lynnswap closed this Jun 18, 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