Skip to content

fix: install from the per-artifact CDN subpath and tolerate a cold CLI start - #24

Merged
rldyourmnd merged 2 commits into
mainfrom
fix/cdn-artifact-subpath
Jul 17, 2026
Merged

fix: install from the per-artifact CDN subpath and tolerate a cold CLI start#24
rldyourmnd merged 2 commits into
mainfrom
fix/cdn-artifact-subpath

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Two install-blocking bugs found while verifying a real bootstrap --apply, each proven against the official 3.3.6 artifact.

1. CDN artifact path (every download 404'd)

The official CDN moved each file under a per-platform directory segment: .../releases/<version>/<cdn_subpath>/<filename>. The URL builder still produced .../releases/<version>/<filename> → Aliyun NoSuchKey.

Declared the exact segment per artifact as cdn_subpath in build/version.json rather than deriving it (macOS uses the platform-arch key; the two Linux formats share one linux-<arch> directory, so no single derivation is correct). All six artifacts confirmed by HTTPS HEAD to return 200 with a content-length equal to the pinned size — only the path was wrong, digests and identities unchanged.

2. CLI version probe timeout (postcondition returned "unknown")

The postcondition probes the freshly installed 9 MB CLI cold from disk. Measured cold start is 2–13 s (warm: <1 s), but the probe timeout was 3 s → it killed the CLI mid-start and reported "unknown", aborting an otherwise-complete install. Raised the default to 30 s with an NDDEV_ZCODE_PROBE_TIMEOUT_SECONDS override (clamped 1–120). Isolation, output-size, and process-group-kill guarantees unchanged.

Verification

A real isolated bootstrap --apply with the official artifact now completes end to end:

[info] url: .../3.3.6/macos-arm64/ZCode-3.3.6-mac-arm64.dmg
[ok] artifact size and SHA-512 verified
hdiutil: ... checksum ... is VALID
[ok] ZCode app 3.3.6 and CLI 0.15.2 verified exactly

https://claude.ai/code/session_01Y29c9sJRhChvxDcUjab5Xo

The official CDN moved each artifact under a per-platform directory segment
between the version and the filename:
`.../releases/<version>/<cdn_subpath>/<filename>`. The bootstrap URL builder
still produced `.../releases/<version>/<filename>`, so every download 404'd
(Aliyun NoSuchKey).

Declare the exact segment per artifact as `cdn_subpath` in build/version.json
rather than deriving it from the key: macOS uses the platform-arch key, but the
two Linux formats share one `linux-<arch>` directory, so no single derivation
is correct. bootstrap.sh validates the segment as a single lowercase path
component and inserts it into the URL; the public-contract validator pins the
exact expected segment per artifact so a wrong path fails closed at validation
time instead of at download. All six artifacts were confirmed by HTTPS HEAD to
return 200 with a content-length equal to the pinned size, so only the path was
wrong -- the digests and identities are unchanged.

Claude-Session: https://claude.ai/code/session_01Y29c9sJRhChvxDcUjab5Xo
The bootstrap postcondition probes the freshly installed CLI immediately, so
its 9 MB bundle is read cold from disk. Measured cold start is 2-13 s (warm:
under 1 s), but the probe timeout was 3 s, so it killed the CLI mid-start and
reported "unknown", aborting an otherwise-complete install with atomic
rollback.

Raise the default probe timeout to 30 s, with an
NDDEV_ZCODE_PROBE_TIMEOUT_SECONDS override (clamped 1-120) for a slower host
or a fast enforcement test. A real isolated `bootstrap --apply` with the
official 3.3.6 artifact now completes: "ZCode app 3.3.6 and CLI 0.15.2
verified exactly". The isolation, output-size, and process-group kill
guarantees are unchanged.

Claude-Session: https://claude.ai/code/session_01Y29c9sJRhChvxDcUjab5Xo
@rldyourmnd
rldyourmnd force-pushed the fix/cdn-artifact-subpath branch from 676c7f0 to a70586f Compare July 17, 2026 18:04
@rldyourmnd
rldyourmnd merged commit 67da727 into main Jul 17, 2026
8 checks passed
@rldyourmnd
rldyourmnd deleted the fix/cdn-artifact-subpath branch July 17, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant