Skip to content

feat(test): redesign CLI reporting and model usage summaries - #3285

Merged
xiong35 merged 16 commits into
mainfrom
feat/test-cli-reporting
Oct 21, 2026
Merged

xiong35 merged 16 commits into
mainfrom
feat/test-cli-reporting

Conversation

@xiong35

@xiong35 xiong35 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

midscene-test currently mixes repeated Step progress, retries, warnings, report paths, and failures in the same log stream. This change adds a concise default reporter with a concurrent live tree in interactive terminals and append-only output in CI.

  • Keep active Project/File/Case progress in a bounded live area, then retain completed file trees with Cases in declaration order. Handle terminal resizing and captured stdout/stderr through the same renderer.
  • Scope warnings to their Project, Case, and Step; distinguish model request retries from Case retries. Collect interactive warnings and final failures into separate sections, while retaining full diagnostics behind --reporter verbose.
  • Show concise failure details with YAML locations, Step positions, attempts, redacted resolved inputs, and the first application stack frame.
  • Combine each observed model with its total, input, cached input, and output tokens on one aligned row. Aggregate usage across failed attempts, retries, and lifecycle Steps without double-counting execution snapshots, and preserve missing/partial usage states. Use a green RUN header and normal text color for model names.
  • Preserve structured JSON/HTML artifacts, add GitHub Actions failure annotations and a job summary, and update the English and Chinese usage documentation.

Validation

  • pnpm run lint
  • pnpm exec nx run @midscene/shared:build --excludeTaskDependencies
  • pnpm exec nx run @midscene/core:build --excludeTaskDependencies
  • pnpm exec nx run @midscene/test:build --excludeTaskDependencies
  • pnpm run type-check:tests
  • pnpm exec tsc -p packages/test/tsconfig.json --noEmit --pretty false
  • pnpm exec nx run @midscene/test:test --excludeTaskDependencies
  • pnpm --filter @midscene/test exec vitest --run --config vitest.e2e.config.ts tests/e2e/create-cli.test.ts
  • pnpm --filter @midscene/cli test:e2e:shared-browser

Lint passes with one existing unused-suppression warning in apps/site/theme/components/TestFramework.tsx. The Midscene Test unit suite passes all 541 tests across 50 files. All 29 generated-project integration tests and all 6 shared-browser CLI E2E tests pass. Model-backed demos have not been rerun for the CI fix.

Render concurrent progress as a terminal tree with grouped final results and append-only
CI output.

Scope warnings to their execution context, distinguish model request retries from Case
retries, and show concise failures with YAML locations and redacted inputs.

Retain verbose diagnostics and structured artifacts, summarize actual models and token
usage across attempts, and document the reporting behavior in English and Chinese.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: f208b4b
Status: ✅  Deploy successful!
Preview URL: https://d8ac0844.midscene.pages.dev
Branch Preview URL: https://feat-test-cli-reporting.midscene.pages.dev

View logs

xiong35 and others added 9 commits October 20, 2026 18:23
* fix(playground): isolate reports between executions

* fix(core): recover report failures and isolate persisted dumps

* test(computer): scroll timeline steps into view before AI assertion

* fix(core): make resetDump reset the full report lifecycle

Make resetDump asynchronous and prepare an independent report while reusing the Agent and device. Callers must await it before continuing execution.

Group report state, separate memory cleanup from report transitions, seal artifacts with finalizeReport, and guard execution and cancellation boundaries. Unify Playground server and local adapters and document the API migration in English and Chinese.

Validated 384 focused tests, root lint, Core/Playground/Report type checks, and the Report/Playground/Test build.

* test(core): initialize agents in YAML regression fixtures

Replace runYaml prototype calls bound to plain objects with initialized Agents in the Core docs and Web YAML validation tests. Keep model-facing actions mocked, disable report files, and dispose the Agents in finally blocks.

Preserve validation of malformed YAML and task results, and verify that inline YAML does not replace the existing report filename.

Validated complete Core and Web unit suites with coverage: 2,798 passed and 9 skipped. Core and Web type checks, root lint and git diff --check also passed.

* style(site): fix sidebar configuration formatting

Remove the blank line rejected by the non-fixing Biome check in CI. Verified pnpm run lint, pnpm exec biome check . --diagnostic-level=warn --no-errors-on-unmatched, and git diff --check.

* fix(core): close report lifecycle gaps

* docs(site): remove report lifecycle reference additions

* refactor(core): extract agent report management and option normalization
* feat(test): add file concurrency with maxConcurrentFiles

* fix(test): classify shared resource failures by explicit ownership

* docs(site): clarify file concurrency and resource lifecycle

* feat(test)!: combine project and file concurrency limits

Use one file scheduler with independent file and live Project limits.
Default omitted limits to 1 and allow null to remove either limit.
Update lifecycle tests and bilingual documentation.

BREAKING CHANGE: replace test.maxConcurrency with the explicit
maxConcurrentProjects and maxConcurrentFiles settings.

* docs(site): clarify setup, fileSetup and beforeAll

* fix(test): tailor concurrency migration to project scope

---------

Co-authored-by: quanru <quanruzhuoxiu@gmail.com>
Render concurrent progress as a terminal tree with grouped final results and append-only
CI output.

Scope warnings to their execution context, distinguish model request retries from Case
retries, and show concise failures with YAML locations and redacted inputs.

Retain verbose diagnostics and structured artifacts, summarize actual models and token
usage across attempts, and document the reporting behavior in English and Chinese.
@xiong35
xiong35 merged commit 82b4801 into main Oct 21, 2026
23 of 27 checks passed
@xiong35
xiong35 deleted the feat/test-cli-reporting branch October 21, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants