Skip to content

feat: add automatic update check notification for binary users#1039

Merged
Wirasm merged 3 commits intodevfrom
feature/update-check-notification
Apr 10, 2026
Merged

feat: add automatic update check notification for binary users#1039
Wirasm merged 3 commits intodevfrom
feature/update-check-notification

Conversation

@Wirasm
Copy link
Copy Markdown
Collaborator

@Wirasm Wirasm commented Apr 10, 2026

Summary

  • Problem: Binary users have no way to know a new version exists without manually checking GitHub
  • Why it matters: Archon releases frequently and users fall behind without realizing it
  • What changed: Added cache-based update notification in CLI (stderr one-liner) and Web UI (TopNav badge). Fixed release skill asset count (6 -> 7).
  • What did not change (scope boundary): No auto-update, no dismiss-per-version, no config option for staleness window. Source builds are unaffected.

UX Journey

Before

CLI:
  $ archon workflow run assist "hello"
  [assist] Started
  [assist] Completed (3.2s)
  $                              <-- no update info

Web UI:
  ┌─────────────────────────────────────────────────────┐
  │  Chat   Dashboard   Workflows   Settings   v0.3.2  │  <-- static version
  └─────────────────────────────────────────────────────┘

After

CLI:
  $ archon workflow run assist "hello"
  [assist] Started
  [assist] Completed (3.2s)
  Update available: v0.3.2 → v0.4.0 — https://github.com/coleam00/Archon/releases/tag/v0.4.0
  $

Web UI:
  ┌──────────────────────────────────────────────────────────┐
  │  Chat   Dashboard   Workflows   Settings   v0.3.2 ● v0.4.0  │
  └──────────────────────────────────────────────────────────┘
                                                  └── pulsing dot, links to release

Architecture Diagram

Before

CLI (cli.ts)  ──▶  commands  ──▶  exit
Server (api.ts)  ──▶  /api/health  ──▶  version string
Web (TopNav.tsx)  ──▶  static version display

After

CLI (cli.ts)  ──▶  commands  ──▶  [+] printUpdateNotice()  ──▶  exit
                                      │
                                      ▼
                               [+] @archon/paths/update-check
                                      │
                                      ▼
                               [+] ~/.archon/update-check.json (cache)
                               [+] GitHub API /releases/latest (if stale)

Server (api.ts)  ──▶  [+] /api/update-check  ──▶  @archon/paths/update-check
Web (TopNav.tsx)  ──▶  [+] useQuery(['update-check'])  ──▶  /api/update-check

Connection inventory:

From To Status Notes
cli.ts @archon/paths modified Added checkForUpdate, BUNDLED_IS_BINARY, BUNDLED_VERSION imports
api.ts @archon/paths modified Added checkForUpdate import
api.ts system.schemas.ts new New schema file for update-check response
TopNav.tsx api.ts (web) new getUpdateCheck() API call
update-check.ts archon-paths.ts new getArchonHome() for cache path
update-check.ts GitHub API new Fetch /releases/latest

Label Snapshot

  • Risk: risk: low
  • Size: size: M
  • Scope: paths, cli, server, web, skills
  • Module: paths:update-check, cli:notification, server:api, web:topnav

Change Metadata

  • Change type: feature
  • Primary scope: multi

Linked Issue

  • None

Validation Evidence (required)

bun run validate  # All pass
  • Type check: 0 errors across 9 packages
  • Lint: 0 errors, 0 warnings
  • Format: All files pass
  • Tests: All pass including 18 new tests (isNewerVersion: 6, parseLatestRelease: 4, checkForUpdate: 5, getCachedUpdateCheck: 3)

Security Impact (required)

  • New permissions/capabilities? No
  • New external network calls? Yes — GitHub API /repos/coleam00/Archon/releases/latest (public, no auth, 60 req/hr limit)
  • Secrets/tokens handling changed? No
  • File system access scope changed? Yes — writes ~/.archon/update-check.json cache file
  • Risk: GitHub API call is unauthenticated, public endpoint. Cache file is in user-owned Archon home dir. All network errors silently swallowed — never affects CLI exit code.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Database migration needed? No

