docs: the uses: line is keyed on location, not on which forge you run #1324
No reviewers
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!1324
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/1321-uses-location-not-provider"
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 README's
uses:line now resolves for a stranger. The rule is where the toolkit LIVES, not which forge software you run.Intended-targets: #1321
AC2, run as a test rather than asserted
I took the line out of the README and resolved it the way an adopter's runner would:
Before publishing that URL I checked the mirror actually serves it, rather than assuming the mirror is current: anonymously readable,
v0.61.1present, and both.forgejo/workflows/reusable-release.ymland.gitea/workflows/reusable-release.ymlresolve at that tag. The owner path is case-insensitive there, so a reader copyingfrankenbitfrom elsewhere in the docs still lands.AC1 — the axis, and where the old text put it
The absolute form was already in the docs. It was under
### Running on Gitea — reference the.gitea/path, which is why this survived: a reader on self-hosted Forgejo reads "on Forgejo… reference.forgejo/", correctly concludes the Gitea section is not theirs, and writes the failing line.integration.mdnow opens the two questions separately:⚠️ The sweep found 16 short-form
uses:examples and 1 absolute across both files. I did not rewrite the other 15. The short form is correct for an adopter who mirrors the toolkit, and rewriting every example would bury that. Instead the guide states once, at the point the reader meets the first one, that the remaining examples use the short form and what to prefix — the same state-it-once shape as#1248.AC3 — the
.gitea/guidance is kept and now stands aloneIt was always correct; the defect was location-guidance nested inside it. §② keeps it verbatim and adds the case the old text could not express: a Gitea adopter pulling from the public mirror needs the absolute URL and the
.gitea/path. Those are two axes, and the old block let a reader pick one.The line I edited has an owner — checked before editing it
internal/prep/doc_version_refs.gore-pins doc refs on every cut.atTagREmatches@vX.Y.Zanywhere in the line, not the bare-form prefix, so the new absolute URL is still re-pinned at the next cut. Had it been anchored on the short form, this change would have frozen the README atv0.61.1silently — the#1279lesson, applied before rather than after.Verification
fragment-check0 with zero warnings on1321.fixed.md(needle control: check 7 still fires on another fragment) ·register-check0 ·gitea-twin --check0 ·contract-paths-check0 ·go test ./...0 · no inbound links or prose references to the retitled section.📌 Credit where it belongs: this needed someone who had never read the docs. Our own
release.ymluses the short form and is correct, because the toolkit lives here — to usfrankenbit/release-toolkitobviously means on our forge, and no amount of running our own pipeline reaches that.🤖 Generated with Claude Code
https://claude.ai/code/session_013sreVuKQfwS7yvxyGL1Z2i
tests / batswent red and it was a real coupling I had missed. Fixed at2eead5c.The guide's example is an INPUT to a gate
#1222's arm does not use a fixture — it reads the absolute Giteauses:line out ofintegration.mdand feeds it through the real resolver. That is the right design, and it is exactly why pointing the guide at the actual public mirror broke it: the extraction pinned the host asgitea.example.com.📌 I checked
doc_version_refs.gobefore editing these lines and foundatTagREsafe. I did not think to ask whether anything ELSE owned them. The second owner was a bats arm in a different directory, and CI told me rather than my sweep. One owner found by looking, one found by being caught.What I changed, and the two checks before loosening a predicate
The extraction now matches any
uses: https://…/.gitea/workflows/reusable-release.yml. Loosening an assertion needs more than a green run, so:So it is weaker on the host and unchanged on the thing it exists to catch. ① is the one that mattered: had the resolver been host-specific, the honest fix would have been to revert my doc change, not to relax the test.
Full local run
bats tests/*.bats174/174, and separately:fragment-check0 ·register-check0 ·gitea-twin --check0 ·go test ./...0.⚠️ I ran
go testbefore pushing the first time and notbats. That is the gap — the Go suite has nothing to say about a doc line, and the arm that did was in the suite I skipped.Reverted my own loosening at
8927e07— @bosun's call, and his reasoning holds.I had made the extraction host-agnostic. Both dispositions prove the documented form RESOLVES — the line is fed through the real resolver either way — so the only thing at stake was whether a change of documented host reddens. ✅ For the public entry point an adopter copy-pastes first, it should. The arm went red on exactly that and was doing its job.
Now
startswith("uses: https://gitea.com/"), exact, with the pin moved to the host the guide documents.Mutation-verified in both directions after the change, not just re-run green:
bats tests/*.bats174/174 ·fragment-check0 ·gitea-twin --check0 ·go test ./...0.📌 What I want on the record, because it is the reusable part rather than the fix. My earlier comment justified loosening with "the host is incidental". That was true of the resolver and false of the reader:
⚠️ I reached for the change that made my PR green and found a principle for it afterwards. The principle was real — a fixture-free test should not pin incidentals — and it was aimed at the wrong field. The tell was available before the argument: I was weakening a guard that had just caught something in my own diff.
APPROVED at exact head
8927e0789d.The README and integration guide now separate the toolkit location question (absolute URL versus short owner/repo) from the adopter forge path (.forgejo versus .gitea), while retaining the Gitea guidance. The public mirror and both v0.61.1 workflow paths were independently read live, including lower- and display-cased owner paths.
The workflow control exercises source and generated-twin resolver paths, fallback forms, baked-marker precedence, the actual guide form, absolute/casefold mutation controls, and unknown-wrapper fail-closed behavior. The old pinned URL assertion was moved to the actual documented fixture rather than weakened. Targeted and root-invoked full Bats checks pass 174/174; Forgejo CI is terminal 26/26 green.