Repository navigation
Conversation
install.sh read release-manifest fields, the GitHub tag_name fallback, the sha256 digest, and the # stepcode PATH block through awk. A base system with no awk implementation (a minimal Fedora/WSL image was reported in stepfun-ai#149) therefore failed at manifest parsing, and the README lists no awk prerequisite. The release bundle writes latest.json and manifest.json with JSON.stringify(_, null, 2), so one top-level key or entry object key per line: read them with bash pattern matching instead. Trim the digest with a parameter expansion, and rewrite strip_step_block's validator and stripper as bash loops with the same semantics — nested or unterminated markers still leave the rc untouched, and the blank lines directly above a block are still dropped with it. Add an end-to-end regression test that renders the installer against a fake release directory and runs it with a PATH containing every command it needs except awk, then proves a wrong checksum still aborts before anything is installed. It fails on the previous implementation. Refs stepfun-ai#149
lit26
requested review from
MelodyVAR,
Uking-xxx,
ZouR-Ma and
liuedcson
as code owners
November 1, 2026 15:46
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.
Fixes #149.
infra/release/install.shused awk in four places: the release-manifest readers (json_value,json_top_value), the GitHubtag_namefallback used by the managed search tools, the sha256 digest trim, and the# stepcodePATH-block validator/stripper. The README lists no awk prerequisite, and a Fedora 44 WSL image without any awk implementation failed at manifest parsing:Change
release-bundle.mjswriteslatest.jsonandmanifest.jsonwithJSON.stringify(_, null, 2), so both documents are line-oriented — one top-level key per line, one entry per line inside each object. That shape is now read with bash pattern matching instead of awk:json_top_value/json_valuekeep their exact signatures and semantics (section start, closing brace at end of section, first matching key wins).${actual%%[[:space:]]*}, instead ofawk '{print $1}'.strip_step_blockis rewritten as two bash loops with the same behaviour: a nested or unterminated# stepcodemarker leaves the rc untouched, the blank lines directly above a well-formed block are dropped with it, and an unterminated block's lines are restored rather than dropped.Manifest entries with a missing key still fall through to the existing
diemessages (|| truekeepsset -efrom aborting before them).Tests
New case in
scripts/release-bundle.test.mjs: renders the installer against a fake release directory (file://base URL,tar.gzwith a stubstep), builds a PATH containing every command the installer needs except awk, asserts awk is not reachable, then runs a full install and a checksum-mismatch run.The new case fails on the previous implementation (
awk: command not found→ exit 127, nothing installed). The existingstrip_step_blockharness and the static PATH-persistence checks still pass, andbash -n infra/release/install.shis clean.A
CHANGELOG.mdentry is added under Unreleased → Fixed.