Skip to content

fix: update Claude from latest channel - #17

Open
amanthanvi wants to merge 1 commit into
mainfrom
fix/claude-update-latest
Open

amanthanvi wants to merge 1 commit into
mainfrom
fix/claude-update-latest

Conversation

@amanthanvi

@amanthanvi amanthanvi commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • run claude update latest instead of claude update on Bash and native Windows
  • update dry-run output and command assertions for both implementations
  • align README, specification, and changelog documentation

Verification

Passed:

  • ./tests/test_cli.sh "claude module logs correct commands"
  • targeted bash -n, shellcheck, and shfmt checks for updates
  • PowerShell parser checks for updates-main.ps1 and tests/test_windows_native.ps1
  • git diff --check

Baseline-only local failures, reproduced unchanged from origin/main:

  • ./scripts/lint.sh: local shfmt wants to reformat the existing Python heredoc condition in tests/test_cli.sh
  • ./scripts/test.sh: existing INT exits 130 and terminates active child fixture does not create its PID file on this host

The latest CI run for the base commit is green.

Summary by Sourcery

Update Claude Code using the latest release channel across supported implementations.

Bug Fixes:

  • Update Claude Code through the explicit latest release channel on Bash and native Windows.

Documentation:

  • Align the README, specification, and changelog with the Claude latest-channel update behavior.

Tests:

  • Update Bash and native Windows command and dry-run assertions for the Claude latest-channel command.

Copilot AI lite review requested due to automatic review settings August 31, 2026 22:41

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sourcery-ai

sourcery-ai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR changes Claude updates on Bash and native Windows to invoke claude update latest, extends command and dry-run assertions for both implementations, and synchronizes the README, specification, and changelog.

Sequence diagram for updating Claude from the latest channel

sequenceDiagram
    participant User
    participant BashUpdates
    participant WindowsUpdates
    participant ClaudeCLI

    alt Bash implementation
        User->>BashUpdates: run updates
        BashUpdates->>ClaudeCLI: claude update latest
        ClaudeCLI-->>BashUpdates: exit status
    else Native Windows implementation
        User->>WindowsUpdates: run updates
        WindowsUpdates->>ClaudeCLI: update latest
        ClaudeCLI-->>WindowsUpdates: ExitCode
    end
Loading

File-Level Changes

Change Details Files
Explicitly target Claude Code’s latest release channel in both update implementations.
  • Change the Bash module command to claude update latest.
  • Pass update latest to the native Windows PowerShell implementation.
updates
updates-main.ps1
Update automated coverage to verify the new command and dry-run behavior across platforms.
  • Assert Bash execution and dry-run output include claude update latest.
  • Update native Windows execution and dry-run assertions for the latest-channel argument.
tests/test_cli.sh
tests/test_windows_native.ps1
Align user-facing documentation with the latest-channel update behavior.
  • Document the explicit latest-channel command in the README, specification, and changelog.
README.md
SPEC.md
CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: fdcb8e4a-6c10-4f87-a0a0-3a515e5ea3fd


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

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. If the channel selection is wrong, the command can install an unintended Claude Code version that persists after this change is reverted and may affect subsequent CLI runs. The installation can generally be repaired by reinstalling or updating to the intended version, so the impact is bounded rather than irreversible.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown

Greptile Summary

This change updates the Claude module to request the latest release channel and aligns its tests and documentation. The added positional argument breaks Claude updates: the Bash module invokes claude update latest, which Claude rejects before performing an update. Removing only latest allows the same selected module to complete successfully. The Windows implementation builds the same invalid argument list.

T-Rex validation blocked

Native Windows execution could not run because the required PowerShell tool (pwsh or powershell) is unavailable in this Linux environment. The Windows source constructs the same update, latest invocation that failed in the Bash reproduction.

Merge safety: do not merge until both Claude module implementations invoke claude update without latest, and the corresponding command assertions are updated.

Confidence Score: 4/5

The change is not safe to merge because it makes the Claude update action fail when Claude rejects the extra positional argument.

The failure was reproduced through the real Bash module path with a contract-faithful Claude stub, then resolved by removing only the extra argument in an isolated copy. The native Windows invocation was confirmed by source inspection but could not be run locally.

Files Needing Attention: updates and updates-main.ps1 need the invalid argument removed; tests/test_cli.sh and tests/test_windows_native.ps1 need their command expectations corrected.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced proof for a posted P1 finding.
  • T-Rex produced proof for another posted P1 finding.
  • General contract validation showed native Windows execution could not be performed in the Linux environment due to missing pwsh/powershell, and that updates-main.ps1 uses the same arguments as the Bash failure.
  • General contract validation also documented that removing the 'latest' argument from the Bash flow yields a successful stub and exit, confirming the expected argument handling while Windows tooling remains unavailable.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 Claude update modules pass an unsupported latest positional argument

    • Bug
      • The Bash module executes claude update latest at updates:3658; the native Windows module passes @('update', 'latest') to its process runner at updates-main.ps1:1356. Claude's documented update command is claude update, and the focused contract harness shows the extra operand makes the selected Bash module fail. Because PowerShell supplies the same two arguments through ProcessStartInfo.ArgumentList, its native Windows module will likewise invoke the unsupported form.
    • Cause
      • The implementation treats latest as an update-channel operand even though claude update itself performs the latest-version update and accepts no positional channel operand. Existing focused tests encode and assert the same invalid command rather than its runtime CLI contract.
    • Fix
      • Change Bash run claude update latest to run claude update; change PowerShell -ArgumentList @('update', 'latest') to -ArgumentList @('update'); update dry-run text and focused Bash/Windows test assertions accordingly.

    T-Rex Ran code and verified through T-Rex

Fix all with Greploop Fix All in Codex Fix All in Claude Code Fix All in Cursor

Prompt To Fix All With AI
### Issue 1
updates:3658
**Claude update command includes an unsupported operand**

`claude update` does not accept a release-channel positional argument. This invocation runs `claude update latest`, which exits with an unexpected-argument error and causes the selected Claude update to fail. `updates-main.ps1` constructs the same `@('update', 'latest')` argument list, so native Windows has the same behavior. Remove `latest` from both invocations and update the dry-run and fixture expectations to assert `claude update`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix: update Claude from latest channel" | Re-trigger Greptile

Comment thread updates
fi

run claude update || return 1
run claude update latest || return 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Claude update command includes an unsupported operand

claude update does not accept a release-channel positional argument. This invocation runs claude update latest, which exits with an unexpected-argument error and causes the selected Claude update to fail. updates-main.ps1 constructs the same @('update', 'latest') argument list, so native Windows has the same behavior. Remove latest from both invocations and update the dry-run and fixture expectations to assert claude update.

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: updates
Line: 3658

Comment:
**Claude update command includes an unsupported operand**

`claude update` does not accept a release-channel positional argument. This invocation runs `claude update latest`, which exits with an unexpected-argument error and causes the selected Claude update to fail. `updates-main.ps1` constructs the same `@('update', 'latest')` argument list, so native Windows has the same behavior. Remove `latest` from both invocations and update the dry-run and fixture expectations to assert `claude update`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code Fix in Cursor

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.

2 participants