Skip to content

feat(hooks): update-available notifier (SessionStart + statusline) + native auto-update docs#209

Merged
SUaDtL merged 3 commits into
mainfrom
feat/update-available-notifier
Jul 2, 2026
Merged

feat(hooks): update-available notifier (SessionStart + statusline) + native auto-update docs#209
SUaDtL merged 3 commits into
mainfrom
feat/update-available-notifier

Conversation

@SUaDtL

@SUaDtL SUaDtL commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Feature: a proactive "update available" notifier for codeArbiter (approach Both — notifier + native-auto-update docs). Spec: .codearbiter/specs/update-available-notifier.md.

What

  • Notifier: when the latest GitHub Release exceeds the installed plugin.json version, surface a one-line codeArbiter: update available X -> Y (run /plugin marketplace update codearbiter) in two surfaces — the SessionStart startup-state block and a compact statusline indicator — both reading the same cache.
  • Off the SessionStart latency: serial git subprocess fan-out and redundant file re-reads #194 hot path: SessionStart/statusline only read a user-global cache (~/.codearbiter/update-state.json); the api.github.com fetch runs in a detached update-refresh.py child, once per day, fail-silent. No synchronous network call is added to the hot path.
  • New: _updatelib.py (version compare, cache, HTTPS-only fetch w/ redirect-downgrade guard, once-daily gate), update-refresh.py (thin detached entry). Stdlib-only (ADR-0004), HTTPS-only (ADR-0003).
  • Docs: README "Staying up to date" section names native /plugin marketplace update codearbiter as the official mechanism, notifier as the nudge. security-controls.md documents the new outbound surface.

Verification

  • 680 hook tests pass (+73 new across _updatelib, session-start, statusline); every acceptance criterion (AC-1..AC-7) maps to tests; py_compile clean; LF.
  • security-reviewer: PASS — 0 critical/high/medium. Verified HTTPS-only (+ redirect-downgrade refusal), no data/secret sent, fail-silent on every path (never crashes SessionStart), no synchronous network on the hot path, safe detached spawn (argv, no shell), atomic user-global cache write. The one LOW (redirect downgrade) is fixed in this branch with tests.

Bumps ca 2.8.3 → 2.8.4.

https://claude.ai/code/session_01PVTCDji6bEuf9SifQ8tfsa

SUaDtL added 3 commits July 2, 2026 14:05
fetch_latest_tag only checked the scheme of the INITIAL url; urllib's default
opener otherwise follows a 3xx transparently, including an https->http
downgrade, without re-applying that check. Install a custom opener whose
HTTPRedirectHandler refuses to build a follow-up request when the redirect
target isn't https:// (defense-in-depth, ADR-0003 posture) — the refusal
surfaces as the same HTTPError urllib raises for an unhandled 3xx, which the
existing broad except already degrades to None (fail-silent, unchanged).

security-reviewer LOW finding on 786c48d.
Version bump + README badge sync for the new SessionStart/statusline
update-notifier; documents its outbound api.github.com surface in
security-controls.md (unauthenticated HTTPS GET, HTTPS-only incl. redirect
guard, fail-silent, off the hot path — ADR-0003/0004).

Claude-Session: https://claude.ai/code/session_01PVTCDji6bEuf9SifQ8tfsa
@SUaDtL
SUaDtL merged commit 98e97d7 into main Jul 2, 2026
23 checks passed
@SUaDtL
SUaDtL deleted the feat/update-available-notifier branch July 2, 2026 18:19
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