Human Verification (required)

  • Verified scenarios: Unit tests cover all core logic paths
  • Edge cases checked: Network timeout, corrupt cache, stale cache, equal versions, v-prefix stripping
  • What was not verified: Binary build end-to-end test (requires scripts/build-binaries.sh)

Side Effects / Blast Radius (required)

  • Affected subsystems/workflows: CLI exit path (adds up to 3s on first daily run), Web UI TopNav, new API endpoint
  • Potential unintended effects: 3s timeout on first daily CLI run could slow interactive workflows. Mitigated: only binary builds, only when cache is stale (once per 24h).
  • Guardrails/monitoring for early detection: All errors silently swallowed. --quiet flag suppresses notice entirely.

Rollback Plan (required)

  • Fast rollback command/path: Revert the commit. No database migration, no config changes.
  • Feature flags or config toggles: --quiet suppresses CLI notice. Source builds (BUNDLED_IS_BINARY === false) skip entirely.
  • Observable failure symptoms: Update notice showing wrong versions, or 3s delay on every CLI run (would indicate cache write failure).

Risks and Mitigations

  • Risk: GitHub API rate limit (60/hr unauthenticated)
    • Mitigation: 24h cache window means ~1 request/day per user
  • Risk: 3s timeout slows CLI once per day
    • Mitigation: Acceptable tradeoff; only binary builds, suppressed by --quiet

Summary by CodeRabbit

  • New Features

    • Automatic update checking with CLI notice and web UI indicator/link when a newer release exists
    • Public HTTP endpoint exposing update status for clients
  • Documentation

    • Docs updated to describe the update-check API and local cache (24‑hour TTL) and release workflow guidance
  • Tests

    • Added unit/integration tests covering update-check parsing, caching and network behavior

Cache-based update check triggered by CLI commands and Web UI page load.
Fetches latest release from GitHub API with 24h cache staleness and 3s
timeout. CLI prints one-liner to stderr (suppressed by --quiet, skipped
for source builds). Web UI shows pulsing badge in TopNav linking to
release page. Also fixes release skill asset count (6 -> 7).
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e7d1049f-4867-4c15-9385-3d682024a88f

📥 Commits

Reviewing files that changed from the base of the PR and between 79629f2 and badf44e.

📒 Files selected for processing (11)
  • .claude/skills/release/SKILL.md
  • CLAUDE.md
  • packages/cli/src/cli.ts
  • packages/docs-web/src/content/docs/reference/api.md
  • packages/docs-web/src/content/docs/reference/archon-directories.md
  • packages/paths/src/update-check.test.ts
  • packages/paths/src/update-check.ts
  • packages/server/src/routes/api.ts
  • packages/web/src/components/layout/TopNav.tsx
  • packages/web/src/lib/api.generated.d.ts
  • packages/web/src/lib/api.ts

📝 Walkthrough

Walkthrough

Adds an update-check feature: a cached GitHub release checker (24h TTL) with version comparison, CLI notice for bundled binaries, server API GET /api/update-check, and web UI display in TopNav; docs and release asset expectations updated to include archon-web.tar.gz.

Changes

