Skip to content

ci: install Rust for the Linux test shards and test-changed - #8630

Merged
lidge-jun merged 2 commits into
devfrom
ci/dev-red-rust-toolchain-self-hosted
Nov 13, 2026
Merged

lidge-jun merged 2 commits into
devfrom
ci/dev-red-rust-toolchain-self-hosted

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

On the dev batch (run 43343080374), job test 1/5 ran on the lidge self-hosted Linux pool (lidge-ocx-12) and failed both cases of tests/clients/link-ocx-child-e2e.test.ts at findOrBuildOcxChildBinary with "neither cargo nor prebuilt ocx-child binary is available". Other lanes on the same pool reported the same cause. ubuntu-latest ships cargo, but the self-hosted image does not, and neither the test nor the test changed job installed it. The prerequisite was only ever implicit in the hosted image. The same gap made tests/clients/link-ocx-child-conformance.test.ts skip its Rust conformance run silently there.

This adds a Setup Rust step (stable toolchain) to both jobs, using the same pinned dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de commit as the existing remote-helper, desktop and release jobs. On a runner without rustup, the action installs it into the runner user's ~/.cargo and adds that to PATH; tests/helpers/rust-toolchain-env.ts already derives CARGO_HOME/RUSTUP_HOME from the proxy's location. native/ocx-child needs Rust 1.90+, which stable satisfies. No test is skipped or changed. As #8605 did, .github/scripts/release-evidence-policy.json gains a ci entry pinning the new ci.yml blob (6bf9d715ec); earlier entries and all other pinned files are unchanged.

