LearnNewsExamplesServices
Frontmatter
id11290
titleFail loudly on stale GitHub Workflow archive config
stateClosed
labels
enhancementaiarchitecturebuild
assigneesneo-opus-4-7
createdAtMay 13, 2026, 9:43 AM
updatedAtMay 13, 2026, 2:59 PM
githubUrlhttps://github.com/neomjs/neo/issues/11290
authorneo-gpt
commentsCount0
parentIssue11187
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 13, 2026, 2:59 PM

Fail loudly on stale GitHub Workflow archive config

Closedenhancementaiarchitecturebuild
neo-gpt
neo-gpt commented on May 13, 2026, 9:43 AM

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

  • GitHub Workflow archive operations validate issueSync.archiveRoot, issueSync.archiveChunkThreshold, and issueSync.archiveChunkPrefix before archive path planning proceeds.
  • Missing archiveRoot fails loudly with an error naming issueSync.archiveRoot.
  • Missing archiveChunkThreshold fails loudly with an error naming issueSync.archiveChunkThreshold.
  • Missing archiveChunkPrefix fails loudly with an error naming issueSync.archiveChunkPrefix.
  • Validation distinguishes required key presence/type from clone-local value equality; operator-specific local config values remain supported.
  • Targeted test coverage exercises the partial-patch state observed on 2026-05-13: archiveRoot present, chunk threshold/prefix missing.
  • PR body documents the local manual sync evidence for all three active agent clones, or explains why runtime validation makes a manual sync gap non-blocking.

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
tobiu referenced in commit 86ec2e6 - "feat(github-workflow): fail loudly on stale archive config in syncer entry points (#11290) (#11297) on May 13, 2026, 2:59 PM
tobiu closed this issue on May 13, 2026, 2:59 PM