Context
PR #11123 introduced the local PR sync script (npm run ai:sync-prs), establishing the foundation for agent-accessible offline PR history. However, upon human review of the merged PR, it was observed that this CLI command was not integrated into the automated release pipeline (buildScripts/release/publish.mjs), whereas the corresponding issue archiver is integrated.
Because of this omission, the release-based PR archiving goal of #11114 is incomplete. If a release is published right now, PR markdown sync will not fire automatically, and the PR directory will immediately become stale until someone manually runs npm run ai:sync-prs.
The Problem
The automated sync pipeline in buildScripts/release/publish.mjs triggers GH_SyncService.runFullSync() in Step 6 (Post-Release Cleanup). GH_SyncService currently handles issues and milestones but lacks the ai:sync-prs capability.
The Architectural Reality
buildScripts/release/publish.mjs: Handles the release workflow and has a Post-Release Cleanup phase.
ai:sync-prs (CLI command added in #11123 via buildScripts/ai/syncPullRequests.mjs): Pulls PR markdown data but operates as a standalone script.
ai/services/GH_SyncService.mjs handles the overarching sync tasks but isn't explicitly tied into sync-prs in the release flow.
The Fix
Modify buildScripts/release/publish.mjs to execute npm run ai:sync-prs (or its underlying service invocation) during the Post-Release Cleanup step, ensuring it runs side-by-side with the issue archive process.
- Update
buildScripts/release/publish.mjs (Step 6) to run the PR synchronization logic.
- Ensure that newly synced PR files (
resources/content/pull-requests/) are correctly added to the commit payload that gets pushed back to the dev branch at the end of the publish script.
Acceptance Criteria
Out of Scope
- Changing the underlying PR sync logic established in #11123.
- Implementing UI changes.
Avoided Traps
- Simply adding the
npm run ai:sync-prs command without checking if its file outputs are caught by the git add . command in Step 6. (The current script runs git add . right before committing archived tickets, so adding the sync-prs command before that git status check is the correct pattern.)
Related
- Follow-up to PR #11123 (which closed #11114).
- Issue #11114.
- Origin Session ID: d5ed6767-0292-46bf-9346-439f268048ec
Context
PR #11123 introduced the local PR sync script (
npm run ai:sync-prs), establishing the foundation for agent-accessible offline PR history. However, upon human review of the merged PR, it was observed that this CLI command was not integrated into the automated release pipeline (buildScripts/release/publish.mjs), whereas the corresponding issue archiver is integrated.Because of this omission, the release-based PR archiving goal of #11114 is incomplete. If a release is published right now, PR markdown sync will not fire automatically, and the PR directory will immediately become stale until someone manually runs
npm run ai:sync-prs.The Problem
The automated sync pipeline in
buildScripts/release/publish.mjstriggersGH_SyncService.runFullSync()in Step 6 (Post-Release Cleanup).GH_SyncServicecurrently handles issues and milestones but lacks theai:sync-prscapability.The Architectural Reality
buildScripts/release/publish.mjs: Handles the release workflow and has aPost-Release Cleanupphase.ai:sync-prs(CLI command added in #11123 viabuildScripts/ai/syncPullRequests.mjs): Pulls PR markdown data but operates as a standalone script.ai/services/GH_SyncService.mjshandles the overarching sync tasks but isn't explicitly tied intosync-prsin the release flow.The Fix
Modify
buildScripts/release/publish.mjsto executenpm run ai:sync-prs(or its underlying service invocation) during thePost-Release Cleanupstep, ensuring it runs side-by-side with the issue archive process.buildScripts/release/publish.mjs(Step 6) to run the PR synchronization logic.resources/content/pull-requests/) are correctly added to the commit payload that gets pushed back to thedevbranch at the end of the publish script.Acceptance Criteria
buildScripts/release/publish.mjsis updated to trigger PR synchronization.Out of Scope
Avoided Traps
npm run ai:sync-prscommand without checking if its file outputs are caught by thegit add .command in Step 6. (The current script runsgit add .right before committing archived tickets, so adding thesync-prscommand before thatgit statuscheck is the correct pattern.)Related