Skip to content

ci(bazel): install Node from node-version.txt in remote image#12205

Merged
fjord-oai merged 1 commit intomainfrom
rewrite/fold-first---4hsvb-0v9tp76_
Feb 20, 2026
Merged

ci(bazel): install Node from node-version.txt in remote image#12205
fjord-oai merged 1 commit intomainfrom
rewrite/fold-first---4hsvb-0v9tp76_

Conversation

@fjord-oai
Copy link
Contributor

@fjord-oai fjord-oai commented Feb 19, 2026

Summary

Install Node in the Bazel remote execution image using the version pinned in codex-rs/node-version.txt.

Why

js_repl tests run under Bazel remote execution and require a modern Node runtime. Runner-level setup-node does not guarantee Node is available (or recent enough) inside the remote worker container.

What changed

  • Updated .github/workflows/Dockerfile.bazel to install Node from official tarballs at image build time.
  • Added xz-utils for extracting .tar.xz archives.
  • Copied codex-rs/node-version.txt into the image build context and used it as the single source of truth for Node version.
  • Added architecture mapping for multi-arch builds:
    • amd64 -> x64
    • arm64 -> arm64
  • Verified install during image build with:
    • node --version
    • npm --version

Impact

  • Bazel remote workers should now have the required Node version available for js_repl tests.
  • Keeps Node version synchronized with repo policy via codex-rs/node-version.txt.

Testing

  • Verified Dockerfile changes and build steps locally (build-time commands are deterministic and fail fast on unsupported arch/version fetch issues).

Follow-up

  • Rebuild and publish the Bazel runner image for both linux/amd64 and linux/arm64.
  • Update image digests in rbe.bzl to roll out this runtime update in CI.

git stack

@bolinfest
Copy link
Collaborator

@zbarsky-openai I think this is appropriate in this case?

@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from 1000f4b to 659e4d2 Compare February 19, 2026 22:11
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 19, 2026 22:11
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 19, 2026 22:11
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from 659e4d2 to b28b426 Compare February 19, 2026 22:11
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 19, 2026 22:11
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 00:07
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from b28b426 to b0d4f8d Compare February 20, 2026 00:07
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 00:07
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 01:31
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from b0d4f8d to 050b277 Compare February 20, 2026 01:31
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 01:31
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 03:35
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from 050b277 to cd49416 Compare February 20, 2026 03:35
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 03:35
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 06:19
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from cd49416 to d001c90 Compare February 20, 2026 06:19
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 06:19
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 06:19
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from d001c90 to 06d66f0 Compare February 20, 2026 06:19
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 06:19
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 06:31
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from 06d66f0 to d989419 Compare February 20, 2026 06:31
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 06:31
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 15:48
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from d989419 to 5c805a6 Compare February 20, 2026 15:48
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 15:48
fjord-oai added a commit that referenced this pull request Feb 20, 2026
## Summary

Tighten the `js_repl` freeform Lark grammar to block the most common
malformed payload wrappers before they reach runtime validation.

## What Changed

- Replaced the overly permissive `js_repl` freeform grammar (`start:
/[\s\S]*/`) with a structured grammar that still supports:
  - plain JS source
  - optional first-line `// codex-js-repl:` pragma followed by JS source
- Added grammar-level filtering for common bad payload shapes by
rejecting inputs whose first significant token starts with:
  - `{` (JSON object wrapper like `{"code":"..."}`)
  - `"` (quoted code string)
  - `` ``` `` (markdown code fences)
- Implemented the grammar without regex lookahead/lookbehind because the
API-side Lark regex engine does not support look-around.
- Added a unit test to validate the grammar shape and guard against
reintroducing unsupported lookaround.

## Why

`js_repl` is a freeform tool, but the model sometimes emits wrapped
payloads (JSON, quoted strings, markdown fences) instead of raw
JavaScript. We already reject those at runtime, but this change moves
the constraint into the tool grammar so the model is less likely to
generate invalid tool-call payloads in the first place.

## Testing

- `cargo test -p codex-core
js_repl_freeform_grammar_blocks_common_non_js_prefixes`
- `cargo test -p codex-core parse_freeform_args_rejects_`

## Notes

- This intentionally over-blocks a few uncommon valid JS starts (for
example top-level `{ ... }` blocks or top-level quoted directives like
`"use strict";`) in exchange for preventing the common wrapped-payload
mistakes.



#### [git stack](https://github.com/magus/git-stack-cli)
- 👉 `1` #12300
- ⏳ `2` #12275
- ⏳ `3` #12205
- ⏳ `4` #12185
- ⏳ `5` #10673
@fjord-oai fjord-oai changed the base branch from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 18:48
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from 5c805a6 to c5e45df Compare February 20, 2026 18:48
@fjord-oai fjord-oai changed the base branch from main to fjord/js_repl_seq---4ht5fx8yw23p4e February 20, 2026 18:48
fjord-oai added a commit that referenced this pull request Feb 20, 2026
## Summary

This PR removes `codex.state` from the `js_repl` helper surface and
removes all corresponding documentation/instruction references.

## Motivation

Top-level bindings in `js_repl` now persist across cells, so the extra
`codex.state` helper is redundant and adds unnecessary API/docs surface.

## Changes

- Removed the long-lived `state` object from the Node kernel helper
wiring.
- Stopped exposing `codex.state` (and `context.state`) during `js_repl`
execution.
- Updated user-facing `js_repl` docs to remove `codex.state`.
- Updated generated instruction text and related test expectations to
list only:
  - `codex.tmpDir`
  - `codex.tool(name, args?)`


#### [git stack](https://github.com/magus/git-stack-cli)
- ✅ `1` #12300
- 👉 `2` #12275
- ⏳ `3` #12205
- ⏳ `4` #12185
- ⏳ `5` #10673
Base automatically changed from fjord/js_repl_seq---4ht5fx8yw23p4e to main February 20, 2026 19:20
git-stack-id: rewrite/fold-first---4hsvb-0v9tp76_
git-stack-title: ci(bazel): install Node from node-version.txt in remote image
@fjord-oai fjord-oai force-pushed the rewrite/fold-first---4hsvb-0v9tp76_ branch from c5e45df to 3b29468 Compare February 20, 2026 19:22
@fjord-oai fjord-oai merged commit 67e802e into main Feb 20, 2026
84 of 88 checks passed
@fjord-oai fjord-oai deleted the rewrite/fold-first---4hsvb-0v9tp76_ branch February 20, 2026 19:51
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants