Repository navigation
Move Apps evaluation orchestration into workflows - #643
zengchuang-hw wants to merge 1 commit into
Conversation
Agent-assisted-by: Codex / unknown [effort=unknown] (author) Signed-off-by: zengchuang-hw <215986001+zengchuang-hw@users.noreply.github.com>
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Reviewed base c159b9cad8591a41b2bebd0cb7a7ec9ee21800e3 and head 2740c2538ef64932ee92620cf71ac52c4b986bfe (full diff, diffComplete: true). The seeded state has no formal review on this head, so this is the first review.
The move itself is faithful. src/inferrsi/apps/api.py now only delegates; src/inferrsi/apps/workflows/evaluation.py carries the orchestration verbatim (_prepare_request, _execute_saved, _port_error, _assess_record, _bind_archived_execution all byte-identical modulo relative import depth and the Assessor → Callable[..., dict] annotation on _assess_record); apps/workflows/__init__.py is still a docstring only, so from .workflows import evaluation introduces no cycle; EvaluationPort.__init__'s output_root_for matches evaluation.execution_for(output_root_for=...); and both monkeypatch sites were retargeted to the new module.
Blocker — the new module is not registered in the migration inventory
docs/apps-module-migrations.json:src/inferrsi/apps/workflows/evaluation.pyimports four migration-registered canonical modules —inferrsi.apps.storage.archive,inferrsi.apps.storage.artifact_reader,inferrsi.apps.storage.result,inferrsi.apps.handoff.bridge— but is absent from each entry'sconsumerslist (theinferrsi.apps.archiveentry's list at lines 18–49,inferrsi.apps.artifact_readerat 59–80,inferrsi.apps.resultat 94–111,inferrsi.apps.bridgeat 145–164; onlysrc/inferrsi/apps/api.pyis listed there).- Failing gate:
tests/test_apps_module_migrations.py:165-188, specifically the registration assert at :188 — every scanned file (undersrc/,tests/,tools/,plugins/) that resolves a canonical entry target must appear in that entry'sconsumers. Relative-import resolution (_from_base, packageinferrsi.apps.workflows) yields exactly those four targets, so this asserts four times:('src/inferrsi/apps/workflows/evaluation.py', 'inferrsi.apps.storage.archive'),… .storage.artifact_reader,… .storage.result,… .handoff.bridge. - Expected correction: add
"src/inferrsi/apps/workflows/evaluation.py"to those fourconsumerslists in the same PR. The existence check at :174 then passes, and the remaining stalesrc/inferrsi/apps/api.pyentries are harmless (the test only requires actual importers to be listed).
Optional, non-blocking
evaluation._assess_recordtypes the port asCallable[..., dict]whereapi.Assessoris the recorded protocol. Keeping theAssessorcontract in one place (defined inevaluation, re-exported byapi) would preserve the port type across the move.docs/module-layout.mdprose is accurate butdocs/architecture.mdstill points Apps callers atapps/api.pyfor the orchestration bodies; a follow-up anchor update keeps the two pages consistent.
Not verified here: I did not execute pytest, the ready lane, or the installed-wheel check; the finding above is from static reading of the diff and the gate source. I read docs/apps-module-migrations.json, apps/api.py, apps/workflows/__init__.py, tests/test_apps_module_migrations.py, tests/test_package_root_inventory.py, tests/test_target_module_import_gate.py, tests/test_module_boundaries.py, tests/test_apps_prepare.py and tests/test_apps_publication.py at this head.
I will re-read after the author pushes the registry update.
Governing Issue and delivery slice
Refs #635
Extract preparation, execution binding, assessment and receipt publication into
apps/workflows/evaluation.py. Public signatures, the Assessor and EvaluationPort definition paths, and the existing provider and view exports stay inapps.api. The failure-injection tests patch the publishing operation at its new definition. The module layout guide records the dependency direction.Anchors touched: none
Knowledge authorship declaration
Checks and dependencies
ruff check src tests toolspassed.Remaining work and Issue closure
The four root implementation moves, compatibility retirement, package verification and final main-tree acceptance remain under #635. Independent review requested for this evaluation slice.
Superseded by #645, which also registers all new migration consumers. Independent review continues there.