Conversation
Justfile passed a --build-arg named SHA_HEAD_SHORT to podman build whenever the worktree was clean, but the Containerfile never declares ARG SHA_HEAD_SHORT and nothing reads it, so the builder discarded it, emitting an unconsumed-build-arg warning on every clean build. That warning is the repo's only signal for a genuinely misspelled build arg, so the noise cost real diagnostic value. Remove the producer from the build recipe, the header anchor in build/00-image-info.sh, the orphaned git stub in the bats harness, and the two unit tests that certified the dead half. Assisted-by: DeepSeek DeepSeek V4 Flash 0731 via goose Signed-off-by: mendezr <mendezr@users.noreply.github.com>
There was a problem hiding this comment.
Duplicate of #373 — this PR is a strict subset.
I read both diffs in full. The Justfile and build/00-image-info.sh hunks are byte-identical between the two PRs (same resulting blobs b4712648 / 2b79abba): both drop the dead SHA_HEAD_SHORT --build-arg block and its header-comment entry. Both also remove the two stale assertions and the git stub from tests/unit/justfile-build_test.bats.
#373 (earlier, 2026-09-16) additionally adds tests/unit/justfile-build-arg-gate_test.bats, a contract gate asserting every --build-arg the Justfile passes is declared as ARG in the Containerfile — which prevents the next undeclared arg from reappearing silently. This PR (2026-09-18) has no equivalent guard.
Flagging for a maintainer: if you agree, this one could be closed in favour of #373. I have not closed anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5
There was a problem hiding this comment.
This appears to duplicate #373, which makes the same change to Justfile and build/00-image-info.sh.
Verified by reading both diffs in full:
- The
Justfilehunk (removing thegit status -sguard and theSHA_HEAD_SHORT--build-argat former lines 154–155) and thebuild/00-image-info.shheader-comment hunk are byte-identical in both PRs. - Both bodies cite issue #372 and both deliberately take the "remove" direction rather than declaring
ARG SHA_HEAD_SHORTin theContainerfile. - Differences: #373 additionally adds
tests/unit/justfile-build-arg-gate_test.bats, a contract gate asserting every--build-argthe Justfile passes is declared as anARGin theContainerfile— that prevents this class of drift from recurring. This PR's only extra is removing the now-orphanedgitstub andSTUB_GIT_STATUSfixture fromjustfile-build_test.bats(a nice cleanup #373 leaves behind, but harmless dead test scaffolding).
Flagging for a maintainer: if you agree, this one could be closed in favour of #373, which is two days earlier and broader in scope (it adds the regression gate). The git-stub cleanup here could be folded into #373 or done as a follow-up. I have not closed anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
There was a problem hiding this comment.
This duplicates #373, which makes the byte-identical change to Justfile (removing the SHA_HEAD_SHORT block at line ~151) and to the header comment in build/00-image-info.sh. Both PRs cite the same problem (undeclared ARG → "build args were not consumed" warning) and both take the "remove" direction from issue #372.
Differences I verified by reading both diffs in full:
- #373 additionally adds
tests/unit/justfile-build-arg-gate_test.bats, a contract gate asserting every--build-argthe Justfile passes has a matchingARGin the Containerfile — so the same class of drift can't recur. - This PR (#379) is cleaner in one respect: it also removes the now-orphaned
gitstub andSTUB_GIT_STATUSfixture fromtests/unit/justfile-build_test.bats(lines 37–70), which #373 leaves behind as dead fixture code.
#373 is earlier (Sep 16 vs Sep 18) and broader in scope, so flagging for a maintainer: if you agree, this one could be closed in favour of #373, ideally after porting its stub-cleanup hunk. I have not closed anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
There was a problem hiding this comment.
Reviewed (correctness) — removal is complete and consistent at head 2d5cdf9: no SHA_HEAD_SHORT reference remains anywhere in the tree, Containerfile indeed never declared the ARG (its ARG block is lines 57–62), and the build recipe no longer invokes git, so dropping the git stub from the bats harness is safe — the two deleted tests were its only consumers.
Two stale comments the diff left behind, both describing the behavior this PR removed:
Justfile:105-106— thebuildrecipe's doc comment still says "If the git working directory is clean, it also includes the short SHA of the current HEAD." That's now false.tests/unit/justfile-build_test.bats:6— the header still listsgitamong the stubbed external commands, but the stub was removed in this PR.
Both are one-line comment fixes; no functional issues found.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
|
This removes the same dead |
Summary
Removes the dead
SHA_HEAD_SHORTbuild-arg contract. This addresses issue #372.Justfilepassed--build-arg SHA_HEAD_SHORT=$(git rev-parse --short HEAD)topodman buildwhenever the worktree was clean, but theContainerfilenever declaresARG SHA_HEAD_SHORTand nothing in the image reads it, so the builder discarded it and emitted anone or more build args were not consumedwarning on every clean build. That warning is the repo's only signal for a genuinely misspelled build arg, so the noise is costing real diagnostic value.Following the issue's recommendation, I chose the "Remove it" direction:
Justfilebuild recipe: dropped the git-basedSHA_HEAD_SHORTbuild-arg block.build/00-image-info.sh: dropped theSHA_HEAD_SHORTentry from the required-env-vars header comment.tests/unit/justfile-build_test.bats: removed the two tests that certified the producer, plus the now-orphanedgitstub andSTUB_GIT_STATUSfixture.Validation
just checkpasses (Justfile syntax).just test-unitpasses: 194 tests, 0 failures.— hive: backend=goose model=deepseek/deepseek-v4-flash-0731