Skip to content

Python: reactively() yields (response, aborted) and never raises - #204

Merged
aviator-app[bot] merged 1 commit into
mainfrom
riley/reactive-reader-unification
Sep 30, 2026
Merged

aviator-app[bot] merged 1 commit into
mainfrom
riley/reactive-reader-unification

Conversation

@rileysdev

@rileysdev rileysdev commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

In Python .reactively() now yield a (response, aborted) and keep reading across errors instead of raising the method's Aborted and stopping. The caller decides whether to continue, break, or raise aborted. This is the first half of making reactive reads consistent across clients (which will replace #185); the web client will follow in a separate PR, React already behaves this way.

@aviator-app

aviator-app Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator (commit 9316156).


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@rileysdev
rileysdev force-pushed the riley/reactive-reader-unification branch from febb032 to 580bffa Compare September 29, 2026 23:25
@rileysdev
rileysdev marked this pull request as ready for review September 29, 2026 23:39
@rileysdev
rileysdev requested a review from benh September 29, 2026 23:39
@rileysdev rileysdev self-assigned this Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Code review

Found 2 issues. Both are Python .reactively() loops that this PR didn't update. Neither line is in the diff, so I'm posting them here rather than inline.

  1. tests/reboot/reactivity_test.py still treats each item as a bare response. greeter.reactively().GetWholeState(context) now yields (response, aborted) tuples, so greeter_state.adjective raises AttributeError on the first item. That happens inside the background _do() task, so _accumulated_adjective is never set and reactivity_test_py hangs until it times out instead of failing. Fix: async for greeter_state, aborted in ..., then handle aborted before using greeter_state.

async def _do():
async for greeter_state in greeter.reactively(
).GetWholeState(context):
self._accumulated_adjectives.append(greeter_state.adjective)
self._accumulated_adjective.set()

  1. tests/reboot/dashboard/code_watcher_tests.py _code_changes was missed. The PR updates the three Dashboard...reactively().Get loops in this file but not the OrderedMap...reactively().ReverseRange loop in _code_changes. response is now a tuple, so response.entries raises AttributeError, which breaks every test that awaits _code_changes (test_a_servicer_found_is_history, test_a_method_edited_is_history, test_a_change_made_while_the_dashboard_was_down_is_history, test_a_servicer_removed_is_history). Fix: use the same pattern as the other loops, async for response, aborted in ..., then if aborted is not None: raise aborted and assert response is not None.

context = self.rbt.create_external_context(name=self.id())
async for response in OrderedMap.ref(CHANGELOG_ID).reactively(
).ReverseRange(context, limit=100):
changes = [
Change.FromString(entry.bytes) for entry in response.entries
]

🤖 Generated with Claude Code

Comment thread reboot/demos/fig/backend/src/many_readers.py
Comment thread reboot/demos/fig/backend/src/many_readers.py
Comment thread reboot/templates/reboot.py.j2
@aviator-app

aviator-app Bot commented Sep 30, 2026

Copy link
Copy Markdown

This pull request failed to merge: PR has a blocked label, remove to re-queue. After you have resolved the problem, you should remove the blocked pull request label from this PR and then try to re-queue the PR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@rileysdev
rileysdev force-pushed the riley/reactive-reader-unification branch from 580bffa to fa6cc67 Compare September 30, 2026 00:31
@aviator-app
aviator-app Bot merged commit 9316156 into main Sep 30, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants