feat(status): surface update availability in mcpproxy status + dedupe startup update log#798
Merged
Merged
Conversation
… startup update log First slice of specs/079-upgrade-nudge US1 (FR-003, FR-004): make the existing background update check visible where users actually look. ## Changes - mcpproxy status: Version line now mirrors doctor's presentation — "vX (update available: vY — <release URL>)" when behind, "(latest)" after a successful check confirms currency, and a plain version when the check failed or has not completed (quiet on failure, FR-020). - mcpproxy status -o json/yaml: new optional "update" object (available, latest_version, release_url, check_error) extracted from the daemon's GET /api/v1/info payload — no second check pipeline (FR-001); check_error is retained in machine output for diagnostics. - internal/updatecheck: the "Update available" zap Info line is now announced exactly once per detected latest version per process (dedupe by version); repeat 4h ticks for the same version log at Debug only, so startup gets one clear line without timer spam. - docs/cli/status-command.md: document the update annotation and the JSON update field. ## Assumptions (zero-interruption policy) - Human output stays silent on check_error / not-yet-checked rather than showing an error state; JSON keeps check_error for diagnostics (per FR-019/FR-020 machine-readable-still-reports-facts). - "(latest)" is only shown when latest_version is non-empty, i.e. a successful check actually confirmed currency. - No config block, channel detection, delta computation, or Web UI banner in this slice — later 079 slices. ## Testing - New cmd/mcpproxy/status_update_test.go: suffix rendering table, table output, JSON contract (present/omitted), info-payload extraction incl. check_error. - New checker tests with zap observer: once-per-version Info dedupe incl. error+recovery, re-announce on newer version, silent when current. - go build ./cmd/mcpproxy; go test -race ./internal/updatecheck/... ./cmd/mcpproxy/...; golangci-lint v2 (.github/.golangci.yml): clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… mark FR-002 delta follow-up Review follow-ups on the US1 status slice (specs/079-upgrade-nudge): - StatusUpdateInfo now carries checked_at (RFC 3339 string, staleness signal for consumers of `status -o json`) and is_prerelease, so it is an accurate mirror of the /api/v1/info update object as the code comment and docs claim (FR-019/FR-021). Extraction + JSON wire-format tests extended; docs example updated. - Added explicit TODO(spec-079/FR-002) markers at the two surfaces that will grow the "N releases / M weeks behind" delta (statusVersionSuffix and the checker's one-shot Info log). The delta needs the release list + publish dates, which the checker does not fetch yet — owned by a later 079 slice, intentionally not in this one. - FR-004 once-per-version (vs once-per-process) Info announce is kept as-is: the operative clause is "MUST NOT repeatedly log the same availability on a timer", and per-version re-announce matches the Web UI banner's per-version dismissal semantics (FR-005); a genuinely newer release is new information. Locked in by checker_test.go. Testing: go test -race ./internal/updatecheck/... ./cmd/mcpproxy/...; golangci-lint v2 (.github/.golangci.yml) on touched packages: clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying mcpproxy-docs with
|
| Latest commit: |
fce24ab
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://318fd6fd.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://feat-079-status-update-info.mcpproxy-docs.pages.dev |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 28585872934 --repo smart-mcp-proxy/mcpproxy-go
|
Dumbris
added a commit
that referenced
this pull request
Jul 2, 2026
…ne, connect-trust/upgrade-nudge progress (#803) check-github now passes with 0 errors: scanner-simplification epic complete (#786/#792/#793/#794 incl. deep-scan trust fixes + docs sweep); connect-trust US1 preview (#802) + backup visibility (#799) done; upgrade-nudge status/log slice (#798) split out as done with the banner+config remainder tracked separately; telemetry machine_id client (#796) and hygiene check-github (#800) done. Remaining warnings are the known windows-tray no-PR-evidence items. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Spec 079 (Upgrade Awareness & Guided Update) targets the ~60% of active installs running pre-v0.40 builds that never learn a newer version exists. This PR is a deliberate first slice of US1 (universal, non-intrusive upgrade awareness): it surfaces the existing background update-check result in
mcpproxy status— the command far-behind users actually run — and stops the startup log from re-announcing the same version every 4h tick.What this slice does NOT include (follow-ups within spec 079):
update_check.*config knobs / CI-quiet semantics (US3)Implementation
cmd/mcpproxy/status_cmd.go: newStatusUpdateInfostruct (available,latest_version,release_url,checked_at,is_prerelease,check_error) mirroringInfoResponseUpdate.extractStatusUpdate()pulls it from the daemon'sGET /api/v1/infopayload — single source of truth, no second GitHub call (FR-001).statusVersionSuffix()renders the Version line exactly likedoctor:v0.45.0 (update available: v0.46.0 — <release URL>)when behind,(latest)when a successful check confirmed currency, and nothing whencheck_erroris set or no check has completed. JSON/YAML output gains an optionalupdateobject (omitted when the daemon reports none).internal/updatecheck/checker.go: the existing "Update available" zap Info line fired on every successful 4h check while behind. AddedannouncedVersiondedupe so each latest version is announced exactly once (US1 scenario 2: "exactly one informational log line ... does not nag repeatedly for the same version").docs/cli/status-command.md: documented the new output.TDD: failing tests written and confirmed red before implementation (
cmd/mcpproxy/status_update_test.go,internal/updatecheck/checker_test.go).Codex review
Reviewed by codex; findings applied in
fce24ab4:updateobject was missingchecked_at/is_prereleasethat/api/v1/infocarries — now mirrored 1:1.Verification
Live end-to-end on this branch (HEAD
fce24ab4), daemon built asv0.40.0:-X main.versionalone is insufficient — the checker readsinternal/httpapi.buildVersion(internal/server/server.gort.SetVersion(httpapi.GetBuildVersion())), so both ldflags were set, matching the Makefile.mcpproxy statusshowsv0.40.0 (update available: vX.Y.Z — <release URL>)and JSON output carries theupdateobject; startup log announces the update exactly once, with no repeat on subsequent check ticks for the same version.sun_pathlimit rejects long data-dir paths (bind: invalid argument) — used a short data dir for the live run.go testfor the touched packages passes.Part of specs/079-upgrade-nudge.
🤖 Generated with Claude Code