Cohort / File(s) Summary
Release Documentation
​.claude/skills/release/SKILL.md
Clarified manual dev sync after merge, CI behavior for Homebrew formula, and increased expected release assets from 6 to 7 to include archon-web.tar.gz.
Update-Check Core
packages/paths/src/update-check.ts, packages/paths/src/update-check.test.ts
New module implementing semantic version comparison, GitHub /releases/latest fetch with 3s timeout, 24-hour JSON cache in ARCHON_HOME, resilient IO/network handling, and comprehensive tests covering parsing, cache, and fetch behavior.
Paths API Exports
packages/paths/src/index.ts
Re-exported update-check APIs and UpdateCheckResult type for downstream consumers.
CLI Integration
packages/cli/src/cli.ts
Added printUpdateNotice(quiet) to call checkForUpdate for bundled binaries, print to stderr when updates available, and shield errors from impacting CLI exit.
Server API & Schema
packages/server/src/routes/api.ts, packages/server/src/routes/schemas/system.schemas.ts
New OpenAPI-backed GET /api/update-check route returning UpdateCheckResponse schema; returns cached or default no-update payload when appropriate.
Web Integration
packages/web/src/lib/api.ts, packages/web/src/components/layout/TopNav.tsx, packages/web/src/lib/api.generated.d.ts
Added getUpdateCheck() API client and type; TopNav queries hourly and shows a pulsing external link to releaseUrl when updateAvailable is true; updated generated types include UpdateCheckResponse.
Docs
CLAUDE.md, packages/docs-web/src/content/docs/reference/api.md, packages/docs-web/src/content/docs/reference/archon-directories.md
Documented update-check.json cache and new GET /api/update-check endpoint, noting binary-only behavior and 24h TTL.
Generated API typings
packages/web/src/lib/api.generated.d.ts
Added UpdateCheckResponse schema to generated types and several unrelated API typing updates (workflow/run, codebase env endpoints, request format changes).

Sequence Diagram

sequenceDiagram
    participant CLI as CLI Process
    participant Cache as Local Cache
    participant GH as GitHub API
    participant Server as Server
    participant Web as Web Client

    rect rgba(100, 150, 200, 0.5)
    Note over CLI: CLI Update Check Flow
    CLI->>Cache: getCachedUpdateCheck(currentVersion)
    alt Cache exists & fresh
        Cache-->>CLI: cached UpdateCheckResult
    else Cache stale/missing
        CLI->>GH: GET /releases/latest (3s timeout)
        GH-->>CLI: release payload (tag_name, html_url)
        CLI->>Cache: write update-check.json
        Cache-->>CLI: write result (errors ignored)
        CLI-->>CLI: isNewerVersion -> UpdateCheckResult
    end
    CLI->>CLI: printUpdateNotice if updateAvailable
    end

    rect rgba(150, 200, 100, 0.5)
    Note over Web,Server: Web Update Check Flow
    Web->>Server: GET /api/update-check
    Server->>Cache: getCachedUpdateCheck(appVersion)
    alt Cache exists & fresh
        Cache-->>Server: cached UpdateCheckResult
    else Cache stale/missing
        Server->>GH: GET /releases/latest (3s timeout)
        GH-->>Server: release payload
        Server->>Cache: write update-check.json
    end
    Server-->>Web: UpdateCheckResult
    Web->>Web: display pulsing link if updateAvailable (refetch hourly)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • coleam00

Poem

🐰 A little rabbit hops with cheer,
Caching releases far and near.
CLI beeps softly, web shows a light,
New versions bloom into the night.
Update, fetch, and hop along—delight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add automatic update check notification for binary users' clearly and specifically summarizes the main feature: an automatic update check notification system designed for binary users.
Description check ✅ Passed The PR description is comprehensive and follows the template structure with all required sections completed: Summary, UX Journey (Before/After), Architecture Diagram with connection inventory, Label Snapshot, Change Metadata, Linked Issues, Validation Evidence, Security Impact, Compatibility, Human Verification, Side Effects, Rollback Plan, and Risks/Mitigations.

✏️ 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 feature/update-check-notification

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 and usage tips.

@Wirasm
Copy link
Copy Markdown
Collaborator Author

Wirasm commented Apr 10, 2026

PR Review Summary

Critical Issues (2 found)

Agent Issue Location
code-reviewer Server route calls checkForUpdate unconditionally — missing BUNDLED_IS_BINARY guard causes unintended GitHub API traffic from source/dev builds packages/server/src/routes/api.ts:2612
code-reviewer UpdateCheckResult in web is a hand-crafted interface instead of using generated OpenAPI type (components['schemas']['UpdateCheckResponse']) — violates Zod schema conventions (regenerate api.generated.d.ts first) packages/web/src/lib/api.ts:499-504

Important Issues (5 found)

