Skip to content

refactor(flow): move the replayer's asset, healing and step-evidence helpers to a mixin, unchanged - #2459

Merged
abrichr merged 6 commits into
mainfrom
refactor/replayer-assets-healing-evidence
Nov 21, 2026
Merged

abrichr merged 6 commits into
mainfrom
refactor/replayer-assets-healing-evidence

Conversation

@abrichr

@abrichr abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member

This is step E3 of the approved monorepo refactor plan (openadapt-internal#277, track E). It moves code and changes no behavior. Stacked on E2 (#2456, approved); only the last change is new.

Three methods move unchanged to the AssetsHealingAndEvidence mixin in openadapt_flow/runtime/replay/evidence.py:

  • _asset_bytes
  • _heal_step
  • _new_step_evidence_key

Replayer inherits the mixin. The move was generated by scripts/extract_mixin.py, the same way as E2. replayer.py keeps every import it had, so no import path is removed.

Size: replayer.py goes from 19,325 to 19,229 lines, and its budget is lowered to match.

Checks:

  • verify_moved_code.py against E2: 3 moved units, no edits, and no test patches to retarget.
  • Strict mypy passes on replayer.py and runtime/replay/ across the whole stack.
  • These tests pass, 3,118 in all: test_import_surface.py, test_import_layers.py, test_fresh_imports.py, test_engine_generality_check.py, and the healing, asset and evidence tests.
  • check_engine_generality.py and ruff are clean.

Collisions: no open PR edits these methods.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 4d5b2e7

Unique versus approved #2456 (4ff6846f): _asset_bytes, _heal_step, and _new_step_evidence_key move AST-identical into AssetsHealingAndEvidence. Replayer inherits QualificationFaultInjection, AssetsHealingAndEvidence and no longer defines those three methods; the two mixins do not overlap. The host stub _AssetsHealingAndEvidenceHost is TYPE_CHECKING only; the runtime mixin base is object. The size-ratchet budget for replayer.py is lowered 19325→19229, which matches the file. No other unique files. I did not merge.

Residual: replayer.py keeps an unused healing as healing_mod import under # noqa: F401 after the move. That does not change behavior.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: 4d5b2e7

@abrichr
abrichr merged commit de6c0bb into main Nov 21, 2026
61 of 62 checks passed
@abrichr
abrichr deleted the refactor/replayer-assets-healing-evidence branch November 21, 2026 13:43
yunusarda-sudo pushed a commit to yunusarda-sudo/OpenAdapt that referenced this pull request Nov 22, 2026
….1.4

Keep OpenAdaptAI#2375's amendment of the OpenAdaptAI#2341 note and this branch's notes side by
side, note the Flow merges since (OpenAdaptAI#2383, OpenAdaptAI#2439, OpenAdaptAI#2451, OpenAdaptAI#2454-OpenAdaptAI#2456, OpenAdaptAI#2459),
and relock packages/flow on openadapt-privacy 1.1.4 (was 1.0.0).
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