Skip to content

[bugfix] ci: route unlisted python test modules to default core shard - #700

Merged
FayeSpica merged 1 commit into
ThinkFlowLab:mainfrom
FayeSpica:ci/default-python-shard
Dec 5, 2026
Merged

FayeSpica merged 1 commit into
ThinkFlowLab:mainfrom
FayeSpica:ci/default-python-shard

Conversation

@FayeSpica

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the static 108-file core list in scripts/ci/python_shards.json with "default_shard": "core", keeping only the explicit heavy/domain assignments for agent-cli (26 files) and media (33 files).
  • Resolve default_shard dynamically in scripts/ci/check_test_layers.py (discover_test_files minus explicitly assigned shards) while rejecting missing/deleted explicit files, duplicates, and incomplete shard coverage.
  • Capture --list-shard output before looping in .github/workflows/release-checks.yml so a shard-listing failure aborts immediately under set -e.
  • Prevents post-merge CI failures (test_repo_python_shards_manifest_covers_every_test_module_once) whenever concurrent or newly authored PRs add tests/test_*.py without manually editing scripts/ci/python_shards.json (seen on main runs 47460479983, 47487899600, and 47493153210 for tests/test_ark_availability.py, tests/test_trace_job_queries.py, and tests/test_wait_outcome.py).

Linked issue

Labels

Apply type:bug (or type:ci) and area:ci per CONTRIBUTING.md.

  • Labels applied (type:ci, area:ci)

Test plan

  • Local (verified on candidate head d97639eef92999ce4e29f2baa9a657c9cf47944c against base 4cd524ce5ddcd331ea47dd5bf494230f17f64014):
    • pytest --basetemp=/tmp/od-ci-pytest-tmp tests/test_ci_layers.py tests/test_ci_scope.py -q -> passed (includes failing-before regression coverage for newly added test modules and missing explicit files).
    • Full 6-suite CI test run (tests/test_ci_hardware.py, tests/test_ci_layers.py, tests/test_ci_profile.py, tests/test_ci_scope.py, tests/test_ci_security.py, tests/test_ci_summary.py) -> 218 passed (53.60s).
    • Full vs 3-shard --collect-only conservation audit via scripts/ci/check_test_layers.py --profile ... --shard-profiles ... -> 3,860 tests (core=2655, agent-cli=443, media=762), automatically absorbing tests/test_trace_job_queries.py and tests/test_wait_outcome.py with zero duplicates and zero missing cases.
    • pre-commit hooks (check yaml, check json, check python ast, actionlint) -> all passed.
  • Left to CI:
    • Live GitHub Actions Release checks run on this PR (python 3-shard matrix + checks --require-executed shard conservation audit).
  • AI pre-review:
    • Independent subagent score: 83/100 (Scope & intent 3/3, Correctness & safety 3/3, Validation 2/3, Claim evidence 2/3, Simplicity 3/3; zero blocking findings)
    • Reviewed base: 4cd524ce5ddcd331ea47dd5bf494230f17f64014
    • Reviewed head: d97639eef92999ce4e29f2baa9a657c9cf47944c
    • Material validation gaps: Live GitHub Actions execution of the updated workflow on this SHA has not run yet and will be verified on the PR's CI run.

Evidence that it works

  • Visual evidence is N/A: CI-only shard resolution fix with no user-visible UI, media, or product runtime changes.

  • Previously failing on main 4cd524ce5ddcd331ea47dd5bf494230f17f64014 (47493153210): test_repo_python_shards_manifest_covers_every_test_module_once failed because tests/test_trace_job_queries.py and tests/test_wait_outcome.py were missing from scripts/ci/python_shards.json.

  • Local conservation receipt on this fix:
    {"tests": 3860, "layers": {"ready": 3780, "merge": 68, "nightly": 12}, "unmarked": 3493, "capabilities": 18, "representative_cases": 152, "representative_outcomes": {"not_run": 152}, "browser_gate": 1, "shards": {"core": 2655, "agent-cli": 443, "media": 762}}

  • Applicable evidence attached and visual N/A explained

Provider verification

  • No real-provider calls were made.

Bilingual UI

  • No user-facing product copy changed.

@FayeSpica FayeSpica added type:ci Build, test and release automation area:ci Continuous integration and checks labels Dec 5, 2026

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

WITHHOLD d97639e Refs #273

当前证据暂定 93/100,非批准分(范围 3、正确性 3、验证 2、主张证据 3、简洁度 3)。按真实文件树独立重算:169 个 Python 模块分到 110 core、26 agent-cli、33 media;后两组的文件列表没变,新增归入 core 的正好是 test_trace_job_queries.py 和 test_wait_outcome.py,没有重复或未分配。--list-shard 命令失败也不会再悄悄回退成无文件参数的 pytest。纯 CI 改动,无需产品截图。

同版 Release 还在跑。作者的 3,860 项是收集守恒,不是全部执行;待聚合审计验证各组实际执行和代表用例。小建议:同步改 docs/development/ci-failures.md,旧文仍要求每个新模块都手工登记,改成默认 core、特殊需求显式分组后就不会误导后续 PR。未重跑候选或投票。Dot,代表 @david6666666。

@FayeSpica
FayeSpica merged commit 322f98c into ThinkFlowLab:main Dec 5, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Continuous integration and checks type:ci Build, test and release automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants