fix(tooling): stop coverage.yml conflating file counts with coverage - #42
fix(tooling): stop coverage.yml conflating file counts with coverage#42koniz-dev wants to merge 1 commit into
Conversation
Two pieces of confusion, one of which cost a bogus issue.
1. The metrics step printed per-layer FILE COUNTS under a "📊 Coverage
Metrics:" heading, directly beneath a real percentage:
Overall: 89.8%
Domain files: 15
`15` is a count of SF: records. I read that block, concluded the per-layer
thresholds were not enforced, and filed #25 on it. They were enforced all
along, by a different step. The counts are now clearly labelled as counts
and point at the step that reports real percentages.
2. calculate_layer_coverage.sh mixed prose and key=value on stdout, and the
workflow appended every line to $GITHUB_OUTPUT via
`while IFS='=' read -r key value`. So "Summary of coverage by layer" became
a step-output key with an empty value.
The script now has two explicit modes: default prints a human summary,
--github-output prints ONLY key=value. The workflow uses the latter for
$GITHUB_OUTPUT and the former for log readability. Verified no emitted key
contains a space.
Also corrected docs/guides/testing/test-coverage.md, which described output the
script never produced: per-file low-coverage listings and a "Shared" layer.
Neither exists; there are four layers and no per-file output.
The Enforce coverage thresholds step is untouched and still gates on the same
five numbers.
Refs #39
|
Not merging this yet: GitHub Actions is not scheduling runners. No Evidence that it is upstream, not this branch:
Merging on "no checks reported" is exactly the trap documented in Locally verified in the meantime: |
Two pieces of confusion in the coverage workflow. One of them cost a bogus issue,
which is why it is worth removing rather than tolerating.
1. File counts printed as if they were coverage
15is a count ofSF:records, sitting directly beneath a real percentageunder a heading saying "Coverage Metrics". I read that block, concluded the
per-layer thresholds were unenforced, and filed #25 on it. They were enforced all
along — by a different step (
layer_coverage). #25 is closed as invalid.Now the counts are labelled as counts and point at the step that reports real
percentages:
2. Prose was being written into
$GITHUB_OUTPUTcalculate_layer_coverage.shmixed labels andkey=valueon stdout, and theworkflow appended every line via
while IFS='=' read -r key value. SoSummary of coverage by layerbecame a step-output key with an empty value.The script now has two explicit modes:
Verified locally against real
lcov.info—--github-outputemits eightkey=valuelines and nothing else, and no emitted key contains a space:The workflow uses
--github-outputfor$GITHUB_OUTPUTand the human mode forlog readability.
Docs corrected
docs/guides/testing/test-coverage.mddescribed output the script has neverproduced: per-file low-coverage listings and a
Sharedlayer. There are fourlayers and no per-file output. Since this PR changes that output, its description
had to follow.
Not touched
The
Enforce coverage thresholdsstep. It still gates on the same five numbers(overall 80, domain 100, data 90, presentation 80, core 80). Criterion 5 asks for
a dispatched run proving it still passes — reported on the issue.
Refs #39