Skip to content

fix: bind Teach corrections to halted runs - #108

Merged
abrichr merged 3 commits into
mainfrom
codex/desktop-teach-fix
Aug 8, 2026
Merged

fix: bind Teach corrections to halted runs#108
abrichr merged 3 commits into
mainfrom
codex/desktop-teach-fix

Conversation

@abrichr

@abrichr abrichr commented Aug 8, 2026

Copy link
Copy Markdown
Member

What changed

  • bind each recorded Teach correction to the exact workflow and halted run
  • return the explicit local correction artifact after recording stops
  • pass that artifact to openadapt-flow teach through the required --fix argument
  • reject stale, incomplete, mismatched, or non-local correction artifacts
  • keep the existing local description path by materializing a correction spec
  • avoid compiling a correction recording as an unrelated workflow

Root cause

The Teach screen recorded a correction, but it discarded the stop result. The dispatcher then called FlowBridge.teach without a fix artifact. The bridge made --fix optional even though the Flow CLI requires it. Unit fakes accepted the incomplete method call, so the UI could report a Teach attempt that the real Flow CLI could not execute.

User impact

An operator can now record the corrective action, stop the recording, and submit it. Desktop binds the artifact to the current halted run and sends the exact artifact to Flow. If a newer run exists, Desktop refuses the old correction instead of teaching against stale state.

Validation

  • 860 passed, 6 skipped in the complete Python suite
  • npm run build
  • 70 passed in the frontend suite
  • Ruff passes on all changed Python files
  • the new integration contract uses the real dispatcher, recording controller, storage index, and Flow bridge; it verifies the exact teach ... --fix ... command and stale-run refusal

@abrichr
abrichr marked this pull request as ready for review August 8, 2026 16:09
@abrichr
abrichr merged commit c149db9 into main Aug 8, 2026
17 checks passed
@abrichr
abrichr deleted the codex/desktop-teach-fix branch August 8, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant