Skip to content

chore: rewrite Tester to write and run automated tests - #84

Merged
wpinrui merged 1 commit into
mainfrom
chore/tester-automated-tests
Jul 13, 2026
Merged

chore: rewrite Tester to write and run automated tests#84
wpinrui merged 1 commit into
mainfrom
chore/tester-automated-tests

Conversation

@wpinrui

@wpinrui wpinrui commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Why

Tricia guided the owner through long manual checklists. Her last plan for PR #62 ran to ~20 items and required a specific stat build (10 Charisma, or trait badges may never appear), a page-refresh trick to escape a negotiation without destroying the listing, and a warning that one check might never become reachable at all. That is not a viable use of the owner's time — and the tricks and warnings were symptoms of testability defects being handed to the owner instead of reported.

What changed

Automation is the default. Every check is triaged Automated or Manual. Manual requires a stated reason, and the only valid reasons are spatial layout, colour/legibility, responsive reflow, clipping, animation/audio, and feel. "Awkward to automate" is explicitly not a reason — it now routes to the Implementer as a testability defect.

The manual pass is a residual, capped at roughly eight items. Each item needs exact navigation ("Map → Scrapyard → Browse Junkers → click the first car", not "open a listing"), exact setup via the debug panel rather than grinding for a state, and a stated pass condition. Checks that need a workaround to perform are now bug reports, not owner instructions.

Feel questions are separated from the checklist and routed to the PM as product signal, rather than being mixed in as test items.

Tests may never be weakened, skipped, or deleted to get a green run. A failing test is the deliverable. Tricia still does not fix source.

Permission boundaries

Widened, scoped to testing:

  • May write test files, test config, and test-only devDependencies (a DOM environment and a component-testing library, when a check genuinely needs rendered output — neither is installed today)
  • May commit and push test files to the PR branch under test
  • May not touch application source, app dependencies, or build config

Project notes recorded

  • src/engine/ is pure and dependency-free; the RNG is seeded (Mulberry32) and injectable, so negotiation, pricing, and listing-lifecycle tests are fully deterministic with zero new dependencies
  • createRNG() seeds from Date.now() and must never be called in a test
  • Bare npm test starts vitest in watch mode and hangs — npm test -- --run is required
  • No test files exist yet; Tricia sets the convention (colocated foo.test.ts)

Effect on PR #62

Against Tricia's own #62 checklist, the entire money path and the whole "one shot per car" rule collapse into unit tests. The owner is left with the four UI/layout items and one feel question.

Knock-on

Tricia now incrementally seeds backlog item 5 (the test/CI/data-validation foundation) as a side effect of every PR she tests. She does not replace it — there is still no CI and no runner config — but a suite will already exist by the time that ticket is picked up. Flagged to the PM in the handoff so Riley can frame the issue accordingly.

Tricia previously guided the owner through long manual checklists. Her last
plan for PR #62 ran to ~20 items and required a specific stat build, a
page-refresh trick to escape a screen, and carried a warning that one check
might never become reachable. That is not a viable use of the owner's time.

Automation is now the default. Every check is triaged Automated or Manual;
Manual requires a stated reason, and the only valid ones are spatial layout,
colour/legibility, responsive reflow, clipping, animation/audio, and feel.
"Awkward to automate" is explicitly not a reason -- it now routes to the
Implementer as a testability defect rather than becoming owner homework.

The manual pass is capped at roughly eight items, each requiring exact
navigation, exact setup via the debug panel rather than grinding, and a stated
pass condition. Feel questions are separated from the checklist and routed to
the PM as product signal. Tests may never be weakened, skipped, or deleted to
get a green run.

Permission boundaries widen accordingly: Tricia may write test files, test
config, and test-only devDependencies, and may commit and push tests to the PR
branch under test. She may not touch application source, app dependencies, or
build config.

Project notes record that src/engine/ is pure and the RNG is seeded and
injectable, so negotiation and listing-lifecycle tests are deterministic with
zero new dependencies, and that bare `npm test` starts watch mode and hangs.
@wpinrui
wpinrui merged commit e383ad8 into main Jul 13, 2026
@wpinrui
wpinrui deleted the chore/tester-automated-tests branch July 13, 2026 16:32
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