3 Commits
Author SHA1 Message Date
zhu1090093659 64beab4ad5 chore(desktop): remove the repository's Electron desktop app and its packaging lane 2026-09-24 21:48:46 +08:00
zhu1090093659 b4944353a5 refactor(scripts): drop the packages/skins root the satellites took
The skin, pet and community packages left this repository, so packages/skins/
never exists in a checkout of it. Every scanner that still walked it as a
second root did so defensively — family-packages.mjs and
coverage-gate.discoverPackages listed it first and guarded the walk with
existsSync, aggregate.mjs looked for a second aggregate manifest and a second
package index under it, e2e-mount-rewrite searched it for workspace packages,
and seven test files built fixtures under it. The walkers now name packages/ as
the single root and the fixtures and comments follow; modules that only carried
the root in a doc comment are reworded.

scripts/coverage-baseline.json loses the three packages no longer measured here;
its sixteen keys now name exactly the sixteen package directories on disk.

The in-repo fallback paths in scripts/market-build stay untouched: they are the
documented route for building from a checkout that still carries the packages,
and the fixture-based market-build tests populate them deliberately.
2026-09-24 09:48:23 +08:00
zhu1090093659 d9357c8572 test(ci): enforce test discipline and add a coverage ratchet
Turn the repository's test conventions into machine-enforced gates and close
three holes in the CI/CD set.

- scripts/test-standards.mjs: six business test rules (no-arbitrary-sleep,
  no-ad-hoc-mock, bdd-title, given-when-then, call-count-only-assertion,
  tautological-assertion) with a per-file, per-rule baseline in
  scripts/test-standards-baseline.json, so new debt is blocked while the
  existing 367-file backlog ratchets down. Rule scope follows the lane:
  business tests under packages/, tests/ and desktop/ carry the full
  contract, repository tooling under scripts/ only the mechanical rules.
- scripts/emoji-audit.mjs: replaces the inline ci.yml Python emoji step with a
  reviewed, unit-tested gate; same ranges and out-of-scope trees, plus a
  strict-UTF-8 skip and file:line:column reporting.
- scripts/coverage-gate.mjs with scripts/coverage-baseline.json: a per-package
  v8 coverage ratchet (21 packages; repository totals 56.64% lines, 67.74%
  branches) with a half-point tolerance for instrumentation noise. The
  provider is declared per vitest major: the six 3.x packages carry
  @vitest/coverage-v8@^3.2.7 and the root devDependency serves the 4.x fleet.
- ci.yml now runs the previously unenforced pnpm i18n:check, the new
  pnpm test:standards, and pnpm emoji:check; nightly.yml is the Tier-2 lane:
  both its jobs build before they test, exactly as ci.yml does, then run the
  coverage ratchet and three consecutive full-suite runs for flake detection.
- scripts/pr-review.mjs keeps its gate sequence aligned with ci.yml.
- docs/development.md owns the rules, baselines, tiering and the failure-path
  audit checklist. Decision recorded in
  .agents/notes/implemented/testing/2026-09-16-business-test-discipline-gates.md.

Verified: pnpm test:scripts (three new specifications), pnpm test:standards
(clean baseline; a probe spec fails with three groups), emoji:check parity with
the Python step it replaces, coverage:check over the full fleet, pnpm
typecheck, pnpm test, docs:check, i18n:check, libs:check, aggregate:check,
actionlint, and pnpm install --frozen-lockfile.
2026-09-17 16:08:54 +08:00