Repository navigation
refactor(flow): move the qualification data model to qualification/models.py, re-exported unchanged - #2454
Conversation
…dels.py, re-exported unchanged
Independent adversarial review: APPROVEFrom: Grok Unique work versus main: the qualification data model (42 top-level constants, enums, models and helpers) moves from I compared those 42 definitions to the pre-split No merge from me. |
….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).
This is the first qualification step (F1) of the approved monorepo refactor plan, openadapt-internal#277 (track F). It builds on B2 (#2439) and the
verify_moved_code.pyfix (#2431), both now merged, and removes no functionality.What moves
openadapt_flow/qualification.pybecomes a package:qualification/models.py(1,169 lines). This is the data model, moved unchanged: 42 constants, enums, Pydantic models and the helpers they use, ending just beforeclass QualificationError. Nothing in it depends on the rest of the module.qualification/__init__.py(4,891 lines). This keeps everything else. It re-exports all 42 names, and keeps every import the module had. Imports the remaining code no longer uses are kept with# noqa: F401, so no attribute disappears.Proof that nothing was removed or edited
scripts/verify_moved_code.py --base origin/mainreports 346 moved units, no edited or new function bodies, and no test patch to retarget.vars(openadapt_flow.qualification)before and after: nothing lost, and onlymodelsgained.tests/test_qualification_package.pychecks that each of the 42 moved names is the same object through the old path. It also checks that the old imports work, thatirstill resolvesWorkflow.qualificationto the same class, and thatmodels.pydoesn't import the package.test_import_surface.pypasses. Its regeneration now counts a package's re-exports from its own submodules, so regenerating keeps the moved names.test_import_layers.pypasses (2,218 tests), after moving the one debt row to the new path and rebinding the reviewed baseline hash (merged with main's four B1 rows).openadapt_flow/qualification/. The safety-path mypy step now lists the package directory.Paths updated
qualification.py(5,963) toqualification/__init__.py(4,891). Per ci(ratchet): size budgets never rise; dropping the row of an existing file fails #2430, dropping the row of a removed file is allowed.CODEOWNERSalready coversqualification/.MULTI_SURFACE.md.Collisions
No open PR edits
qualification.py.git merge-treeagainst the heads of #2394, #2410, #2414, #2415, #2411, #2406, #2407, #2412, #2300, #2398, #2382, #2314, #2363 and #2401 adds no conflict. Every conflict listed there already exists against main. The new tests from #2421, #2422, #2424 and #2427 pass on this branch merged with each of them.Full flow suite (local, Python 3.12): 24,576 passed, 114 failed, 12 errors. Every one of those failures also fails on the base commit
12713d970in this environment: missingmcpextra, CDP and Playwright browser tests, the capture recorder, and the serialtx_acidspeed case. The two files that hang in this environment (test_capture_preflight.pyande2e/test_video_capture.py) were left out of both runs.