Skip to content

ci: run all test targets and gate the static UX audit on every PR (#311) — re-land on main - #326

Merged
ZhangHanDong merged 1 commit into
mainfrom
feat/ci-test-and-ux-gate-main
Aug 18, 2026
Merged

ci: run all test targets and gate the static UX audit on every PR (#311) — re-land on main#326
ZhangHanDong merged 1 commit into
mainfrom
feat/ci-test-and-ux-gate-main

Conversation

@ZhangHanDong

Copy link
Copy Markdown

Fixes #311. Re-lands #325 on main.

#325 was merged into its stacked base chore/spec-regression-guards-main (GitHub only retargets a stacked PR when the base branch is deleted on merge), so its commit never reached main. This PR cherry-picks the identical commit (dd34a352) onto current main. See #325 for the full description and verification.

Base is main, so spec_gate runs here with the new cargo test --workspace + gated static UX audit.

🤖 Generated with Claude Code

Finish #311 on top of the `spec_gate` job from #324:

- `cargo test --workspace` (lib + bins + doctests + tools/ux-harness)
  replaces `cargo test --lib`; the five failing doctests are fixed in place
  (imports, missing commas, a `text` fence for the state diagram, and the
  RoomDisplayFilterBuilder example updated to the current API) — none is
  marked `ignore`.
- `tools/ux-harness` becomes a root workspace member (no new deps; png and
  serde_json versions already matched) so its unit tests run under
  `cargo test --workspace` and agent-spec `Package: ux-harness` selectors
  resolve. Its private Cargo.lock / [profile.release] are removed.
- ux-harness: `Finding.count` for aggregate rules and a `--gate <policy.json>`
  pass/fail layer (exit 3) over findings; `tools/ux-harness/gate.json` is a
  ratchet policy — 0 for token-contrast / hardcoded-color / missing-key,
  current baselines 37 / 4 for untranslated screens / values, unlisted rules
  fail. Rendered to `<out>/ux-gate.md`.
- CI `spec_gate`: `cargo test --workspace` + `ux-harness static --gate`.
  Workflow also triggers on `tools/**`.
- `tests/ci_policy.rs` pins the workflow shape, the policy baseline and the
  no-`ignore` doctest rule; harness unit tests cover gate evaluation and
  aggregate counts.
- Docs: CLAUDE.md Build & Test (required checks), ux-harness README (gate).

Spec: specs/task-ci-test-and-ux-gate.spec.md — 10 passed / 0 failed / 2
mechanical-manual (cargo test --doc and the gated static audit both pass
locally).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ZhangHanDong
ZhangHanDong merged commit 7ef31f6 into main Aug 18, 2026
9 checks passed
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.

CI: execute unit tests and static UX checks on pull requests

1 participant