Repository navigation
fix: read the drawn-visuals digest from the held revision reading in page state - #7181
Merged
Merged
Conversation
`leaf page state` and a thread's part check passed `drawn_visuals` the digest from `read_artifact`, which reads the revision's document again to build a bundle descriptor. The held revision reading already carries the same digest (`RevisionReading.digest`, from the manifest), so a state read opens the active revision's document once again, as `test_a_state_read_never_materializes_a_revision_bundle` requires. Closes #7176
leaf-agent
commented
Nov 25, 2026
leaf-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
The same digest-only read is left in _live in src/leaf/handover_pass.py, return revision, read_artifact(page_dir, revision).digest. It builds the whole bundle descriptor, the active revision's HTML included, only to get the manifest digest that read_revision(page_dir, revision).digest already holds. _live runs on every handover check and on _unread, so this is the one remaining caller of the pattern this PR removes. I'll push the same change there.
… the handover pass `_live` read the whole bundle descriptor, the active revision's HTML included, only for the manifest digest the held revision reading already carries. Nothing changes in what the handover pass reports.
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.
Since #7109,
leaf page stateopened the active revision's document twice: it got the render reading's digest fromread_artifact, which builds a bundle descriptor and reads the document again even though the state read had already read it. The held revision reading carries the same digest (RevisionReading.digest, computed from the manifest, documented asRevisionArtifact.digest), sopage_state, the thread part check inthread.pyand the handover pass's_liveinhandover_pass.py, which made the same digest-only call, now take it fromread_revision. Nothing changes in what any of them reports.tests/journeys/test_interact_document.py::test_a_state_read_never_materializes_a_revision_bundlefails onmain(assert 2 == 1at line 781) and passes with this change;tests/model/test_interact_anchors.pyandtests/model/test_handover_pass.pypass too.Closes #7176 — automated triage