Context
This is bucket B0b of Epic #11187 (Adopt single-root archive with lazy 100-item chunking).
Currently, MetadataManager.save() over-prunes metadata, causing path, closed, closedAt, mergedAt, and milestone to be lost.
The Problem
Over-pruning metadata for substrate-budget breaks downstream substrate-correctness. If we lose closedAt or path, we can't reliably sync items between active and archive directories, leading to duplication (OQ1 root-cause).
The Architectural Reality
ai/services/github-workflow/MetadataManager.mjs
The Fix
Modify MetadataManager.save() to preserve:
path, closed, closedAt (for discussions and all types)
mergedAt, milestone (for PRs)
Acceptance Criteria
Out of Scope
- Migrating existing corrupted metadata.
Related
Origin Session ID: 2c4aa4df-2628-45ae-a9c2-156fd9308f21
Context
This is bucket B0b of Epic #11187 (Adopt single-root archive with lazy 100-item chunking). Currently,
MetadataManager.save()over-prunes metadata, causingpath,closed,closedAt,mergedAt, andmilestoneto be lost.The Problem
Over-pruning metadata for substrate-budget breaks downstream substrate-correctness. If we lose
closedAtorpath, we can't reliably sync items between active and archive directories, leading to duplication (OQ1 root-cause).The Architectural Reality
ai/services/github-workflow/MetadataManager.mjsThe Fix
Modify
MetadataManager.save()to preserve:path,closed,closedAt(for discussions and all types)mergedAt,milestone(for PRs)Acceptance Criteria
MetadataManager.save()preserves the necessary lifecycle fields.Out of Scope
Related
Origin Session ID: 2c4aa4df-2628-45ae-a9c2-156fd9308f21