Repository navigation
Updates 1/3: daily update check on the machine, plannotator update, PLANNOTATOR_UPDATE_CHECK - #1830
Merged
Merged
Conversation
This was referenced Oct 10, 2026
…e, PLANNOTATOR_UPDATE_CHECK
The machine asks GitHub (never the browser) at most once per 24h per data
dir, 6h after a failure, and caches the release and its notes in the data
dir (packages/shared/update-check.ts, vendorable to Pi). Auto-update now
answers from that cache and needs update checks on. New knob
PLANNOTATOR_UPDATE_CHECK / { updateCheck } (default on), allowlisted on
POST /api/config in all six servers. New plannotator update [--check] runs
the same install wrapper as auto-update in the foreground (lock, pinned tag,
remembered install flags). A one-line stderr hint after an interactive
session, at most once a day, TTY only.
…ase-only checks, process test without the built HTML - plannotator update's process test spawns update-command-entry.ts (the same function, no built HTML import), so the test job needs no build. - The POSIX wrapper traps INT/TERM/HUP and the PowerShell wrapper records its result in finally: a Ctrl-C writes exit 130 and releases update.lock at once. runInstallerForeground forwards INT/TERM to the wrapper and finishes on exit, so a wrapper killed outright still releases the lock (abortLaunch). - A failed release fetch gives auto-update's 24h window back (the 6h backoff still bounds requests). - plannotator update asks GitHub only from a release build (0.0.0-dev never). - CLAUDE.md and docs describe only what this change does on its own.
backnotprop
force-pushed
the
feat/updates-check
branch
from
October 11, 2026 00:05
9edd09d to
33c64fd
Compare
1 task
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.
Part 1 of 3 of the owner-approved update notices and updating (design:
.product/approved/plannotator-updates/, owner answers in itsapproval.md). This part is the plumbing; the Inbox button (2/3) and the review-window toast (3/3) are stacked on it.What it does
packages/shared/update-check.ts, node-only, vendorable to Pi).runReleaseCheckasks GitHubreleases/latestat most once per 24h per data dir, claims the attempt inupdate-state.jsonbefore the request (concurrent starts ask once), waits 6h after a failure (never a retry loop), logs failures toupdate.log, and keeps the last known answer. The tag is reduced to a canonicalX.Y.Z. Release notes (## What's New in→## Install / Update, 64 KB cap, plus the "Missed recent releases?" table) are kept inupdate-notes/<version>.json. User agentplannotator-update-check, no version in it.registerCliSession, on the same unref'd, never-awaited tick as auto-update. No check in dev/source runs.PLANNOTATOR_UPDATE_CHECK/{ "updateCheck": false }: env > config > default on (resolveUpdateCheck). Allowlisted onPOST /api/configin all six servers (Bun + Pi);getServerConfigsendsupdateCheck+updateCheckEnv. Off = no automatic request, no notice, no auto-update.runAutoUpdateCheckgainschecks-off), so the machine makes one request per day total.plannotator update [--check](apps/hook/server/update-command.ts): forces a check, then runs the same wrapper as auto-update in the foreground (beginManualUpdate+runInstallerForeground:update.lock, pinned tag, rememberedinstall-flags.json, output to the terminal andupdate.log,update-result.json). No 24h window, no open-sessions gate. Refuses dev builds and unmanaged binaries (prints the install command with the remembered flags). Exit 0 / 1 / 2.startManualUpdate: the detached "Update now" used by parts 2 and 3; a second press while one runs getslocked.review/annotate/last/archivesession, TTY only, never with--json/--hook/ inside an agent (CLAUDECODE,PLANNOTATOR_SESSION_TAG), at most once a day, from the cache.plannotator --versionunchanged.PLANNOTATOR_UPDATE_API_URLandPLANNOTATOR_INSTALL_SCRIPT_URL(https or loopback http only), used by the process test.plannotatorskill (+ freshness test passes),uninstall --purgeremovesupdate-notes/.Tests
packages/shared/update-check.test.ts: 24h throttle, 6h retry after failure, concurrent claim, off = no request, forced check, junk tags, notes extraction + cap, advert, install commands per platform, hint once a day, knob precedence.packages/server/auto-update.test.ts: existing suite unchanged and passing, pluschecks-off, answering from the shared cache, Update now runs the wrapper once (lock), unmanaged / dev / up-to-date refusals.apps/hook/server/update-command.test.ts: outcomes over seams, and the real CLI as a process with a fake GitHub API and fakeinstall.shon loopback (temp HOME whose~/.local/bin/plannotatorlinks to bun, so it counts as managed): installer argv carries--version v9.9.9 --non-interactive --skip-codex, lock released, failure exits 1,--checkinstalls nothing.packages/server/update-check-config.test.ts: the knob throughPOST /api/configon plan / review / annotate.bun run typecheckpasses.