bug(fetch-rt): the HTML guard exits without cleanup — on the cache path it leaves HTML named like the binary #832
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#832
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?
Motivation
fetch-rt.sh's HTML guard exits without cleaning up, so on the cache path it leaves thedownloaded HTML under the release asset's own name.
✅ The dangerous half is genuinely closed: the guard runs BEFORE
install -m 0755, so anHTML body never becomes
rt.🔴 The residual is path-dependent. With no
RT_INSTALL_DIRthe workdir ismktemp -dandthe HTML dies with it. With
RT_INSTALL_DIRset — which is the#606cache path — the filepersists in the adopter's install dir, named after the release asset. An asset named like a
binary leaves an HTML file named like a binary.
Scope
trap 'rm -rf "$workdir"' EXIT, or an explicitrm -f "${workdir}/${name}"on the guard'sfailure branch
trapon the whole workdir is WRONG on the cache path —RT_INSTALL_DIRis the persistent cache and deleting it defeats
#606. Clean the artefact, not thedirectory.
Acceptance criteria
RT_INSTALL_DIRset leaves no HTML file behindBoth paths (— RETIRED (there is no second path):mktempandRT_INSTALL_DIR) exercisedworkdir="${RT_INSTALL_DIR:-$(mktemp -d)}"at:71is a parameter default, and the guard contains noRT_INSTALL_DIRtest. One code path, two values — anmktemparm would re-run the same lines against a directory nobody can inspect afterwards.Related
#749— the 200-masks-HTML class, genuinely closed; this is its cleanup residual#606— the cache path that makes the workdir persistentAnchor
Found while sweeping
#749's ACs: its third AC ("must not leave an executable-named HTML filebehind") was left unticked rather than flipped, because the behaviour holds on one path
and not the other. Filed rather than folded in —
#749's named defect is closed and this isa different one.
✅ CLOSED — verified against
mainfrom my seat, and one AC RETIRED because it asks for something that does not existAC 1 and 2 hold. The arms distinguish artefact gone from directory gone, which is the
distinction
#606needs — an arm checking only emptiness would pass on the destructive version.🔴 AC 3 is RETIRED, not done — "both paths" is one path
There is no second code path to exercise. An
mktemparm would re-run the identical linesagainst a directory that is discarded immediately afterwards — it could assert nothing the
RT_INSTALL_DIRarms do not already assert, and it could not observe the result if it tried.⚠️ I wrote that AC, and it was written from the tracker's own prose — "harmless on the default
path, not harmless with
RT_INSTALL_DIRset" — which describes a difference in CONSEQUENCE andwhich I turned into an AC about a difference in CODE PATH. Second AC of mine today retired for
asking to port a distinction that does not exist in the substrate; the other was
#840's:519.📌 Fix and both arms by @engineer, who also hit the density gate three times getting the fragment
under budget and reported the two WARN-band intermediates rather than presenting a clean first
pass.