Skip to content

fix: repo alias resolution and CC_REPOS_DIR support#12

Merged
stackbilt-admin merged 1 commit intomainfrom
fix/repo-alias-resolution
Mar 24, 2026
Merged

fix: repo alias resolution and CC_REPOS_DIR support#12
stackbilt-admin merged 1 commit intomainfrom
fix/repo-alias-resolution

Conversation

@stackbilt-admin
Copy link
Copy Markdown
Member

Summary

  • Adds REPO_ALIASES support loaded from repo-aliases.conf (configurable via CC_REPO_ALIASES env var) so tasks with aliased repo names resolve correctly at taskrunner claim time
  • Adds CC_REPOS_DIR env var for configurable base directory for repo lookups
  • Fixes CRLF line endings across all shell scripts and adds .gitattributes to prevent recurrence

Closes #11

Details

The repo resolution order is now:

  1. Check alias map (repo-aliases.conf) → resolve name
  2. Try resolved name as direct path
  3. Try $CC_REPOS_DIR/resolved_name
  4. Try $CC_REPOS_DIR/original_name
  5. Fail with descriptive error

Note: The server-side preflight validation in the AEGIS API that pre-fails tasks before the taskrunner claims them is a separate issue that needs to be addressed in the aegis-daemon repo. This PR fixes the taskrunner side so aliased repos work when tasks do reach it.

Test plan

  • Create repo-aliases.conf with an alias mapping, verify task resolves correctly
  • Verify CC_REPOS_DIR resolution works for non-aliased repos
  • Verify existing behavior unchanged when no alias file or repos dir is configured
  • Verify bash -n taskrunner.sh passes (CRLF fix)

🤖 Generated with Claude Code

Fixes #11 — tasks with aliased repo names now resolve correctly at
claim time instead of failing with repo_missing.

Changes:
- Add REPO_ALIASES loaded from repo-aliases.conf (or CC_REPO_ALIASES)
- Add CC_REPOS_DIR for configurable base directory for repo lookups
- Resolution order: alias → direct path → REPOS_DIR/resolved → REPOS_DIR/original
- Fix CRLF line endings across shell scripts (prevents bash parse errors)
- Add .gitattributes to enforce LF for *.sh and *.conf files

Note: the server-side preflight validation in the AEGIS API that
pre-fails tasks before the taskrunner claims them is a separate issue
that needs to be addressed in the aegis-daemon repo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

bug: tasks pre-failed with repo_missing before taskrunner claims them

1 participant