Repository navigation
Conversation
…ng banner The --break-it rerun used the MockMed `optimistic` fault: the backend rejected the write after the app painted its success banner. That is a fabricated failure and does not match how the quickstart now frames a caught save (#2883, `?fault=partial`). Switch the rerun to the existing `partial` fault: the backend stores the encounter but drops the typed note, the app still closes the form and shows its saved message, and reading the record back shows a blank note. The engine refutes the mined `field_equals` contract on the note and HALTs (RECONCILIATION_REQUIRED), same as before. - tutorial.py: TUTORIAL_BREAK_FAULT = "partial"; BreakItResult gains notes_as_typed (rows whose stored note equals the typed note), read from the store; docstrings and [break-it] lines rewritten. - __main__.py / cli/try_and_measure.py: narrative and --break-it help describe the dropped note; the closing sentence follows the evidence. - demo_proof.py: the run card counts typed notes found, so the pair still shows the difference when the encounter row exists; the Run 2 title is "Stopped: the record is missing the typed note". - tests and cli_surface.json updated (OPENADAPT_WRITE_CLI_SURFACE=1); e2e now asserts 1 encounter row, 0 notes as typed, field_equals in the halt reason. docs/TUTORIAL.md shows the new output. The qualify-accept oracle gate's own unchanged-store fixture is a separate feature and is untouched.
The break-it rewording grew __main__.py 10 lines past its size budget, which failed the smoke job. The narrative now lives in break_it_narrative.py; __main__.py keeps a thin _print_break_it_narrative for the call site and the import surface, and its budget drops to 10346.
Independent adversarial review: APPROVEFrom: Grok The switch of
Commit Generality gate. No engine behavior changed. The new wording lives in Limitations. CI at |
What changes
openadapt-flow tutorial --break-it(andopenadapt-flow demo, which runs the same pair) used MockMed'soptimisticfault: the backend rejected the write after the app painted its success banner. That failure was made up for the demo. This PR switches the rerun to MockMed's existingpartialfault, the same one #2883 uses for the launcher quickstart:The engine refutes the mined
field_equalscontract on the note and HALTs withRECONCILIATION_REQUIRED. No engine, gate, policy or verifier code changed. Only the injected fault and the words describing it changed.Files
tutorial.py:TUTORIAL_BREAK_FAULT = "partial".BreakItResultgainsnotes_as_typed: the number of stored rows whose note equals the typed note, read from the store. Docstrings and the[break-it]lines are rewritten._run_break_it,--break-itand every other public name are unchanged.__main__.py,cli/try_and_measure.py: the narrative and the--break-ithelp text describe the dropped note. The closing sentence is picked from the evidence (encounter present and 0 notes as typed → "note blank").demo_proof.py: the page used to tell the two runs apart byrecords == 0. That count is now 1 for both runs, so the run card counts typed notes found instead (1, then 0), and "records in the store" in Technical details shows the raw row count. The Run 2 title changes from "Stopped: the note never reached the record" to "Stopped: the record is missing the typed note". The new title has no apostrophe because the page HTML-escapes text.tests/fixtures/cli_surface.json: regenerated withOPENADAPT_WRITE_CLI_SURFACE=1on Python 3.12. Only the--break-ithelp text changed. No flag was added or removed.test_cli_tutorial_break_it.py,test_cli_tutorial_next_steps.py,test_demo_proof.pyande2e/test_tutorial_break_it_e2e.pynow expectfault="partial", 1 encounter row, 0 notes as typed, andfield_equalsin the halt reason. A new unit test checks thatnotes_as_typedis counted from the stored rows rather than assumed from the fault. The CLI test asserts that "rejects the write" and "believ…" no longer appear.docs/TUTORIAL.md: new description and real output.packages/desktop/.../flow_bridge.py: one docstring line, in a separatedocs(desktop)commit.Left unchanged on purpose
qualify acceptoracle gate'sunchanged_storebreak-it fixture (qualification_oracle_gate.pyand its schema surface). It is a separate feature. Its tests pass unchanged.optimisticas one scenario among many.Before (origin/main, real run)
After (this branch, real run)
Tests
All runs on macOS, Python 3.12.7, through the shared CPU-slot runner.
Follow-ups (not in this PR)
packages/seal-view/src/lib/sealSummary.mjsmaps halt reasons to plain words and has no pattern forfield_equals … field 'note' is ''. A halted tutorial run emits no receipt, so this code path can't be reached today.?fault=partialbeat) is still open.openadapt quickstart --break-itdelegates to this tutorial for the engine half.