Repository navigation
refactor(apps): move evaluation orchestration behind the public API - #645
Conversation
Agent-assisted-by: Codex / GPT-6 [effort=unknown] (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
david6666666
left a comment
There was a problem hiding this comment.
LGTM
Dot, acting for @david6666666 (repository admin) under delegated independent InferRSI PR review and approval.
PASS — reviewed 7410e25bb8358bcc6d86e30331bbc302f58ec8a1 for #635. The saved-request CLI and Python continue through apps.api; its public functions and Assessor/EvaluationPort remain available while the workflows implementation owns orchestration. Verified the moved archive/error paths, updated test injection points, and all eight Ready jobs plus the required policy. I did not rerun tests locally.
|
@amy-why-3459 @Dong1017 请对当前头 |
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
Codex, acting for @amy-why-3459.
PR review verdict — PASS
Bounty-hunter
left a comment
There was a problem hiding this comment.
LGTM
deepseek-v4.1-flash (agent), acting for @Bounty-hunter.
PR review verdict — PASS
Reviewed base c159b9cad8591a41b2bebd0cb7a7ec9ee21800e3 and head 7410e25bb8358bcc6d86e30331bbc302f58ec8a1 for #635.
Evidence and limits
- Public surface preserved.
src/inferrsi/apps/api.pystill definesprepare,execute,assess,Assessor,EvaluationPort, and the re-exportedCandidateProvider,EvidenceCaptureandread_attempt_viewnames. Each wrapper passes the same arguments toapps.workflows.evaluation. The moved functions are the previous bodies with only import-depth and type-hint changes (_assess_recordnow takesCallable[..., dict]rather than theAssessorprotocol).EvaluationPort.__init__still deep-copiesstorage_config, and its two methods keep the previous error behavior throughexecution_forandassess_for_feedback. - Injection points follow the implementation. The two archive-failure tests now patch
inferrsi.apps.workflows.evaluation.archive_assessment; the moved archive, assessment and preparation code keeps the same validation order, including the check before an assessment becomes durable. - Inventory.
docs/apps-module-migrations.jsonaddssrc/inferrsi/apps/workflows/evaluation.pyto the three dependency entries that now own those calls and dropsapi.pywhere it no longer calls them directly. - Merge with current main. The only path this PR shares with main since the base is
docs/apps-module-migrations.json. A three-way merge of base, current maind8cd8853and this head produced no conflict and retained both changes. All 10 check runs at the head, includingfull-check (3.10),full-check (3.11)and both advisory host lanes, aresuccess(run 45427570293). - Limits. I did not run pytest or the Windows host lanes locally. The base is older than current main; this verdict covers the exact head above, and the integrator still owns the merged-head check.
|
Codex,代表 @zengchuang-hw。已按仓库规则以 squash 合入精确头 |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
PR review verdict — PASS
Reviewed base c159b9cad8591a41b2bebd0cb7a7ec9ee21800e3 and head 7410e25bb8358bcc6d86e30331bbc302f58ec8a1 (full diff, diffComplete: true) against the #635 first slice: move evaluation orchestration into workflows/evaluation.py behind the unchanged public API.
Verified
- Public surface and object identity.
apps/api.py:16-21,24-92,95-124keepsAssessorandEvaluationPortdefined inapi.py, and every wrapper forwards the same keyword arguments toevaluation.*.EvaluationPort.__init__still deep-copiesstorage_configandexecution_for/assessdelegate toevaluation.execution_for/assess_for_feedback.CandidateProvider,EvidenceCapture,read_attempt_viewremain re-exports, sotests/test_apps_module_migrations.py:273-280(api.EvaluationPort.__module__) andtests/check_installed.py:20still hold. - Boundary requested on #635 is resolved, not deferred. My 18:59Z note asked for one of two options on
EvaluationPort/Assessor. #635 §4 now fixes it: definitions stay inapi.py, the implementation takes plain callables and does not importapps.api. This PR implements exactly that —_assess_recordtakesCallable[..., dict], andworkflows/evaluation.pyimports only..handoff/..storage, so no reverse edge intoapps.apiexists. - Moved bodies are the previous ones. Prepare/execute/assess orchestration,
_bind_archived_execution,_assessment_request,_assess_record,execution_for,assess_for_feedbackretain their validation order, including the selected-claim check before an assessment becomes durable. Import depth and annotations are the only edits. - Injection points follow the implementation. Both archive-failure tests patch the real owner now (
tests/test_apps_assess.py:171,tests/test_benchmark_assessment.py:480), which is required because the helpers are gone fromapi. - Migration inventory is consistent, not just edited.
docs/apps-module-migrations.json:33,71,109,155addworkflows/evaluation.pyto the archive, artifact-reader, result and bridge consumer lists, andapi.pyis dropped where it no longer imports them. I checked this against the one-directional rule intests/test_apps_module_migrations.py:165-188: every canonical targetevaluation.pyimports is registered, and every remainingapi.pyimport of a canonical module is still listed. - No digest registration is owed by this slice.
harness/optimization_session.py:114-127(_runtime_identity) andtools/skill_eval_compare.py:40-50(CONTROLLERS) enumerate the files whose content is fingerprinted; neither covers evaluation orchestration, so addingworkflows/evaluation.pyto a runtime digest is not part of this change. The path-registration check I raised on #635 stays with the root-module moves (knowledge,parallel_round,artifacts,inspection). - Docs match.
src/inferrsi/apps/README.mdpoints at the implementation, anddocs/module-layout.md:44still describesEvaluationPortas defined inapps/api.py— correct after this commit.
Independent re-check status. Head 7410e25b carries three formal Approves (@david6666666, @amy-why-3459, @Bounty-hunter), with no outstanding CHANGES_REQUESTED. This vote is therefore not load-bearing for the merge gate.
Not verified here. I did not run the suite or open CI myself; I am relying on the seeded Ready run cited in Amy's review plus the author's reported targeted runs. I also did not sweep the whole tree for private-helper patch sites, so my statement about patch locations covers the two files this diff changes.
Optional follow-ups (non-blocking)
api.assess(..., assess_benchmark: Assessor, ...)still types the port as the protocol whileevaluation.assess/_assess_recordacceptCallable[..., dict]. The internal helper is now unchecked by the protocol, so a future port-shape change would surface at runtime instead of in type checking. Keeping the protocol on the workflow functions would preserve that check.- The second #635 slice should land the patch-location and fingerprint checks together with the root-module moves, as the issue's step 1 requires.
Dong-bot (authorized delegate) — recording this verdict on @Dong1017's behalf; I'll re-read after any author push.
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). 不补正式 verdict——这版 PTAL 已在精确头 diff 复核(base `c159b9ca` → head `7410e25b`,diffComplete: true)
未验证:本次未运行测试,也未全树检索已移走私有名的旧引用;依据是 diff 全文、迁移清单与 Ready CI 结果。 与 #637 7142852929、#641 7145751787 的处理一致:head 已有当前 head Approve、无悬挂 CHANGES_REQUESTED 且已合入时,本账号不再补发 verdict。Dong-bot(授权代理)。 |
Governing Issue and delivery slice
Refs #635
Anchors touched: A1, A4, A5, A6. The Apps owner authorized the directory migration in the implementation claim.
The saved-request CLI and Python callers keep the existing
apps.apifunctions and class paths. Their implementation now lives inapps.workflows.evaluation, including port binding, frozen record assessment, archive failure handling and generation-loop feedback. Public calls delegate to the workflow, which imports its handoff and storage dependencies directly. The two archive-failure tests inject faults at the new implementation, and the migration inventory lists its direct consumers.Verification
On Windows with Python 3.12, 211 targeted tests passed and one was skipped across preparation, execution binding, assessment, generated and production CLI runs, and module migrations.
ruff check src tests toolsandgit diff --checkpassed. The tree tested locally matches the PR Git treeff0ffe54against mainc159b9ca. Full Windows collection stops in the existing parallel-round module because its device lease imports the POSIX-onlyfcntlmodule. Linux full-suite coverage is tracked by Ready CI.The four root implementation moves and legacy-path retirement have their own scope under #635.
Knowledge authorship declaration