Skip to content

Update notice in the finalize receipt - #223

Merged
grunion-ai merged 3 commits into
mainfrom
claude/update-notice
Nov 8, 2026
Merged

grunion-ai merged 3 commits into
mainfrom
claude/update-notice

Conversation

@grunion-ai

Copy link
Copy Markdown
Owner

What changed

finalize now records in its receipt whether a newer decklet is on main, and prints one line when one is.

Why

Closes #206. Plugin and npx skills installs went stale without anyone noticing. As decided on the issue, the version comes from package.json on main, not git tags: the tags lag (the latest is v0.9.0 while package.json says 0.14.0), and this needs no release-process change.

  • lib/release.mjs:
    • reads version from https://raw.githubusercontent.com/grunion-ai/decklet/main/package.json with curl, under a 4-second limit, the same route bin/archify-sync.mjs uses;
    • caches the answer for 24 hours under $XDG_CACHE_HOME/decklet;
    • reports unavailable instead of failing when offline;
    • never installs anything.
  • The receipt gets update: {installed, available, noticeRequired, source, checkedAt}. DECKLET_NO_UPDATE_CHECK=1 turns it off, and the check never changes ok.
  • The CLI always asks; the finalize() API asks only when passed update, so tests and embedders make no request.
  • SKILL.md Step 6 tells the agent to mention the update once and never install. Two Step 6 items were tightened to stay inside the 7,100-word budget (7,099).
  • The deck stays network-free; only the CLI makes the request.

How it was verified

  • test/release.test.mjs, red before the change: 6 pass. It covers newer, same and older versions; a thrown, non-JSON or version-less fetch; a cache hit within 24 hours making no request and a refetch after; the off switch; and the receipt, with ok decided by the gates alone and no request without update.
  • A live check from this container: installed 0.1.0 read available 0.14.0 from the network and then from the cache. A real finalize CLI run wrote update: {installed: '0.14.0', available: '0.14.0', noticeRequired: false, source: 'network'} and printed FINALIZE PASS.
  • test/skill.test.mjs and test/finalize.test.mjs pass.
  • npm test with Chromium only: before the final budget trim, 634 pass and 20 fail; the trim fixed the budget test, and the 19 left are the same ones that fail on untouched main in this container (17 WebKit cases with no WebKit installed, two sub-pixel toolbar overlaps from container fonts). CI runs all three engines.

This touches the finalize verify-stage area next to #222. I'll merge #222 first and bring main into this branch before merging it.


Generated by Claude Code

lib/release.mjs reads version from package.json on main with curl under
a 4-second limit (git tags lag the releases), caches it for 24 hours
under $XDG_CACHE_HOME/decklet, reports unavailable when offline and
never installs. The finalize CLI adds update {installed, available,
noticeRequired, source} to the receipt and prints one line when main is
ahead; the API checks only when passed update, so tests make no
request. DECKLET_NO_UPDATE_CHECK=1 turns it off. The check never
changes ok. SKILL.md Step 6 says to mention it once.

Closes #206

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiXonXtVxd5FHk4XqMzY8f
# Conflicts:
#	CHANGELOG.md
#	llms.txt
@grunion-ai
grunion-ai merged commit 173807b into main Nov 8, 2026
1 check passed
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.

Update notice in the finalize receipt

2 participants