Context
Two small pieces of confusion in coverage.yml. Neither breaks the gate - the
per-layer thresholds are computed and enforced correctly (see the closing comment
on #25) - but the first one directly cost a bogus P2 issue, so it is worth
removing.
1. The metrics step prints file counts that read like coverage
📊 Coverage Metrics:
Overall: 89.8%
Domain files: 15
Data files: 12
Presentation files: 11
Core files: 70
15 is a count of SF: records, not a percentage, sitting directly under a real
percentage under a heading that says "Coverage Metrics". The real per-layer
figures are produced by a different step (layer_coverage) and printed
elsewhere. I read this block, concluded the thresholds were not enforced, and
filed #25 on that basis. It is a trap for the next reader too.
2. calculate_layer_coverage.sh emits prose into $GITHUB_OUTPUT
The script prints label lines between its key=value pairs:
Output values with % suffix for display
domain_display=100.0%
...
Output numeric values for comparison
domain=100.0
...
Summary of coverage by layer
Domain Layer: 100.0%
The workflow appends every line to $GITHUB_OUTPUT with
while IFS='=' read -r key value, so a line with no = becomes
Output values with % suffix for display=. Harmless today, but it is writing
junk keys into a step output and would silently break if a label ever contained
=.
Acceptance criteria
Calculate coverage metrics no longer prints per-layer file counts under a
"Coverage Metrics" heading. Either it reports the real per-layer percentages
(reusing steps.layer_coverage.outputs.*) or it drops the per-layer lines and
reports overall only.
- Anything still emitting a file count says so unambiguously in its label
(e.g. "files measured", not "Domain files" under "Coverage Metrics").
scripts/test/calculate_layer_coverage.sh separates machine-readable output
from human output: only key=value lines reach $GITHUB_OUTPUT. A
--github-output flag, or sending prose to stderr, both work.
$GITHUB_OUTPUT contains no keys with spaces after the change. Show the
step's parsed output.
- The
Enforce coverage thresholds step still gates on the same five numbers
and still passes on main: a workflow_dispatch run concludes success with
the five ✅ lines. Record the run id.
./scripts/dev/audit_template.sh exits 0.
Context
Two small pieces of confusion in
coverage.yml. Neither breaks the gate - theper-layer thresholds are computed and enforced correctly (see the closing comment
on #25) - but the first one directly cost a bogus P2 issue, so it is worth
removing.
1. The
metricsstep prints file counts that read like coverage15is a count ofSF:records, not a percentage, sitting directly under a realpercentage under a heading that says "Coverage Metrics". The real per-layer
figures are produced by a different step (
layer_coverage) and printedelsewhere. I read this block, concluded the thresholds were not enforced, and
filed #25 on that basis. It is a trap for the next reader too.
2.
calculate_layer_coverage.shemits prose into$GITHUB_OUTPUTThe script prints label lines between its
key=valuepairs:The workflow appends every line to
$GITHUB_OUTPUTwithwhile IFS='=' read -r key value, so a line with no=becomesOutput values with % suffix for display=. Harmless today, but it is writingjunk keys into a step output and would silently break if a label ever contained
=.Acceptance criteria
Calculate coverage metricsno longer prints per-layer file counts under a"Coverage Metrics" heading. Either it reports the real per-layer percentages
(reusing
steps.layer_coverage.outputs.*) or it drops the per-layer lines andreports overall only.
(e.g. "files measured", not "Domain files" under "Coverage Metrics").
scripts/test/calculate_layer_coverage.shseparates machine-readable outputfrom human output: only
key=valuelines reach$GITHUB_OUTPUT. A--github-outputflag, or sending prose to stderr, both work.$GITHUB_OUTPUTcontains no keys with spaces after the change. Show thestep's parsed output.
Enforce coverage thresholdsstep still gates on the same five numbersand still passes on
main: aworkflow_dispatchrun concludes success withthe five
✅lines. Record the run id../scripts/dev/audit_template.shexits 0.