Skip to content

feat(updates): core logic for update notifications (off by default, no behaviour change) - #105

Merged
vibesoftwarecoder merged 5 commits into
masterfrom
feat/update-check-core
Oct 9, 2026
Merged

vibesoftwarecoder merged 5 commits into
masterfrom
feat/update-check-core

Conversation

@vibesoftwarecoder

Copy link
Copy Markdown
Owner

Steps 1 to 5 of the update-notification design. Pure logic, options and tests. Nothing is registered, no endpoint, no dashboard change, no network call.

What is in it

  • UpdateCheckEnabled (default false, shipped false in appsettings.json) and UpdateCheckIntervalHours (12, clamped 1..168). The API host and repository names are constants, not settings.
  • ReleaseVersion / ReleaseSelector: closed grammar per component, numeric tuple comparison (0.6.9 < 0.6.19, ms9 < ms10), +build ignored, never throws.
  • GitHubReleaseClient: generic User-Agent, If-None-Match, no Authorization or cookies, manual redirects to api.github.com only (max 3), 10 s timeout, 2 MB cap, rate-limit handling. Every failure is a recorded result.
  • UpdateStateStore: update-check.json, atomic write, SYSTEM+Administrators only, a bad file loads as empty.
  • Installed-version detectors: MultiSeat from its assembly; ApolloVibe by marker, then SHA-256 of sunshine.exe against release notes, then source commit. The PE version is never used as a release version.

Differences from the design (see commit messages)

  • Enum values are named explicitly (upToDate, marker-modified, ...) because the API's enum converter would otherwise emit PascalCase.
  • A refuted release.json marker yields to an exact release-hash or commit match; marker-modified is the fallback.
  • Redirects are limited to api.github.com /repos and /repositories.

Tests: 411 new, using real ApolloVibe ms3 to ms6 release notes and a real releases response as fixtures. Each group was mutation-checked. Full suite 1288 passed, 18 skipped (baseline 877 / 18).

Needs a live host: TLS and DNS from SYSTEM, proxy, hashing the locked sunshine.exe.

🤖 Generated with Claude Code

vibesoftwarecoder and others added 5 commits October 9, 2026 10:26
…urs options

Adds the two options for the planned update notifications, the constants for the
GitHub API host and the three repositories (constants on purpose, not settings),
and ships "UpdateCheckEnabled": false in appsettings.json. Nothing reads them yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…notes hash parser

Pure logic for the update check, with tests and real release-note fixtures:
- ReleaseVersion: closed grammar per component, numeric tuples (so 0.6.9 < 0.6.19 and
  -ms9 < -ms10), +build ignored, overflow-safe, never throws on garbage.
- ReleaseSelector: drops drafts, pre-releases and tags outside the grammar, picks the
  highest version, and classifies installed against latest (including "ahead").
- ApolloHashTable: reads the sunshine.exe SHA-256 from release notes, anchored on the
  file name so the zip hash in the same notes is never taken.
- The result model, whose JSON matches the design (camelCase status names, kebab-case
  installed.source).

Not wired to anything: no service, endpoint or network call.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…throws none

GET api.github.com/repos/vibesoftwarecoder/{repo}/releases?per_page=30 with a generic
User-Agent, If-None-Match from the stored ETag, no Authorization and no cookies. Manual
redirects (at most 3, only to api.github.com /repos or /repositories), 10 s timeout,
2 MB body cap, rate-limit handling, strict UTF-8 and JSON handling. Takes an injected
HttpClient; nothing creates or starts it yet. Tests use a fake handler and open no sockets.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…th itself

Per-repo ETag, check time, parsed candidates, baseline, backoff and last error, plus the
installed sunshine.exe hash cache. Written with AtomicFile and restricted to SYSTEM and
Administrators; a corrupt, wrong-type, oversized or future-schema file loads as empty.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
MultiSeat from the running assembly's informational version. ApolloVibe in order: a
release.json marker whose hash matches the real sunshine.exe, the SHA-256 of sunshine.exe
against the release notes, the PE commit against a release's full-SHA target, else
unknown or not installed. The exe is opened with FileShare.ReadWrite|Delete and the hash
is cached by path, size and mtime. A commit match is labelled and never reported as the
release; the PE 2026.6.1 is never used as a version.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vibesoftwarecoder
vibesoftwarecoder merged commit 6e228c1 into master Oct 9, 2026
3 checks passed
@vibesoftwarecoder
vibesoftwarecoder deleted the feat/update-check-core branch October 20, 2026 18:14
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