Verification

  • node --test .github/scripts/release-evidence.test.cjs: 26 pass, 0 fail (the PR's first gates run failed only on the missing pin).

  • bun test tests/ci-workflows tests/test-layout.test.ts: 1904 pass, 1 fail. The one failure, tests/ci-workflows/bun-runtime.test.ts > "PATH-selected process provenance survives durable selection and project dotenv", fails identically on unmodified dev on this host (19 pass, 1 fail on both), and the case does not read ci.yml.

  • NOT RUN: the self-hosted job itself. This PR's test changed job exercises the new step on whichever runner it lands on; the self-hosted test N/5 shards run on the maintainer's next dev batch.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (Workflow change: the action is pinned to a full commit SHA already trusted elsewhere in this workflow, gets no secrets or extra permissions, and persist-credentials: false is unchanged; a separate security review is requested.)

Summary by CodeRabbit

  • Chores
    • Automated test workflows now install the stable Rust toolchain before running tests. This updates the project’s test process; no changes to application behavior or user-facing features are included in this update. The release evidence record has also been refreshed to reflect the updated CI configuration.

The lidge self-hosted Linux pool has no cargo, unlike ubuntu-latest, so on the
dev batch run 43343080374 test 1/5 (lidge-ocx-12) failed
tests/clients/link-ocx-child-e2e.test.ts with "neither cargo nor prebuilt
ocx-child binary is available", and the ocx-child conformance run silently
skipped. Install the stable toolchain with the same pinned
dtolnay/rust-toolchain commit the other jobs use, in both jobs that run those
tests, so the prerequisite is explicit on either runner kind.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 13, 2026 02:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T02:57:11.595580Z 18563aa PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The test and test-changed jobs install the stable Rust toolchain before running tests. The release evidence-policy record updates the CI workflow hash for 14 Windows shards.

Changes: CI test toolchain

Layer / File(s) Summary
Install stable Rust in test jobs
.github/workflows/ci.yml, .github/scripts/release-evidence-policy.json
The test and test-changed jobs add stable Rust setup steps before their test commands. The evidence-policy record for 14 Windows shards updates the workflow hash; its other recorded hashes remain unchanged.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Merge Risk: Minimal · up to 0c1ee

The change installs Rust for the Linux test jobs so the Rust-dependent client tests can run. No concrete merge-blocking risk was found. Validation on the self-hosted runner is still pending, which is normal for CI changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "ci: install Rust for the Linux test shards and test-changed" matches the main change. The raw summary says the test and test-changed jobs now install the stable Rust toolchain before ru…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "ci: install Rust for the Linux test shards and test-changed" matches the main change. The raw summary says the test and test-changed jobs now install the stable Rust toolchain before running tests, and the PR objectives describe the same step. The title names the jobs and the purpose, so it is specific and accurate. It does not mention the release evidence policy update, but that is a supporting record, not the main change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 18563aa and 0c1ee9c.

Files selected for processing: 1

  • .github/scripts/release-evidence-policy.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Append a ci policy entry with the new ci.yml blob (6bf9d71), as #8605 did, keeping earlier entries; other pinned files are unchanged. node --test .github/scripts/release-evidence.test.cjs: 26 pass, 0 fail.
@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer judgment (dev integration, MAINTAINERS.md maintainer-integration exception): merging without a second maintainer approval, as part of the DEV-RED repair for dev batch run 43343080374 (test 1/5, self-hosted lidge-ocx-12).

  • Exact head: 0c1ee9cde66937c01b02530f554afd549ec51b1d. Every required PR check on this head passed, including the full Linux shards. On this head, test 1/5 ran on self-hosted lidge-ocx-08 and both link-ocx-child-e2e cases passed; they had failed there in the batch. Setup Rust succeeded on self-hosted lidge-ocx-07.
  • Fresh independent code review on this exact head: VERDICT: PASS, no findings (release-evidence tests 26 / 0; ocx-child e2e and Rust conformance pass; the one ci-workflows failure, bun-runtime "PATH-selected process provenance", fails identically on unmodified dev on the review host).
  • Separate security review on this exact head: VERDICT: PASS. The action is pinned to the SHA already trusted in this workflow; contents: read and persist-credentials: false are preserved; no secrets are involved; the release-evidence entry differs from the previous one only in the ci.yml blob hash. Informational: the stable toolchain floats, matching the existing remote-helper and release jobs, and self-hosted runner homes persist between jobs, which only trusted runs reach.
  • No outstanding change requests.

@lidge-jun
lidge-jun merged commit be429e3 into dev Nov 13, 2026
39 checks passed
@lidge-jun
lidge-jun deleted the ci/dev-red-rust-toolchain-self-hosted branch November 13, 2026 04:56
lidge-jun added a commit that referenced this pull request Nov 13, 2026
… cargo, and pin the edited ci.yml

After #8630 the Linux test shards and test changed install cargo and run ocx-child's conformance suite
through the Bun wrappers when those tests are selected; only fmt, clippy and the crate's own unit and
lifecycle suites are left to this job. The last release-evidence entry pins the edited ci.yml blob.
lidge-jun added a commit that referenced this pull request Nov 13, 2026
…te-helper job

The separate ocx-child job put ci.yml at 2040 lines, past the 2000-line file-size rule, and #8630 already
gives the Linux shards cargo for the Bun wrappers. The remote_helper filter now also selects
native/ocx-child/** and the conformance fixture, and remote-helper gains one Linux-only step that runs
cargo fmt --check, clippy -D warnings and test --locked for native/ocx-child. The separate job and all of
its wiring (filter output, env, gate needs, GATED_JOBS, expected_for) are gone, and the workflow tests are
back to dev's. ci.yml is at 1996 lines; the release-evidence entry pins its new blob.
lidge-jun added a commit that referenced this pull request Nov 13, 2026
…8635)

* ci: run fmt, clippy and the tests of native/ocx-child when a change touches it

* ci: let an edit to ci.yml select the ocx-child job so it verifies itself

* ci: approve the changed ci.yml in the release evidence policy, keeping the earlier entries

* ci: select ocx-child for its conformance fixture, drop the cache, pin Rust 1.100.0, and refresh the policy blob in place

* ci: say what the ocx-child job adds now that the Linux shards install cargo, and pin the edited ci.yml

After #8630 the Linux test shards and test changed install cargo and run ocx-child's conformance suite
through the Bun wrappers when those tests are selected; only fmt, clippy and the crate's own unit and
lifecycle suites are left to this job. The last release-evidence entry pins the edited ci.yml blob.

* ci: run ocx-child's fmt, clippy and tests as a Linux step of the remote-helper job

The separate ocx-child job put ci.yml at 2040 lines, past the 2000-line file-size rule, and #8630 already
gives the Linux shards cargo for the Bun wrappers. The remote_helper filter now also selects
native/ocx-child/** and the conformance fixture, and remote-helper gains one Linux-only step that runs
cargo fmt --check, clippy -D warnings and test --locked for native/ocx-child. The separate job and all of
its wiring (filter output, env, gate needs, GATED_JOBS, expected_for) are gone, and the workflow tests are
back to dev's. ci.yml is at 1996 lines; the release-evidence entry pins its new blob.
lidge-jun added a commit that referenced this pull request Nov 13, 2026
… release evidence policy

Append a ci policy entry with the new blobs for scripts/test.ts (1a87e47) and
scripts/structure-ssot.ts (5b2d291), as #8630 did, keeping earlier entries; the
other pinned files are unchanged. node --test .github/scripts/release-evidence.test.cjs:
26 pass, 0 fail.
lidge-jun added a commit that referenced this pull request Nov 13, 2026
… release evidence policy

Append a ci policy entry with the new blobs for scripts/test.ts (1a87e47) and
scripts/structure-ssot.ts (5b2d291), as #8630 did, keeping earlier entries; the
other pinned files are unchanged. node --test .github/scripts/release-evidence.test.cjs:
26 pass, 0 fail.
lidge-jun added a commit that referenced this pull request Nov 13, 2026
… release evidence policy

Append a ci policy entry with the new blobs for scripts/test.ts (1a87e47) and
scripts/structure-ssot.ts (5b2d291), as #8630 did, keeping earlier entries; the
other pinned files are unchanged. node --test .github/scripts/release-evidence.test.cjs:
26 pass, 0 fail.
lidge-jun added a commit that referenced this pull request Nov 13, 2026
Append a ci policy entry, as #8630 did, keeping earlier entries: new blobs for
scripts/test.ts and scripts/structure-ssot.ts, plus scripts/git-repository-env.ts,
which both now import (the entry already pins scripts/test.ts's other direct imports).
node --test .github/scripts/release-evidence.test.cjs: 26 pass, 0 fail.
lidge-jun added a commit that referenced this pull request Nov 13, 2026
…is inherited (#8652)

* docs(devlog): plan test git environment isolation

* test(harness): reproduce fixture git writing into an inherited GIT_DIR repository

Red on purpose: the shared fixture helper still spawns git with the inherited
environment and writes user.* with git config, so a hostile GIT_DIR/GIT_WORK_TREE
lands user.name, user.email and core.worktree in the outer repository, and the
script helpers read the outer index instead of the root they were given.

* fix(test): keep test git off the developer's repository when GIT_DIR is inherited

A test process that inherits GIT_DIR/GIT_WORK_TREE/GIT_INDEX_FILE (a hook, rebase --exec,
bisect run, a --git-dir/--work-tree wrapper) sent every fixture git command to that
repository: git init reinitialised it with core.worktree, git config wrote user.* into
its .git/config, and add/commit landed in it. Bun.spawn without an env keeps the start
environment, so scrubbing process.env alone cannot fix it.

- scripts/git-repository-env.ts: git's --local-env-vars list and a scrub.
- tests/helpers/git-fixture.ts: fixtureGitEnv (no inherited repo, no system/global config,
  identity via GIT_AUTHOR_*/GIT_COMMITTER_*) and repositoryGitEnv for checkout reads;
  every test-side git call passes one. initFixtureRepo writes no config.
- createIsolatedTestEnvironment and the preload drop the variables; inspectChangedRun,
  test-layout move/verify, structure-ssot and file-size-ratchet scrub their git env.
- tests/helpers/git-config-guard.ts: the preload fails a case after which the checkout's
  common .git/config changed core.bare/hookspath/worktree or user.name/email.
- setup-hooks.test.ts passes a hostile base env instead of assigning process.env.GIT_DIR.

* docs(devlog): record red/green and validation evidence for test git isolation

* test(harness): keep the hash-pinned messages differential recorders byte-identical

messages-sse-baseline-contract pins the SSE recorder's SHA-256 as provenance for its
golden. The recorders are children doing read-only git reads of pinned commits and get
their env from the parent test, so they keep their original bytes.

* ci: pin the git-isolated scripts in the release evidence policy

Append a ci policy entry, as #8630 did, keeping earlier entries: new blobs for
scripts/test.ts and scripts/structure-ssot.ts, plus scripts/git-repository-env.ts,
which both now import (the entry already pins scripts/test.ts's other direct imports).
node --test .github/scripts/release-evidence.test.cjs: 26 pass, 0 fail.

---------

Co-authored-by: lidge-jun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant