Found while implementing #63. Recorded in ADR 0008's Consequences with this issue as its owner.
Problem
check_sections in check-records.sh reports its scan fault through err:
*)
err "E-SECTION-SCAN: $label: could not scan $file for section '$section' (grep exit $grep_status)"
continue
;;
err is the downgradable channel. For a record that was already non-conforming at the base ref the checker runs in downgrade mode, where err relabels the finding as ::warning::W-LEGACY-SHAPE and never sets failed=1 — so the gate exits 0 over a section it could not scan.
ADR 0005 states the rule this breaks, in its Consequences:
Reporting goes through err_full rather than err, so a scan fault cannot be downgraded to W-LEGACY-SHAPE for a record that was already non-conforming — a fault describes the scan, not the record.
check_title_number in profiles/adr.sh follows that rule and carries a comment explaining it. check_sections does not, and appears to predate it: E-SECTION-SCAN came from #25's sweep, before ADR 0005 was written.
Why it is narrow, and still worth fixing
The fault has to coincide with a record that is non-conforming at the base ref. A record that is conforming at base runs in report mode, where err and err_full behave alike — which is why the existing test for this code passes: it drives a tree-only fault (chmod 000 on the working-tree file) while the base pass reads a readable temp copy of the blob.
So this is not a live false green on the repo's current records. It is a rule that holds by accident of which pass faults, and the grandfathered-record path is exactly where a gate is least examined.
#63 hit the same distinction from the other side: E-SECTION-BODY-SCAN had to use err_full because section_body's awk faults in both passes, which marks the record non-conforming at base and downgrades the finding. The two codes now sit adjacent in the same function on different channels.
Expected
E-SECTION-SCAN reports through err_full, with a comment giving the reason, matching check_title_number.
- A sweep of the remaining
E-*-SCAN codes for the same inconsistency — this was one reading of one function, not a mechanical check.
- A regression test that fails on the current channel: a record non-conforming at the base ref whose section scan then faults, asserting exit 1 and
E-SECTION-SCAN rather than W-LEGACY-SHAPE.
- Both mirrors (
.github/scripts/ ↔ skills/tome-of-lore/assets/) stay byte-identical.
Provenance
ADR 0005 (accepted) states the rule. ADR 0008 records the divergence and defers it here rather than widening #63's charter, which was scoped to the pipeline idiom.
Found while implementing #63. Recorded in ADR 0008's Consequences with this issue as its owner.
Problem
check_sectionsincheck-records.shreports its scan fault througherr:erris the downgradable channel. For a record that was already non-conforming at the base ref the checker runs indowngrademode, whereerrrelabels the finding as::warning::W-LEGACY-SHAPEand never setsfailed=1— so the gate exits 0 over a section it could not scan.ADR 0005 states the rule this breaks, in its Consequences:
check_title_numberinprofiles/adr.shfollows that rule and carries a comment explaining it.check_sectionsdoes not, and appears to predate it:E-SECTION-SCANcame from #25's sweep, before ADR 0005 was written.Why it is narrow, and still worth fixing
The fault has to coincide with a record that is non-conforming at the base ref. A record that is conforming at base runs in
reportmode, whereerranderr_fullbehave alike — which is why the existing test for this code passes: it drives a tree-only fault (chmod 000on the working-tree file) while the base pass reads a readable temp copy of the blob.So this is not a live false green on the repo's current records. It is a rule that holds by accident of which pass faults, and the grandfathered-record path is exactly where a gate is least examined.
#63 hit the same distinction from the other side:
E-SECTION-BODY-SCANhad to useerr_fullbecausesection_body's awk faults in both passes, which marks the record non-conforming at base and downgrades the finding. The two codes now sit adjacent in the same function on different channels.Expected
E-SECTION-SCANreports througherr_full, with a comment giving the reason, matchingcheck_title_number.E-*-SCANcodes for the same inconsistency — this was one reading of one function, not a mechanical check.E-SECTION-SCANrather thanW-LEGACY-SHAPE..github/scripts/↔skills/tome-of-lore/assets/) stay byte-identical.Provenance
ADR 0005 (accepted) states the rule. ADR 0008 records the divergence and defers it here rather than widening #63's charter, which was scoped to the pipeline idiom.