Skip to content

fix: address code review feedback from post-release audit#106

Merged
eddietejeda merged 2 commits into
mainfrom
fix/review-feedback
May 23, 2026
Merged

fix: address code review feedback from post-release audit#106
eddietejeda merged 2 commits into
mainfrom
fix/review-feedback

Conversation

@eddietejeda
Copy link
Copy Markdown
Contributor

Four fixes from the review of changes since v0.2.9, validated by both manual review and Codex CLI.

Changes

query.rs — remove dead AsyncResponse.status field
This field was printed in the old exit-code-2 path but is unused since the polling loop was introduced. Was the source of the persistent dead_code compiler warning.

query.rs — reorder polling loop (poll → match → deadline → sleep)
The previous order (sleep → deadline → poll) added an unconditional 500ms delay before the first check and caused timeout detection to lag by up to 500ms. New order polls immediately on entry, checks deadline only after an in-progress result, then sleeps before the next iteration.

skill.rs — add 120s timeout to skills download HTTP client
download_and_extract_from_url was using Client::new() with no timeout. With install_for_version now called from run_update(), a stalled connection would hang the entire upgrade. Timeout matches the 120s used in perform_update.

main.rs — replace chained .unwrap() with .expect() in tables help path
Three unwraps on string-matched subcommand lookups replaced with descriptive .expect() messages.

Not fixed (by design)

  • Homebrew notice now says hotdata update instead of brew upgrade — intentional UX simplification, tracked separately.
  • Codex P1 (positional arg vs subcommand) — verified false positive; clap 4 resolves ambiguity by matching subcommands before positionals.

Generated with Claude Code

- query.rs: remove dead AsyncResponse.status field (was the source of
  the dead_code compiler warning; field was printed pre-polling but is
  unused now that the loop reads QueryRunResponse.status)
- query.rs: reorder polling loop — poll first, then check deadline and
  sleep; eliminates the mandatory 500ms delay before the first check and
  ensures timeout is detected without an extra sleep cycle
- skill.rs: add 120s timeout to download_and_extract_from_url HTTP
  client, matching the timeout used in perform_update; prevents an
  indefinite hang during hotdata update if the skills download stalls
- main.rs: replace chained .unwrap() with .expect() in the databases
  tables help path for clearer panic messages if subcommand names change

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sentry
Copy link
Copy Markdown

sentry Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 0% with 60 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/update.rs 0.00% 44 Missing ⚠️
src/query.rs 0.00% 9 Missing ⚠️
src/skill.rs 0.00% 4 Missing ⚠️
src/main.rs 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

claude[bot]
claude Bot previously approved these changes May 23, 2026
Instead of printing instructions and returning, run_update() now shells
out to `brew upgrade <formula>` when a Homebrew install is detected.
brew is located by checking common install paths (/opt/homebrew/bin,
/usr/local/bin) before falling back to PATH. If brew is not found or
the upgrade fails, falls back to printing the manual command.

On success, busts the update-available cache so the notice clears on
the next run, matching the behaviour of the non-Homebrew upgrade path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eddietejeda eddietejeda merged commit de7cf1f into main May 23, 2026
11 checks passed
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