Skip to content

Store backup CLI, and extension targets in descriptors so recipes stop over-claiming (#859) - #869

Merged
jimhoyd merged 1 commit into
mainfrom
claude/store-backup-and-targets
Sep 28, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/store-backup-and-targets

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Fixes #859 items 3 and 4.

Extension targets in descriptors (item 4)

  • Breaking: ExtensionDefinition.targets is now required. defineExtension validates it, and all nine first-party extensions declare it.
  • composeHost refuses a registration whose targets differ from its definition's.
  • The generated urlcode.json descriptors and the release catalog carry targets, alongside Artifact inspection: $id bases, $ref in data, documents in the release catalog (#857) #864's documents for artifacts.
  • Capability preflight: with no host file, an extension used on a target it does not declare is refused. A descriptor can only narrow support, never widen it.
  • Recipe metadata: store-crud, protected-download and examples/extensions now show aws and vercel as refused, and a new test fails for any recipe claiming a target one of its extensions refuses. The feature planner falls back to the release catalog.
  • Follow-up: urlcode validate and urlcode capabilities without --host-file do not use these targets yet (validate/capabilities without --host-file should use descriptors' declared targets #867).

urlcode-store backup (item 3)

  • Online backup with node:sqlite backup(), safe beside the running server.
  • The source must be a private, non-symlinked store database with a supported schema version. Refused: an existing destination and the source path itself.
  • Writes a 0600 temp copy, checks it (application_id, user_version, integrity_check), fsyncs it and link()s it into place.
  • Restore stays manual and is documented.
  • Docs: STORE, RESILIENCE, OPERATIONS, the store README and CHANGELOG.

Evidence (macOS, Node 26), on current main with #862, #864 and #865

Limits

  • A backup destination inside app/ is not refused; the docs say to keep backups outside it.
  • Windows and Linux are left to CI.

🤖 Generated with Claude Code

…ors (#859)

Recipe target metadata (#859 item 4): every extension definition now
declares `targets` (node, aws, vercel). `npm run build:addons` writes them
into urlcode.json and the release add-on catalog, composeHost refuses a
registration whose targets differ from the definition, and the capability
preflight takes the descriptors' declared targets: without a host file an
extension requirement on a target the extension does not declare is
`refused`, never `conditional`. Recipe/example metadata (npm run check,
deriveMetadata) and the feature planner read them, so store-crud,
protected-download and the extensions example are now refused on aws and
vercel. A new test fails for any recipe claiming a target one of its
extensions refuses.

Store backup (#859 item 3): `urlcode-store backup --database <file>
--destination <file>` takes a consistent online copy with node:sqlite's
backup(), safe beside the running server. It refuses an existing
destination and a source that is not a private store database, writes the
copy 0600 in a private temporary directory, verifies application_id,
user_version and integrity_check, then links it into place. Exported as
backupStore. Docs (STORE, RESILIENCE, OPERATIONS, store README) point at
the command instead of "use SQLite's backup API".

BREAKING CHANGE: an extension definition and its urlcode.json descriptor
must declare `targets`; descriptors without them are refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 28, 2026 22:06
@jimhoyd
jimhoyd merged commit d8f8874 into main Sep 28, 2026
38 checks passed
@jimhoyd
jimhoyd deleted the claude/store-backup-and-targets branch September 28, 2026 22:15
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.

Store on SQLite follow-ups: sorted lists in SQL, multi-process, backup CLI, recipe targets, throughput

1 participant