Update 2026-05-14 (post-ADR-0004 + #11372 supersession):
- Authority refresh: Epic #11187 Phase 6 framing in original body is now superseded. This ticket is a sub-issue of Epic #11372 (ADR 0004 implementation).
- Alignment: retiring
archiveVersion carry-forward is consistent with ADR 0004 §9 item 4 (config audit — drop defaultArchiveVersion) + §9 item 5 (syncer updates). Under clean-slate migration framing (§3.6), archiveVersion persistence in .sync-metadata.json becomes moot once the new syncer emits fresh metadata. The specific buggy-contract test (AC4) remains independently valuable as a regression anchor.
- No prescription changes — original ACs still hold under ADR 0004 authority.
- Status: open under #11372 Phase 1; sequence per Epic #11372 phase-gates.
Context
Epic #11187 Phase 6 is removing the stale unversioned / pre-staged next-release archive model from resources/content. PR #11362 fixes the producer-side fallback and data cleanup for #11360. A separate Pocket B remains in the sync metadata layer.
V-B-A duplicate sweep found adjacent but non-duplicate work:
- #11282 preserved archive planning metadata in
MetadataManager.
- #11291 migrated PR archive paths and introduced the now-retired v13 pre-stage shape.
- PR #11362 fixes #11360 producer fallbacks and data cleanup.
- #11363 covers config/template
archiveDir and defaultArchiveVersion cleanup.
Current evidence on PR #11362 head:
ai/services/github-workflow/sync/MetadataManager.mjs still serializes archiveVersion: value.archiveVersion.
ai/services/github-workflow/sync/PullRequestSyncer.mjs still carries pr.archiveVersion, hydrates it from cached metadata, branches on it before milestone/release lookup, and writes archiveVersion: p.state === 'OPEN' ? null : plan?.version || null.
test/playwright/unit/ai/services/github-workflow/PullRequestSyncer.spec.mjs still asserts preserves cached archiveVersion for migrated closed PR paths with archiveVersion: 'v13.0.0'.
This ticket is the metadata-contract follow-up. It must not be bundled into #11360 / PR #11362.
Problem
archiveVersion was useful during migration, but after #11360 the active/archive model must be derived from real release placement, not preserved stale metadata. Keeping archiveVersion as a first-class carry-forward field risks re-locking the invalid next-release archive shape into .sync-metadata.json, especially for PRs that should remain active until an actual release cut.
Acceptance Criteria
Out of Scope
- PR #11362 / #11360 data cleanup and syncer fallback fixes.
- #11363 gh-workflow config/template cleanup for
archiveDir and defaultArchiveVersion.
- #11361 recursive archive ingestion for graph sources.
- Release-publish archive creation logic unless this audit proves a direct metadata dependency.
Avoided Traps
- Do not preserve
archiveVersion just because #11282 made it useful for migration; the target substrate changed.
- Do not remove metadata fields blindly if a real release-cut path still depends on them; prove the consumer first.
- Do not encode
v13.0.0 as a special-case cleanup; the rule must prevent any future next-release pre-stage bucket.
- Do not make
.sync-metadata.json the authority for archive placement when GitHub state + release chronology are the real inputs.
Related
Origin Session
- Origin Session ID: d6d89930-f408-42a0-b60e-ec4487a8cc46
Retrieval Hint
Search for archiveVersion MetadataManager PullRequestSyncer v13 carry-forward metadata contract.
Context
Epic #11187 Phase 6 is removing the stale
unversioned/ pre-staged next-release archive model fromresources/content. PR #11362 fixes the producer-side fallback and data cleanup for #11360. A separate Pocket B remains in the sync metadata layer.V-B-A duplicate sweep found adjacent but non-duplicate work:
MetadataManager.archiveDiranddefaultArchiveVersioncleanup.Current evidence on PR #11362 head:
ai/services/github-workflow/sync/MetadataManager.mjsstill serializesarchiveVersion: value.archiveVersion.ai/services/github-workflow/sync/PullRequestSyncer.mjsstill carriespr.archiveVersion, hydrates it from cached metadata, branches on it before milestone/release lookup, and writesarchiveVersion: p.state === 'OPEN' ? null : plan?.version || null.test/playwright/unit/ai/services/github-workflow/PullRequestSyncer.spec.mjsstill assertspreserves cached archiveVersion for migrated closed PR pathswitharchiveVersion: 'v13.0.0'.This ticket is the metadata-contract follow-up. It must not be bundled into #11360 / PR #11362.
Problem
archiveVersionwas useful during migration, but after #11360 the active/archive model must be derived from real release placement, not preserved stale metadata. KeepingarchiveVersionas a first-class carry-forward field risks re-locking the invalid next-release archive shape into.sync-metadata.json, especially for PRs that should remain active until an actual release cut.Acceptance Criteria
MetadataManager.mjsandPullRequestSyncer.mjsto determine whetherarchiveVersionis still a valid persistent metadata field after #11360 / PR #11362.archiveVersioncarry-forward from PR metadata serialization and hydration.PullRequestSyncerno longer uses cachedpr.archiveVersionas a primary archive-bucket source for closed/merged PRs. Archive bucket selection must come from real release/milestone logic or remain active when no release-version applies.PullRequestSyncer.spec.mjscoverage that assertspreserves cached archiveVersion for migrated closed PR paths; tests must assert the post-#11360 contract instead.archiveVersion: 'v13.0.0'metadata cannot force a closed-post-latest-release PR intoarchive/pulls/v13.0.0/.rg "archiveVersion|defaultArchiveVersion|unversioned" ai/services/github-workflow/sync test/playwright/unit/ai/services/github-workflow -g "*.mjs"has no active stale carry-forward path. Remaining mentions must be historical comments or targeted regression assertions that cannot drive runtime placement.Out of Scope
archiveDiranddefaultArchiveVersion.Avoided Traps
archiveVersionjust because #11282 made it useful for migration; the target substrate changed.v13.0.0as a special-case cleanup; the rule must prevent any future next-release pre-stage bucket..sync-metadata.jsonthe authority for archive placement when GitHub state + release chronology are the real inputs.Related
Origin Session
Retrieval Hint
Search for
archiveVersion MetadataManager PullRequestSyncer v13 carry-forward metadata contract.