Repository navigation
Leave a widget shown in an exhibit out of the obligations an earlier version asked - #7234
Merged
Merged
Conversation
…n an exhibit A user whose page once showed a widget inside an exhibit, such as an `lf-options` in an `lf-sample`, and then moved it out already settled, saw a finished obligation for it on their list (`done`, `dropped`), though the widget never asked them anything. Reading the page with only the later version listed nothing. The current version's fold, the thread reader and the question check each leave out a widget an exhibit shows (`structure.shown_in`); the compact registration a revision keeps for the history scan did not. It took `asking` from the widget's `awaits.when` alone, and its `triggers`, the value verbs whose writes could have made it ask, likewise, so a write to a widget an interactive exhibit shows, a demonstration, could register a request too. `obligation_registrations` now applies `shown_in` to both: a widget an exhibit shows registers as one that neither asks nor is asked by a write. It keeps its registration, so the scan still walks on to earlier versions where it stood outside and asked, as it does past any version where a widget doesn't ask. The tests read the reported case (no events; `lf-options#choice` in an exhibit in revision 1, outside and settled in revision 2) and the write path (a widget in an interactive exhibit written open and closed, then moved out), both of which listed a finished obligation before.
leaf-agent
approved these changes
Nov 26, 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.
A page that showed a widget inside an exhibit (such as an
lf-sample), then later moved it out already settled, listed a finished obligation (done,dropped) for a widget that never asked the user anything. The reading of the current version, the thread reader and the question check all leave a shown widget out, but the reader of earlier versions tookaskingfrom the widget'smatches_whenalone, and the log fold trusted it.obligation_registrationsnow calls the samestructure.shown_in, so the historical reader applies the same rule as the others with no fourth copy of it. The event triggers needed it too: a widget shown in an interactive exhibit, writtenphase=openthenclosed, and later moved out not ready, also listed a finished obligation. A shown widget still gets a registration, so the history scan keeps walking back to versions where it stood outside and did ask.Codex found this while reviewing #7224, which moved the obligation sources from
logtosource; the bug predates the move.Tests: two regression tests in
tests/model/test_obligations.py, the reported case and the write path, each failing before the fix;lint-imports, pre-commit, and 1,161 covering tests.