Skip to content

Write down testing rules and prune the suite against them - #397

Merged
cameronapak merged 5 commits into
mainfrom
claude/test-improvement-assessment-9e2e8a
Oct 9, 2026
Merged

cameronapak merged 5 commits into
mainfrom
claude/test-improvement-assessment-9e2e8a

Conversation

@cameronapak

@cameronapak cameronapak commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Testing guidance now favors the lightest check that can falsify behavior, and the suite removes duplicate or implementation-derived assertions without changing production code. Review context: Amp thread.

Changes

  1. Agents get one testing standard for independent oracles, reachable behavior, one home per contract, and test-only seams.
  2. Exported constants and production helpers no longer provide their own expected values.
  3. Repeated single-case tests become workflow tests and input-output tables while distinct reachable setups remain covered.
  4. Security, MCP, history, billing, and Lunora retirement contracts retain explicit regression guards.
  5. The full local e2e gate runs the app suite plus isolated capture and retirement Worker suites.
  6. Review follow-ups restore optional-field Sentry scrubbing, non-leaf mirror deletion, paragraph search projection, and current real-suite fixtures.

Start here: change 3 — consolidation must preserve distinct setup and projection paths.

Test plan

  • bun run test: 1,132 pass, 0 fail
  • bun run test:e2e:real: 47 pass, 0 fail
  • bun run test:e2e:app e2e/lunora-retirement-browser.spec.ts: 1 pass, 0 fail
  • typecheck:test, lint, formatting, docs, and changeset checks: pass
  • GitHub CI quality, changeset, and CLI matrix on Node 22/24 across Ubuntu, macOS, and Windows: pass

@pullfrog

pullfrog Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Pullfrog  | Review this ➔

cameronapak and others added 2 commits October 8, 2026 15:42
Adapt Kent C. Dodds' testing principles: lightest flavor that can
falsify, one test per workflow, independent oracles, a high bar for
Playwright, no test seams in production, and a pruning pass agents can
run. Gather the scattered testing bullets under one section and sharpen
the AGENTS.md pointer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…testing

First pruning pass under the new testing rules. Lunora tests are untouched
(ADR 0061). No production code changed.

- Independent oracles: expected values derived from exported constants
  (RESTORE_WINDOW_MS, FREE_NODE_LIMIT, MAX_FRAME_OPS, RESTORE_SLICE_OPS,
  DEMO_SEED_*, DAILY_CONTAINER_TEXT, CORE_FILTER_OPERATORS, ...) became
  hand-derived literals.
- One behavior, one home: removed re-export copies (scaffold
  sortedInsertAfterId, daily-index localDateKey, runPromise), sibling-chain
  ordering outside its owner, searchNodes outside search.test.ts, and the
  MCP tool-name list copies in mcp.test.ts and cli commands.test.ts.
- Unpinned copy and error wording; fixed two absence assertions that
  could not fail (opml-export view state, saved-queries blank row).
- Collapsed single-assertion tests into workflow tests and test.each
  tables.
- playwright.config.ts ignores the two *-real specs, which run under their
  own configs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cameronapak
cameronapak force-pushed the claude/test-improvement-assessment-9e2e8a branch from 447d126 to d182547 Compare October 8, 2026 20:46
@cameronapak
cameronapak merged commit ed29647 into main Oct 9, 2026
14 of 15 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.

2 participants