test(release): remove the dead INSTALL_DIRS derivation and pin the survivor - #453
Open
kragent66-glitch wants to merge 1 commit into
Open
kragent66-glitch wants to merge 1 commit into
kragent66-glitch wants to merge 1 commit into
Conversation
…rvivor (lacs-project#449) tests/release/install-paths.test.sh derived INSTALL_DIRS twice, three lines apart, and the first derivation was both unused and wrong. The `sed` read one physical line, so it stopped at the backslash and lost $(SUDOERS) and $(HELPERS). The `awk` on the next line overwrote it unconditionally, and ShellCheck at --severity=warning does not report an unused assignment, so the dead line sat above the reader that works, looking authoritative. Deleting a line is not the deliverable. The derivation moves into install_dirs_vars() so a fixture can exercise the real reader rather than a copy of it, and the new assertion fails naming the variables a reader that stops at the backslash loses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/release/install-paths.test.shderivedINSTALL_DIRStwice, three lines apart, and the first derivation was both unused and wrong.Line 54 read one physical line with
sed, which stops at the backslash and loses$(SUDOERS)and$(HELPERS). Line 56 then overwrote it unconditionally with theawkthat reads the whole logical line. Nothing read the first value — and ShellCheck at--severity=warning, which is whate2e / scripts-lintruns, does not report an unused assignment — so it sat there looking authoritative above the reader that works. The next person to read those four lines sees two spellings of one idea and a coin flip over which to delete; pick wrong and the check stops covering$(HELPERS), which is the path #301 is about.This removes the dead derivation and adds the assertion that says why the survivor is the one that survived.
Two changes beyond the deletion, both in service of that assertion:
install_dirs_vars(), so the fixture exercises the real reader instead of a copy of it. Extracting it is what makes the new assertion mean anything.awkit describes.The
sedat line 48, which extractsPREFIXfrom a genuinely single-line assignment, is untouched.Related Issue
Closes #449
Validation
$(HELPERS)), so deleting the wrong reader can no longer silently disable that checkClean run, byte-identical at
30b9e31(the commit the issue measured against):Mutation, using the method from the issue — copy the
Makefile,tests/e2e/provision.shand this test into a scratch tree, then swap the survivingawkfor the line-54sed:The two
daemon-install writes into …lines are the failure the issue predicted from the clean run. The twolost $…lines are the new assertion naming the variables the bad reader dropped, which is what makes the mutation legible without diffing the two readers by eye.ShellCheck, the same invocation CI uses:
Notes for Reviewers
cargo nextest run --workspace --locked: NOT RUN. This box has noglib-2.0development headers, so the workspace does not compile here —glib-sysfails at itspkg-configprobe with exit code 101. That is pre-existing and unrelated to this diff, which touches no Rust code. I did run the build step thate2e / scripts-lintactually performs,cargo build -p sysknife-cli --locked, and it passes here (Finished dev profile in 1m 38s).CLAUDE.mdand the AI section ofCONTRIBUTING.md. Every command output quoted above comes from a run reproduced on30b9e31, not from the draft.