Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 路径不受影响)
Expand Down
3 changes: 1 addition & 2 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 即失败

Expand All @@ -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`)。
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 22 additions & 0 deletions tests/test_doc_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
)

Loading