Context
This is the missing B0a companion for Epic #11187, surfaced during the 2026-05-13 clone-local config sync recovery.
PR #11282 merged the MetadataManager pruning prerequisite. During the follow-up archive-structure readiness check, the swarm found that ai/mcp/server/github-workflow/config.template.mjs had the archive fields, but each agent's gitignored clone-local ai/mcp/server/github-workflow/config.mjs needed manual sync. The Codex/GPT clone and Gemini real repo clone were patched cleanly. Claude's persistent checkout briefly entered a worse partial state: archiveRoot present while archiveChunkThreshold and archiveChunkPrefix were missing.
That state is more dangerous than a fully stale config: code that only checks for archiveRoot can proceed into archive planning while the lazy chunking contract is undefined.
The Problem
The GitHub Workflow runtime config has no loud shape validation for the archive substrate fields required by Epic #11187:
issueSync.archiveRoot
issueSync.archiveChunkThreshold
issueSync.archiveChunkPrefix
Template/local drift is expected because config.mjs is gitignored and clone-local. #10559 already added PR workflow guidance for template-change notification, and #11189 added the initial archive config fields. Those are necessary but not sufficient: when a local runtime config is stale or partially patched, archive sync/release tooling should fail early with an operator-actionable error instead of running with undefined chunk semantics.
The Architectural Reality
Observed current surfaces:
ai/mcp/server/github-workflow/config.template.mjs declares archiveRoot, archiveChunkThreshold: 100, and archiveChunkPrefix: 'chunk-'.
ai/mcp/server/github-workflow/config.mjs is gitignored and can drift in each real repo clone.
ai/services/github-workflow/shared/archivePath.mjs consumes the archive config contract for path construction.
ai/services/github-workflow/sync/IssueSyncer.mjs, PullRequestSyncer.mjs, and DiscussionSyncer.mjs pass archive config into archive path planning.
- Release/archive runs also route through
buildScripts/release/publish.mjs and GitHub Workflow sync services.
Duplicate sweep notes:
- #11189 is closed and covered adding the config fields, not runtime validation of stale clone-local configs.
- #10559 is closed and covered PR author/reviewer workflow guidance, not service-level fail-loud validation.
- No open ticket found for archive config shape validation.
The Fix
Add a narrow runtime validation path for the GitHub Workflow archive config. The implementation should validate that all three archive fields are present and structurally valid before any archive planning, sync, or release archive operation can proceed.
Recommended behavior:
- Fail loudly when any required field is missing, with an error naming the exact config key and local file surface.
- Treat the three archive fields as an all-or-nothing contract for archive operations.
- Keep clone-local value overrides legal; validate shape and type, not byte-identical template equality.
- Reuse existing config/service validation patterns where available instead of adding a broad new config framework.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
| GitHub Workflow archive config shape |
Epic #11187 + #11189 + this ticket |
Archive operations require archiveRoot, archiveChunkThreshold, and archiveChunkPrefix to be present and valid |
Abort before archive planning with operator-actionable error |
Inline JSDoc/error text; reference #10559 for clone-local sync guidance |
Unit or targeted smoke test with one missing field |
Clone-local config.mjs drift handling |
#10559 + 2026-05-13 recovery |
Local overrides allowed; missing required archive keys fail loudly |
Manual sync from template |
Existing PR workflow guide remains author/reviewer layer |
Reproducer fixture or temporary config object test |
Acceptance Criteria
Out of Scope
- Committing any
config.mjs file.
- Forcing byte-identical local configs across clones.
- Replacing the #10559 PR workflow guidance.
- Implementing the actual archive data migration.
- Changing archive path semantics beyond fail-loud validation.
Avoided Traps
- Template-only confidence. Rejected because runtime servers read gitignored
config.mjs, not only the tracked template.
- Byte-identical config policing. Rejected because clone-local config values can legitimately differ; the invariant is required key presence and valid type.
- Silent fallback defaults. Rejected for archive paths because defaults can hide a stale clone and create inconsistent corpus layout.
- Broad config framework extraction. Rejected unless implementation evidence shows multiple validators need the same abstraction.
Related
- Epic #11187
- #11189 — initial archive config fields
- #10559 — PR workflow guard for MCP config template changes across three clones
- PR #11282 — MetadataManager pruning prerequisite for archive planning
ai/mcp/server/github-workflow/config.template.mjs
ai/services/github-workflow/shared/archivePath.mjs
Origin Session ID: d6d89930-f408-42a0-b60e-ec4487a8cc46
Handoff Retrieval Hints:
query_raw_memories(query="B0a clone-local config sync archiveChunkThreshold archiveChunkPrefix partial patch")
ask_knowledge_base(query="GitHub Workflow archive config validation archiveRoot archiveChunkThreshold archiveChunkPrefix")
- A2A anchors:
MESSAGE:64642b5e-6f33-4293-ae3b-76899ec71702, MESSAGE:4133e07c-5ef1-44c6-b3dd-f316734da5a9
Context
This is the missing B0a companion for Epic #11187, surfaced during the 2026-05-13 clone-local config sync recovery.
PR #11282 merged the MetadataManager pruning prerequisite. During the follow-up archive-structure readiness check, the swarm found that
ai/mcp/server/github-workflow/config.template.mjshad the archive fields, but each agent's gitignored clone-localai/mcp/server/github-workflow/config.mjsneeded manual sync. The Codex/GPT clone and Gemini real repo clone were patched cleanly. Claude's persistent checkout briefly entered a worse partial state:archiveRootpresent whilearchiveChunkThresholdandarchiveChunkPrefixwere missing.That state is more dangerous than a fully stale config: code that only checks for
archiveRootcan proceed into archive planning while the lazy chunking contract is undefined.The Problem
The GitHub Workflow runtime config has no loud shape validation for the archive substrate fields required by Epic #11187:
issueSync.archiveRootissueSync.archiveChunkThresholdissueSync.archiveChunkPrefixTemplate/local drift is expected because
config.mjsis gitignored and clone-local. #10559 already added PR workflow guidance for template-change notification, and #11189 added the initial archive config fields. Those are necessary but not sufficient: when a local runtime config is stale or partially patched, archive sync/release tooling should fail early with an operator-actionable error instead of running with undefined chunk semantics.The Architectural Reality
Observed current surfaces:
ai/mcp/server/github-workflow/config.template.mjsdeclaresarchiveRoot,archiveChunkThreshold: 100, andarchiveChunkPrefix: 'chunk-'.ai/mcp/server/github-workflow/config.mjsis gitignored and can drift in each real repo clone.ai/services/github-workflow/shared/archivePath.mjsconsumes the archive config contract for path construction.ai/services/github-workflow/sync/IssueSyncer.mjs,PullRequestSyncer.mjs, andDiscussionSyncer.mjspass archive config into archive path planning.buildScripts/release/publish.mjsand GitHub Workflow sync services.Duplicate sweep notes:
The Fix
Add a narrow runtime validation path for the GitHub Workflow archive config. The implementation should validate that all three archive fields are present and structurally valid before any archive planning, sync, or release archive operation can proceed.
Recommended behavior:
Contract Ledger Matrix
archiveRoot,archiveChunkThreshold, andarchiveChunkPrefixto be present and validconfig.mjsdrift handlingAcceptance Criteria
issueSync.archiveRoot,issueSync.archiveChunkThreshold, andissueSync.archiveChunkPrefixbefore archive path planning proceeds.archiveRootfails loudly with an error namingissueSync.archiveRoot.archiveChunkThresholdfails loudly with an error namingissueSync.archiveChunkThreshold.archiveChunkPrefixfails loudly with an error namingissueSync.archiveChunkPrefix.archiveRootpresent, chunk threshold/prefix missing.Out of Scope
config.mjsfile.Avoided Traps
config.mjs, not only the tracked template.Related
ai/mcp/server/github-workflow/config.template.mjsai/services/github-workflow/shared/archivePath.mjsOrigin Session ID: d6d89930-f408-42a0-b60e-ec4487a8cc46
Handoff Retrieval Hints:
query_raw_memories(query="B0a clone-local config sync archiveChunkThreshold archiveChunkPrefix partial patch")ask_knowledge_base(query="GitHub Workflow archive config validation archiveRoot archiveChunkThreshold archiveChunkPrefix")MESSAGE:64642b5e-6f33-4293-ae3b-76899ec71702,MESSAGE:4133e07c-5ef1-44c6-b3dd-f316734da5a9