Skip to content

an empty Cursor pin should build without Cursor, not fail the build - #567

Open
lroolle wants to merge 1 commit into
mainfrom
fix/empty-pin-disables
Open

an empty Cursor pin should build without Cursor, not fail the build#567
lroolle wants to merge 1 commit into
mainfrom
fix/empty-pin-disables

Conversation

@lroolle

@lroolle lroolle commented Sep 9, 2026

Copy link
Copy Markdown
Member
/tmp/install-agent-tooling.sh: line 15: CURSOR_CLI_VERSION: CURSOR_CLI_VERSION is required
ERROR: process "/bin/sh -c DEVA_TOOLING_STAGE=agents bash /tmp/install-agent-tooling.sh"
       did not complete successfully: exit code: 1

One character

: "${CURSOR_CLI_VERSION:?CURSOR_CLI_VERSION is required}"

:? rejects empty as well as unset. Cursor is the one CLI in this script with no npm package and no pin hook in its own installer -- the version is parsed out of cursor.com/install, so any build host that cannot reach cursor.com resolves it to "" and the whole image build dies over one optional CLI. Leaving the pin empty is the sane way to say "build this image without Cursor", and :? turned that into a build failure.

? instead of :? keeps unset an error, because unset means versions.env is incomplete rather than deliberate. Empty is now honoured and install_cursor_agent returns early saying so.

unset  -> CURSOR_CLI_VERSION is required (set it empty to build without the Cursor CLI)
""     -> CURSOR_CLI_VERSION is empty; skipping the Cursor CLI
pinned -> Installing Cursor CLI pinned to 2026.08.11-e8db854

Verification

All three cases run against the real script, not a toy reproduction (main "$@" stubbed out so install_cursor_agent can be called on its own):

--- pin empty (the #551 scenario)
==> CURSOR_CLI_VERSION is empty; skipping the Cursor CLI
rc=0

--- pin unset (versions.env incomplete)
install-agent-tooling.sh: line 21: CURSOR_CLI_VERSION: CURSOR_CLI_VERSION is
    required (set it empty to build without the Cursor CLI)

CI on this branch is green on all four jobs, including the Installer Smoke Test that #551 fails. Note what that does and does not prove: versions.env here still carries CURSOR_CLI_VERSION=2026.08.11-e8db854, so CI exercised the pinned path only --

Installer Smoke Test  #31 59.47 ==> Installing Cursor CLI pinned to 2026.08.11-e8db854
Installer Smoke Test  #31 62.20 ==> cursor-agent installed

-- which shows the change is non-regressive. The empty path is proven by the run above and will get its first CI exercise from whichever change actually empties the pin.

bash -n clean, shellcheck -S warning clean.

Why this is its own PR

#551 has been red for 27 days, and this is one of its two failures. Meanwhile main's pins are drifting badly:

                main      #551 proposes   upstream today
claude-code     2.1.232   2.1.258         2.1.266
codex           0.147.0   0.152.1         0.153.4
gemini-cli      0.55.1    0.58.0          0.59.0

34 Claude Code releases behind on a repo whose entire job is running pinned agent CLIs. #551's proposed pins are themselves 8 releases stale now, so it wants a refresh before it lands -- which is easier once it is not also carrying a mechanism fix.

The other failure is tests/version-upgrade.sh:239, which hardcodes CURSOR_CLI_VERSION=2026.08.11-e8db854 as an expected value. That fixture belongs to whichever change empties the pin, so it is deliberately not touched here.

Also worth knowing before #551 lands: scripts/version-upgrade.sh:267 counts an empty cursor pin under "Could not determine versions for", so make versions-up will warn about a variable that is deliberately empty. Cosmetic, but that is how a warning channel gets trained to be ignored. Left alone here because it needs a decision about how the tool distinguishes "unresolvable" from "disabled".

#562 and #563 are green and mergeable and have been for 24 days; neither depends on this.

🤖 Generated with Claude Code

    /tmp/install-agent-tooling.sh: line 15: CURSOR_CLI_VERSION:
        CURSOR_CLI_VERSION is required

`: "${CURSOR_CLI_VERSION:?...}"` rejects empty as well as unset. Cursor is the
one CLI here with no npm package and no pin hook in its own installer: the
version comes from parsing cursor.com/install, so a build host that cannot
reach cursor.com resolves it to "" and the entire image build dies over one
optional CLI. Leaving the pin empty is the sane way to say "build without it",
and `:?` turned that into a failure.

`?` instead of `:?`: unset is still an error, because that means versions.env is
incomplete rather than deliberate. Empty is now honoured, and
install_cursor_agent returns early with a log line saying why.

    unset  -> CURSOR_CLI_VERSION is required (set it empty to build without ...)
    ""     -> CURSOR_CLI_VERSION is empty; skipping the Cursor CLI
    pinned -> Installing Cursor CLI pinned to 2026.08.11-e8db854

This is one of the two failures on #551, which has been red for 27 days while
main's Claude Code pin fell 34 releases behind upstream (2.1.232 vs 2.1.266).
The other is tests/version-upgrade.sh, which hardcodes
CURSOR_CLI_VERSION=2026.08.11-e8db854 as an expectation; that fixture belongs
to whichever change empties the pin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T06:43:08.021253Z ec753a4 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.

@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: ec753a4889

ℹ️ 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 on lines +336 to +338
if [ -z "$CURSOR_CLI_VERSION" ]; then
log "CURSOR_CLI_VERSION is empty; skipping the Cursor CLI"
return 0

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 Remove inherited Cursor install when the pin is empty

When buildx-multi-rust is run with an empty CURSOR_CLI_VERSION, Dockerfile.rust inherits MAIN_IMAGE (Makefile:298-303), which may already contain ~/.local/bin/cursor-agent and its version tree, before invoking this installer. Returning without cleanup therefore produces an image labeled with an empty Cursor version while still exposing the inherited, stale binary, so the advertised opt-out does not actually build without Cursor. Remove the inherited link/version directory in this branch, or ensure this path always starts from a Cursor-free base.

Useful? React with 👍 / 👎.

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