Skip to content

[Infra] Hash-lock Python tool installs and pin the emsdk commit - #67

Open
DongyuZhao wants to merge 2 commits into
mainfrom
hash-locked-tool-installs
Open

[Infra] Hash-lock Python tool installs and pin the emsdk commit#67
DongyuZhao wants to merge 2 commits into
mainfrom
hash-locked-tool-installs

Conversation

@DongyuZhao

Copy link
Copy Markdown
Contributor

Summary

Verification

audit:ci green with the new checks active; both requirements files installed for real with --require-hashes into fresh venvs on macOS arm64 (cmake-format 0.6.13, clang-format 22.1.8); the modified format-cmake.sh --check ran end-to-end against the repo with a fresh tool dir; shellcheck reports nothing new on either script.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DongyuZhao
DongyuZhao requested a review from a team July 28, 2026 05:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4070cc110c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/init-environment.sh Outdated
# Pin the emsdk manager itself to the immutable commit of the release
# tag matching EMSCRIPTEN_VERSION: a moved tag or new default-branch
# commit must never change the bytes this installer executes.
git -C "$directory" fetch --filter=blob:none origin "$EMSCRIPTEN_COMMIT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip the fetch when the pinned commit already exists

When a contributor reruns --install emscripten after a successful installation while GitHub is unavailable, this unconditional fetch fails under set -e before the already-installed SDK can be reused. That regresses the documented idempotent bootstrap behavior in docs/development-environment.md:14; check whether EMSCRIPTEN_COMMIT exists locally and fetch it only when absent.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7effa09: the fetch now runs only when the pinned commit is absent locally (git rev-parse --quiet --verify "$EMSCRIPTEN_COMMIT^{commit}" || git fetch …), so a re-run of --install emscripten after a successful installation stays offline-safe under set -e. Verified both branches of the guard against a simulated repo: commit present → no network touched; commit absent → falls through to the fetch.

Review: the unconditional fetch made a re-run of --install emscripten
fail under set -e without network access, regressing idempotent
bootstrap. Verify the pinned commit locally first and fetch only when
it is absent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR performance and binary-size diff

Benchmark execution is required; hosted-runner timing, memory, and size deltas are informational only.

Baseline: exact PR base 384e8a744487 (successful main CI).

Performance

Runtime Workload Median Perf diff Memory Memory diff
c representative_large 6.138 ms ⚠️ +17.6% 8,564 KiB ✅ -1.0%
es deep_nesting 0.380 ms ⚠️ +31.1% 146,488 KiB ✅ -2.2%
es large_document 49.396 ms ⚠️ +48.3% 146,488 KiB ✅ -2.2%
kotlin deep_nesting 0.260 ms ⚠️ +6.3% 102,304 KiB ✅ -1.1%
kotlin large_document 30.282 ms ✅ -8.6% 100,360 KiB ✅ -1.6%
swift deep_nesting 0.070 ms ✅ -12.4% 26,304 KiB ✅ +1.1%
swift large_document 11.311 ms ✅ -48.8% 26,128 KiB ✅ +0.6%

Binary size

Artifact Bytes KiB Size diff
c-shared-library 501,888 490.1 ✅ 0 B (0.0%)
es-wasm 288,573 281.8 ✅ 0 B (0.0%)
kotlin-jvm-jar 312,972 305.6 ✅ 0 B (0.0%)

Head CI run

Size deltas are deterministic for identical build inputs. Performance deltas compare separate hosted runners and should be treated as directional evidence, not a pass/fail threshold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant