Skip to content

fix(ci): quote schedule.time — the whole dependabot config was being discarded - #289

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/dependabot-config-invalid
Aug 3, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/dependabot-config-invalid

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Closes #288.

The defect

.github/dependabot.yml had time: 09:00 unquoted in all six ecosystem entries. Dependabot's YAML 1.1 parser reads that as a sexagesimal integer; its schema requires a string; it rejects the entire file, once per entry:

The property '#/updates/0/schedule/time' of type integer did not match the following type: string

An invalid config is not partially applied — it is ignored. Every labels:, groups:, reviewers: and ignore: block in the file was dead, and Dependabot ran on its defaults. Present since 2025-10-15 (d4ff903), where the key was introduced unquoted and never quoted after.

You can see it failing right now on #210 as the .github/dependabot.yml check.

Why this is more than a quoting nit

It masked a fix that appeared to land and didn't. The automerge label was missing from the repository; Dependabot drops unknown labels silently; every approve and merge step in dependabot-automerge.yml is gated on contains(labels.*.name, 'automerge'). 46 PRs opened, 0 merged. That was diagnosed and fixed — the label is in .github/labels.yml and on the repository, guarded by TestDependabotLabelsAreDefined.

And it still did not work, because labels: sat inside a file being discarded wholesale. Confirmed on the currently-open PRs:

PR labels
#210 dependencies, java
#249 dependencies, go
#254 dependencies, github-actions
#258 dependencies, github-actions

No automerge on any of them. Two independent causes for one symptom; fixing the visible one left the other invisible.

It hid for nine months because it surfaces as a failing check rather than a validation message — that reads like "a dependabot job failed," and the file has a version: 2 key and six well-formed-looking entries, so nothing about reading it suggests it is being thrown away.

The test checks the file text, and that is deliberate

TestDependabotScheduleTimesAreQuoted (in internal/config/labels_test.go, next to the existing label gate) matches the raw text rather than asserting the decoded Go type.

Asserting the decoded type is the obvious design and it cannot work. Probed rather than assumed: gopkg.in/yaml.v2 and gopkg.in/yaml.v3 both decode 09:00, 9:00, 10:30 and 05:00 as Go string, because Go's YAML 1.2 core schema has no sexagesimal integer type while Dependabot's YAML 1.1 parser does. So a decode-based assertion passes on exactly the input that breaks the file — the first version of this test did, and mutation-checking it is what caught that.

The narrower claim that buys: it cannot tell "9am" from "09:00", since both are quoted strings and only Dependabot's schema knows the difference. The failing check on the PR remains the authority on validity; this test exists to stop the known regression.

Mutation-verified three ways:

mutation result
unquote one time (the original bug) FAIL — "time: 09:00, which is not a quoted scalar"
single-quote it (a valid YAML string) passes, as intended
rename the key to tyme: FAIL — the scan-found-nothing guard fires

The config's header comment went from "Two things to know before editing" to three, with this as item 1.

Gates

go build ./... · go vet ./... · gofmt -l . clean · go test -count=1 -race ./internal/config/ ok · golangci-lint --new-from-merge-base=origin/main 0 issues.

After this lands

Dependabot re-evaluates the config on its next run, so the open PRs will not retroactively gain automerge — worth confirming on the next batch that the label arrives, since this has now appeared fixed twice without being fixed.

Then #210 becomes mergeable, clearing all six jackson-databind alerts (2 high). The three vite alerts are not covered: a security update needs a committed lockfile and docs-platform/ has none (#214). That ceiling is documented in the config itself.

…discarded

`time: 09:00` unquoted is not a string in YAML 1.1: Dependabot's parser reads it
as a sexagesimal integer, its schema requires a string, and it rejects the ENTIRE
FILE — one error per ecosystem entry, six of them.

An invalid config is not partially applied, it is ignored. So every `labels:`,
`groups:`, `reviewers:` and `ignore:` block in this file was dead and Dependabot
ran on its defaults. Present since 2025-10-15 (d4ff903), where the key was
introduced unquoted and never quoted after.

This also explains a fix that appeared to land and didn't. `automerge` was missing
from the repository, Dependabot drops unknown labels silently, and every approve
and merge step in dependabot-automerge.yml is gated on that label — 46 PRs opened,
0 merged. That was diagnosed and fixed: the label is in .github/labels.yml and on
the repository, guarded by TestDependabotLabelsAreDefined. And it still did not
work, because `labels:` sat inside a file being thrown away. Confirmed on the open
PRs — #210, #249, #254 and #258 all carry `dependencies` plus an ecosystem label
and no `automerge`. Two independent causes for one symptom; fixing the visible one
left the other invisible.

It hid for nine months because it surfaces as a failing `.github/dependabot.yml`
check on every PR, which reads like a failed job rather than an invalid config —
and the file has a `version: 2` key and six well-formed-looking entries, so
nothing about reading it suggests it is being discarded.

TestDependabotScheduleTimesAreQuoted checks the file TEXT, not the decoded value,
and that is deliberate. Asserting the decoded Go type is the obvious design and it
cannot work: gopkg.in/yaml.v2 and gopkg.in/yaml.v3 both decode 09:00, 9:00, 10:30
and 05:00 as Go `string`, because Go's YAML 1.2 core schema has no sexagesimal
integer type while Dependabot's YAML 1.1 parser does. A decode-based assertion
therefore passes on exactly the input that breaks the file — the first version of
this test did, which is how the text approach was arrived at.

The narrower claim that buys: it cannot tell `"9am"` from `"09:00"`, since both
are quoted strings and only Dependabot's own schema knows the difference. The
failing check on the PR stays the authority on validity; this stops the known
regression. Mutation-verified three ways: unquoting fails it, single-quoting
passes, renaming the key trips the scan-found-nothing guard.

Refs #288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci-cd CI workflows, gates, and release automation priority: high Important issue that should be addressed soon type: bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dependabot.yml is invalid — unquoted schedule.time discards the whole config, including the automerge fix

1 participant