Skip to content

test(ci): isolate semantic probe subprocess coverage - #5376

Closed
Duang777 wants to merge 1 commit into
mainfrom
codex/fix-semantic-probe-coverage-isolation
Closed

Duang777 wants to merge 1 commit into
mainfrom
codex/fix-semantic-probe-coverage-isolation

Conversation

@Duang777

Copy link
Copy Markdown
Collaborator

Summary

  • remove inherited pytest-cov state before launching the copied semantic-probe CLI
  • keep synthetic checkout files out of shard coverage artifacts so aggregation can run on a separate runner

Root cause

The semantic-probe CLI tests execute copied loopx sources in a temporary checkout. Inheriting COV_CORE_* variables caused pytest-cov to record the synthetic loopx/a.py. The shard could report it while the temporary checkout existed, but the aggregate runner could not read that source path.

Verification

  • 307 passed for tests/architecture/test_semantic_development_probe.py and tests/test_python_ci_workflow.py
  • focused xdist + pytest-cov run produced no temporary source paths in the coverage database
  • coverage reporting succeeded after removing the test temporary directory
  • Ruff and git diff --check passed

This unblocks the baseline CI needed by #5367 and #5340.

Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>
@Duang777

Copy link
Copy Markdown
Collaborator Author

Exact-head CI attribution for 99c36b08345c6a279cef0a1422e352f55e41ec90:

  • The target fix remains validated locally: all 17 semantic-probe tests passed under xdist + pytest-cov, the coverage database contained no temporary checkout paths, and coverage report --format=total succeeded after the temporary repository was removed.
  • Remote pytest did not combine coverage. Its Require every upstream check step stopped after unrelated upstream failures, so this run neither reproduces nor disproves the former temporary-source aggregation error.
  • typescript-core (1/3) failed on control_plane/work_items/task_lease_workspace.ts:26 /^[a-f0-9]{64}$/u, introduced by merged fix(coordination): allow isolated worktree edits with integration advisories #5364. The same check fails on current main run 36770551543.
  • test-shard (2) and test-shard (3) failed on runtime fingerprint churn tests already fixed by fix(runtime): reject stale batched source fingerprints #5367.
  • test-shard (3) also found a stale mainline assertion: merged feat(telemetry): qualify usage diagnostics and installation return cohorts #5366 raised _NOTICE_VERSION to 5, while test_source_cli_entrypoint.py still expects 4.
  • All other functional jobs passed, including static checks, Windows, dashboard, both browser/bundle jobs, Stage2C, TypeScript 2/3 and 3/3, and Python shards 1 and 4.

This PR still changes only the semantic-probe subprocess environment. I left the branch unchanged and took no merge action.

@Duang777

Copy link
Copy Markdown
Collaborator Author

Closing this as a duplicate of #5375. Both PRs start from the same parent and apply the same semantic-probe subprocess coverage isolation to the same file; #5375 retains the explanatory boundary comment and is the canonical review target. No merge action was taken.

@Duang777 Duang777 closed this Sep 30, 2026
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.

1 participant