Repository navigation
Refuse a snapshot of a revision saved before a protocol bump - #3870
Merged
Merged
Conversation
capture_page_snapshot now refuses a selected revision this Leaf cannot serve (incompatible_revision), so page picture and page export on such a revision say "Revision N was saved at page protocol X". Before, picture's preview server refused with the page's foreign-layer advice to re-vendor, which the page had already had, and export wrote the file anyway. page_endpoint no longer judges a snapshot, since its capture did. Behavior change: the re-vendor revision test also asserts picture and export refuse on the older revision. Refs #2415 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 25, 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.
leaf page pictureon a drawing made on a revision saved before a protocol bump now refuses with that revision's ownforeign-revisionwords ("Revision 1 was saved at page protocol 22, and this Leaf speaks protocol 23…"), the words its address gets from a page server. So doesleaf page exportof a version stamped on such a revision, which before wrote the file without complaint.The triage expected
page pictureto time out on the server's 409. Reproducing it showed something else: the preview server refused before it bound, with the page'sforeign-layerwords, "Update the page's Leaf runtime withleaf page init". The page had already been re-vendored, so an agent following that advice would re-vendor again and get the same refusal. The cause is inhttp.page_endpoint, which judged a snapshot by askingincompatible_layerof the frozen revision's registry, as if that registry were the page's layer. Export never asked at all.Every snapshot reader (the render gate's preview server behind
page pictureandpage check --render, export, and the website's captures) runs this Leaf's runtime against the revision the snapshot froze. Socapture_page_snapshotnow asksincompatible_revisionof the revision it selects and raises the refusal, andpage_endpointno longer checks a snapshot, since its capture already did. That fixes picture and export in one place rather than inpreview_serveralone, as the triage proposed.Behavior change:
test_a_revision_saved_before_a_re_vendor_neither_opens_nor_takes_inputnow also asserts thatpage pictureandpage exporton the older revision fail with theforeign-revisionwords and write nothing. Before the fix, picture gave theforeign-layeradvice and export exited 0.Refs #2415