mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 20:34:02 +01:00
dice.ts 415 -> 93 and badges.ts 369 -> 111, with the literal tables in six new modules. Every previously exported name is still exported from the same path, so no importer or test changed. Two import cycles on the way, both of which tsc and eslint called clean and which only showed up as a runtime TypeError when 11 test files failed with "Cannot read properties of undefined (reading tin)". HEADSTART_POINTS now has its own module so both halves of the badge table can use it at init time. 288 tests passing before and after, coverage still 100% on all four metrics with the new modules measured. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
19 lines
1.4 KiB
JSON
19 lines
1.4 KiB
JSON
{
|
|
"title": "Split the kcd2_dice_solver data tables under the 250-line cap",
|
|
"objective": "Bring src/data/dice.ts (415) and src/data/badges.ts (369) under the cap by extracting their large literal tables, without changing any exported value.",
|
|
"acceptance_criteria": [
|
|
"Every file under src/data/ is at most 250 lines.",
|
|
"The suite still reports exactly 288 passing tests in 15 files -- the same as before the split.",
|
|
"Coverage stays at 100% for statements, branches, functions and lines. The new modules are inside the coverage include glob, so they are measured, not skipped.",
|
|
"npm run lint (tsc --noEmit && eslint src) passes with no new suppression and no eslint-disable.",
|
|
"No import cycle: a module that supplies a value used during another module's initialisation must not import back from it. tsc does NOT catch this - it only appears as a runtime TypeError, so the test suite is the check.",
|
|
"Every name previously exported from dice.ts and badges.ts is still exported from the same path, so no importer or test needs editing."
|
|
],
|
|
"out_of_scope": [
|
|
"Changing any die weight, badge effect or headstart value.",
|
|
"The kcd2 core/ and component files, which are separate commits.",
|
|
"Editing any test."
|
|
],
|
|
"verifier": "npm test -- --run (expects exactly 288 passed in 15 files), npm run coverage (expects 100% on all four metrics), npm run lint, and check_file_length.sh over src/data/."
|
|
}
|