Repository navigation
test(apps): verify fixed CPU records across read-only views - #542
Conversation
Signed-off-by: zengchuang <zengchuang3@huawei.com> Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Reviewed base 13a9953ac682f831d5be6d9489c9092779410295 and head 96b327fe1222d297275f340c35e4a428393add2b (full diff, first review). No prior formal reviews, Approves or CHANGES_REQUESTED are seeded for this head, so there is no independent re-check to weigh.
Blockers
-
Unrelated docs change with an unverified claim (
docs/module-layout.md, around line 114).- The PR is titled
test(apps): verify fixed CPU records across read-only views. The diff also rewrites a normative sentence. - Old text: "Legacy worker paths retain Python import compatibility; external interpreters are launched against the canonical files."
- New text: "files are importable compatibility shims, not runnable scripts."
- That is a new behavioral contract about the legacy worker files, and no test in this PR exercises it.
- The reviewable material does not show a governing Issue or a code change that backs it.
- Expected correction: either drop the docs hunk from this test PR, or split it out. If it stays, link the Issue or PR that made the legacy workers non-runnable and cite the evidence.
- The new text also leaves a long unwrapped line. This is minor.
- The PR is titled
-
No execution evidence for the new test.
tests/test_apps_fixed_cpu_views.pyis a new 129-line integration test. It runs a real CPU harness execution, the CLI, an HTTPDashboardServerand a-Isubprocess.- Nothing seeded shows it passing, and I could not run it here. There is no CI result, no local command output and no environment note.
- Expected correction: record the exact command and result on this head, for example the pytest invocation, interpreter and CPU environment. Also record the required CI status.
What I read in the test (static only)
- The test runs one real CPU record through
read_attempt_view,status,trace,report,dashboard, andDashboardServerwithfixed_attempt. It asserts that they agree:tracedis a superset ofexpected, and the dashboard HTML served at/equals the file written by the CLI. - The no-execution guard patches
Harness.execute,Harness.allocate,RunStore.claim,Claim.commit,apps_api.assessandsubprocess.Popen. - The
subprocess.runfor the isolated child comes after thewithblock exits, so thePopenpatch does not interfere with it. - The child also guards
execute,allocate,claim,commitandassess. - The test checks
record_refandpayload_bytesbefore and after, which covers the no-write claim. - The server shutdown and
thread.joinare infinally.
Not verified
- Tests were not run.
- The helper contracts were not verified: the
cpu_generationfixture, therecord_ref["artifact"]["sha256"]shape, and theDashboardServer(None, None, 0, fixed_attempt=...)signature. - Lint was not run.
generationis imported fromtest_apps_generation_planand does not appear to be used directly. Please confirm it is a deliberate fixture re-export.
I will re-read after the author pushes. Once the docs hunk is justified or removed and passing evidence is attached, I expect to be able to PASS. This review does not approve or alter scope.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
|
@Dong1017 @amy-why-3459 @david6666666 按已接受 #490 顺序提交第五步正式 Ready 验收切片;#537 已合入,当前 base 本 PR 仅新增一个真实普通 CPU 固定记录的只读表面回归,并按 #537 的 non-blocking 建议明确旧 worker 是 importable shim、不是可按文件直接运行的脚本。请关注真实 Harness/SQLite 记录来源、status/trace/report/离线及实时 Dashboard/新进程读取是否同一 Ref、读期间禁止执行/判定/写入及记录字节不变、live server 线程收束,以及测试范围/环境缺口是否如实声明。 本 head 定向 39 passed;全 Apps + delivery/Dashboard/trace/T38 在 请独立检视;通过时以首个非空行独立 |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 13a9953ac682f831d5be6d9489c9092779410295 and head 96b327fe1222d297275f340c35e4a428393add2b. The full diff is visible (diffComplete: true): the new tests/test_apps_fixed_cpu_views.py and a one-sentence edit to docs/module-layout.md. This re-checks my earlier DO NOT PASS on this same head. I did not run anything, so the points below come from reading the diff and the linked PRs and issues.
Earlier blockers
-
Docs hunk without a governing source — resolved.
- The new wording is "legacy worker files are importable compatibility shims, not runnable scripts".
- It is backed by #490 (the accepted design). Dong-bot's acceptance there carried a non-blocking item: "state that old worker file paths are not supported or keep the shim runnable".
- It is also backed by the merged #537. My review there recorded that running the legacy worker file by path fails with
ImportError: attempted relative import with no known parent package. - #537's merge comment and #490's step 5 both say this clarification was deferred to #542.
- The PR body links all of this, so the docs change is a documented accepted follow-up and not a new behavioral contract.
- Still open, and minor: the edited line is now unwrapped and long.
-
No execution evidence — partly resolved.
- The body now states 39 passed on this head for the fixed-CPU-views and migration group, plus Ruff and diff whitespace.
- It also states 362 passed, 2 skipped and 1 deselected on
0af3fb37. - The skips (missing Playwright) and the deselected #494 busy-lock node are named as not counted as passed.
- The body says the Git tree matches after rebasing onto #537, and that only
docs/module-layout.mddiffers from the fully tested tree. That fits the diff, which has no Python changes beyond the new test file. - These are author-reported results and I have not independently reproduced them. See "Not verified" below.
Verified from the diff
- Real record source.
- The test uses the
cpu_generationfixture, Harnessprepare_generationandharness.execute(spec). It assertsexit_code == 0. - It takes
record_reffrom the real record. - It does not build a synthetic record.
- The test uses the
- One shared
RecordRef.read_attempt_view, CLIstatus, CLItrace, thereportanddashboardHTML, the liveDashboardServerstate and page, and a-Ichild process all take the samerecord_refand storage config.- Each output is compared with
expectedortraced. - The HTML outputs are checked for the artifact sha256 and the attempt id.
- Read-only enforcement.
Harness.execute,Harness.allocate,RunStore.claim,Claim.commit,apps_api.assessandsubprocess.Popenare patched to raise while the in-process surfaces run.- The child process patches the same set except
Popen. - Afterwards the test asserts that
store.committed(...)returns an unchangedrecord_refand unchangedpayload_bytes. - The assessment is explicitly asserted to be absent, which matches the stated #429/#434 boundary.
- Thread cleanup. The live server is shut down in
finally, the thread is joined, and the test assertsnot thread.is_alive(). - Scope. There are no runtime, API or CI changes.
Non-blocking observations
- Live Dashboard check is weaker than the others.
DashboardServer(None, None, 0, fixed_attempt=traced)is given the already-read view, so/api/state == tracedshows the server echoes that fixed attempt. It does not show the server read the store itself. The/page is compared with the offline dashboard HTML, which is the more useful check. A short comment or docstring saying this would avoid over-reading the coverage. - Child-process claim. It checks that
read_attempt_viewworks with-Iand returns the same view. ThePopenban is parent-only, which is fine.
Not verified here
- I did not execute the new test or the 362-test group.
- The new head's Ready CI (44868142347) was reported as queued, and I did not see a result.
- Merge still needs a passing required CI on this head and two eligible independent approvals, and this review is one vote. If CI fails on the Linux lanes, treat that as a blocker and I will re-read.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 13a9953 and head 96b327f.
Verified against accepted #490 step 5: the new test drives a real ordinary CPU record through cpu_generation / prepare_generation / harness.execute, then checks that CLI status/trace, report, offline dashboard, live Dashboard / page and an isolated -I child all share the same RecordRef. Query paths patch execute/allocate/claim/commit/assess (and parent Popen) and then confirm the committed ref and payload bytes are unchanged. Assessment is asserted absent, matching the #429/#434 boundary. The generation import is required because cpu_generation depends on that fixture.
The docs/module-layout.md one-sentence clarification matches the deferred #537 / #490 follow-up (legacy worker files are importable shims, not path-runnable scripts) and does not change runtime code.
lint-and-smoke, declarations, pr-references, installed-package (3.10/3.11), dashboard-browser and host-compatibility are green on this head; Ready CI full-check (3.10/3.11) in 44868142347 is still running and should pass before merge.
Non-blocking: DashboardServer(..., fixed_attempt=traced) echoes the already-read view on /api/state; the stronger live check is that / equals the offline dashboard HTML.
Refs #490
Refs #371
Complete #490 step 5's durable acceptance coverage after the storage, handoff, workflows, Cannbot and MindIE slices merged. A real ordinary CPU generation run now has one fixed RecordRef checked across CLI status/trace, HTML report, offline Dashboard, live Dashboard state/page and a fresh isolated Python process. The test rejects allocation, execution, assessment and RunStore writes while querying, then confirms the original RecordRef and committed payload bytes are unchanged.
Reuse the actual Apps providers, Harness
prepare_generationand SQLiteRunStore fixtures. The assessment remains absent: this test establishes shared ordinary CPU execution facts, while production evaluation execution and offline assess remain #429 / #434 work. Clarify the non-blocking note from #537: legacy worker files are importable compatibility shims, not runnable scripts; approved interpreters launch the canonical worker files.Base: merged #537 / main
13a9953ac682f831d5be6d9489c9092779410295. Head:96b327fe1222d297275f340c35e4a428393add2b. Scope: one new 129-line regression and one documentation clarification, with no runtime/API/CI changes.Validation and checked-content relationship
0af3fb371628b53e9c643a71f31ffab91136fbee(Windows / Python 3.12). After refactor(apps): move MindIE adapter into integrations #537 squash, rebasing onto main produced the identical Git tree; this head then changes onlydocs/module-layout.mdrelative to that fully tested tree. All Python/runtime/test content is identical. This is accounted reuse, not a claim that the whole group was rerun on a different hash.test_progress_uses_committed_control_and_a_fixed_clock; it was not counted as passed, modified or suppressed in CI.Acceptance boundary
This is the final directory-refactor acceptance slice, not completion of #371's production evaluation chain or an L4/model/service claim. No thresholds, frozen fixtures, recorded evidence, legacy shim retirement rules or CI lanes change. After this PR has two eligible independent formal approvals and passing required checks, squash it and record the whole #490 delivery/verification/limits card for owner acceptance. Keep #371 open for its remaining production ports and joint CPU acceptance.
Please review the real CPU/fixed-record provenance, whether all queries share the exact committed record, read-only enforcement, test fixture use and the stated validation limits. Apps accountable parent and author: zengchuang-hw / Codex; author/self-review cannot count. Approval requires
LGTMalone on the first non-empty line of the formal Approve.