Skip to content

pick self-test: the side release commit is made with the self-test's identity, so a host with no git identity gets its v0.0.0 tag - #1149

Closed
juliankang4 wants to merge 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-pick-identity
Closed

juliankang4 wants to merge 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-pick-identity

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

tools/release/pick.sh --self-test가 git identity 없는 기계에서 3건 실패하던 것을 한 줄로 고쳤습니다.

What and why

pick.sh --self-test builds a side release commit with git commit-tree to carry the v0.0.0 tag. Unlike the other two commits in that function, this call had no -c user.name=selftest -c user.email=selftest@invalid. On a host where git cannot pick an identity (a CI runner, a fresh machine), commit-tree fails, the tag is never made, pick reports needs-gpu PRs skipped (no release tag before HEAD), and three cases fail: "needs-gpu PRs listed", "gh that cannot answer" and "gh absent". The call now gets the same identity flags as its neighbours. One line changes.

Release notes: internal: the release pick self-test passes on a host with no git identity.

Code shape

The review reads these first. A box left unticked needs one line of why.

  • No second copy. Logic two models (or two call sites) share has one common owner; I lifted it there instead of
    copying it (AGENTS.md "Common code first", docs/rust-quality.md R14). Where I found an existing copy, I
    named it below.
  • Model code holds only architecture facts. A model's own files carry only what its architecture forces
    (tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
  • Dead code is gone. Nothing I made unused is left behind (functions, flags, gate clauses, docs).
  • No silent failure. Undefined input is a named error or panic, never a defined-looking output.
  • Comments state what is true now. No dates, issue numbers or how a bug was found (tools/check-comments.sh).
  • No relaxed gate. No band, tolerance or lint moved to make a check pass; a re-pin carries PIN(YYYY-MM-DD):
    and its reason.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up.

Duplication found or removed (path:line), or "none": none. The fix reuses the identity flags already on the other commits in self_test in tools/release/pick.sh.

What I ran

Base 0190b04b63e68a481a69f971612eecfcf9d4b48e (upstream/main), head 5bc975d983eb4995a4615b4df4d57663ff0456ab.

The fix cannot be seen on a machine whose git invents an identity from the hostname (macOS), so the run forces the no-identity state with user.useConfigOnly=true and an empty HOME, and runs the base pick.sh (taken from git show) beside the head one:

export HOME=$(mktemp -d) XDG_CONFIG_HOME= GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=user.useConfigOnly GIT_CONFIG_VALUE_0=true
b=$(mktemp -d); git show 0190b04b6:tools/release/pick.sh > $b/pick.sh && cp tools/release/publish.sh $b/
echo BASE: && bash $b/pick.sh --self-test 2>&1 | tail -1
echo HEAD: && bash tools/release/pick.sh --self-test 2>&1 | tail -1
BASE:
pick.sh: self-test 3 failure(s) in 109 cases
HEAD:
pick.sh: self-test ok (29 cases, 80 mutant runs)

The default environment on the head also passes:

env -u GIT_AUTHOR_NAME HOME=$(mktemp -d) bash tools/release/pick.sh --self-test 2>&1 | tail -2
pick.sh: self-test ok (29 cases, 80 mutant runs)

Lint on the head, the clippy run the repository's lint recipe uses (python3 tools/recipes.py box-command lint): chain-clippy: lint rc 0 (^warning: 0, the ratchet 0 in tools/lint-ratchet.txt).

The change touches only the self-test block of a release tool, so no GPU gate or binary is reached.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

…identity, so a host with no git identity gets its v0.0.0 tag
@github-actions github-actions Bot added the tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo label Nov 3, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: The side release commit now receives the self-test's Git identity, matching the neighboring fixture commits.

Checked

Duplicates: 0 new functions, types or constants; identity options match the neighboring commit commands.
Complexity: self_test gains command options; no control-flow growth.
Silent failure: 1 command-substitution path followed; failed commit creation leaves the tag absent, and the assertions at lines 270, 280 and 284 reject the resulting skipped PR row.
Tests: Shell syntax check passes. Static mutation check: removing the identity options at tools/release/pick.sh:140 with no identity and user.useConfigOnly=true prevents tag creation and fails those assertions. The PR reports 3 base failures and a passing head run with 29 cases and 80 mutant runs; these runs were not repeated during validation.
Gates: No pins, thresholds or assertions changed.
Escape catalog: C1 command substitution checked; no catalog defect matched.

Notes

Dryer and crapper did not run because no Rust file changed.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The same fix landed in 18e15bb, so this one is no longer needed. Many thanks to the maintainer for taking care of it.

(AI 코딩 에이전트가 작성한 코멘트입니다.)

@juliankang4 juliankang4 closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant