Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 2.9 KB

File metadata and controls

71 lines (54 loc) · 2.9 KB

M6 Controlled History Rewrite Plan

Status: completed for private main; post-rewrite publication steps pending

This plan is destructive to commit IDs and the private remote branch. Execute it only as a separate M6 milestone after the current audit commit is pushed and a recoverable backup exists.

Rewrite Scope

Rewrite only publishable refs:

  • refs/heads/main;
  • any intentionally retained refs/tags/v* tags, if tags exist at execution time.

Do not publish or use workstation-local tool refs as rewrite inputs.

Required transformations:

  1. Replace the two historical personal author/committer identities with Shaelz <7167970+Shaelz@users.noreply.github.com>.
  2. Replace the historical private live-target name with a generic target name.
  3. Replace concrete workstation paths with generic examples.
  4. Rename the historical private-target check script to its generic successor.

The 2026-06-06 dry run proved these transformations with git-filter-repo callbacks. The real private-remote rewrite then completed with the same strategy, preserving the reviewed tip tree and passing the strengthened publishable-history audit from a fresh GitHub clone.

Safe Execution Sequence

  1. Push and freeze the pre-rewrite audit commit while the repository is private.
  2. Create a mirror backup outside the working repository and verify its refs.
  3. Perform the rewrite in a separate disposable mirror clone using a deterministic replacement map and mailmap.
  4. Run npm run check:public:history in a normal checkout of rewritten main.
  5. Compare the rewritten tip tree with the pre-rewrite tip tree; they must be identical except for any separately reviewed current-tree cleanup.
  6. Review old-to-new commit mapping, commit count, branch set, tag set, and author identities.
  7. Force-push only the intended private main and recreated intended tags.
  8. Fresh-clone from GitHub and run the exact-candidate validation matrix.

The dry-run and real rewrite record is maintained in M6_REWRITE_DRY_RUN_RECORD.md.

Required Verification

  • publishable commit count remains intentional;
  • only intended branches and tags exist locally and on GitHub;
  • every publishable commit uses the intended noreply identity;
  • every annotated publishable tag uses the intended noreply tagger identity;
  • npm run check:public passes;
  • npm run check:public:history passes;
  • npm run check, npm run check:evals, and npm audit --audit-level=high pass from the fresh rewritten clone;
  • the rewritten tip tree matches the reviewed pre-rewrite tip tree;
  • GitHub-hosted exposure surfaces are re-audited after force-push.

Stop Conditions

Stop without pushing if:

  • the backup cannot be verified;
  • unexpected branches or tags appear;
  • the rewritten tip tree changes unexpectedly;
  • the history audit still fails;
  • commit count or identity changes exceed the documented scope; or
  • exact-candidate checks fail.