Skip to content

ci: config-key-coverage checker (catch overlay keys the chart renders nowhere) - #2208

Merged
rbuergi merged 1 commit into
mainfrom
ci/config-key-coverage
Aug 25, 2026
Merged

rbuergi merged 1 commit into
mainfrom
ci/config-key-coverage

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds scripts/check-config-key-coverage.py, the checker behind the recurring silent-drop defect (#2203 dropped all OpenRouter models; #1925/#1778/#1780 before it). A deployment overlay key under config.{memex_portal,memex_migration,memex_postgres} that the chart renders as NO ConfigMap/Secret data key reaches no container with no error.

Matches on the rendered ConfigMap key NAME, not the .Values.config.{block}.{key} path — so a key rendered from a different values path (e.g. Hosting__Operator__Enabled <- .Values.hostingOperator.enabled) is correctly seen as rendered, not flagged. One-directional (overlay-declared-but-rendered-nowhere = FAIL); ratcheted via a caller-supplied --allow list.

Lives in the PUBLIC framework repo beside the chart it validates, so the config repo (Memex, private) runs it credential-free (Memex PR #110 is the thin caller — no token). Validated: green on Memex main (only client-i Email__NoReplyAddress renders nowhere, allow-listed); fails on an injected config.memex_portal.FooBar__Test. For review before merge (false-positive traps).

…s nowhere

Fails when a deployment overlay declares a config.{memex_portal,memex_migration,memex_postgres}
key that no chart template renders as a ConfigMap/Secret data key — the silent defect that dropped
all OpenRouter models in #2203 (and #1925/#1778/#1780 before it): the key reaches no container, no
error. Matches on the rendered KEY NAME (any values path), so a key rendered from a different path
(Hosting__Operator__Enabled <- .Values.hostingOperator.enabled) is not a false positive. Public
repo, so a config repo (Memex) runs it credential-free. Ratcheted via a caller-supplied allow-list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 25, 2026 11:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new repository script to detect a specific Helm misconfiguration class: keys declared under config.memex_{portal,migration,postgres} in deployment overlays that are rendered by no chart template (silent drop → no container sees the config).

Changes:

  • Introduces scripts/check-config-key-coverage.py to scan Helm templates for rendered ConfigMap/Secret key names and compare them against overlay-declared config.* keys.
  • Adds allow-list support (--allow) to ratchet pre-existing “rendered nowhere” keys while failing on new misses and stale allow-list entries.
  • Provides clear exit codes and human-readable output to support CI gating in downstream config repos.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +64 to +67
Collects the name from each YAML key line across all templates. Config keys are distinctive
(.NET `Foo__Bar` / `MEMEX_*` style), so scanning every key line — rather than only those inside
a `data:`/`stringData:` block, which is unreliable to parse in templated YAML — cannot collide
with a chart structural key (`name`, `image`, `replicas`) for the keys this gate checks.
Comment on lines +120 to +121
ap.add_argument("--overlays", nargs="*", default=None,
help="Overlay YAML paths. Default: deployments/aks/*/values.*.public.yaml")
@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

    9 files  ±0      9 suites  ±0   4m 42s ⏱️ +32s
1 681 tests ±0  1 676 ✅ ±0  5 💤 ±0  0 ❌ ±0 
2 186 runs  ±0  2 181 ✅ ±0  5 💤 ±0  0 ❌ ±0 

Results for commit e4a80a1. ± Comparison against base commit 0e61fa4.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

   10 files  ±0     10 suites  ±0   6m 55s ⏱️ +20s
1 254 tests ±0  1 253 ✅ ±0  1 💤 ±0  0 ❌ ±0 
1 255 runs  ±0  1 254 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit e4a80a1. ± Comparison against base commit 0e61fa4.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

1 283 tests  ±0   1 283 ✅ +1   17m 9s ⏱️ + 2m 11s
    9 suites ±0       0 💤 ±0 
    9 files   ±0       0 ❌  - 1 

Results for commit e4a80a1. ± Comparison against base commit 0e61fa4.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

2 140 tests  ±0   1 841 ✅ ±0   10m 28s ⏱️ + 1m 36s
    9 suites ±0     299 💤 ±0 
    9 files   ±0       0 ❌ ±0 

Results for commit e4a80a1. ± Comparison against base commit 0e61fa4.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

3 339 tests  ±0   3 339 ✅ ±0   8m 24s ⏱️ +27s
    8 suites ±0       0 💤 ±0 
    8 files   ±0       0 ❌ ±0 

Results for commit e4a80a1. ± Comparison against base commit 0e61fa4.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 769 tests  ±0   1 769 ✅ ±0   9m 11s ⏱️ +8s
   10 suites ±0       0 💤 ±0 
   10 files   ±0       0 ❌ ±0 

Results for commit e4a80a1. ± Comparison against base commit 0e61fa4.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    55 files  ±0      55 suites  ±0   56m 51s ⏱️ + 5m 13s
11 466 tests ±0  11 161 ✅ +1  305 💤 ±0  0 ❌  - 1 
11 972 runs  ±0  11 667 ✅ +1  305 💤 ±0  0 ❌  - 1 

Results for commit e4a80a1. ± Comparison against base commit 0e61fa4.

@rbuergi
rbuergi merged commit 618631a into main Aug 25, 2026
26 checks passed
@rbuergi
rbuergi deleted the ci/config-key-coverage branch August 28, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants