Files
gyxx-flow/tests/test_engineering_baseline.py
T
wangyunlong b1861f69cd chore(workbench): 移除 dsh 工作台集成
工作台以 deepseek-harness 为 agent 底座,把现有工作流以 dsh 插件接入 Web UI。
该路线已停用,移除整个 workbench/ 与配套文档,避免留下点了启动不起来的死入口。

- 删除 workbench/:宿主插件 gyxx-workbench.mjs、侧边栏面板前端、cordis 配置
  模板、启动脚本、独立面板与 node 冒烟测试
- 删除 docs/workbench.md 与 README 的「智能工作台」章节
- .gitignore 去掉 workbench 本地产物两条规则
- 基线结构测试的 docs 白名单同步移除 workbench.md

工作流能力不受影响:gyxx console、调度器、运行记录与诊断接口均未改动。
2026-10-19 11:19:31 +08:00

82 lines
2.8 KiB
Python

from __future__ import annotations
import tomllib
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
BUSINESS_MODULES = (
"content_marketing",
"product_commerce",
"shop_intelligence",
"supply_chain",
)
def test_repository_keeps_the_simplified_public_structure() -> None:
modules_root = PROJECT_ROOT / "src" / "gyxx_flow" / "modules"
for module in BUSINESS_MODULES:
module_root = modules_root / module
compatibility_items = {
path.name
for path in (module_root / "runtime").iterdir()
if path.name != "__pycache__"
}
assert compatibility_items == {"__init__.py"}
assert not (module_root / "tests").exists()
assert not (module_root / "runtime_tests").exists()
primary_docs = {
path.name for path in (PROJECT_ROOT / "docs").iterdir() if path.is_file()
}
assert primary_docs == {
"acceptance-report.md",
"architecture.md",
"deployment.md",
"dynamic-workflow-config.md",
"note-inventory.md",
"plan.md",
"runbook.md",
"workflow-acceptance-test-report.md",
"workflow-acceptance-test-requirements.md",
"workflow-console.md",
"workflow-time-distribution.md",
}
assert not {
"design.md",
"final_report.md",
"plan.md",
"review.md",
} & {path.name for path in PROJECT_ROOT.iterdir() if path.is_file()}
def test_development_group_contains_reproducible_quality_tools() -> None:
configuration = tomllib.loads(
(PROJECT_ROOT / "pyproject.toml").read_text(encoding="utf-8")
)
development = configuration["dependency-groups"]["dev"]
package_names = {requirement.split(">=", 1)[0] for requirement in development}
assert {"build", "pytest", "ruff"} <= package_names
assert (
"src/gyxx_flow/modules/*/**"
in configuration["tool"]["ruff"]["extend-exclude"]
)
assert configuration["tool"]["pytest"]["ini_options"]["testpaths"] == ["tests"]
def test_gitlab_ci_runs_lock_lint_tests_and_build() -> None:
pipeline = (PROJECT_ROOT / ".gitlab-ci.yml").read_text(encoding="utf-8")
assert "uv sync --frozen --group dev" in pipeline
assert "uv run ruff check src tests" in pipeline
assert "uv run ruff check src/gyxx_flow/modules/content_marketing/daily_creator_exposure_scope.py" in pipeline
assert "src/gyxx_flow/modules/product_commerce/market_rank_product_import.py" in pipeline
assert "uv run pytest" in pipeline
assert "test_daily_creator_exposure_scope.py" in pipeline
assert "test_chanmama_refresh_before_export.py" in pipeline
assert "test_daily_exposure_fields.py" in pipeline
assert "test_market_rank_limits.py" in pipeline
assert "test_market_rank_product_import.py" in pipeline
assert "uv build" in pipeline