apollo_deployments: derive override schema by evaluating applicative jsonnet#14571
Closed
nimrod-starkware wants to merge 1 commit into
Closed
apollo_deployments: derive override schema by evaluating applicative jsonnet#14571nimrod-starkware wants to merge 1 commit into
nimrod-starkware wants to merge 1 commit into
Conversation
This was referenced Jun 21, 2026
Contributor
Author
This was referenced Jun 21, 2026
…jsonnet The override-schema invariant test extracted overridable keys by scanning applicative_config.libsonnet source for the substring `overrides.` (split_once per line), which is brittle: a reformat that splits a reference across lines, a second `overrides.` on one line, or the string appearing in a comment all silently change the derived key set. Replace the text scan with evaluation: build an `overrides` object that places a path-encoding sentinel at every override path expected from KEYS_TO_BE_REPLACED (collapsing optional configs marked `.#is_none` to their option root, which the applicative reads whole), evaluate `applicative_config(overrides)`, and check which sentinels reached the output. A sentinel that never appears is a replacer key the applicative never reads; an override the applicative reads but KEYS_TO_BE_REPLACED does not declare makes jsonnet fail to evaluate (missing field). Both failure directions are exercised by mutation testing. The check is now about actual consumption and is insensitive to jsonnet formatting. The distinct "covered by more than one override" diagnostic the source scan produced now surfaces as an evaluation error (indexing a sub-field of a scalar sentinel) rather than a dedicated message. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7cfdd66 to
c76e9eb
Compare
975bd5d to
6948beb
Compare
This was referenced Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The override-schema invariant test extracted overridable keys by scanning
applicative_config.libsonnet source for the substring
overrides.(split_once per line), which is brittle: a reformat that splits a
reference across lines, a second
overrides.on one line, or the stringappearing in a comment all silently change the derived key set.
Replace the text scan with evaluation: build an
overridesobject thatplaces a path-encoding sentinel at every override path expected from
KEYS_TO_BE_REPLACED (collapsing optional configs marked
.#is_nonetotheir option root, which the applicative reads whole), evaluate
applicative_config(overrides), and check which sentinels reached theoutput. A sentinel that never appears is a replacer key the applicative
never reads; an override the applicative reads but KEYS_TO_BE_REPLACED
does not declare makes jsonnet fail to evaluate (missing field). Both
failure directions are exercised by mutation testing. The check is now
about actual consumption and is insensitive to jsonnet formatting.
The distinct "covered by more than one override" diagnostic the source
scan produced now surfaces as an evaluation error (indexing a sub-field
of a scalar sentinel) rather than a dedicated message.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com