Problem
On a Homebrew-installed BrainLayer 1.5.1, BRAINLAYER_REPO_ROOT points inside:
/opt/homebrew/opt/brainlayer/libexec/venv/lib/python3.13/site-packages
deploy_drift.git_head() walks upward and resolves the enclosing /opt/homebrew repository. The daemon's BrainLayer launch commit is therefore compared with Homebrew's unrelated HEAD.
Live evidence
On the M1 repair host, brainlayer doctor reported:
repo_root: the installed BrainLayer site-packages directory
deployed_commit: 3130e804..., the enclosing Homebrew checkout
launch_commit: c010c96b..., a BrainLayer commit
A prior controlled brew update changed the alleged deployed commit in lockstep with Homebrew's HEAD without changing BrainLayer.
Expected
Package installs must not resolve an enclosing, unrelated Git repository. If the configured repo root is not itself a BrainLayer checkout, either:
- skip commit-based drift detection and report package version/build identity, or
- use package metadata that identifies the installed BrainLayer artifact.
Acceptance
- Regression test with site-packages nested under an unrelated parent Git repo.
- No deploy-drift alarm when only the parent Homebrew repo changes.
- Source checkouts retain commit-based drift detection.
Problem
On a Homebrew-installed BrainLayer 1.5.1,
BRAINLAYER_REPO_ROOTpoints inside:/opt/homebrew/opt/brainlayer/libexec/venv/lib/python3.13/site-packagesdeploy_drift.git_head()walks upward and resolves the enclosing/opt/homebrewrepository. The daemon's BrainLayer launch commit is therefore compared with Homebrew's unrelated HEAD.Live evidence
On the M1 repair host,
brainlayer doctorreported:repo_root: the installed BrainLayer site-packages directorydeployed_commit:3130e804..., the enclosing Homebrew checkoutlaunch_commit:c010c96b..., a BrainLayer commitA prior controlled
brew updatechanged the alleged deployed commit in lockstep with Homebrew's HEAD without changing BrainLayer.Expected
Package installs must not resolve an enclosing, unrelated Git repository. If the configured repo root is not itself a BrainLayer checkout, either:
Acceptance