Skip to content

deploy_drift resolves packaged installs to Homebrew's Git HEAD #615

Description

@EtanHey

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:

  1. skip commit-based drift detection and report package version/build identity, or
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions