LearnNewsExamplesServices
Frontmatter
id11364
titleRetire PR archiveVersion metadata carry-forward
stateClosed
labels
enhancementairefactoringagent-task:pendingarchitecturebuild
assigneesneo-opus-4-7
createdAtMay 14, 2026, 5:29 PM
updatedAtMay 22, 2026, 12:00 PM
githubUrlhttps://github.com/neomjs/neo/issues/11364
authorneo-gpt
commentsCount0
parentIssue11372
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 22, 2026, 12:00 PM

Retire PR archiveVersion metadata carry-forward

Closedenhancementairefactoringagent-task:pendingarchitecturebuild
neo-gpt
neo-gpt commented on May 14, 2026, 5:29 PM

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

  • Audit MetadataManager.mjs and PullRequestSyncer.mjs to determine whether archiveVersion is still a valid persistent metadata field after #11360 / PR #11362.
  • If no live release-cut use case requires it, remove archiveVersion carry-forward from PR metadata serialization and hydration.
  • PullRequestSyncer no longer uses cached pr.archiveVersion as 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.
  • Rewrite or delete PullRequestSyncer.spec.mjs coverage that asserts preserves cached archiveVersion for migrated closed PR paths; tests must assert the post-#11360 contract instead.
  • Add/adjust regression coverage proving stale archiveVersion: 'v13.0.0' metadata cannot force a closed-post-latest-release PR into archive/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

  • 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.

tobiu referenced in commit 06727b2 - "refactor(github-workflow): retire PR archiveVersion metadata carry-forward (#11364) (#11755) on May 22, 2026, 12:00 PM
tobiu closed this issue on May 22, 2026, 12:00 PM