Skip to content

Leave a widget shown in an exhibit out of the obligations an earlier version asked - #7234

Merged
max-sixty merged 2 commits into
mainfrom
agent-a6946ae49c1c830b3
Nov 26, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a6946ae49c1c830b3

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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 took asking from the widget's matches_when alone, and the log fold trusted it.

obligation_registrations now calls the same structure.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, written phase=open then closed, 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 log to source; 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.

This was written by Claude Code on behalf of max-sixty

…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.
@max-sixty
max-sixty merged commit 592a2be into main Nov 26, 2026
6 checks passed
@max-sixty
max-sixty deleted the agent-a6946ae49c1c830b3 branch November 26, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants