maniator / maniator/verticopolis

[P3] roomCapacity.test.ts names its kinds, so a new room kind fails open

Open Beginner friendly
#829 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.