fix: install from the per-artifact CDN subpath and tolerate a cold CLI start - #24
Merged
Conversation
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
force-pushed
the
fix/cdn-artifact-subpath
branch
from
July 17, 2026 18:04
676c7f0 to
a70586f
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.
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>→ AliyunNoSuchKey.Declared the exact segment per artifact as
cdn_subpathinbuild/version.jsonrather than deriving it (macOS uses the platform-arch key; the two Linux formats share onelinux-<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_SECONDSoverride (clamped 1–120). Isolation, output-size, and process-group-kill guarantees unchanged.Verification
A real isolated
bootstrap --applywith the official artifact now completes end to end:https://claude.ai/code/session_01Y29c9sJRhChvxDcUjab5Xo