fix(auto-update-checker): skip the check when auto_update is false

Merged
OS
35m ago
+57-3

Approved issue: #854

What does this PR do?

Narrow this PR to the disable path requested in review: OpenCode 1 now passes enabled: false to its background checker when auto_update: false, so no npm update request is scheduled. Unset/true settings keep the existing enabled behavior. The hook's separate notification-only mode remains available to direct callers.

All registry-resolution changes and their tests have been removed from this PR. Registry resolution is left to #855; this PR does not read project or user .npmrc files.

How to test

  • bun test packages/plugin/src/hooks/auto-update-checker/ — 44 passed, including a regression asserting no latest-version request with auto_update: false, plus unset/true defaults. The regression failed semantically with the old option mapping (one request instead of zero), then passed with the fix.
  • bun test packages/plugin/src/v2/hooks/update-check.test.ts — 4 passed.
  • bun run --cwd packages/plugin typecheck — passed.
  • bun run --cwd packages/plugin lint — passed (existing warnings only).
  • Changed-file Biome formatting and git diff --check — passed.

Tests and checks ran locally on Linux with Bun 1.4.2. Full monorepo tests were not run.

Harness coverage (required)

  • OpenCode 1: covered — the real plugin config entry maps auto_update into the checker options; regression checks that disabled updates make no npm request.
  • OpenCode 2: covered — existing src/v2/server.ts already skips startUpdateChecks when the same config key is false; reviewed and its update-check tests pass, no code change needed.
  • Pi: not applicable — the Pi plugin has no npm auto-update-checker surface.
  • OMP: not applicable — the shared Pi/OMP implementation has no npm auto-update-checker surface.
  • Rust module: not applicable — no npm auto-update-checker surface exists there.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

OpenCode 1 now skips the update checker when auto_update is false.

  • OpenCode 1 skips update checks when auto_update is false.

The only change since the previous review is the refreshed pin. Its focused test passed.

Reviews (2) · Last reviewed commit: "e2e: re-pin the OpenCode 2 index.ts hash..." · Reviewed by Greptile