Repository navigation
Installed-file record, bounded YAML for inert documents, and upgrading independent packages (#857) - #901
Merged
Conversation
…ackage upgrades (#857) Item 2: extensions add / artifacts add write addon-files.lock.json at the site root (beside package-lock.json, committed with it, outside node_modules and app/): per package its add-on name, kind, recorded spec, lock version, integrity and resolved URL, and the sha256 of every installed file (linked directories recorded as linked). list --strict, artifacts inspect, MCP artifact tools and the new `extensions|artifacts verify [name]` compare the installed files offline (bounded added/removed/changed lists; stale and unrecorded entries are problems). `verify --online` is an explicit network operation: it downloads the lock's resolved tarball, checks the sha512 and compares file by file. remove, upgrade and every rollback keep the record. Item 4: artifact YAML parses under a separate inert-document profile, used by install-time inertness and inspection alike: anchors, aliases and merge keys allowed; tags and directives refused; at most 1024 aliases; recursive aliases refused; expanded size (<= 10x input, <= 16 MiB) and nesting (256) measured before expansion in one linear pass. Project YAML still refuses anchors. Item 6: re-running add <spec> for an installed independent package upgrades it in place through the same gates with full rollback (an extension keeps its declaration, which the new descriptor must still accept). New `extensions|artifacts outdated` reports the newest registry version matching each recorded spec via npm view. `urlcode upgrade` never moves independent packages. Package budget raised with measured numbers in scripts/package-audit.ts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 29, 2026 08:49
This was referenced Sep 29, 2026
jimhoyd
added a commit
that referenced
this pull request
Sep 29, 2026
…together (#903) Main's CI failed the package audit (954811 packed > 949248) because #900 and #901 each measured the core budget on their own branch. Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Sep 29, 2026
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.
Implements #857 items 2, 4 and 6 as the owner decided them.
Item 2: installed-file record
addon-files.lock.json: a new file at the site root, next topackage-lock.json, meant to be committed and reviewed with it. It records each add-on's sha256 per file, plus its spec, version, integrity and resolved URL. Linked directories are recorded as linked. It sits outsideapp/, soprojectSha256is unchanged.add,removeandurlcode upgrade, and included in every rollback.list --strict,artifacts inspect(refused when modified), MCP artifact descriptions, and the newextensions|artifacts verify [name]. Statuses:match,modified(bounded lists of paths),stale,unrecorded,linked,missing.verify --online: explicit and labelled as a network operation. It downloads the lock'sresolvedtarball with bounded size and time, checks the lock sha512, then compares installed files and the record against it using core's own tar reader.added again. The record catches edits made after install, not a package that was malicious when installed.Item 4: bounded YAML for third-party inert documents
inert-yaml.ts, used by install-time inertness checks and by inspection. Project YAML still refuses anchors.<<merge keys.__proto__.Item 6: upgrading independent packages
extensions add <spec>/artifacts add <spec>again upgrades an installed independent package in place, with every gate: descriptor, integrity, ignored scripts, inertness, and the extra-lock-entry check.package.json, both locks andnode_modules.outdated: a newextensions|artifacts outdatedis informational. It runsnpm viewon the recorded spec and says so when offline.urlcode upgradestill never moves independent packages.Evidence (macOS, Node 26): full
npm run verifyafter merging maintest:addons,test:proof,test:proof:authjsandtest:ecosystem.npm run test:packagealso passes.test/addon-files.test.ts(7 tests):--onlineagainst a local http server: match, drift, a tampered tarball, and the server down;outdated.test/inert-yaml.test.ts: a real-world OpenAPI document with anchors is accepted; billion-laughs, tags, recursive aliases, the alias cap and nesting after expansion are refused.Limits:
verify --onlinedoesn't support private registries that need credentials.🤖 Generated with Claude Code