You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git grep reads external bytes — a ref's worth of workflow files — and its status is discarded by || true. A fault is indistinguishable from "the needle does not appear in any workflow", which is the ordinary answer. The result feeds the gate-file rules, so a fault makes a gate file look unreferenced.
This is the same idiom ADR 0005 and ADR 0008 govern, and #63 converted sixteen sites of it. This one was not converted, for a reason that is about shape rather than risk.
Why it was deferred rather than converted
gate_paths's entire body is a pipeline: a { … } group piped into a while loop piped into sort -u. Every statement in it therefore runs in a subshell, so err/err_full would set failed=1 into a subshell that is discarded — ADR 0005's stated "a scan inside a process substitution has no channel at all". Giving this site a report means restructuring gate_paths so its scanning is not inside a pipeline, not adding a status capture to the existing shape.
Converting it inside #63 would have meant either a restructure materially larger than the sixteen mechanical conversions around it, or inventing the private per-scan protocol ADR 0005 decision 1 explicitly refuses.
Expected
gate_paths restructured so a scan fault has a reporting channel — most likely by collecting needles into a variable and running the git grep loop outside a pipeline, the way ADR 0008 decision 6 handles the < <(…) loop sites.
The git grep status captured and branched three ways: 0 matched, 1 no match, >= 2 fault.
Split out of #63 as a deferred site, and recorded as such in ADR 0008's Consequences.
Problem
check-records.sh'sgate_pathsends:git grepreads external bytes — a ref's worth of workflow files — and its status is discarded by|| true. A fault is indistinguishable from "the needle does not appear in any workflow", which is the ordinary answer. The result feeds the gate-file rules, so a fault makes a gate file look unreferenced.This is the same idiom ADR 0005 and ADR 0008 govern, and #63 converted sixteen sites of it. This one was not converted, for a reason that is about shape rather than risk.
Why it was deferred rather than converted
gate_paths's entire body is a pipeline: a{ … }group piped into awhileloop piped intosort -u. Every statement in it therefore runs in a subshell, soerr/err_fullwould setfailed=1into a subshell that is discarded — ADR 0005's stated "a scan inside a process substitution has no channel at all". Giving this site a report means restructuringgate_pathsso its scanning is not inside a pipeline, not adding a status capture to the existing shape.Converting it inside #63 would have meant either a restructure materially larger than the sixteen mechanical conversions around it, or inventing the private per-scan protocol ADR 0005 decision 1 explicitly refuses.
Expected
gate_pathsrestructured so a scan fault has a reporting channel — most likely by collecting needles into a variable and running thegit greploop outside a pipeline, the way ADR 0008 decision 6 handles the< <(…)loop sites.git grepstatus captured and branched three ways: 0 matched, 1 no match,>= 2fault.E-*-SCANdiagnostic naming the ref and the status, per the convention Sweep the bareif grep/if rgverdict idiom out of the gate scripts #25/Sweep the grep/rgcmd || trueverdict-swallow idiom out of check-records.sh (and siblings) #55/check_not_rewritten and evaluate_base_conformance fail open on an unreadable base blob #64/tracked_in_index collapses a git ls-files fault into 'not tracked' #69/Sweep the pipeline-into-grep verdict idiom, which needs PIPESTATUS not a captured $? #63 established.gitPATH-stubbed to fault, following the existing convention..github/scripts/↔skills/tome-of-lore/assets/) stay byte-identical.Out of scope
The sixteen sites converted in #63, and the in-memory
printf … | grepclass that ADR 0005 decision 1 and ADR 0008 decision 4 place outside the rule.Provenance
Found while reviewing ADR 0008 for #63. Recorded in that record's Consequences as a site remaining outside the sweep, with this issue as its owner.