Repository navigation
fix(snapshot): declare the calls of each snapshot procedure, read metadata with s3.read - #602
Open
mark1russell7 wants to merge 2 commits into
Open
mark1russell7 wants to merge 2 commits into
mark1russell7 wants to merge 2 commits into
Conversation
…adata with s3.read - s3.read (new): an object into memory with a size limit, and no file. Its effects read s3 and network and write nothing. procedure.new made the files. - snapshot.list, snapshot.diff and snapshot.restore read the metadata with s3.read, not with s3.download (which declares the writes of fs). - Each snapshot procedure declares metadata.calls. checkEffects finds no fault over the snapshot, s3 and git modules. - Tests: s3.read (text, base64, no file, maxBytes, a missing key), the calls of each snapshot procedure against its source, and snapshot.list under a capability without writes. Both snapshot tests fail with the old list and module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
This change is stacked on #600. With #600, the admission skips a nested call only when its caller declares the callee in
metadata.calls. Thesnapshot.*procedures declared nocalls, so each of their nested calls goes through the admission.s3.read(new): it reads an object into memory with a size limit (maxBytes, 64 MiB by default) and writes no file. Its effects reads3andnetworkand write nothing.procedure.new(fix(procedure): procedure.new adds the procedure to the list of definePackage() #601) made its files.snapshot.list,snapshot.diff,snapshot.restore: they read the metadata of a snapshot withs3.read. Before, they useds3.download, which declares the writes offs. A procedure that declares no writes cannot declares3.downloadas a callee.metadata.calls: each of the 5 snapshot procedures declares the procedures that it uses.callssnapshot.creategit.status,git.revParse,git.remote,git.stash.list,s3.upload,s3.multipart.init,s3.multipart.upload,s3.multipart.complete,s3.multipart.abortsnapshot.lists3.list,s3.readsnapshot.restores3.list,s3.read,s3.downloadsnapshot.diffs3.list,s3.read,git.revParse,git.diff,git.stash.listsnapshot.deletes3.list,s3.deleteChecks
checkEffectsover the snapshot, s3 and git modules: 85 procedures, 5 withcalls, 0 faults. The effects test ofmarkexamines the full ecosystem in CI.s3.read: text and base64, no file also with adestPathin a direct call, themaxBytesrefusal, a missing key.callsof each snapshot procedure are equal to the procedure paths in its source.snapshot.liststarts under a capability without writes, and the capability refusess3.download.list.tsandmodule.tsof fix(client): the admission examines each nested call that its caller does not declare #600, the two new snapshot tests fail. With this change, they pass.@procedures/s3(93 passed, 2 skipped) and@procedures/snapshot(23 passed, 1 skipped), the typecheck of both, the API report, the conventions check andste-lint.PROCEDURES.mdandPACKAGES.mdget thes3.readrow and the new counts. CI compares them with the generator.Versions
@procedures/s3: PATCH. A new procedure and new exports, before 1.0.0.@procedures/snapshot: PATCH. A fix of the declarations. The input and the output of each procedure do not change.Merge this change after #600. Then set its base to
main.🤖 Generated with Claude Code