Allow REPO to accept arbitrary filesystem paths#212
Open
mikeangstadt wants to merge 1 commit intoKeygraphHQ:mainfrom
Open
Allow REPO to accept arbitrary filesystem paths#212mikeangstadt wants to merge 1 commit intoKeygraphHQ:mainfrom
mikeangstadt wants to merge 1 commit intoKeygraphHQ:mainfrom
Conversation
Remove the hardcoded ./repos/ directory assumption. Users can now specify absolute paths, relative paths, or folder names under ./repos/: REPO=my-repo # legacy: looks in ./repos/ REPO=/home/user/projects/app # absolute path REPO=../other-project/app # relative path Implementation uses Docker Compose env var substitution for the volume mount (same pattern as BENCHMARKS_BASE and OUTPUT_DIR). The TypeScript code is already path-agnostic — changes are limited to the CLI script, docker-compose.yml, Dockerfile, and documentation. Closes KeygraphHQ#181 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
johanbm1405-commits
approved these changes
Mar 6, 2026
johanbm1405-commits
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the hardcoded
./repos/directory assumption from Shannon's CLI and Docker configuration. Users can now specify arbitrary filesystem paths via theREPOflag:REPO=my-repo— legacy behavior, looks in./repos/(unchanged)REPO=/home/user/projects/app— absolute path (new)REPO=../other-project/app— relative path (new)Changes
docker-compose.yml: Replace static./repos:/reposmount with${REPO_MOUNT_SOURCE:-./repos}:${REPO_MOUNT_TARGET:-/repos}(follows existingBENCHMARKS_BASE/OUTPUT_DIRpattern)shannon: Add Mode 2 path detection (/*|./*|../*|..|.), resolve to absolute viapwd -P, export mount env vars, update help text/examples/error messagesDockerfile: Pre-create/target-repomount point with correct permissionsREADME.md: Rewrite "Prepare Your Repository" section, add arbitrary path examples to Quick Start and UsageCLAUDE.md: Update setup commands and troubleshootingDesign
The TypeScript code is already fully path-agnostic — all services accept
repoPathas a generic string. Changes are limited to the CLI-to-Docker bridge layer. When an arbitrary path is detected, the CLI resolves it to an absolute path, exportsREPO_MOUNT_SOURCEandREPO_MOUNT_TARGET, and Docker Compose substitutes them into the volume mount.Backward Compatibility
REPO=my-repocontinue to work exactly as before (Mode 3 / legacy)REPO=/benchmarks/*andREPO=/repos/*are unchanged (Mode 1)./repos:/repos)Test plan
REPO=repo-name— verify legacy mode works (folder under./repos/)REPO=/absolute/path/to/repo— verify absolute path modeREPO=../relative/path— verify relative path resolutionREPO=.andREPO=..— verify single-dot edge casesREPO=/nonexistent— verify error messageREPO=nonexistent-name— verify improved error with path hintsdocker compose configwith/without env vars — verify mount substitutionCloses #181
🤖 Generated with ClosedLoop