The PR check job authenticates the private tramiton-core git fetch, but the main-branch deploy-agent job builds Dockerfile.agent where cargo also fetches tramiton-core — inside the image build, with no credentials — so agent image builds on main fail.
Fix: inject the PAT as a BuildKit secret (never baked into an image layer).
Dockerfile.agent: RUN --mount=type=secret,id=tramiton_token … applies the same https-insteadOf rewrite + CARGO_NET_GIT_FETCH_WITH_CLI=true before cargo build.
Only the agent image depends on tramiton-core (dashboard/mcp/docs unaffected). Self-tests on merge — changing Dockerfile.agent makes detect-changes run deploy-agent.
Note: couldn't fully run the image build locally (no PAT value on hand + no .dockerignore so the context is large), but this mirrors the working PR-stage auth and uses standard BuildKit secret injection. Assumes the deploy runner's Docker daemon supports BuildKit (docker:27-cli → yes).
The PR `check` job authenticates the private tramiton-core git fetch, but the main-branch **`deploy-agent`** job builds `Dockerfile.agent` where cargo also fetches tramiton-core — inside the image build, with no credentials — so **agent image builds on main fail**.
Fix: inject the PAT as a **BuildKit secret** (never baked into an image layer).
- `Dockerfile.agent`: `RUN --mount=type=secret,id=tramiton_token …` applies the same `https`-insteadOf rewrite + `CARGO_NET_GIT_FETCH_WITH_CLI=true` before `cargo build`.
- `deploy-agent`: `DOCKER_BUILDKIT=1 docker build --secret id=tramiton_token,env=TRAMITON_FETCH_TOKEN …`, reusing the existing `TRAMITON_FETCH_TOKEN` secret.
Only the agent image depends on tramiton-core (dashboard/mcp/docs unaffected). **Self-tests on merge** — changing `Dockerfile.agent` makes `detect-changes` run `deploy-agent`.
Note: couldn't fully run the image build locally (no PAT value on hand + no `.dockerignore` so the context is large), but this mirrors the working PR-stage auth and uses standard BuildKit secret injection. Assumes the deploy runner's Docker daemon supports BuildKit (docker:27-cli → yes).
The PR `check` job configures git auth for the private tramiton-core dependency,
but the main-branch `deploy-agent` job builds `Dockerfile.agent` where cargo also
fetches tramiton-core — inside the image build, with no credentials — so agent
image builds on main failed.
Inject the PAT as a BuildKit secret (never baked into a layer):
- Dockerfile.agent: `RUN --mount=type=secret,id=tramiton_token` configures the
same https-insteadOf rewrite + CARGO_NET_GIT_FETCH_WITH_CLI before cargo build.
- deploy-agent: `DOCKER_BUILDKIT=1 docker build --secret id=tramiton_token,env=
TRAMITON_FETCH_TOKEN ...`, reusing the existing TRAMITON_FETCH_TOKEN secret.
Only the agent image depends on tramiton-core; dashboard/mcp/docs builds are
unaffected. Self-tests on merge (deploy-agent runs when Dockerfile.agent changes).
Refs #118.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sharang
merged commit c6b5622113 into main2026-07-12 20:25:40 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The PR
checkjob authenticates the private tramiton-core git fetch, but the main-branchdeploy-agentjob buildsDockerfile.agentwhere cargo also fetches tramiton-core — inside the image build, with no credentials — so agent image builds on main fail.Fix: inject the PAT as a BuildKit secret (never baked into an image layer).
Dockerfile.agent:RUN --mount=type=secret,id=tramiton_token …applies the samehttps-insteadOf rewrite +CARGO_NET_GIT_FETCH_WITH_CLI=truebeforecargo build.deploy-agent:DOCKER_BUILDKIT=1 docker build --secret id=tramiton_token,env=TRAMITON_FETCH_TOKEN …, reusing the existingTRAMITON_FETCH_TOKENsecret.Only the agent image depends on tramiton-core (dashboard/mcp/docs unaffected). Self-tests on merge — changing
Dockerfile.agentmakesdetect-changesrundeploy-agent.Note: couldn't fully run the image build locally (no PAT value on hand + no
.dockerignoreso the context is large), but this mirrors the working PR-stage auth and uses standard BuildKit secret injection. Assumes the deploy runner's Docker daemon supports BuildKit (docker:27-cli → yes).