Problem Statement
While PR #11114 successfully completed a one-shot data migration and updated 5 consumer recursive-readdir readers to support chunked paths for Issues, it did not update IssueSyncer.mjs#getIssuePath to write new active/archived issues to chunked paths.
Currently, IssueSyncer continues to write to flat paths (issues/ and archive/), creating a write-path vs archive scope asymmetry.
Proposed Solution
Refactor IssueSyncer.mjs to utilize the chunked pathing algorithm for writes, ensuring new and updated issues correctly land in Math.floor(issue.number / 100) + 'xx' (or the padStart equivalent) directories. This aligns IssueSyncer with the newly implemented PullRequestSyncer and DiscussionSyncer chunked write-paths.
Additionally, this ticket should track the extraction of the pathing primitive (e.g. String(number).padStart(4, '0').slice(0, -2) + 'xx') into a shared utility (ai/services/github-workflow/shared/chunkPath.mjs) to prevent future drift across the 3 syncers.
Acceptance Criteria
Problem Statement
While PR #11114 successfully completed a one-shot data migration and updated 5 consumer recursive-readdir readers to support chunked paths for Issues, it did not update
IssueSyncer.mjs#getIssuePathto write new active/archived issues to chunked paths. Currently,IssueSyncercontinues to write to flat paths (issues/andarchive/), creating a write-path vs archive scope asymmetry.Proposed Solution
Refactor
IssueSyncer.mjsto utilize the chunked pathing algorithm for writes, ensuring new and updated issues correctly land inMath.floor(issue.number / 100) + 'xx'(or thepadStartequivalent) directories. This alignsIssueSyncerwith the newly implementedPullRequestSyncerandDiscussionSyncerchunked write-paths.Additionally, this ticket should track the extraction of the pathing primitive (e.g.
String(number).padStart(4, '0').slice(0, -2) + 'xx') into a shared utility (ai/services/github-workflow/shared/chunkPath.mjs) to prevent future drift across the 3 syncers.Acceptance Criteria
IssueSyncer.mjsuses chunked paths for all issue file creations and updates.