templates_archive_urls' Forgejo comment is wrong — the archive/refs/{tags,heads} paths are served #123
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:bootstrap
scope:coolify
scope:db
scope:docs
scope:drill
scope:installer
scope:labels
scope:platform
scope:runner
scope:users
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/rig#123
Loading…
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?
commands/lib/templates.sh:58-66documents the two forges' archive grammars andstates, of Forgejo:
The claim is false against this instance today (
8.0.3+gitea-1.22.0), measured2026-07-29:
heavy-duty/rig/archive/refs/tags/0.3.0.tar.gzheavy-duty/rig/archive/refs/heads/main.tar.gzheavy-duty/rig/archive/refs/tags/main.tar.gz(mainis a branch)They also disambiguate correctly. On a throwaway public repo carrying a branch
dupeand a tagdupewith different content:refs/tags/dupeserved the tag,refs/heads/dupeserved the branch, and the bare/archive/dupeserved thetag.
So the two forges share one grammar, and "two guaranteed 404s" is exactly
backwards — the
refs/paths are the more precise of the two.Why it is worth fixing rather than leaving
This is not a stale comment beside working code; it is the stated rationale for a
casearm, and it already cost something. !114 inherited the premise and shippeda Forgejo arm emitting only the bare form, which meant the release channel could
not express "tag only" — the bare form serves branches — and a resolved release
tag whose archive was missing fell through to a same-named branch while
INSTALLED_FROMstill recorded the tag. That was caught in review and fixed bydropping the case arm from
ref_candidate_urlsentirely;templates_archive_urlsstill carries both the arm and the wrong comment.
Whether the instance gained these paths since !110 measured or the earlier
measurement read something else, the file is wrong now.
Spec
Re-measure, then either correct the comment and keep the single-form arm as a
deliberate choice with an accurate reason, or drop the arm so both forges share
the two-URL list — which is what
install.sh'sref_candidate_urlsnow doesafter !114, making the two files disagree about the same forge.
Recommend dropping the arm: one grammar, less code, and the
refs/forms arewhat let a caller demand a tag specifically.
Coupling that constrains the change:
install.sh:135-145carries abyte-identical copy of
templates_archive_urls, andtest/cli.shdiffs the two.Both move in one commit or the drift test reds.
Tasks
commands/lib/templates.shinstall.sh's copyref_candidate_urls, which no longer has a case armAcceptance criteria
archive/refs/{tags,heads}/templates_archive_urls' two copies stay byte-identical andtest/cli.shproves ittemplates_resolvestill fetches successfully from both forgesTest plan
Extend
test/cli.sh'stemplates_archive_urlscases with whichever grammar ischosen. Live: fetch a tag, a branch and a SHA from the instance through
templates_resolveand confirm each lands.Dependencies
Split out of #111 / !114 — @andres was asked there whether this correction should
ride that PR or become its own issue and the question is still open. If it rides,
close this as duplicate.
Filed under @andres's explicit authorization on !114 to create process issues
directly. No queue label applied —
readydoes not exist yet.