Repository navigation
Description
The sweep #1503 asked for turned up six fields where the validation is looser than what the consumer requires, or where a declaration has no consumer at all. #1503's own pull request fixed the two highest-consequence ones, the url that becomes a request path and the unvalidated groundTruthBranch. These six are the remainder, ranked, with the evidence for each.
1. name and url are validated independently, and a mismatch is a silent no-op
repo-config/configure.sh derives its lookup key from the repo argument rather than from the registry, name="${repo##*/}", and then keys the registry on it. An entry whose name differs from the url's last segment therefore resolves to nothing:
- the environment assertions are skipped, and the run still reports no drift
- the description lookup degrades the same way
- the workflow-model lookup falls through to
defaults.workflowModel, so a repo declaredoperationalis checked against the release ruleset payload
spec/validate.py validates each field and never that they agree.
2. A registry name is still tested by .strip() truthiness
"Utilities" is already trimmed, so it passes both name checks, and then configure.sh's select(.name == $n) reports "no registry entry named" and spec/audit.py reports "Not cataloged". This is the exact exact-comparison failure ENVIRONMENT_NAME_PATTERN was introduced for, one field away.
Applying that same printable-ASCII grammar here was tried and reverted inside #1503's pull request, on measurement: spec/validate.py's own dedupe tests deliberately declare a name carrying a sharp s to pin the casefold normalizer, GitHub allows such a repository name, and the ASCII floor refuses a legal value. So the fix needs a grammar that excludes the invisible characters without excluding a legitimate non-ASCII name, which is a design question rather than a one-line change.
3. requiredSecrets[] has no element shape check
spec/validate.py only builds a set from the list. A padded element passes, and spec/audit.py then reports it missing from the actions store on every run, since GitHub's stored name has no padding, while validate.py's own requires-check simultaneously misses the unpadded name. A non-string element passes too.
4. hasDevelop is coerced with bool() and validated by nothing
spec/audit.py compares bool(entry.get("hasDevelop")) against the live branch. "hasDevelop": "no" reads as True and [] reads as False, and the DRIFT text prints the raw value either way.
5. driftNotes[] element type is unchecked
spec/validate.py checks nothing. spec/audit.py slices each note and runs a regex over it, so a non-string element raises during the audit rather than reporting.
6. Four declarations no consumer reads
configLayout.rulesetsDirandconfigLayout.pythonConfig: nothing in the tree reads either. Despite the name, the first never becomes a path.defaults.groundTruthBranch: every reader hardcodes"main"as the per-entry fallback and never consults defaults, so setting this todevelopvalidates clean and silently auditsmain. A Validator Looser Than Its Consumer: Three Instances, and Why a Whitespace Test Cannot Close the Class #1503's pull request gave the key a grammar and a gate check, which makes it consistent, not live.lineEndings: read only by its own validator.
Either wire each one or retire it. A declaration nothing reads cannot drift into being wrong, so it reads as a guarantee that is not one.
Also, and separately
spec/validate.py has no unknown-key check for a repo entry. registry/repos.schema.json's additionalProperties: false is the only thing that would catch a typo'd key, and no gate runs that schema, so a misspelled groundTruthBranch passes CI and the audit reads main without saying so.
Filed from the sweep in #1503 rather than fixed there, because each of these is local to a different consumer and #1503's fix already spans the schema, the validator, and the audit.
Activity
Validate a Registry Value by a Positive Grammar Both Its Consumer and…
Validate a Registry Value by a Positive Grammar Both Its Consumer and…
Hold Every Registry Field to the Shape Its Consumer Requires, and Set…
Hold Every Registry Field to the Shape Its Consumer Requires, and Set…