diff --git a/Agent.md b/Agent.md index 70597a9..1c53518 100644 --- a/Agent.md +++ b/Agent.md @@ -93,7 +93,7 @@ Community needs voiced in HN agent-UI discussions map directly to EMRG's design: pkill -f "emrg.server"; rm -f ~/.emrg/emrgd.port; python -m emrg ``` -Python: `uv run pytest tests/ -v` (674) — import check: `uv run python -c "from emrg.client.app import run_client"` +Python: `uv run pytest tests/ -v` (675) — import check: `uv run python -c "from emrg.client.app import run_client"` GUI: `cd emrg/gui && npm test` (111: 29 daemon_client + 22 app-commands + 32 renderer smoke + 15 i18n + 7 integration + 3 commands + 3 build-config) — syntax: `node --check main.js preload.js daemon_client.js renderer/js/*.js` CI: `uv run pytest` + GUI tests + **actionlint workflow lint** (`rhysd/actionlint@v1.7.12` gate, #444 — workflow 解析错误在 PR CI 即失败,如 `if:` secrets 上下文) Re-trigger: `scripts/re-trigger-ci.sh [branch]` (workflow_dispatch, #527 — 替代空 commit 重触发:Actions outage 会整段丢弃 push 事件,dispatch 走 API 路径不受影响) diff --git a/README.cn.md b/README.cn.md index 58a9e26..ee0e61d 100644 --- a/README.cn.md +++ b/README.cn.md @@ -274,7 +274,7 @@ EMRG 不只是追赶——它自己追上来。 git clone https://github.com/argszero/emrg.git cd emrg uv sync # 安装依赖 -uv run pytest tests/ -v # 跑测试(当前 674 项) +uv run pytest tests/ -v # 跑测试(当前 675 项) uv run python -m emrg # 启动 TUI # CI 含 actionlint workflow 门禁(#444):workflow 解析错误在 PR 即失败 @@ -283,7 +283,6 @@ cd emrg/gui npm ci # 安装依赖(生产模式可 --omit=dev) npm start # 启动 GUI(自动拉起 daemon) npm test # 运行 Node 测试(111 项:29 daemon_client + 22 app-commands + 32 renderer smoke + 15 i18n + 7 integration + 3 commands + 3 build-config;集成测试在 CI 跑,本地可 npm run test:integration) -npm test # 运行 Node 测试(111 项:29 daemon_client + 22 app-commands + 32 renderer smoke + 15 i18n + 7 integration + 3 commands + 3 build-config;集成测试在 CI 跑,本地可 npm run test:integration) ``` CI 通过 GitHub Actions 自动运行测试并检查冲突标记(`.github/workflows/test.yml`)。 diff --git a/README.md b/README.md index c100c6b..244c06c 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,7 @@ EMRG doesn't just keep up — it catches up on its own. git clone https://github.com/argszero/emrg.git cd emrg uv sync # install deps -uv run pytest tests/ -v # run tests (currently 674 items) +uv run pytest tests/ -v # run tests (currently 675 items) uv run python -m emrg # launch TUI # CI includes actionlint workflow gate (#444): workflow parse errors fail PR CI diff --git a/tests/test_doc_counts.py b/tests/test_doc_counts.py index b148a40..29dcff5 100644 --- a/tests/test_doc_counts.py +++ b/tests/test_doc_counts.py @@ -84,3 +84,25 @@ def test_gui_breakdown_sums_to_headline() -> None: assert sum(parts) == headline, ( f"{label}: breakdown {parts} sums to {sum(parts)} but headline says {headline}" ) + + +def test_no_duplicate_npm_test_command_lines() -> None: + """Each doc must not contain an identical `npm test` command line twice. + + #617: README.cn.md carried the `npm test` line twice (exact copy-paste + duplicate). The breakdown-sum guard above passed because it validates + each line independently — both copies sum correctly to the same + headline. Exact-line duplicates within one doc are always a copy-paste + bug: README.md has one line, README.cn.md must have one, Agent.md has + two *different* lines (features + test-commands sections), never an + identical repeat. + """ + for doc in ("README.md", "README.cn.md", "Agent.md"): + text = (REPO_ROOT / doc).read_text(encoding="utf-8") + lines = [ln.rstrip() for ln in text.splitlines() if "npm test" in ln] + dupes = {ln for ln in lines if lines.count(ln) > 1} + assert not dupes, ( + f"{doc} contains duplicated npm-test command line(s) — remove the " + f"copy-paste duplicate: {dupes}" + ) +