Repository navigation
flow: classify common local edits from the recording, on strict evidence - #1366
Merged
Merged
Conversation
Draft for the founder; not for merging until decided (docs/design/LOCAL_EDIT_CLASSIFICATION.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eld and a dialog's dismiss Every pattern now needs network capture showing no write in the step's window, URL, title and page count unchanged, and equal record-store snapshots when the recorder took them. Control+a no longer classifies without capture. New patterns: confirm_entry (Enter after typing into a text field; the field_value check reads the text field's exact value) and dismiss_dialog (an informational dialog's dismiss, e.g. MockMed's What's New 'Continue to tasks'; checks the page is unchanged and the label is gone). A dismiss is reconsidered only when 'continue' or 'next' are its only write words and its risk is still the per-step keyword inference, so effect mining no longer attaches a placeholder record_written to it (#1377). Fixes the CI crash on a structural target with no frame_path and the mypy index error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
marked this pull request as ready for review
October 19, 2026 23:15
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.
Approved by the founder on 2026-10-19, with a strict rule. Design:
packages/flow/docs/design/LOCAL_EDIT_CLASSIFICATION.md.Why
A compiled program flags every special key and every unlabelled or navigation-shaped click for a person. On the OpenEMR referral that is 8 × Control+a before typing, 4 × Enter after typing a dropdown option, and an in-form tab click. On MockMed's What's New change, the "Continue to tasks" dismiss is treated as a write, so effect mining gives it a placeholder
record_writtenand admission refuses every recording (#1377).The rule
The compiler classifies a step only when both of these hold:
Anything else goes to a person, as today. Write-shaped context and
risk_overridesstill win. The duplicate-prevention key is untouched.select_all: Control+a / Meta+alocal_edit: focus still on that field; URL, title and page count unchangedconfirm_option: Enter in a dropdownlocal_edit+field_value(the dropdown shows this run's value)confirm_entry: Enter in a text fieldlocal_edit+field_value(the field's value matches exactly)in_form_tabtab, or abuttonwhose only mined check is a region change; next acting step in the same framelocal_editdismiss_dialogbutton/linklabelled only "Continue", "Continue to …", "Next", "Close", "OK", "Got it", "Dismiss", "Not now", "Maybe later" or "Skip for now"local_edit+text_absentof the labelcontinueandnextare write words, so a dismiss starts irreversible. It is reconsidered only when those are its only write words and its risk is still the per-step keyword inference. A click that a later rule made irreversible is never reconsidered: the click that confirms a dialog, or an icon-only click presumed to save. "Continue to checkout" and "Continue and save" stay irreversible.local edit:explanation and its checks.entity_navigation.clinical-write'sprohibit_unarmed_clicksstill applies to it.Postcondition's new fields are left out when unset, so existing bundles serialize byte-for-byte as before.frame_path, and a mypy index error.Limit: network capture is opt-in (
record --capture-network). A recording made without it classifies nothing. To clear #1377 in the silent-saves arm, the agent has to record with capture on.OpenEMR referral, re-admitted offline (main merged + this PR)
These counts are the same under no profile, Standard and Regulated.
step_007(Control+a in Last Name). OpenEMR's backgroundPOST /library/ajax/execute_background_services.phplanded in its window.step_015(the Contact tab) is unarmed underclinical-write.step_039is unarmed and has no identity contract or record check on its GUI path.step_039andstep_040have no duplicate-prevention key, which stays a person's choice.Tests
tests/test_local_edit_classification.py, 45 tests. Every case has a positive test and a test where a write request was sent, which must refuse:record_writtenand the save keeps its own.Also covered:
🤖 Generated with Claude Code