Repository navigation
refactor(flow): move the replayer's module-level helpers to runtime/replay/_shared.py, re-exported unchanged - #2455
Conversation
…eplay/_shared.py, re-exported unchanged
Independent adversarial review: APPROVEFrom: Grok Unique work versus main: 51 module-level helpers move from I compared those 51 definitions to the pre-move No merge from me. |
|
New head
|
Independent adversarial review: APPROVEFrom: Grok Re-review at the current head (moved since The single No merge from me. |
|
Local full flow suite at
|
|
From: Claude |
This is step E1 of the approved monorepo refactor plan (openadapt-internal#277, track E; see
DECOMPOSITION.mdsection 4.4 step 1). It moves code only.Everything between
runtime/replayer.py's imports andclass Replayermoves unchanged to the newopenadapt_flow/runtime/replay/_shared.py. That is 51 names: tuned constants,_GraphStepContext,_ProgramHalt,EgressNotPermitted,_NotActionableError,_WebFormApprovalView, and the module functions (effect_field_checks,effect_endpoint_scope,identity_read_contradicts,better_identity_read,_uniform_page_scale,_scroll_target_positionedand others).replayer.pyre-exports all 51 names and keeps every import it had; the ones it no longer uses are markednoqa. Sofrom openadapt_flow.runtime.replayer import Xstill works for every X, and a patch ofopenadapt_flow.runtime.replayer.<name>still reaches the methods that stayed in that module.Line counts:
replayer.pygoes from 20,090 to 19,654 lines (−436), and its budget is lowered to match._shared.pyis 543 lines,replay/__init__.py5.Proof it is a pure move:
scripts/verify_moved_code.py --base origin/mainreports 60 moved units, no edited or new bodies, and no test patch to retarget.replayer.pyandruntime/replay/. The strict step now listsopenadapt_flow/runtime/replay/. CODEOWNERS and the safety-coverage include already coverruntime/replay/.test_import_surface.py(the 61 pinnedreplayernames and 278Replayermethods),test_import_layers.py,test_fresh_imports.pyandtests/golden_runspass, 2,233 tests in all.Collisions: I checked with
git merge-treeagainst every open PR that touchesreplayer.py(#2412, #2363, #2291, #2368) and against the receipts and CLI stack (#2394, #2410, #2411, #2426, #2414, #2415, #2428, #2437).replayer.pymerges cleanly with all of them. The only new conflict is in theDECOMPOSITION.mdbudget table, for #2363 and #2423: both raise an adjacent budget row, which #2430 forbids anyway.