maniator / maniator/verticopolis
[P3] roomCapacity.test.ts names its kinds, so a new room kind fails open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Deferred from the gds-code-review of the room occupant seats fix (PR for #813).
src/render/pixelSprites/roomCapacity.test.ts names the kinds it covers in a literal list. The suite pins all eight populated kinds that lay furniture out in a row, and it picks up new SUBTYPES automatically from the look tables, but a new KIND would be silently uncovered: the suite would keep passing while the new room drew the wrong number of people.
Fail closed instead by driving the kind list off FACILITIES (every entry with population > 0), pinned per kind, so adding a populated kind without a capacity expectation breaks the build.
Severity low: it does not hide a current defect, it leaves the door open for the next one. The defect class it guards (#813) was exactly a silent under-draw.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/render/pixelSprites/roomCapacity.test.ts and inspect how the literal kind list and capacity expectations are defined. Compare it with FACILITIES entries whose population is greater than 0, then run the room capacity test. Done means every populated kind has a pinned capacity expectation and adding one without it fails the build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100