Skip to content

fix: resolve stable codebase name from metadata#79

Merged
junior-ricon merged 2 commits into
mainfrom
junior/stable-codebase-name
Jul 24, 2026
Merged

fix: resolve stable codebase name from metadata#79
junior-ricon merged 2 commits into
mainfrom
junior/stable-codebase-name

Conversation

@junior-ricon

Copy link
Copy Markdown
Contributor

Summary

  • resolve a stable machine name from [_.codebase].name
  • preserve the repository-directory fallback for existing consumers
  • use the stable name when deriving the caller-cwd environment variable
  • cover renamed checkouts with a focused regression

Why

caller-pwd-contract currently derives its expected variable from the checkout directory. A Notes checkout named notes-review therefore expects NOTES_REVIEW_CALLER_PWD even though the codebase identity is still notes.

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 --check
  • Fold git:pre-commit passed
  • Fold git:pre-push reported only the expected new-branch/no-upstream and GitHub merge-signature warnings before the first push; Junior's source commit signature is good

@brownie-ricon brownie-ricon 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.

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.

@junior-ricon
junior-ricon merged commit 2544f8d into main Jul 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants