mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
In a linked worktree `.git` is a file naming that worktree's gitdir, not a directory, so reading `PROJECT_ROOT/.git/config` raised NotADirectoryError. `_git_config` catches OSError and returns an empty mapping, which left `_owner_and_repository` without a remote and `mirror_image` returning None for every image. The consequence was silent: every probe addressed the upstream registry directly, so all image work done from a worktree bypassed the GHCR mirror and hit Docker Hub instead. The rate limits and handshake timeouts that showed up as flaky `test-external` runs came from there. `_config_path` follows the indirection: a `.git` directory keeps its own config, a `.git` file is read for its gitdir and that dir's `commondir` points at the shared config. Reads go through utils.cache.files, which the uncached-read lint requires under utils/. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>