Skip to content

CLI update check + release auto-publish (ADR 0080 Phases 2 & 4)#244

Merged
isuttell merged 1 commit into
mainfrom
feat/cli-update-check
Jun 5, 2026
Merged

CLI update check + release auto-publish (ADR 0080 Phases 2 & 4)#244
isuttell merged 1 commit into
mainfrom
feat/cli-update-check

Conversation

@isuttell

@isuttell isuttell commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements ADR 0080 Phases 2 and 4. The CLI now learns the latest published version from the Agent Paste API and prints one channel-tailored upgrade hint when stale; a release: published workflow publishes the package to npm and advertises the new version in KV with no api redeploy. Builds on Phase 1 (version baking, #232).

Changes

  • api: GET /v1/public/cli-version (unauthenticated) serves {latest, min_supported} from a new CLI_RELEASE KV namespace, with a 60s module memo and Cache-Control: public, max-age=300. The handler is total: serves a 0.0.0 safe default on absent/malformed/erroring KV, never 500s. Mounted via a new no-db registrar (pure KV read).
  • contracts: cli.version route + CliVersionResponse schema + OpenAPI (200-only, matching the total handler). Extracted applyWebCursorParameterBounds into its own file to keep api.ts under the line cap.
  • cli: update-check.ts detects channel (npx / npm-global / binary), throttles 24h (stamps the cache before the fetch so offline users aren't re-checked), suppresses on CI / non-TTY / --json / --quiet / AGENT_PASTE_NO_UPDATE_CHECK, fetches fail-open, and prints one stderr hint (npx: none; npm-global: npm i -g …@latest; binary: agent-paste upgrade; below min_supported: louder warning). Wired after dispatch() so it never affects exit code.
  • ci: cli-advertise.yml on release: published (gated on cli-v*) publishes @zaks-io/agent-paste to npm via OIDC trusted publishing (no stored token) then writes CLI_RELEASE per env via wrangler kv key put --binding CLI_RELEASE --env <env>. cli-release.yml asserts the dispatch tag equals cli-v<package.json version>. package.json is the single version source.
  • chore: biome.json excludes **/coverage (generated artifact was being linted).

Risk: MEDIUM

  • Areas touched: new public unauthenticated API route; release infra (npm publish + production KV write).
  • Security: route is read-only and fail-open (no tenant data, never 500s). npm auth moved from a stored token to OIDC trusted publishing (removes a long-lived secret). Cloudflare write token scoped to the KV step only. tag_name is maintainer-controlled and never reaches a shell unquoted.
  • Performance: update check is throttled (24h), bounded (3s fetch timeout), and suppressed in CI/non-TTY; stdout is never touched.
  • Breaking: none.

Test plan

  • pnpm verify (88/88) and pnpm test:coverage (branches 80.34%) green
  • api 208 tests incl. KV seeded / unset / malformed / rejecting → safe default, never 500; memo TTL
  • cli 83 tests incl. channel matrix, all suppression flags, throttle, fail-open, below-min warning, --json stdout untouched
  • actionlint clean on both workflows; injection audit (no untrusted input in run: blocks)
  • OpenAPI golden regenerated and in sync

Out of scope: Phase 3 (agent-paste upgrade) and the README docs.

Manual prerequisite before the first automated release: configure the npm trusted publisher on npmjs.com (org zaks-io, repo agent-paste, workflow cli-advertise.yml). A 0.0.0 placeholder is already published, so the precondition is met. (Done.)

AP-165

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • CLI now performs periodic update checks and notifies users when newer versions are available, with channel-specific upgrade guidance.
    • Added public API endpoint (GET /v1/public/cli-version) to retrieve current and minimum supported CLI versions.
  • Chores

    • Automated release pipeline configuration and test coverage for CLI publishing.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 477dc93d-dc1e-4061-8559-d1f4fdf59cc0

📥 Commits

Reviewing files that changed from the base of the PR and between 9885616 and a118145.

⛔ Files ignored due to path filters (1)
  • packages/contracts/openapi/api.json is excluded by !packages/contracts/openapi/*.json
📒 Files selected for processing (25)
  • .github/workflows/cli-advertise.yml
  • .github/workflows/cli-release.yml
  • apps/api/src/env.ts
  • apps/api/src/index.ts
  • apps/api/src/routes/cli-version.ts
  • apps/api/test/route-cli-version.test.ts
  • apps/api/wrangler.jsonc
  • apps/cli/src/credentials.ts
  • apps/cli/src/index.ts
  • apps/cli/src/node-globals.d.ts
  • apps/cli/src/update-check.ts
  • apps/cli/test/index.test.ts
  • apps/cli/test/update-check.test.ts
  • biome.json
  • docs/ops/cli-auto-update-plan.md
  • packages/api-client/src/index.ts
  • packages/contracts/src/cliVersion.ts
  • packages/contracts/src/index.ts
  • packages/contracts/src/mvp-contracts.test.ts
  • packages/contracts/src/openapi/api.ts
  • packages/contracts/src/openapi/shared.ts
  • packages/contracts/src/openapi/web-cursor-bounds.ts
  • packages/contracts/src/routes/registry.ts
  • packages/worker-runtime/src/route-repository-errors.ts
  • scripts/local-mvp-server.mjs
✅ Files skipped from review due to trivial changes (4)
  • biome.json
  • packages/contracts/src/mvp-contracts.test.ts
  • packages/contracts/src/openapi/shared.ts
  • apps/cli/src/node-globals.d.ts
🚧 Files skipped from review as they are similar to previous changes (18)
  • packages/contracts/src/index.ts
  • packages/worker-runtime/src/route-repository-errors.ts
  • .github/workflows/cli-release.yml
  • apps/api/src/env.ts
  • apps/api/wrangler.jsonc
  • apps/cli/src/index.ts
  • apps/api/src/routes/cli-version.ts
  • packages/contracts/src/routes/registry.ts
  • packages/contracts/src/openapi/api.ts
  • packages/contracts/src/openapi/web-cursor-bounds.ts
  • packages/api-client/src/index.ts
  • apps/cli/src/credentials.ts
  • apps/api/src/index.ts
  • apps/api/test/route-cli-version.test.ts
  • apps/cli/test/index.test.ts
  • apps/cli/test/update-check.test.ts
  • apps/cli/src/update-check.ts
  • scripts/local-mvp-server.mjs

📝 Walkthrough

Walkthrough

This PR implements Phase 2 of the CLI auto-update feature: a KV-backed public CLI version endpoint, background update checks with semver comparison and per-channel warnings, and release automation via GitHub Actions to advertise new versions to Cloudflare KV.

Changes

CLI version endpoint: contract through integration

Layer / File(s) Summary
Contract, schema, and registry registration
packages/contracts/src/cliVersion.ts, packages/contracts/src/routes/registry.ts, packages/worker-runtime/src/route-repository-errors.ts, packages/contracts/openapi/api.json, packages/contracts/src/openapi/*
Introduces CliVersionResponse Zod schema with semver-format latest and min_supported fields, registers the cli.version route contract and OpenAPI endpoint, updates MVP test expectations, and extracts cursor-bounds utility to standalone module.
API route handler with KV and memoization
apps/api/src/routes/cli-version.ts
Implements getCliVersion handler that reads from CLI_RELEASE KV namespace under key cli-release, parses JSON safely, caches results per isolate with 60s TTL, and returns HTTP 200 with cache-control: public, max-age=300; falls back to safe default {latest: "0.0.0", min_supported: "0.0.0"} on missing binding, missing key, malformed JSON, or KV errors.
KV namespace binding configuration
apps/api/src/env.ts, apps/api/wrangler.jsonc
Adds optional CLI_RELEASE KVNamespace binding to Env type and configures it in wrangler at top-level, preview, and production environments.
API mounting and local dev runtime
apps/api/src/index.ts, scripts/local-mvp-server.mjs
Mounts cli.version through new apiNoDbRegistrar (context-only, no database wiring) and seeds CLI_RELEASE with sample {latest: "0.1.0", min_supported: "0.0.0"} in local MVP server.
API route validation tests
apps/api/test/route-cli-version.test.ts
Tests seeded KV happy path, missing binding/key/malformed JSON fallback, KV error tolerance, cache-control header, and memoization behavior (cache hits, mutations, explicit reset invalidation).

CLI update-check: runtime logic through integration

Layer / File(s) Summary
Semver, channel detection, and update-check policy
apps/cli/src/update-check.ts (partial)
Adds compareSemver() for version ordering with suffix normalization (v-prefix, prerelease, build), detectChannel() to classify runtime (npx/npm-global/binary/unknown via env/argv/execPath heuristics), shouldCheck() gating with 24h cache TTL and suppression flags (env/CI/quiet/json/non-TTY), and cache file I/O utilities.
runUpdateCheck async routine and output formatting
apps/cli/src/update-check.ts (partial)
Implements runUpdateCheck entry point: reads cache, applies suppression gates, fetches /v1/public/cli-version with 3s timeout, validates response, updates cache before/after fetch, and prints at most one channel-specific stderr warning (min_supported danger or latest upgrade suggestion); swallows all errors (network/fs/parse).
Config directory helpers and CLI main wiring
apps/cli/src/credentials.ts, apps/cli/src/index.ts, apps/cli/src/node-globals.d.ts, packages/api-client/src/index.ts
Adds configDir() and updateCheckCachePath() helpers for XDG-compliant per-app config directory, integrates runUpdateCheck(parsed.global) into CLI main after dispatch completes, extends process type globals for channel detection (execPath, isTTY), and refactors API client base URL resolution into reusable resolveApiBaseUrl() function.
Update-check behavior validation
apps/cli/test/update-check.test.ts, apps/cli/test/index.test.ts
Tests semver normalization/ordering, channel classification (npx/npm-global/binary heuristics), upgrade command per channel, suppression under multiple gate conditions, cache throttling and freshness, output formatting per channel, and silent error handling for network/parse/KV failures; validates JSON output is not corrupted by post-dispatch stderr writes.

Release automation: npm publish and KV advertisement

Layer / File(s) Summary
cli-advertise workflow: publish and KV writes
.github/workflows/cli-advertise.yml
Adds release-triggered workflow: checks out released tag, validates tag matches apps/cli/package.json version (cli-v<version>), conditionally publishes @zaks-io/agent-paste to npm with OIDC trusted publishing (skips if version exists), and writes {latest, min_supported} to CLI_RELEASE KV key in both preview and production via wrangler kv key put.
Release workflow tag validation
.github/workflows/cli-release.yml
Adds early validation in binary compilation workflow: compares workflow_dispatch tag input against apps/cli/package.json version and fails before bun build if they do not match (format: cli-v<version>).
Phase documentation and biome config
docs/ops/cli-auto-update-plan.md, biome.json
Marks Phase 2 complete, rewrites Phase 4 with concrete release automation (OIDC, single version source, npm trusted-publisher setup), updates release criteria and out-of-scope section, and adds !**/coverage to biome file exclusions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

  • zaks-io/agent-paste#231: Implements Phase 2 of CLI auto-update feature (version endpoint, update check, KV-backed release advertisement) for detecting and notifying CLI staleness.

Possibly related PRs

  • zaks-io/agent-paste#195: Both modify binary release automation in .github/workflows/cli-release.yml (main PR adds tag-version validation guardrail, retrieved PR introduces manual workflow).
  • zaks-io/agent-paste#142: Scopes and bumps @zaks-io/agent-paste package version and updates publish setup, which the main PR's npm publish flow depends on.
  • zaks-io/agent-paste#226: Both modify .github/workflows/cli-release.yml with the main PR adding tag-version validation and the retrieved PR adding SBOM/provenance/scan steps.

🐰 Release the KV, check the version near,
Update flows silent with warnings clear—
No redeployment needed here,
Phase Two complete, the future's near! 📦✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: CLI update check functionality and release auto-publishing, referencing the specific ADR phases being implemented.
Linked Issues check ✅ Passed The PR fully implements the coding objectives from AP-165 Phases 2 & 4: provides unauthenticated GET /v1/public/cli-version endpoint with KV backing, implements throttled update check with channel-specific guidance, and adds release pipeline automation for version advertisement without API redeploy.
Out of Scope Changes check ✅ Passed All changes are scoped to Phase 2 & 4 objectives: API endpoint/KV integration, CLI update check implementation, release automation workflows, and supporting infrastructure. Phase 3 (agent-paste upgrade command) and Phase 1 (version baking, already marked complete) are appropriately excluded.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cli-update-check

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

@linear-code

linear-code Bot commented Jun 5, 2026

Copy link
Copy Markdown
AP-165 CLI auto-update: version baking, update check, and binary self-upgrade

Outcome

The @zaks-io/agent-paste CLI can tell a user — human or agent — that a newer version exists, and the standalone binary channel (which has no package manager behind it) can self-upgrade on explicit request. Implements ADR 0080; phased plan in docs/ops/cli-auto-update-plan.md.

Context

Three distribution channels with different update mechanics: standalone binary (bun --compile, GitHub Releases, ~/.local/bin), npm i -g, and npx. Today the running CLI does not even know its own version (neither build path injects it), so it cannot detect staleness. The version source of truth will be a new unauthenticated GET /v1/public/cli-version route backed by a CLI_RELEASE KV value, so advertising a new version is a data write, not an api redeploy.

Scope (phased)

  • Phase 1 (this PR): bake package.json version into the bundle (esbuild define) and the binary (bun build --define); add version / --version / -v.
  • Phase 2: unauthenticated cli.version route + KV-backed {latest, min_supported}; background, throttled (24h), silenceable update check that prints a per-channel nag to stderr (npx: none; npm-global: npm i -g ...@latest; binary: agent-paste upgrade). Edge-cached (Cache-Control) + module-scope memo, not the two-layer auth cache.
  • Phase 3: agent-paste upgrade — verified download (SHA256SUMS) + atomic self-replace, reusing the install.sh flow.
  • Phase 4: release pipeline writes the KV value on publish (GitHub release: publishedwrangler kv key put); reconcile npm version ↔ cli-vX.Y.Z tag.

Out of scope

Silent binary self-update (explicit upgrade only); auto-publishing to npm; runtime package.json read for the version.

Acceptance criteria

  • Phase 1: agent-paste version / --version / -v print the package version; compiled binary prints the same; dev/test runs print 0.0.0-dev without throwing.
  • Phase 2–4 per the plan doc.

Required checks

pnpm verify + pnpm test:coverage (CI Validate).

@coderabbitai coderabbitai 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.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/cli-advertise.yml:
- Line 27: The job-level guard if: startsWith(github.event.release.tag_name,
'cli-v') causes the workflow to run then skip jobs; either move the filter to
the trigger by switching the workflow to a tag-based trigger (e.g., replace the
current release trigger with an on: push: tags: - "cli-v*" or an appropriate
tag-filtering trigger if you want no workflow runs for non-cli tags) or, if the
workflow must be release-triggered, add a short comment above the job explaining
that workflow-level if: is not supported for release events so the guard remains
at job-level (referencing the existing if:
startsWith(github.event.release.tag_name, 'cli-v') in cli-advertise.yml).
- Around line 54-56: Replace the non-deterministic "npm install -g npm@latest"
invocation in the "Upgrade npm for trusted publishing" step with a pinned
version that satisfies the >=11.5.1 requirement (for example "npm install -g
npm@11.7.0"); update the run command to use that specific version (or an input
variable like NPM_VERSION) so the workflow installs a fixed npm version instead
of latest.

In `@apps/cli/src/update-check.ts`:
- Around line 127-131: The minimum-supported warning currently hardcodes the
upgrade command; update the block that checks compareSemver(CLI_VERSION,
min_supported) so it uses the same channel detection logic as nag() (or its
helper) to pick a channel-appropriate suggestion: for "binary" show "agent-paste
upgrade", for "npm-global" show the npm global upgrade instruction, for
"unknown" or when channel detection fails omit the specific command and use a
generic "Upgrade soon" message; ensure you modify the write(...) call (and any
helper used) so the message text varies by channel rather than always printing
"agent-paste upgrade".

In `@docs/ops/project-status.md`:
- Line 150: Update the status line in docs/ops/project-status.md that currently
reads “Placeholder UI: dashboard Access Link management.” to indicate the
feature is shipped (e.g., “Shipped: dashboard Access Link management (AP-156)”),
since docs/ops/status/implementation.md and the implemented route
apps/web/src/routes/_authed.access-links.tsx show the /access-links
list/create/mint/revoke/lockdown and artifact detail work is complete; reference
AP-156 in the updated text so the two docs remain consistent.

In `@docs/ops/status/implementation.md`:
- Line 69: Update the table entry for the `pnpm verify` row so the branch
context is explicit: either replace "AP-33 branch" with `main` if `main` has a
more recent successful run, or append a clarifying note like "pre-merge
verification for AP-33" if this is a feature-branch result; ensure the "Latest
known result" wording reflects that it's a branch verification rather than main.
Locate the table row containing the `pnpm verify` entry and edit the fourth
column text accordingly to show the correct branch context and date.

In `@packages/contracts/openapi/api.json`:
- Around line 569-585: The schema for CliVersionResponse currently allows any
non-empty string for latest and min_supported; update the source JSON/YAML
schema where CliVersionResponse is defined to replace their
"type":"string","minLength":1 with a shared semver pattern (e.g., a reusable
regex schema component like "components/schemas/Semver" or a $ref to a shared
"Semver" schema) and reference that shared Semver schema for both latest and
min_supported, then regenerate the OpenAPI artifact so the api.json contains the
semver constraint for those fields.

In `@packages/contracts/src/cliVersion.ts`:
- Around line 7-10: The current CliVersionResponse schema only enforces
non-empty strings for latest and min_supported; update CliVersionResponse to
validate proper semver format instead of .min(1). Replace the .min(1) checks on
the latest and min_supported fields with a semver validation (e.g., use
z.string().regex(...) or z.string().refine(...) with a standard semver regex
that matches MAJOR.MINOR.PATCH and optional pre-release/build metadata) so
malformed values like "not-a-version", "1.2", or "v1.2.3" are rejected; keep the
schema name CliVersionResponse and the field names latest and min_supported
unchanged.

In `@scripts/local-mvp-server.mjs`:
- Around line 346-347: The local harness seed for cli release version is
inconsistent with the PR intent, since the MemoryKVNamespace initialization in
the local-mvp-server flow hardcodes "0.1.0" while the summary refers to a "0.0.0
placeholder." Update the seeded value to match the intended package.json
baseline or add a clear inline comment near the cliRelease.put setup explaining
why "0.1.0" is used, so the behavior in the local harness is explicit and easy
to reconcile.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 003bdc51-3251-4762-bd60-432039dc2f09

📥 Commits

Reviewing files that changed from the base of the PR and between abae238 and 9885616.

📒 Files selected for processing (37)
  • .github/workflows/ci.yml
  • .github/workflows/cli-advertise.yml
  • .github/workflows/cli-release.yml
  • .github/workflows/security.yml
  • apps/apex/src/copy.ts
  • apps/apex/src/index.test.ts
  • apps/api/src/env.ts
  • apps/api/src/index.ts
  • apps/api/src/routes/cli-version.ts
  • apps/api/test/route-cli-version.test.ts
  • apps/api/wrangler.jsonc
  • apps/cli/src/credentials.ts
  • apps/cli/src/index.ts
  • apps/cli/src/node-globals.d.ts
  • apps/cli/src/update-check.ts
  • apps/cli/test/index.test.ts
  • apps/cli/test/update-check.test.ts
  • biome.json
  • docs/ops/cli-auto-update-plan.md
  • docs/ops/live-updates-todo.md
  • docs/ops/project-status.md
  • docs/ops/status/changelog.md
  • docs/ops/status/coverage.md
  • docs/ops/status/implementation.md
  • docs/ops/status/phase-backlog.md
  • docs/vision.md
  • packages/api-client/src/index.ts
  • packages/contracts/openapi/api.json
  • packages/contracts/src/cliVersion.ts
  • packages/contracts/src/index.ts
  • packages/contracts/src/mvp-contracts.test.ts
  • packages/contracts/src/openapi/api.ts
  • packages/contracts/src/openapi/shared.ts
  • packages/contracts/src/openapi/web-cursor-bounds.ts
  • packages/contracts/src/routes/registry.ts
  • packages/worker-runtime/src/route-repository-errors.ts
  • scripts/local-mvp-server.mjs
💤 Files with no reviewable changes (4)
  • .github/workflows/security.yml
  • docs/vision.md
  • docs/ops/status/changelog.md
  • apps/apex/src/index.test.ts

Comment thread .github/workflows/cli-advertise.yml
Comment thread .github/workflows/cli-advertise.yml
Comment thread apps/cli/src/update-check.ts
Comment thread docs/ops/project-status.md Outdated
Comment thread docs/ops/status/implementation.md Outdated
Comment thread docs/ops/status/phase-backlog.md Outdated
Comment thread packages/contracts/openapi/api.json
Comment thread packages/contracts/src/cliVersion.ts
Comment thread scripts/local-mvp-server.mjs
…165)

Implements ADR 0080 Phases 2 and 4: the CLI learns the latest published
version from the Agent Paste API and nags per channel when stale, and a
release-published workflow publishes to npm and advertises the version in KV.

- api: GET /v1/public/cli-version (unauthenticated) serves {latest,
  min_supported} from a new CLI_RELEASE KV namespace, with a 60s module
  memo and Cache-Control: public, max-age=300. Total handler: serves a
  0.0.0 safe default on absent/malformed/erroring KV, never 500s.
- contracts: cli.version route + CliVersionResponse schema + OpenAPI;
  extract applyWebCursorParameterBounds to keep api.ts under the line cap.
- cli: update-check.ts detects channel (npx/npm-global/binary), throttles
  24h, suppresses on CI/non-TTY/--json/--quiet/AGENT_PASTE_NO_UPDATE_CHECK,
  fetches fail-open, and prints one channel-tailored stderr hint. Wired
  after dispatch so it never affects exit code.
- ci: cli-advertise.yml on release:published publishes @zaks-io/agent-paste
  to npm via OIDC trusted publishing (no stored token) and writes the
  CLI_RELEASE value per env; cli-release.yml asserts the tag matches
  package.json. package.json is the single version source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@isuttell

isuttell commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Pushed fixes for CodeRabbit review + a rebase-revert correction

Material fix (beyond CodeRabbit's findings): the previous push contained accidental reverts of 11 files unrelated to this feature — a corrupted rebase had re-applied stale copies of ci.yml, security.yml, apps/apex/src/{copy.ts,index.test.ts}, docs/vision.md, the changelog/coverage/live-updates docs, and the three status docs, rolling back content that landed in #220/#225/#243. All 11 are now restored to origin/main; this PR's diff is Phase 2 only (26 files). CodeRabbit caught three of these as 'stale label' nits — the root cause was the rebase, now fixed wholesale.

Code findings addressed:

  • cliVersion.ts (Major): latest/min_supported now validate against a shared semver regex, not .min(1); golden api.json regenerated to match.
  • update-check.ts: min_supported warning now uses channel-correct guidance via a factored upgradeCommand(channel) helper (npm-global/unknown → npm command, npx → none), with new unit coverage.

Nits resolved with reasons (skipped): job-level if: in cli-advertise.yml is correct (release-triggered, no workflow-level if:); npm@latest pin intentionally tracks the OIDC-capable npm; local-mvp 0.1.0 seed documented as deliberate.

Verified: pnpm verify 88/88, test:coverage branches 80.35% / lines 89.08%, contracts 42 / api 209 / cli 85.

@isuttell

isuttell commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@isuttell isuttell merged commit 4a05587 into main Jun 5, 2026
10 checks passed
@isuttell isuttell deleted the feat/cli-update-check branch June 5, 2026 00:28
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

agent-paste PR preview resources were cleaned up. The shared Preview GitHub Environment is retained for future preview deploys.

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