Agent Issue Location
code-reviewer getCachedUpdateCheck does not check cache staleness — can return weeks-old data, diverging from readCache() behavior packages/paths/src/update-check.ts:138-154
code-reviewer TopNav anchor could render with empty href if releaseUrl is empty — add updateCheck.releaseUrl && guard packages/web/src/components/layout/TopNav.tsx:63
silent-failure-hunter 3 bare catch {} blocks have zero debug visibility — add log.debug() to readCache, writeCache, and outer checkForUpdate catch for --verbose diagnostics packages/paths/src/update-check.ts:40,50,130
comment-analyzer SKILL.md note claims CI handles "Steps 10-11" but Step 11 (tap sync) is entirely manual — could cause missed tap sync during release .claude/skills/release/SKILL.md:199-201
comment-analyzer SKILL.md Step 9 note mischaracterizes what CI does/does not do re: merge commit syncing — reword for clarity .claude/skills/release/SKILL.md:189-191

Suggestions (6 found)

Agent Suggestion Location
test-reviewer Add test for getCachedUpdateCheck with stale cache to document intentional staleness asymmetry update-check.test.ts
test-reviewer Add test for non-200 HTTP response (GitHub rate limit 403) — !res.ok branch is untested update-check.test.ts
test-reviewer Verify cache file content after fetch, not just existsSync update-check.test.ts
type-design Extract cache field validation into shared helper to eliminate inconsistency between readCache and getCachedUpdateCheck update-check.ts
type-design Consider `string nullforreleaseUrl` instead of empty string sentinel
docs-impact Regenerate api.generated.d.ts to include UpdateCheckResponse schema packages/web/src/lib/api.generated.d.ts

Documentation Issues

File Issue
CLAUDE.md — API Endpoints section GET /api/update-check not listed
CLAUDE.md — Directory Structure ~/.archon/update-check.json cache file not in tree
packages/docs-web/ — API reference + directories Same omissions as CLAUDE.md

Strengths

  • Well-structured cache + fetch architecture with sensible 24h TTL
  • Correct AbortController + clearTimeout in finally — no timer leaks
  • Good test coverage for core functions (18 tests) with proper spyOn/mockRestore pattern
  • UpdateCheckCache correctly kept private — good encapsulation
  • parseLatestRelease(json: unknown) uses unknown input type — correct for external API data
  • Double-digit semver test (0.9.0 vs 0.10.0) catches classic string comparison bug

Verdict: NEEDS FIXES

Two critical issues must be addressed before merge:

  1. Add BUNDLED_IS_BINARY guard to the server /api/update-check route
  2. Regenerate api.generated.d.ts and use components['schemas']['UpdateCheckResponse'] instead of hand-written interface

Recommended Actions

  1. Fix the 2 critical issues
  2. Address the SKILL.md factual inaccuracy (Steps 10-11 claim)
  3. Add debug-level logging to bare catch blocks
  4. Add releaseUrl && guard in TopNav
  5. Consider adding staleness check to getCachedUpdateCheck
  6. Update CLAUDE.md and docs-web with new endpoint and cache file

- Add BUNDLED_IS_BINARY guard to /api/update-check server route to
  prevent unintended GitHub API calls from source/dev builds
- Replace hand-crafted UpdateCheckResult interface with generated
  OpenAPI type (components['schemas']['UpdateCheckResponse'])
- Add staleness + checkedAt validation to getCachedUpdateCheck,
  matching readCache behavior
- Add debug-level logging to all bare catch blocks in update-check.ts
  for --verbose diagnostics
- Add releaseUrl guard in TopNav to prevent empty href links
- Fix SKILL.md: correct CI scope claim (Step 10 only, not 10-11) and
  clarify merge commit sync note
- Add tests: non-200 HTTP response, stale cache for getCachedUpdateCheck,
  missing checkedAt, and cache content verification
- Document /api/update-check endpoint and update-check.json cache file
  in CLAUDE.md and docs-web
- Regenerate api.generated.d.ts with UpdateCheckResponse schema
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/paths/src/update-check.ts (1)

27-43: Consider extracting shared cache validation logic.

readCache() and getCachedUpdateCheck() (lines 138-153) both parse and validate the cache JSON with similar logic. The only difference is staleness handling. Consider extracting the common validation into a helper to reduce duplication and ensure consistent validation.

