Repository navigation
fix(flow): keep record identifiers in an API step's URLs as run parameters - #1369
Merged
Merged
Conversation
…eters Review of #1269: a save to /save.php?record_id=17 compiled to /save.php, losing the query, while /new.php?record_id=17 stayed literal in the form-fetch URL, so a later run read and wrote record 17. The save URL and the form page URL keep their query. A path segment or query value equal to exactly one input's demonstration value becomes that parameter; the rest is kept as recorded; a value equal to two inputs is refused as ambiguous. A hidden field echoing a URL-bound identifier (an update form's pid) binds to the same parameter. The form page, pre-checks and save must share one origin. The actuator fills the URLs with the run's values, URL-encoded (fill_url). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Third of six fixes from an external review of #1269. Stacked on #1368, because both change
api_proposal.py; it retargets tomainwhen that merges.Bug
A save to
/save.php?record_id=17compiled to/save.php, losing the query./new.php?record_id=17stayed literal in the form-fetch URL. A later run therefore read record 17's form and posted without the identifier.Fix
/app/save.php?record_id={record_id}&mode=edit). The rest is kept as recorded. A value equal to two inputs is refused as ambiguous.pid) binds to the same parameter. Without this, fix(flow): bind API step fields by which step typed them, not by equal values #1368's provenance rule would refuse it, because no step typed it.fill_url: a path segment quoted whole, query values form-encoded).API_TIER.mdis updated.Tests
tests/test_api_proposal_url_identifiers.py(new, 6 tests):record_idin both URLs, and a later run withrecord_id=42reads/app/new.php?record_id=42and posts to/app/save.php?record_id=42;pidechoing the URL id binds as{record_id};fill_urlencodes values and keeps literals.47 pass with the existing API-tier and provenance tests. On the real OpenEMR referral recording the API step is still proposed; its URLs carry no identifiers, so they are unchanged.
Synthetic values only.
🤖 Generated with Claude Code