fix(archon): use absolute paths for ARCHON_UI_DIR in vendor build step - #1592
Conversation
The archon Dockerfile's UI build step had a relative-path-after-cd bug
that broke every multi-arch GHCR build of pmoves-archon:
ARG ARCHON_UI_DIR=vendor/archon/packages/web
RUN if [ -d "$ARCHON_UI_DIR" ]; then \
...
cd /app/vendor/archon && bun install --frozen-lockfile && \
cd "$ARCHON_UI_DIR" && bun run build && \
...
The test `[ -d "$ARCHON_UI_DIR" ]` ran from the /app WORKDIR and passed.
`cd /app/vendor/archon` then changed CWD. After that, `cd "$ARCHON_UI_DIR"`
was interpreted as relative — the shell tried to cd to
`/app/vendor/archon/vendor/archon/packages/web`, which doesn't exist.
Build log:
→ Building Archon UI from vendor/archon/packages/web
bun install v1.3.14 (0d9b296a)
... 2631 packages installed [5.39s]
/bin/sh: 1: cd: can't cd to vendor/archon/packages/web
Fix: prefix both the test and the cd with /app/ so they resolve
unambiguously regardless of current CWD.
This bug has been failing every push-event GHCR build of pmoves-archon
since at least 2026-05-19 (dependabot branches, fix/agent-zero-dockerized-flag,
main pushes) and was confirmed reproducing on PR #1589's `Validate
archon (PR)` job after that PR's submodule-aware archive fix materialized
the build context correctly.
Companion fix to PR #1589 (CI failure sweep round 2). Once both merge,
all 14 GHCR matrix builds will progress past their respective build
phases. GHCR push 403 remains a separate operator/workflow issue
tracked under Finding 2 of PR #1589.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 4 minutes and 8 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Docker Hardening ValidationHardening Validation ReportValidated: Sun May 24 11:11:36 UTC 2026Services CheckedPMOVES.AI Docker Hardening Validation[INFO] Checking: pmoves/docker-compose.hardened.yml [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: extract-worker [INFO] Validating: langextract [INFO] Validating: presign [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: pdf-ingest [INFO] Validating: jellyfin-bridge [INFO] Validating: invidious-companion-proxy [INFO] Validating: ffmpeg-whisper [INFO] Validating: media-video [INFO] Validating: media-audio [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: deepresearch [INFO] Validating: supaserch [INFO] Validating: publisher-discord [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: publisher [INFO] Validating: analysis-echo [INFO] Validating: graph-linker [INFO] Validating: comfy-watcher [INFO] Validating: grayjay-plugin-host [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: pmoves-yt [INFO] Validating: notebook-sync [INFO] Validating: supabase_service_role_key [INFO] Validating: supabase_jwt_secret ====================================== |
* infra(ci): prefer org-scoped PAT over App token for GHCR auth The GitHub App installation referenced by GH_APP_CLIENT_ID/GH_APP_SEC lacks org-level write:packages permission on POWERFULMOVES, so its token cannot push to ghcr.io/powerfulmoves/* packages. But because docker/login-action only validates that the registry accepts the credential (not whether it has push scope), App login was claiming "success" — preempting the PAT fallback. Result: all 14 integration builds fail at the push step with `403 denied: installation not allowed to Write organization package`, even after the GHCR_TOKEN secret is rotated to an org-scoped PAT with write:packages. Fix: swap the auth-chain order so PAT runs first when configured. New precedence: PAT > App > workflow token. The PAT step's existing condition (`env.GHCR_USERNAME != '' && env.GHCR_PAT != ''`) already gates correctly when PAT is unset, falling through to App. The other reference (USE_GHCR at line 474) is an OR across all three outcomes, so order-independent. After this lands, the next workflow_dispatch run should show all build-publish jobs reaching the push step successfully — gated only by the remaining build-time failures (archon Dockerfile bug → PR #1592, archon-ui matrix entry → PR #1589). Verified empirically via run 26352859002: agent-zero/open-notebook/wger all hit `403 Forbidden` at blob PUT despite the rotated GHCR_TOKEN being correctly configured. Companion to: - PR #1581 (round 1 CI sweep) - PR #1589 (round 2: archon-ui matrix + CodeQL + submodule-aware archive) - PR #1592 (archon Dockerfile relative-cd fix) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ci): correct GH_APP_CLIENT_ID in GHCR auth error message Error message referenced GH_APP_ID but the actual secret is GH_APP_CLIENT_ID. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Shaela Bello <slbello@uncg.edu> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Fixes a relative-path-after-cd bug in
pmoves/services/archon/Dockerfile:178-186that has broken every push-event GHCR build ofpmoves-archonsince at least 2026-05-19.The bug
[ -d "$ARCHON_UI_DIR" ]runs from WORKDIR/appand passes (/app/vendor/archon/packages/webexists).cd /app/vendor/archonchanges CWD.cd "$ARCHON_UI_DIR"(relativevendor/archon/packages/web) resolves to/app/vendor/archon/vendor/archon/packages/web— doesn't exist.Build log proof:
The fix
Two-line change — prefix both the
[ -d ]test and thecdwith/app/so they resolve unambiguously regardless of current CWD.History
This bug has been failing repeatedly on
Build and publish integration images to GHCRruns since 2026-05-19+ — surfaced on dependabot branches,fix/agent-zero-dockerized-flag, and main pushes. It also reproduces on PR #1589'sValidate archon (PR)job after the submodule-aware archive fix from that PR materialized the build context correctly.Relation to other PRs
Once #1581 + #1589 + this PR merge, all 14 GHCR matrix builds should progress past their respective build phases. GHCR push 403 remains a separate auth-order issue tracked under Finding 2 of PR #1589 (operator action: workflow auth chain reorder OR App installation permission).
Test plan
workflow_dispatchon integrations-ghcr.yml —Build archonshould complete the docker build successfully (push step pending Finding 2 resolution)🤖 Generated with Claude Code