♻️ Suggested refactor
+function parseCache(raw: string): UpdateCheckCache | null {
+  try {
+    const data = JSON.parse(raw) as UpdateCheckCache;
+    if (!data.latestVersion || !data.releaseUrl || typeof data.checkedAt !== 'number') {
+      return null;
+    }
+    return data;
+  } catch {
+    return null;
+  }
+}
+
 function readCache(): UpdateCheckCache | null {
   try {
     const cachePath = getCachePath();
     if (!existsSync(cachePath)) return null;
     const raw = readFileSync(cachePath, 'utf-8');
-    const data = JSON.parse(raw) as UpdateCheckCache;
-    if (!data.latestVersion || !data.releaseUrl || typeof data.checkedAt !== 'number') {
-      return null;
-    }
+    const data = parseCache(raw);
+    if (!data) return null;
     if (Date.now() - data.checkedAt > STALENESS_MS) {
       return null;
     }
     return data;
   } catch {
     return null;
   }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/paths/src/update-check.ts` around lines 27 - 43, readCache() and
getCachedUpdateCheck() duplicate JSON parse and validation logic; extract a
helper (e.g., parseAndValidateCache or validateCache) that takes raw JSON or
parsed object and an optional maxAgeMs (use STALENESS_MS for readCache and
undefined/Infinity for getCachedUpdateCheck) and verifies latestVersion,
releaseUrl and that checkedAt is a number and not stale when maxAgeMs provided;
update readCache and getCachedUpdateCheck to call this helper, handle parse
errors centrally, and return null on failure to keep behavior identical.
packages/paths/src/update-check.test.ts (1)

3-3: Remove unused import unlinkSync.

The unlinkSync import is not used in this file.

🧹 Fix unused import
-import { mkdirSync, writeFileSync, existsSync, rmSync, unlinkSync } from 'fs';
+import { mkdirSync, writeFileSync, existsSync, rmSync } from 'fs';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/paths/src/update-check.test.ts` at line 3, The import list at the
top of update-check.test.ts includes an unused symbol unlinkSync; remove
unlinkSync from the named import list (leaving mkdirSync, writeFileSync,
existsSync, rmSync) so there are no unused imports reported and the test file
only imports symbols that are actually referenced.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/release/SKILL.md:
- Around line 199-201: Update the note that currently says the `update-homebrew`
CI job handles "Steps 10-11" to correctly state it only handles Step 10;
specifically, edit the text referencing the `update-homebrew` job (the line
mentioning "Steps 10-11" in SKILL.md) so it reads that the CI job only updates
the main formula and pushes to dev (Step 10) and does not sync the Homebrew tap
(Step 11), and add a short reminder to check Actions and perform the manual tap
sync (Step 11: syncing coleam00/homebrew-archon) if the CI job does not cover
it.

---

Nitpick comments:
In `@packages/paths/src/update-check.test.ts`:
- Line 3: The import list at the top of update-check.test.ts includes an unused
symbol unlinkSync; remove unlinkSync from the named import list (leaving
mkdirSync, writeFileSync, existsSync, rmSync) so there are no unused imports
reported and the test file only imports symbols that are actually referenced.

In `@packages/paths/src/update-check.ts`:
- Around line 27-43: readCache() and getCachedUpdateCheck() duplicate JSON parse
and validation logic; extract a helper (e.g., parseAndValidateCache or
validateCache) that takes raw JSON or parsed object and an optional maxAgeMs
(use STALENESS_MS for readCache and undefined/Infinity for getCachedUpdateCheck)
and verifies latestVersion, releaseUrl and that checkedAt is a number and not
stale when maxAgeMs provided; update readCache and getCachedUpdateCheck to call
this helper, handle parse errors centrally, and return null on failure to keep
behavior identical.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 82a47870-1fa2-4bdf-87c5-d31db443942f

📥 Commits

Reviewing files that changed from the base of the PR and between 36bd9cf and 79629f2.

📒 Files selected for processing (9)
  • .claude/skills/release/SKILL.md
  • packages/cli/src/cli.ts
  • packages/paths/src/index.ts
  • packages/paths/src/update-check.test.ts
  • packages/paths/src/update-check.ts
  • packages/server/src/routes/api.ts
  • packages/server/src/routes/schemas/system.schemas.ts
  • packages/web/src/components/layout/TopNav.tsx
  • packages/web/src/lib/api.ts

Comment thread .claude/skills/release/SKILL.md Outdated
- Deduplicate getCachedUpdateCheck by delegating to readCache
- Extract shared noUpdate fallback object in server route
- Move guard clause outside try block in printUpdateNotice
- Fix cachePath variable scoping in readCache catch block
@Wirasm Wirasm merged commit 6f1b72e into dev Apr 10, 2026
@Wirasm Wirasm deleted the feature/update-check-notification branch April 10, 2026 11:10
@Wirasm Wirasm mentioned this pull request Apr 10, 2026
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
…m00#1039)

* feat: add automatic update check notification for binary users

Cache-based update check triggered by CLI commands and Web UI page load.
Fetches latest release from GitHub API with 24h cache staleness and 3s
timeout. CLI prints one-liner to stderr (suppressed by --quiet, skipped
for source builds). Web UI shows pulsing badge in TopNav linking to
release page. Also fixes release skill asset count (6 -> 7).

* fix: address review findings for update check notification

- Add BUNDLED_IS_BINARY guard to /api/update-check server route to
  prevent unintended GitHub API calls from source/dev builds
- Replace hand-crafted UpdateCheckResult interface with generated
  OpenAPI type (components['schemas']['UpdateCheckResponse'])
- Add staleness + checkedAt validation to getCachedUpdateCheck,
  matching readCache behavior
- Add debug-level logging to all bare catch blocks in update-check.ts
  for --verbose diagnostics
- Add releaseUrl guard in TopNav to prevent empty href links
- Fix SKILL.md: correct CI scope claim (Step 10 only, not 10-11) and
  clarify merge commit sync note
- Add tests: non-200 HTTP response, stale cache for getCachedUpdateCheck,
  missing checkedAt, and cache content verification
- Document /api/update-check endpoint and update-check.json cache file
  in CLAUDE.md and docs-web
- Regenerate api.generated.d.ts with UpdateCheckResponse schema

* refactor: simplify update check code

- Deduplicate getCachedUpdateCheck by delegating to readCache
- Extract shared noUpdate fallback object in server route
- Move guard clause outside try block in printUpdateNotice
- Fix cachePath variable scoping in readCache catch block
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…m00#1039)

* feat: add automatic update check notification for binary users

Cache-based update check triggered by CLI commands and Web UI page load.
Fetches latest release from GitHub API with 24h cache staleness and 3s
timeout. CLI prints one-liner to stderr (suppressed by --quiet, skipped
for source builds). Web UI shows pulsing badge in TopNav linking to
release page. Also fixes release skill asset count (6 -> 7).

* fix: address review findings for update check notification

- Add BUNDLED_IS_BINARY guard to /api/update-check server route to
  prevent unintended GitHub API calls from source/dev builds
- Replace hand-crafted UpdateCheckResult interface with generated
  OpenAPI type (components['schemas']['UpdateCheckResponse'])
- Add staleness + checkedAt validation to getCachedUpdateCheck,
  matching readCache behavior
- Add debug-level logging to all bare catch blocks in update-check.ts
  for --verbose diagnostics
- Add releaseUrl guard in TopNav to prevent empty href links
- Fix SKILL.md: correct CI scope claim (Step 10 only, not 10-11) and
  clarify merge commit sync note
- Add tests: non-200 HTTP response, stale cache for getCachedUpdateCheck,
  missing checkedAt, and cache content verification
- Document /api/update-check endpoint and update-check.json cache file
  in CLAUDE.md and docs-web
- Regenerate api.generated.d.ts with UpdateCheckResponse schema

* refactor: simplify update check code

- Deduplicate getCachedUpdateCheck by delegating to readCache
- Extract shared noUpdate fallback object in server route
- Move guard clause outside try block in printUpdateNotice
- Fix cachePath variable scoping in readCache catch block
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