Skip to content

refactor(apps): move the chart renderer and task launcher into Apps (A2) - #474

Merged
Dong1017 merged 2 commits into
mainfrom
impl/a2-composition
Nov 16, 2026
Merged

Dong1017 merged 2 commits into
mainfrom
impl/a2-composition

Conversation

@Dong1017

Copy link
Copy Markdown
Collaborator

Scope

Refs #408

A2 only, following merged C1/C2/R1/A1. This is one slice of the open Apps/architecture issues; M1/R2/R3 are not implemented.

  • Move root summary_chart.py to apps/views/summary_chart.py and root benchmark_operations.py to apps/benchmark_operations.py. Both files move with their bytes unchanged (Git records two pure renames with 0 changed lines).
  • Update every active consumer: the CLI benchmarks run, the HTML report, the dashboard, tools/campaign_summary_chart.py, five tests and the docs. Delete both root files with no forwarding shell, sys.modules alias or import fallback.
  • Remove the gate's exact-file APPLICATION_ENTRIES listing. Its last entry was benchmark_operations.py. Apps is now the inferrsi.apps package by its first path segment and nothing else, so a root file that returns under any retired name fails. RETIRED_BY_A2 adds the two names, bringing the retired root modules to fifteen. No scan, assertion or allowlist was widened.
  • The tracked package root shrinks from eight files to six: __init__.py, __main__.py and the four MindIE files that wait for M1 (task: consolidate existing MindIE adapters under Apps #452).
  • No evaluator, factual-record or OBS change; rendering stays non-authoritative. This PR does not claim isolation: the 12 Harness hits into Infra (R2) and the five runtime resource loaders (R3) remain.

Provenance

Based on main 4da2a15bb33cf22534ab5281ce157fa8b2fbb32d, then an ordinary signed-off merge of main 2cbfab66b00d75e69be583ebfeabee2b8f83c4ea (#470, #472, #465 and others) with no conflicts. No rebase, amend, force push or skipped hooks. The installed checker keeps main's resource count (928) and A2's retirement checks.

The code, tests and docs were written in a Claude Code session reported as claude-opus-5-5, effort xhigh, confirmed by the owner. This is client/session attribution, not a backend attestation. The changed paths are outside the knowledge-model-policy protected scope, so the declaration below is disclosure only. Manifest and precision-guard changes still need formal architecture review; passing tests is not that approval.

Evidence

All heavy runs were on the owned CPU-only H200 (Linux, single process, no GPU); the local laptop ran only the small groups below. Candidate and baseline trees were extracted from tarballs and every one of the 3,089 files was verified by SHA256 against a manifest before the run.

  • Chart tool, real entry. python -I tools/campaign_summary_chart.py on the tracked example specification, a deliberately broken specification and --help, before and after the move: exit codes (0, 2, 0), stdout, stderr, the SVG bytes and the Markdown bytes are identical.
  • Ruff 0.17.5 on all 17 changed Python files passes.
  • Seven directly affected test files, 198 passed (local, 310.97 s): root inventory, import gate, first-wave isolation policy, summary chart, trial-check reports, campaign record injection and the task launcher.
  • Full suite on H200, candidate vs unchanged main 4da2a15, same environment and flags (-o addopts= -q, CUDA_VISIBLE_DEVICES= empty):
Candidate (A2) Baseline (main 4da2a15)
Result 406 failed, 4,176 passed, 166 skipped 404 failed, 4,176 passed, 166 skipped
Failed test ids 399 397

The 397 baseline ids are a subset of the candidate's. The candidate has two more: tests/test_dsh_plugin.py::test_remote_ssh_connection_and_scoped_operations and tests/test_moe_benchmark.py::test_deadline_cleans_detached_workers_but_preserves_unrelated_process. Neither involves an A2 module. The first is nondeterministic on H200: running tests/check_dsh_remote.cjs directly passed once and failed twice on the candidate, and passed once and failed three times on unchanged main, with a JSON.parse error on the same empty-channel path as the earlier Windows record. The second failed in the full run with PermissionError reading /proc/<pid>/environ of a process owned by another user on the shared H200. Run alone afterwards it passed 3 of 3 on the candidate and 3 of 3 on unchanged main, so it depends on which foreign processes exist at that moment and not on A2.
The H200 failures overall (git 2.34.1, no bwrap, other users' processes) are why this run is not full-suite proof. The authoritative Linux full-suite result is this PR's full-check 3.10 and 3.11 jobs, and the host-compatibility job from A1 covers hosted Windows and macOS.

Not claimed

No local full-suite pass, no Windows or macOS run before CI, and no architecture approval. The DSH test is nondeterministic on H200 on both sides, so its failure there is not evidence either way.

{"schema_version":1,"head_sha":"3e83a2fdedec570be828d249ba50a38817588c9d","human_only":false,"material_ai_authors":[{"tool":"Claude Code","model_id":"claude-opus-5-5","effort":"xhigh","role":"author"}]}

Move root summary_chart.py to apps/views/summary_chart.py and root
benchmark_operations.py to apps/benchmark_operations.py with their bytes
unchanged. Update every active consumer (CLI, HTML report, dashboard, the
campaign_summary_chart tool, tests and docs) and delete both root files with
no forwarding shell, sys.modules alias or import fallback.

The package root shrinks from eight tracked files to six. The gate's
APPLICATION_ENTRIES listing is removed with its last entry, so no root file is
application assembly, and both names join the retired root modules.

Refs #408

Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author)
Signed-off-by: GUOGUO <xwdong1998@163.com>
@Dong1017 Dong1017 added the kind:task Bounded delivery task with a delegated slice label Nov 16, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

PR review verdict — PASS
Reviewed base 2cbfab66b00d75e69be583ebfeabee2b8f83c4ea and head 3e83a2fdedec570be828d249ba50a38817588c9d.
Verified #408 A2 only: pure renames of summary_chart → apps/views/summary_chart and benchmark_operations → apps/benchmark_operations (R100), consumer/docs/tool import updates with no forwarders or aliases, APPLICATION_ENTRIES removed, RETIRED_BY_A2 brings retired root modules to 15, root inventory pinned at 6 MindIE-waiting files, focused gate/inventory/chart/launcher tests pass locally, installed checkers keep resource count 928. Author is Dong1017 — this cursor[bot] Approve is the independent formal vote; a second independent write-access Approve is still required before merge. M1/R2/R3 not in scope.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Steward independent review: PASS on head 3e83a2fdedec570be828d249ba50a38817588c9d (cursor[bot] Approve with LGTM). Ready-lane checks are green.

Author is @Dong1017, so this account cannot supply the second independent Approve. @amy-why-3459 @zengchuang-hw — please add the second write-access Approve when ready; integrator will squash-merge once dual Approve is present.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

PR review verdict — PASS

Independent first review of base 2cbfab6 → head 3e83a2f. No previous review by this account to supersede; resolved prior findings: not applicable. Acting reviewer: the owner's delegated assistant under zengchuang-hw, independently of the implementation. Scope is #408 A2, requested in #474 (comment); the owner's standing delegation permits substantive COMMENT/APPROVE reviews, not merging.

I read AGENTS, the repository review guidance, #408's current acceptance, all 23 changed files and affected callers. I did not read other reviewers' opinion bodies. Both moved implementations are byte-identical to their base blobs. The CLI relative import resolves to Apps; Dashboard/report/tool consumers use the new canonical renderer. No old runtime imports remain in src/tools. The removal of the last flat application exemption narrows rather than relaxes the boundary; retired names and the exact six-file root are tested. Breaking Python import/pickle paths are explicitly documented; frozen evidence is untouched.

Actually executed in isolated checkout:

  • 241 focused tests covering charts, launcher, optimization session/project, trial reports, record injection, root inventory and isolation/import gates: passed.
  • Ruff on src/tests/tools and git diff --check: passed.
  • Real chart-tool execution for chain, branch and invalid input against base and head: exit codes (0/0/2), stdout/stderr and SVG/Markdown bytes identical.
  • Built sdist and wheel, installed the wheel into a fresh environment outside the checkout, then ran check_installed.py with -I: passed, 128 records and 928 resource files; inventory SHA-256 97659c1f4e69d825e774ba6ebc7848f4b56db7f833ccebc37e9a6ee0bef4b80f. The first attempt lacked optional PyYAML; after installing that declared extra dependency the check passed.

Separately verified all 10 exact-head GitHub checks successful, including 3.10/3.11 full and installed-package jobs, macOS/Windows host compatibility and dashboard-browser. I did not locally rerun the full suite, browser or non-Linux host matrix, nor any hardware campaign. Scaffold checks are not campaign performance/quality acceptance.

Approval prerequisites remaining from this independent review: none. Non-blocking suggestions: none. Overall architectural isolation remains incomplete pending the separately scoped R2/R3/M1 work; this approval does not claim otherwise. No merge or auto-merge action.

@Dong1017
Dong1017 merged commit bebd491 into main Nov 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants