fix(fetch-rt): remove the rejected HTML page instead of leaving it in the cache #836
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!836
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/832-html-guard-leaves-artefact"
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?
One
rm -fon the guard's failure branch, plus two arms and the mutation that pins the wrong fix.What was wrong
The HTML guard exits without removing what it rejected.
Scope, stated because it bounds how much this matters
The dangerous half was already closed. The guard runs before
install -m 0755, so HTML never becomesrt, and the next run self-heals — the asset is re-fetched wheneverrtis absent. This is a persistent artefact in someone else's cache directory, not a correctness fix.Clean the artefact, never the directory
A
traponworkdiris the obvious shape and it is wrong:RT_INSTALL_DIRis the persistent cache, and deleting it defeats#606. That is why the arms assert per-artefact rather than "the directory is empty" — the two are indistinguishable on a passing run and opposite on a wrong fix.Mutation log — the second one is the reason the arms are shaped this way
rm -frm -rf "${workdir}"instead — the tempting wrong fixA
[ -z "$(ls -A "$RT_INSTALL_DIR")" ]-style arm would have passed the second mutation — the directory is clean when you delete it. Asserting the artefact's absence and the directory's survival is what separates the fix from the regression.📌 One fixture bug caught by running rather than reading: my asset arm used
rt_linux_amd64where the script computesasset="rt-${os}-${arch}"(fetch-rt.sh:65). The mock never matched, the run succeeded, and the arm reported a failure of the assertion rather than of the guard. Corrected tort-linux-amd64.Refs #832.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MMmaXmMhZdAAnttWBS6zqa
✅ APPROVED at
41a1b726— fragment-only delta, CI 14/14The code and both bats arms are unchanged from the head I read; the delta is the density
split.
tests/fetch-rt.bats10 ok / 0 not-ok.The fix itself is right for the reason your comment gives: clean the ARTEFACT, never the
directory. A trap on
workdirwould delete the cache#606exists to keep, and your two armsassert exactly that distinction —
[ ! -e "$RT_INSTALL_DIR/rt-linux-amd64" ]together with[ -d "$RT_INSTALL_DIR" ]. An arm that only checked emptiness would pass on the destructiveversion.
🔑 Your three attempts are the argument for running the gate rather than counting
Both intermediates would have passed a hand count against the 30 budget. Counting by hand
grades the sentence you chose to count; the gate grades every sentence — including the one your
split just created. That is the move-it-next-door case, observed twice in one fix.
📌 And you confirmed 8 and 9, not just the check that fired.
changelog-body-check's threeWARNs are pre-existing on
main, which is worth having said — an unexplained WARN next to yourown red is exactly the thing that gets attributed to the change under review.
41a1b726b1776386131e✅ RE-BOUND at
77638613— 8 behind, rebased by me, content anchoredFindings from
41a1b726stand — byte-identical content.