Skip to content

Drop the CI .node-version rewrite after nubjs/setup-nub#13 #1947

Open

Description

@yamcodes

Summary

#1946 still rewrites .node-version on latest-channel jobs so nub run uses Node 26. That is only needed because nubjs/setup-nub@v0 fronts PATH and leaves later nub on the committed pin (nubjs/setup-nub#12).

Context

Default jobs already read .node-version (24.21.0). Latest jobs pass node-version: 26 and echo that into the pin file for the job (not committed). nubjs/setup-nub#13 exports NODE_EXECUTABLE so that rewrite can go away.

Implementation Steps (Follow-up)

Once #13 is in nubjs/setup-nub@v0:

  1. Stop rewriting the pin in .github/actions/setup-nub-ci/action.yml — delete the Override Node pin for this job step and the #12 comment.
  2. Keep one uses: nubjs/setup-nub@v0 — omit node-version for the pin; pass node-version: 26 for latest. Do not write .node-version.
  3. Update AGENTS.md — the Node caveat should no longer say latest jobs rewrite the pin.

Dependencies

Activity

  1. pullfrog commented on Sep 21, 2026

    @pullfrog
    Contributor

    Plan: drop the CI .node-version rewrite after nubjs/setup-nub#13

    Verdict: actionable, but currently blocked — do not implement yet. I verified the dependency is not satisfied:

    • nubjs/setup-nub#13 is still open (state: OPEN, no merge commit) and Docs search is broken #12 is open too.
    • nubjs/setup-nub@v0's action.yml still lacks NODE_EXECUTABLE; its Provision Node step still warns "nub runs the project pin at invocation time" and has no from_explicit / NODE_EXECUTABLE block.

    So the issue should stay blocked / ready for human until a maintainer confirms #13 has landed in the moving v0 tag. The plan below is ready to execute the moment it does.

    Unblock gate (do first)

    1. Confirm #13 merged.
    2. Confirm @v0 carries it: fetch repos/nubjs/setup-nub/contents/action.yml?ref=v0 (raw) and check for NODE_EXECUTABLE and from_explicit=true.
    3. Confirm the merged action still gives node-version precedence over node-version-file (current code: want="$NODE_VERSION"; if [ -z "$want" ] && [ -n "$NODE_VERSION_FILE" ] …). The whole single-step design below relies on it.

    Edits

    1. .github/actions/setup-nub-ci/action.yml — delete the Override Node pin for this job step and the #12 comment; collapse to one uses: (issue step 1 + 2):

    name: Set up Nub (CI)
    description: >
      Install Nub and Node from the committed `.node-version` pin. Pass
      node-version only for a matrix job that must run a different major;
      setup-nub binds it for later `nub` invocations and the pin file is
      never rewritten.
    inputs:
      node-version:
        description: Optional major override (e.g. 26). Omit to use `.node-version`.
        required: false
        default: ""
    runs:
      using: composite
      steps:
        - name: Set up Nub
          uses: nubjs/setup-nub@v0
          with:
            shim: true
            node-version: ${{ inputs.node-version }}
            node-version-file: .node-version
            cache-key-prefix: ${{ inputs.node-version }}

    Passing both inputs is safe: with node-version set, want is non-empty and the file is ignored; with it empty, the file supplies the pin. If the merged action ever rejects both inputs, fall back to two conditional steps that both omit the rewrite (minimal-diff alternative).

    2. Cache-key caveat (not in the issue, but a real regression). setup-nub's cache key is nub-<os>-<arch>-<prefix>-<hashFiles(pin files)>-<hashFiles(lockfile)>. Today the latest job's pin rewrite to 26 makes hashFiles(.node-version) differ, so lts/latest get separate caches. Removing the rewrite makes both hash the committed 24.21.0 and the same lockfile — the two channels would collide on one cache key while provisioning different Nodes (one channel always restores a cache missing its Node; nub then lazily downloads, so it's a perf hit, not breakage). cache-key-prefix: ${{ inputs.node-version }} restores the split (nub-linux-x64-26-… vs the unchanged nub-linux-x64--… for lts).

    3. .github/workflows/test.yml — update the comment at lines 22–23 (latest overrides to 26) to say latest passes node-version: 26 (no pin rewrite). No matrix/step change: node-version: ${{ matrix.node-version }} already resolves to empty for lts.

    4. AGENTS.md line 33 — the Node caveat should no longer say latest jobs rewrite the pin. Replace the clause with: latest jobs pass node-version: 26, which setup-nub binds for later nub invocations via NODE_EXECUTABLE; the committed pin is never rewritten.

    No changeset: this touches only CI + AGENTS.md, not packages/*.

    Verification

    • Run test.yml on v1 (push or workflow_dispatch); require test (lts), test (latest), test-build (lts), test-build (latest) green (these are required checks).
    • In the test (latest) log, confirm Exporting NODE_EXECUTABLE=…/node/26… appears and there is no Override Node pin for this job step; confirm nub/nub run uses 26 (e.g. a throwaway nub -e 'console.log(process.version)', or the existing build succeeding).
    • In the test (lts) log, confirm no NODE_EXECUTABLE export and Node 24.21.0.
    • Confirm git status in the latest job shows a clean .node-version (no rewrite) and the autofix job (which calls setup-nub-ci with no node-version) cannot commit a rewritten pin.
    • docs/CONTRIBUTING.md already describes only the committed pin — no edit needed.

    Acceptance criteria mapping

    • Latest runs Node 26 for nub run → NODE_EXECUTABLE from Sidebar misspells GitHub #13 + single uses.
    • No .node-version write → rewrite step deleted.
    • Default jobs still read the pin, no hardcoded 24 → unchanged (empty node-version + node-version-file).
    • Commit-the-tree jobs can't pick up a rewritten pin → no rewrite exists anywhere.
    • AGENTS.md caveat updated.

    Out of scope (per issue)

    Fork-SHA pinning before #13 is in @v0, adding root package.json#engines.node, playground/example engines, and the committed pin patch itself.

    Suggested branch when unblocked: pullfrog/1947-drop-node-version-rewrite, PR base v1.

    Task list (2/3 completed)

    Pullfrog  | Implement plan ➔ | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

  2. added
    enhancementNew feature or improvement
    infraInfrastructure related issue or pull request
    github actionsPull requests that update GitHub Actions code
    blockedWork cannot proceed; waiting on something else
    ready for humanNeeds a judgment call or design decision before implementation
    on Sep 21, 2026
  3. yamcodes commented on Sep 21, 2026

    @yamcodes
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: After nubjs/setup-nub@v0 exports NODE_EXECUTABLE for an explicit node-version, stop rewriting the committed Node pin on latest-channel CI jobs.

    Why this is ready for human (not agent yet): Do not implement while nubjs/setup-nub#13 is still open or unreleased. A human confirms #13 is in the moving v0 tag (or a newer tag we pin), then this can move to ready for agent.

    Current behavior:
    The CI Nub setup action reads .node-version for default jobs. Latest-channel jobs pass a different major (26). Because setup-nub only fronts that Node on PATH and later nub / nub run still follow the project pin (nubjs/setup-nub#12), those jobs write 26 into .node-version for the rest of the job (not committed).

    Desired behavior:
    Once setup-nub binds later nub invocations via NODE_EXECUTABLE when node-version is set, latest jobs pass node-version: 26 only. The tracked pin file stays 24.21.0 on disk. Default jobs still omit the override and use the file. No job-local rewrite, no dual uses: split that exists only to pair with that rewrite.

    Key interfaces:

    • Composite CI setup action for Nub — optional node-version input remains; it must not mutate pin files
    • nubjs/setup-nub@v0 (or the tag that contains Sidebar misspells GitHub #13) — explicit node-version / node-version-file must bind PATH and later nub
    • Maintainer Node caveat in AGENTS.md — should describe reading the pin and passing 26 for latest, not rewriting the file

    Acceptance criteria:

    • Latest-channel jobs still run Node 26 for nub run / nub (not only bare PATH node)
    • Those jobs do not write .node-version (working tree pin stays the committed 24.21.0)
    • Default CI jobs still provision from .node-version with no hardcoded 24 in workflows
    • Autofix / other commit-the-tree jobs cannot pick up a rewritten pin
    • Maintainer Node caveat no longer says latest jobs rewrite the pin

    Out of scope:

    • Pinning ArkEnv CI to a fork SHA of setup-nub#13 before it is in @v0
    • Adding root package.json#engines.node
    • Changing playground/example engines ranges
    • Changing the committed pin patch itself
  4. removed
    ready for humanNeeds a judgment call or design decision before implementation
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedWork cannot proceed; waiting on something elseenhancementNew feature or improvementgithub actionsPull requests that update GitHub Actions codeinfraInfrastructure related issue or pull request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions