Repository navigation
Store backup CLI, and extension targets in descriptors so recipes stop over-claiming (#859) - #869
Merged
Merged
Conversation
…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]>
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.
Fixes #859 items 3 and 4.
Extension targets in descriptors (item 4)
ExtensionDefinition.targetsis now required.defineExtensionvalidates it, and all nine first-party extensions declare it.composeHostrefuses a registration whose targets differ from its definition's.urlcode.jsondescriptors and the release catalog carrytargets, alongside Artifact inspection: $id bases, $ref in data, documents in the release catalog (#857) #864'sdocumentsfor artifacts.refused. A descriptor can only narrow support, never widen it.store-crud,protected-downloadandexamples/extensionsnow show aws and vercel asrefused, 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.urlcode validateandurlcode capabilitieswithout--host-filedo not use these targets yet (validate/capabilities without --host-file should use descriptors' declared targets #867).urlcode-store backup(item 3)backup(), safe beside the running server.application_id,user_version,integrity_check), fsyncs it andlink()s it into place.Evidence (macOS, Node 26), on current main with #862, #864 and #865
npm run verifypasses: root 1123 tests, store 123, plustest:addonsandtest:proof.npm run test:packagepasses.dist/backup.js.Limits
app/is not refused; the docs say to keep backups outside it.🤖 Generated with Claude Code