Conversation
Centaur supports two overlay-delivery modes: an overlay image (the chart sets CENTAUR_OVERLAY_DIR on the api-rs container) and the repo-cache route (the repoCache DaemonSet clones repos that api-rs mounts into sandboxes at /home/agent/github/<owner>/<repo>). Under repo-cache mode CENTAUR_OVERLAY_DIR was never set in the sandbox, so the entrypoint's overlay branches (.agents/skills copy, services/sandbox/SYSTEM_PROMPT.md append) were silently skipped and any $CENTAUR_OVERLAY_DIR-relative reference resolved to the wrong path. Add an explicit overlay-repo slug and have api-rs inject CENTAUR_OVERLAY_DIR = /home/agent/github/<slug> into the codex sandbox env when set, so overlay files have one stable base path in both modes. - args.rs: --overlay-repo / CENTAUR_OVERLAY_REPO on SandboxArgs; overlay_dir_in_repo_cache(); inject CENTAUR_OVERLAY_DIR before the operator extra-env merge, guarded so SESSION_SANDBOX_EXTRA_ENV still wins; unit tests via a clap Parser wrapper. - chart: overlay.repo value + guarded CENTAUR_OVERLAY_REPO env on api-rs. Backward compatible: overlay.repo empty => no env emitted => unchanged. The sandbox entrypoint already consumes $CENTAUR_OVERLAY_DIR and is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tarrencev
force-pushed
the
feat/overlay-dir-repo-cache
branch
from
June 22, 2026 20:07
2dd6379 to
120e061
Compare
joystick-gg
Bot
force-pushed
the
main
branch
from
September 4, 2026 22:01
5530336 to
d8b3766
Compare
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.
Problem
Centaur has two overlay-delivery modes:
CENTAUR_OVERLAY_DIRon the api-rs container.repoCacheDaemonSet clones repos that api-rs mounts into sandboxes at/home/agent/github/<owner>/<repo>.Under repo-cache mode,
CENTAUR_OVERLAY_DIRis never set in the sandbox. The sandbox entrypoint already consumes$CENTAUR_OVERLAY_DIR(services/sandbox/entrypoint.sh:.agents/skillscopy +services/sandbox/SYSTEM_PROMPT.mdappend, with comments describing exactly this case), so those branches silently no-op and any$CENTAUR_OVERLAY_DIR/...reference resolves to the wrong path. (This bit a downstream overlay that shipped sandbox-side files referenced via$CENTAUR_OVERLAY_DIR.)Fix
Add an explicit overlay-repo slug and have api-rs inject
CENTAUR_OVERLAY_DIR = /home/agent/github/<slug>into the codex sandbox env when set — giving overlay files one stable base path in both delivery modes.args.rs:--overlay-repo/CENTAUR_OVERLAY_REPOonSandboxArgs;overlay_dir_in_repo_cache()(reusesSANDBOX_REPOS_MOUNT_PATH+clean_optional_value); injectCENTAUR_OVERLAY_DIRbefore the operator extra-env merge, guarded by a not-already-present check soSESSION_SANDBOX_EXTRA_ENVstill wins.overlay.repovalue + a guardedCENTAUR_OVERLAY_REPOenv block on api-rs (the existing image-modeCENTAUR_OVERLAY_DIRblock is untouched).Backward compatibility
overlay.repoempty ⇒ no env emitted ⇒ identical behavior to today. Image-mode and the unset case are unchanged; the entrypoint is unchanged. Operators must also add the overlay repo torepoCache.repositories(api-rs only points at the path).Tests
New
args.rsunit tests (via a clapParserwrapper): slug→clone-path mapping incl. unset/empty/slashes-only; codex env template includes/omitsCENTAUR_OVERLAY_DIR.cargo fmt --all --check,clippy --workspace --all-targets -- -D warnings, andcargo test -p centaur-api-serverall pass.🤖 Generated with Claude Code