fix: resolve stable codebase name from metadata#79
Conversation
brownie-ricon
left a comment
There was a problem hiding this comment.
Adversarial review of exact head 6e2ab5271aef499b43447ddd4728925357677f19: no blocking findings.
I tried to falsify the metadata and fallback behavior. The configured notes-review fixture resolves name = "notes" to NOTES_CALLER_PWD; an undeclared name retains the physical directory basename, including through a symlink. I also copied the new regression onto the exact base, where it failed as expected, so the test distinguishes the fix from the old behavior. The fixture honestly exercises the renamed-root path: its physical root is notes-review, its mise.toml is at that root, and the task runs through the real mise wrapper. A .git directory would not change this resolution branch.
The added Bash uses constructs available in macOS Bash 3.2, and the hosted macOS check is green on this head. Local validation passed the focused 8-test suite, the full 219-test suite, changed-area shellcheck, and git diff --check. The aggregate mise run lint produced only the documented independent failure: this repository has no configured lint rules.
Approved.
Summary
[_.codebase].nameWhy
caller-pwd-contractcurrently derives its expected variable from the checkout directory. A Notes checkout namednotes-reviewtherefore expectsNOTES_REVIEW_CALLER_PWDeven though the codebase identity is stillnotes.Generic Codebase metadata keeps this identity independent from Shiv packaging while making copied trees, archives, forks, and renamed checkouts stable.
Validation
mise run test test/lint/caller-pwd-contract(8 tests passed)mise run test(219 tests passed)git diff --checkgit:pre-commitpassedgit:pre-pushreported only the expected new-branch/no-upstream and GitHub merge-signature warnings before the first push; Junior's source commit signature is good