Context
Sub of #12186. The bucketing logic fixes — #12188 (fetch-all-releases) + #12184 (milestone semver-guard), merged via #12192 — are forward-only: they correct how new closures bucket, but do not move the existing pile-up.
The Problem (verified)
IssueSyncer.mjs:586-606 (sealed-chunk enforcement) forces any already-archived issue whose recomputed bucket differs from its current path to stay put:
} else if (wasArchived && targetPath !== oldAbsolutePath) {
logger.warn(`[SEALED CHUNK ENFORCEMENT] ... Forcing retention at ${oldAbsolutePath}.`);
targetPath = oldAbsolutePath;
}A clean-slate re-sync (lastSync === null) still seeds from existing metadata.issues (:562 {...metadata.issues}), so oldIssue exists → sealed. Result: a re-sync will NOT move the existing 4,133 v8.1.0 issues (56.9% of the archive). The portal tickets-view stays garbage until a deliberate one-time migration runs. (The epic's "after re-sync, no v8.1.0 catch-all" AC silently assumed a re-sync clears it — it doesn't.)
Approaches
- A — Regenerate (ADR-canonical): clear
metadata.issues + delete resources/content/archive/{issues,pulls,discussions}/ → clean-slate re-sync re-fetches + buckets fresh (no sealed conflict). Matches ADR-0004's regeneratable-cache model. Destructive (deletes committed content) + heavy full GitHub re-fetch (now rate-limit-hardened by #12193).
- B — Non-destructive migration: a one-time sealed-chunk override that re-buckets the existing archive into correct folders, ideally metadata-driven (local file moves using the new bucketing logic + full
sortedReleases; no full GitHub re-fetch). No delete; controlled + reviewable; more code than A.
Operational notes
sync_all runs on dev only.
- Either approach produces a large content diff (4,133+ files move buckets).
- The follow-on portal regen needs a concurrency cap first — the un-capped SSR fan-out melted the host at load 117 on 18 cores (middleware-v2
build.mjs).
Status
Deferred (operator 2026-05-30: finish #12191 first; schedule this migration deliberately for the large diff + regen).
Acceptance Criteria
Related
- #12186 (epic), #12188 / #12184 (forward-only logic fixes), #12193 (rate-limit hardening — de-risks approach A's re-fetch).
Retrieval Hint: grep SEALED CHUNK in ai/services/github-workflow/sync/IssueSyncer.mjs.
Context
Sub of #12186. The bucketing logic fixes — #12188 (fetch-all-releases) + #12184 (milestone semver-guard), merged via #12192 — are forward-only: they correct how new closures bucket, but do not move the existing pile-up.
The Problem (verified)
IssueSyncer.mjs:586-606(sealed-chunk enforcement) forces any already-archived issue whose recomputed bucket differs from its current path to stay put:} else if (wasArchived && targetPath !== oldAbsolutePath) { logger.warn(`[SEALED CHUNK ENFORCEMENT] ... Forcing retention at ${oldAbsolutePath}.`); targetPath = oldAbsolutePath; }A clean-slate re-sync (
lastSync === null) still seeds from existingmetadata.issues(:562 {...metadata.issues}), sooldIssueexists → sealed. Result: a re-sync will NOT move the existing 4,133 v8.1.0 issues (56.9% of the archive). The portal tickets-view stays garbage until a deliberate one-time migration runs. (The epic's "after re-sync, no v8.1.0 catch-all" AC silently assumed a re-sync clears it — it doesn't.)Approaches
metadata.issues+ deleteresources/content/archive/{issues,pulls,discussions}/→ clean-slate re-sync re-fetches + buckets fresh (no sealed conflict). Matches ADR-0004's regeneratable-cache model. Destructive (deletes committed content) + heavy full GitHub re-fetch (now rate-limit-hardened by #12193).sortedReleases; no full GitHub re-fetch). No delete; controlled + reviewable; more code than A.Operational notes
sync_allruns ondevonly.build.mjs).Status
Deferred (operator 2026-05-30: finish #12191 first; schedule this migration deliberately for the large diff + regen).
Acceptance Criteria
resources/content/archive/issues/has no v8.1.0 catch-all; the 4,133 mis-bucketed issues distribute to their true historical releases._index.json+tickets.jsonregenerated consistently.Related
Retrieval Hint: grep
SEALED CHUNKinai/services/github-workflow/sync/IssueSyncer.mjs.