Skip to content

Improved internal package migration safeguards - #29842

Merged
ErisDS merged 2 commits into
mainfrom
codex/harden-migrate-internal-package-skill
Aug 11, 2026
Merged

Improved internal package migration safeguards#29842
ErisDS merged 2 commits into
mainfrom
codex/harden-migrate-internal-package-skill

Conversation

@ErisDS

@ErisDS ErisDS commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • hardens the internal-package migration workflow after its first cold-start use
  • requires isolated, freshly based worktrees and machine-checkable subtree topology verification
  • documents public-consumer assessment, strict-catalog dependency mapping, and minimal legacy JavaScript integration
  • keeps CommonJS configuration details in a conditional reference so the core workflow remains concise

Testing

  • git diff --check
  • pnpm lint:agent-skills

Context

The first end-to-end use of the migration skill exposed gaps around long-running git subtree split commands, partially created worktrees, destination-base verification, source workspace:* dependencies, and adapting a legacy CommonJS package without prematurely modernizing it.

This PR updates the reusable workflow only. It does not migrate or modernize a package.

no ref

The first cold-start migration exposed missing worktree, long-running subtree, dependency mapping and legacy package integration guidance. These checks make history imports safer without folding modernization into the ownership PR.
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c638ba4d-e514-40c8-b8a2-f0decd5526be

📥 Commits

Reviewing files that changed from the base of the PR and between 6186586 and 3ad5916.

📒 Files selected for processing (2)
  • .agents/skills/migrate-internal-package/SKILL.md
  • .agents/skills/migrate-internal-package/references/history-and-merge.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • .agents/skills/migrate-internal-package/references/history-and-merge.md
  • .agents/skills/migrate-internal-package/SKILL.md

Walkthrough

The migration skill now documents isolated checkouts, guarded history operations, consumer audits, dependency mapping, legacy package integration, and expanded pre-PR verification. The history reference adds subtree split, worktree, ancestry, and file-history checks. The legacy reference defines CommonJS integration and related configuration and validation steps.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the migration safeguard improvements covered by the pull request.
Description check ✅ Passed The description directly explains the migration workflow safeguards, documentation updates, testing, and scope.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/harden-migrate-internal-package-skill

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Aug 10, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 3ad5916

Command Status Duration Result
nx run ghost-monorepo:lint:boundaries ✅ Succeeded <1s View ↗
nx run-many -t lint -p ghost-monorepo ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-11 11:02:55 UTC

@ErisDS
ErisDS marked this pull request as ready for review August 11, 2026 09:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/migrate-internal-package/references/history-and-merge.md:
- Around line 7-25: After the git switch command in the history-splitting
instructions and before git subtree split, add a clean-working-tree check using
git status --porcelain that stops execution when any local changes remain.
- Around line 72-84: Make the topology-verification block self-contained by
accepting or assigning the recorded source split tip within this block rather
than relying on the earlier source_split_tip assignment. Enable fail-fast shell
execution with set -euo pipefail before the verification checks, preserving the
existing parent and ancestor validations and diagnostic commands.
- Around line 41-49: Update the dedicated Ghost worktree setup instructions
before the existing branch, cleanliness, base, and destination checks to
explicitly prove checkout isolation, either by adding a git worktree add step or
by asserting that git rev-parse --git-dir differs from git rev-parse
--git-common-dir; retain the existing validation checks afterward.

In @.agents/skills/migrate-internal-package/SKILL.md:
- Around line 53-60: Update the public-consumer audit guidance to require a
freshness or active-use signal before classifying Ghost forks or deployed
installation snapshots as having continued installation needs. Treat historical
presence alone as insufficient, and preserve the existing ownership decision and
escalation when current support expectations remain unclear.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 926f2d9f-4e7c-41f6-a72f-2eb8f2a4ac3a

📥 Commits

Reviewing files that changed from the base of the PR and between 32d22de and 6186586.

📒 Files selected for processing (3)
  • .agents/skills/migrate-internal-package/SKILL.md
  • .agents/skills/migrate-internal-package/references/history-and-merge.md
  • .agents/skills/migrate-internal-package/references/legacy-integration.md

Comment thread .agents/skills/migrate-internal-package/SKILL.md
no ref

Make the documented history checks fail closed and distinguish current consumer evidence from historical repository snapshots.
@ErisDS
ErisDS merged commit 579fc56 into main Aug 11, 2026
37 checks passed
@ErisDS
ErisDS deleted the codex/harden-migrate-internal-package-skill branch August 11, 2026 11:11
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