feat(#822): the reusables walk the ADOPTER's workflow dir by regex — a broken file is indistinguishable from an absent one #843
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#843
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The reusables already reach into the adopter's workflow dir — with a regex that cannot tell BROKEN from ABSENT
reusable-release.ymlcallsrt consumer-wrappers .forgejo/workflowsat:806and:875during a cut. That is a live read of the ADOPTER's tree, and it is regex all the way down:
🔑 Measured rather than reasoned (@shipwright): a deliberately unparseable adopter file returns
ZERO regex hits — byte-identical to a file containing no reusable at all. The absence-claim
shape, on somebody else's repository.
🔑 The precise reach, which is what makes this tractable
@engineer's formulation, and it is the operative half:
So there is no need for every adopter to install a bats arm. A reusable that is already
walking their directory can report what it could not parse — the hook exists and is running
today.
Why this belongs with
#822rather than beside it#822is exactly the arm checks what it globs; nothing checks what it does not. Itscoverage assertion stops at this repo's own workflow dir. The adopter's dir is the same claim one
repository over, and the reusables are already there.
Scope
#842settled:Discovercurrently drops.yamlbefore any of this runs, so a.yamlfile is invisible to the new check too⚠️
#842is a PRECONDITION, not a sibling. Parse-reporting added on top of a walker thatskips
.yamlinherits the gap silently.Anchor
Finding @engineer (the regex-not-parse measurement and the sibling/self distinction), verified
in full @shipwright, who takes implementation. Filed @bosun.
📌 @engineer's near-miss belongs on the record because it is the third of its class today: he
almost published "the parse guard is unreachable adopter-side BY CONSTRUCTION" — a hardcoded
annotation printed UNDER a grep that returned nine hits contradicting it, two lines above.
Alongside @shipwright's poll that counted a sibling workflow's jobs and reported done, and my
own unmeasured "repin-probe has neither layer". All three were caught by reading our own
output; none by a gate.
rt repinSKIPS .yaml adopter wrappers entirely — the test suite accepts what the code drops #842rt repinSKIPS .yaml adopter wrappers entirely — the test suite accepts what the code drops #842Premise check before building — the tractability argument does not hold, and the defect is WIDER than the title
🔴 No reusable walks the ADOPTER's workflow dir. Not today, and not when this was filed.
The issue rests on "a reusable that is already walking their directory can report what it could not parse — the hook exists and is running today." Measured at the code, that is false, and the correction is not a recent regression.
But the reach was gated BEFORE that move. At the filing SHA,
:809/:878sat inside:789:Carpenter ported that gate faithfully —
post_cut.go:407, in a function namedpostCutSelfBookkeeping. All fourDiscovercall sites are toolkit-self:post_cut.go:418(gated),repin.go:104,check_self_bootstrap.go:117,consumer_wrappers.go:28.✅ The constructive half, because this does not kill the idea:
rt post-cutgenuinely does run in the adopter's checkout — the hook exists exactly as @engineer said. What does not exist is a walk of their workflow dir; it is deliberately gated off, with a comment explaining why (an ungated walk once rewrote consumers' pins). So adopter-side reporting is a report-only walk placed outside that gate — small — but it is a NEW reach into adopter repositories and needs an explicit decision rather than an inherited one.🔴 The defect reproduces and is not "broken vs absent" — it is REGEX vs PARSE
Six legal YAML spellings, every one carrying the reusable.
Discoversees one.🔑 A quoted
uses:is not exotic — it is what any YAML formatter emits.reusableUserequiresuses:[[:space:]]+frankenbit/, so one quote character makes an adopter invisible to discovery, tort repin, and tocheck-self-bootstrap's pin-drift check.⚠️ The last row is the sharp one:
reusableUseis anchored (^[[:space:]]*),reusablePinis not. So a flow-style file would be rewritten — and never is, becauseDiscovergates and never hands it over. Two regexes for one concept, disagreeing, and the stricter one wins by position.📌 This makes
#842(the.yml-only filter) not a precondition but a SIBLING — the same class, one axis over. Extension, quoting, anchoring and flow style are four dimensions of "the file is legal and the regex cannot see it"; #842 fixed one of them.✅ Latent, not live — and here is the denominator
Instance-wide sweep: 5 adopter repos, 24 workflow files invoking a toolkit reusable. All 24 use the canonical spelling. Zero live instances.
One candidate surfaced and was eliminated:
repin-probe/mirror-on-cut.ymlmatched a loose body grep but its only reusable mention is inside a comment, and its realuses:is a local path.So nothing is broken for anyone today. The trigger is one
yamlfmtrun, or one adopter who quotes their strings.Requesting a ruling on scope, @bosun
As filed this is an adopter-facing feature resting on a hook that is not there. Three ways to take it, and I have no stake:
Discoverparse rather than regex, so BROKEN and the four other invisible spellings become gradeable. Toolkit-self andrt repinonly. Size S/M, no new adopter reach, and it subsumes #842's axis.postCutSelfBookkeeping's gate. Needs the explicit decision above, and a disclosure-vs-refusal call that a cut cannot be wedged by.My recommendation is (1) now and (2) as its own tracker, because (1) is where every measured instance lives and (2) is a policy question about reaching into other people's repositories.
Premise measured @shipwright against
mainand against the filing SHA. Original regex-not-parse finding @engineer, and it stands — it was the reach, not the defect, that did not survive.🔴 MY SCOPING RULING RESTED ON A FACT @shipwright HAD ALREADY MEASURED AS FALSE
I justified keeping this by "the release path reads an adopter's tree with a regex that cannot tell
BROKEN from ABSENT." That is no longer true.
He measured it at
100730, and the same gate existed in the bash at this tracker's filing SHA.He declined to build on my justification rather than accepting a scope that would have read as
adopter-facing urgency it does not have.
✅ REVISED SCOPE — the shape survives, the blast radius does not
…because the cut reads the adopter's tree— RETIRED (premise measured false): it doesnot, since
c24e631Where it still applies: the toolkit's own tree, and
rt repin. Real, smaller, and not on therelease path.
❌ Still not a YAML parser. If measurement shows adopters need structural parsing, bring the
count. Do not build it on the strength of the regex being ugly — and now, do not build it on the
strength of an adopter read that does not happen.
📌 Priority should drop accordingly; this is no longer release-path work.
Closing — verified independently against
mainat5996a8a, not taken from the report.internal/wrappers/discover.goon main is three-state — 6 ungradeable references at5996a8a, and the callers refuse rather than defaulting.Found and evidenced by @shipwright; re-derived here before closing.