Skip to content

Trim brittle test assertions and fixture self-checks - #190

Merged
noeltock merged 3 commits into
mainfrom
block-theme/test-trim
Oct 12, 2026
Merged

noeltock merged 3 commits into
mainfrom
block-theme/test-trim

Conversation

@noeltock

@noeltock noeltock commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Problem

Tests asserted documentation wording, hand-written activation fixture labels, release source spellings and exact hook-call bookkeeping. Those checks made harmless edits fail without proving the behavior they described.

Solution

Remove the fixture self-check and two source-only release cases, and trim prose/generated-JavaScript spelling assertions. The generated editor test retains its unique settings-forwarding check; actual rendered layout, save/reopen, locks, hashes, receipt refusal and compiler rejection coverage remain.

Behaviour Read first Proof
Documented example still compiles and skill references load correctly dev/test/skill.test.ts Retained example, invariants and reader tests
Release receipts and installed bytes retain their checks dev/test/release-activation-contract.test.ts Executed validation, hash binding and buffer regressions
Generated editor settings and observable native behavior remain covered dev/test/authoring.runtime.test.ts Settings forwarding, rendered root, persistence and lock matrix

Diff

+17 −213 · 5 files · application source and test configuration unchanged.

- skill prose assertions and activation fixture self-check
- release source-string cases and incidental spelling assertions
- generated JavaScript spelling assertions
- exact hook-call bookkeeping
+ short generated editor settings assertion
  retain executable behavior, integrity and refusal tests

Testing & verification

Reviewed revision: 94a3388 · Environment: local macOS, Node 22.23.1.

  • vitest run dev/test/skill.test.ts dev/test/release-activation-contract.test.ts dev/test/authoring.generate.test.ts dev/test/authoring.runtime.test.ts --reporter=dot: 42 passed across 4 files, exit 0, 8 seconds.

  • npm run typecheck: exit 0.

  • git diff --check: exit 0.

  • Bounded advisor review identified these brittle families; source review retained the unique emitted-settings check that the rendered helper supplies manually.

  • Exact-head CI 38283821682: Node22.13/24 full verification passed969/four skips; package and WordPress checks passed. The first utility-hero native-style check failed (9passed/1failed); one bounded failed-job rerun passed without source changes, and the original log is retained.

Not verified: no measured runtime saving is established. Three cases are removed, with larger savings in assertion and fixture maintenance.

Risk / rollout

Release orchestration has fewer literal source-presence checks; these were weak evidence of executed wiring. Documentation copy and hook implementation can change without rewriting these assertions. Actual agent activation remains unproved by the removed fixture labels.

Detection: existing executed behavior and integrity suites plus CI. Rollback: revert this test-only PR; no migration or production operation.

@noeltock
noeltock merged commit 8dfb053 into main Oct 12, 2026
14 of 16 checks passed
@noeltock
noeltock deleted the block-theme/test-trim branch October 12, 2026 17:59
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.

1 participant