Repository navigation
fix(flow): refuse an API step whose span also wrote - #1370
Merged
Merged
Conversation
Review of #1269: an earlier POST inside the span (for example /reserve.php) was only listed in other_writes_seen, and the API step still replaced the whole span, so a run skipped that write. A proposal is refused when any POST, PUT, PATCH or DELETE other than the save was sent while the replaced steps ran. Admission refuses such a binding, and a binding admitted before this rule runs on the GUI with the reason. On the OpenEMR referral this refuses the API step: OpenEMR's background POST /library/ajax/execute_background_services.php lands inside the span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
…se-other-writes # Conflicts: # packages/flow/openadapt_flow/runtime/replayer.py
Member
Author
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.
Fourth of six fixes from an external review of #1269. Stacked on #1369 (then #1368), because all three change
api_proposal.py.Bug
An earlier write inside the span (for example
POST /reserve.php) was only listed inother_writes_seen, and the API step still replaced the whole span. A run therefore skipped that write.Fix
POST,PUT,PATCHorDELETEother than the save was sent while the replaced steps ran. The reason names the write.api admitrefuses a binding that lists other writes.api_fallbacknames the write.Impact on the OpenEMR referral (needs a decision)
This refuses the referral's API step. OpenEMR's background
POST /library/ajax/execute_background_services.phplands inside the span:That is the rule as asked, and it fails closed. If background polls like this should be allowed, a person would have to declare a recorded write as unrelated at admission. That is a follow-up for the founder; it isn't in this PR.
Tests
tests/test_api_proposal_other_writes.py(new, 7 tests):/reserve.phpcase forPOST,PUT,DELETEandPATCH;54 pass with the API-tier, provenance and URL tests.
Synthetic values only.
🤖 Generated with Claude Code