feat(create-*): a pin is a commit SHA, not a name nobody moved yet - #14
Merged
Conversation
--dplaax-module-ref rejected a denylist of six familiar branch names (main, master, develop, dev, head, trunk) and accepted everything else. That is not a pin discipline, and release.pin.source-exact says why in as many words: any branch is movable. So were `release/2026-07`, `my-feature`, and every tag — all of which sailed straight through a check whose comment claimed it enforced "an exact tag". Inverted to the positive form: a full 40-hex lowercase commit id, or nothing. Lowercase because git resolves object ids in lowercase, and accepting the other spelling would give one commit two pin strings. --allow-unpinned-ref is the mode boundary the rule implies by scoping the requirement to a "published-release mode". Iterating locally against a branch is legitimate; publishing from one is not. The escape is explicit, names what it gives up in its own text, and does not double as a bypass for a missing value — a test pins that. AUTH_REF loses its `poc` default in generated-instance.Dockerfile: a default here would have to be a branch name, i.e. the very thing the requirement exists to keep out of a published artifact. The build now fails early with a readable message instead of deep inside the scaffold; the guard is POSIX sh (verified against the four shapes it must classify) because the stage is alpine. Tests: both generators, the denylist cases plus the ones it could never have caught, both length and case boundaries of the SHA, and — the part a rejection-only suite would miss — that the escape actually scaffolds.
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.
The defect
--dplaax-module-refrejected a denylist of six familiar branch names andaccepted everything else:
The comment above it claimed the CLI enforced "an exact tag". It did not.
release/2026-07,my-feature,HEAD~1and every tag — all equallymovable — passed.
release.pin.source-exactnames this shape directly:The change
Inverted to the positive form —
/^[0-9a-f]{40}$/, or nothing. Lowercasebecause git resolves object ids in lowercase; accepting the other spelling
would give one commit two pin strings.
--allow-unpinned-refis the mode boundary the rule implies by scoping itsrequirement to a published-release mode. Iterating locally against a branch
is legitimate; publishing from one is not. The flag says in its own name what
it gives up, and a test pins that it is not also a bypass for a missing
value.
AUTH_REFloses itsARG AUTH_REF=pocdefault: a default here would have to bea branch name — the very thing the requirement exists to keep out of a
published artifact. A POSIX-sh guard now fails the build early with a readable
message instead of failing deep inside the scaffold.
Blast radius
publish-images.ymlgithub.shamake instancesgit rev-parse HEADdocker buildpocdefault)--allow-unpinned-refTest plan
Both generators, 108 + 95 passing:
v0.1.0,release/2026-07,my-feature,HEAD~1,deadbeef);--allow-unpinned-ref→ exit 0), which arejection-only suite would have missed;
Guard logic verified against all four input shapes in POSIX sh (the gen stage
is alpine, so
bash-isms would not run).Not in this PR
release.lock.frozen-graph— the builder stage still runs a barepnpm install, so the instance's transitive graph is resolved fresh at imagebuild time. Closing it properly means generating and testing the lockfile
before the image build, which restructures the publish path; raised separately
rather than half-done here.
🤖 Generated with Claude Code