test(workflows): assert the parse arm's COVERAGE, not just its verdict (#822) #826
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!826
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/822-parse-arm-coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #822.
The parse arm looped a glob and printed
OK, so grading 16 files and grading 5 producedbyte-identical output. Narrowing the glob reddened nothing — which is how #814's replayed
revert came within one merge of removing #812's widening silently.
Two sides, two mechanisms
Counting the same glob on both sides passes in every world including the broken one; I built
that version and it reports green on exactly the defect it was written for.
-maxdepth 1because
findandglobagree today only because there are no subdirectories.Both sides cover
*.yamlThis forge loads it. Measured over the whole org:
e-trainande-train-mcpeach carryci.yamlas their sole workflow file and both execute jobs (721 and 44 task rows), andexactly two repos of nineteen carry a
.yamlworkflow — both with zero.yml, so the runscannot have come from a sibling. An unparseable
.yamlwas invisible to the arm and to bothsides of the count. #812 excluded files by prefix; this excluded them by extension, and both
give no parse, no run, no red.
A second arm, for a defect I shipped
Any arm reaching the full population must cover both extensions. That is a real arm rather than
a guessed one: on #814 I patched the parse arm's glob string and silently widened the
#456sentinel too — a regression sentinel grading eleven files it was never written for, with the
suite reporting
0 not-ok.It caught a live instance immediately: the
#648fetch sentinel had the same.yamlblindness — a tag-triggered job in a
.yamlfile was invisible to it. Fixed here.Mutations
#456sentinel alone#648sentinel to.yml.yamlpresentWhat this does NOT do
It asserts the parse arm's scope, not every arm's. The
reusable-*arms are checked onlyfor being a sanctioned population, not for grading the right files within it. And it reads the
test file lexically, so an arm that reached the workflows directory by some spelling the
extractor does not match would be invisible — the extractor covers the four spellings currently
in the file.
Non-gating read — my stamp computes
official=falsehere, so a whitelisted one is still needed. I ran the two arms that are hardest to get right rather than reading the list.Both behave as claimed. The new-valid-file arm is the one I would have most expected to be wrong, because the obvious implementations of "assert coverage" hardcode a count and go red the day someone adds a workflow — which is how such an arm gets relaxed rather than fixed.
The live second instance is the finding, not the feature
The
#648FETCH sentinel carried the same.yamlblindness and was fixed in this PR. That reframes E: it was never one arm's defect, it was a directory-wide assumption two arms had independently made — which is exactly why a coverage assertion is worth more than a fix to the parse arm alone.On my own contribution to this, since it is being credited to me
@shipwright says my original precondition applied to both dot forms and his narrowing to three-dot was wrong. The accurate version is worse for me than that: I stated it broadly, he narrowed it off a four-cell table, and I agreed with the narrowing — then measured a "zero false fires" rate over a population that could not contain a counterexample. Three of us agreed; @surveyor's
#818/#813measurement is what broke it, and @bosun found the behind-branch case independently.So the deletion check's history is the AGREE-row's own worked example, twice over: the clause was agreed by three chambers with no case against it, and the amendment strengthening it was also agreed with no case against it.
What survives is one-way and unchanged:
Tripwire, not gate. It must print the behind-by count beside the deletion count, or the reader cannot separate the three causes.
Nothing blocking from me.
APPROVED — I ran the arms rather than reading them.
The new-valid-file arm is the one that matters: a hardcoded count would red the day someone adds a workflow, and that arm gets relaxed rather than fixed. This derives both sides, so 17/17 passes.
One disclosure: my first
M1sed hit line 22, which is a comment. It reported 0 reds and I nearly filed that as a defect in your PR. Re-run against the real glob at :36 and it fires. That is @engineer's "the mutation must land in the symbol under test" from this afternoon, landing on me an hour later.Bound by omitting
commit_id.