---
id: 10209
title: 'test(github-workflow): implement contract-scan test for config completeness'
state: CLOSED
labels:
  - enhancement
  - ai
  - testing
assignees:
  - neo-gemini-pro
createdAt: '2026-04-22T20:53:14Z'
updatedAt: '2026-05-13T13:14:57Z'
githubUrl: 'https://github.com/neomjs/neo/issues/10209'
author: neo-gemini-pro
commentsCount: 0
parentIssue: 10186
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-05-13T13:14:57Z'
---
# test(github-workflow): implement contract-scan test for config completeness

## Problem
The `ConfigCompleteness.spec.mjs` test asserts statically that `config.template.mjs` contains the keys `issuesDir`, `archiveDir`, `discussionsDir`, and `pullsDir`. While this provides a baseline safety net against omissions (like the bug in #10191), it is brittle: if a new syncer is added that accesses a new `issueSyncConfig.*` key, the static test won't know about it until the test itself is manually updated.

## Value
A contract-scan test dynamically discovers the required keys by reading the source code of the syncers, ensuring the configuration template always perfectly matches the runtime consumption without manual test maintenance.

## Proposal
Implement a test that:
1. Greps the source code of the four syncers (`IssueSyncer`, `DiscussionSyncer`, `ReleaseSyncer`, `PullRequestSyncer`) for every `issueSyncConfig.*` access.
2. Extracts the key names.
3. Asserts that each dynamically discovered key exists in `config.template.mjs`.

## Related
- Sub-task of Epic #10186 (Caching Hardening / Configuration Robustness)
- Identified during review of #10200 (PR #10205)

_Authored by Gemini 3.1 Pro (Antigravity). Session 90dc2e65-962b-419f-91af-55dea55e5d3d._

## Timeline

- 2026-04-22T20:53:23Z @neo-gemini-pro added parent issue #10186
- 2026-05-13T10:40:29Z @neo-gemini-pro assigned to @neo-gemini-pro
- 2026-05-13T10:40:46Z @neo-gemini-pro added the `ai` label
- 2026-05-13T10:40:46Z @neo-gemini-pro added the `testing` label
- 2026-05-13T10:40:46Z @neo-gemini-pro added the `enhancement` label
- 2026-05-13T10:42:44Z @neo-gemini-pro cross-referenced by PR #11299
- 2026-05-13T11:03:40Z @neo-gemini-pro referenced in commit `45a3598` - "test(github-workflow): implement contract-scan test for config completeness (#10209)

Resolves #10209

Replaced static validation of config.template.mjs with dynamic
contract-scanning across the syncer layer to guarantee all consumed
issueSyncConfig keys remain present in the config template without
manual test updates."
- 2026-05-13T11:08:45Z @neo-opus-ada cross-referenced by PR #11300
- 2026-05-13T11:20:54Z @neo-opus-ada cross-referenced by PR #11301
- 2026-05-13T11:41:19Z @neo-opus-ada cross-referenced by PR #11302
- 2026-05-13T13:14:57Z @tobiu referenced in commit `f2b24f1` - "test(github-workflow): implement contract-scan test for config completeness (#10209) (#11299)

Resolves #10209

Replaced static validation of config.template.mjs with dynamic
contract-scanning across the syncer layer to guarantee all consumed
issueSyncConfig keys remain present in the config template without
manual test updates.

Co-authored-by: neo-gemini-pro <neo-gemini-pro@users.noreply.github.com>"
- 2026-05-13T13:14:58Z @tobiu closed this issue
- 2026-05-14T15:20:37Z @neo-gpt cross-referenced by #11363

