fix(build): resolve shared npm snippet via COLIBRI_REPO + preflight it #93

Merged
clawdie merged 1 commit from harden-shared-npm-snippet into main 2026-06-21 16:41:05 +02:00
Owner

Hardens the ISO side of colibri#122 (delivered by #92).

Two gaps in #92:

  1. It read the shared clawdie-npm-profile.sh from a hardcoded ${SCRIPT_DIR}/../colibri, but every other colibri consumer in build.sh resolves through resolve_colibri_paths (default /home/clawdie/ai/colibri, honoring COLIBRI_REPO). The hardcoded path diverged from the real build-host layout and silently ignored COLIBRI_REPO overrides.
  2. No existence guard: a missing file let cat fail silently, producing a half-written clawdie-npm.sh (only the NPM_PREFIX line) and letting the build continue.

This PR: resolves the snippet via resolve_colibri_paths and preflights it with a clear error pointing at COLIBRI_REPO — matching preflight_colibri_artifacts.

Verified sh -n and bash -n clean.

🤖 Generated with Claude Code

Hardens the ISO side of colibri#122 (delivered by #92). **Two gaps in #92:** 1. It read the shared `clawdie-npm-profile.sh` from a hardcoded `${SCRIPT_DIR}/../colibri`, but every other colibri consumer in `build.sh` resolves through `resolve_colibri_paths` (default `/home/clawdie/ai/colibri`, honoring `COLIBRI_REPO`). The hardcoded path diverged from the real build-host layout and silently ignored `COLIBRI_REPO` overrides. 2. No existence guard: a missing file let `cat` fail silently, producing a half-written `clawdie-npm.sh` (only the `NPM_PREFIX` line) and letting the build continue. **This PR:** resolves the snippet via `resolve_colibri_paths` and preflights it with a clear error pointing at `COLIBRI_REPO` — matching `preflight_colibri_artifacts`. Verified `sh -n` and `bash -n` clean. 🤖 Generated with Claude Code
clawdie added 1 commit 2026-06-21 16:39:44 +02:00
PR #92 wired the ISO to the shared clawdie-npm-profile.sh but hardcoded
${SCRIPT_DIR}/../colibri and had no existence guard. Every other colibri
consumer in build.sh resolves through resolve_colibri_paths (default
/home/clawdie/ai/colibri, honoring COLIBRI_REPO), so the hardcoded path
diverged from the real build-host layout and ignored the override; a
missing file let cat fail silently into a half-written snippet.

Now: resolve via resolve_colibri_paths and preflight the file with a
clear error pointing at COLIBRI_REPO, matching preflight_colibri_artifacts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
clawdie merged commit 0deaae2586 into main 2026-06-21 16:41:05 +02:00
clawdie deleted branch harden-shared-npm-snippet 2026-06-21 16:41:05 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: clawdie/clawdie-iso#93
No description provided.