Holdout: the band checks at 8 and 24 weeks and the release

Open
#804 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, typescript

Research direction

Read ADR 037, ADR 041, and CONTEXT.md’s Holdout section, then inspect #744’s draw and storage, packages/domain/src/learning/recognitionChoicesOf.ts, apps/api/src/adapters/postgres/schema.ts, and apps/api/migrations/. Start with the domain rules and tests, keeping time injected and randomness in the API; verify the migration on a session-owned Postgres. Done means both checks, result storage, release behavior, named domain tests, typecheck, migration verification, and pnpm gate all pass.

Written by the indexing model from the issue text.

Description

ready-for-agent

S41 · PRD: none (ADR 035's within-player holdout, no row) · ADR 037 (The holdout), ADR 041 (The holdout and placement) · Dispatch: row 4, opus:high (schema and migration), domain, contracts and api, a wave of one

Blocked by #744
Blocked by #753

Context

Split from #744 by ADR 041. #744 draws and stores each band's held-out words at the band's start; this ticket runs the band's external checks, 8 and 24 weeks after that start, stores their results, and releases the held-out words after the 24-week check. It is due 8 weeks after the owner starts band 1, when the first check falls due on read: a check taken later measures a longer delay than ADR 037's.

Pointers: ADR 037 (The holdout), ADR 041 (The holdout and placement), CONTEXT.md (Holdout), #744's draw and its storage, packages/domain/src/learning/recognitionChoicesOf.ts (the placement's item format), apps/api/src/adapters/postgres/schema.ts, apps/api/migrations/. The criteria win over this list.

Done when

  • The 8- and 24-week checks are due on read from the band's start, never by a timer; each holds the held-out words of studied lessons and as many practised words of the same lessons, in the placement's format; a result is stored.
  • After the 24-week check, taken or skipped, the held-out words are released as lessons of 5 in rank order through the lesson slot, earning no skill.
  • Any sample is drawn by the api's random source, never the domain's.
  • A migration stores each check's result per player and band; pnpm --filter @mygame/api db:generate writes no new file after it.
  • Domain tests name each rule: "falls due 8 weeks after the band's start", "falls due again at 24 weeks", "holds as many practised words as held-out ones", "releases the held-out words after the 24-week check, taken or skipped", "earns no skill for a released lesson".
  • Verification rows: packages/domain (test and the leak check), packages/contracts (pnpm -r typecheck), apps/api with the migration test on the session's own Postgres, never Neon.
  • pnpm gate green.

Gotchas: lazy evaluation, no cron (root CLAUDE.md, W7); time is injected; no randomness enters packages/domain. Load mattpocock-skills:tdd.

Known gaps

  • The check screen and the school's line about 1 word in 10 are sub-issues filed once this merges (a schema change plus a screen is split).
  • A released word needs its lexicon entry, which the later batches of #742 supply; the release is tested on fixtures here.
  • ADR 037 assumes intention-to-treat analysis; no analysis code is in scope.
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
30m
Merged PRs (30d)
219

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emm3000/myGame

All issues in emm3000/myGame

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.