maniator / maniator/verticopolis
[Bug]: [P3] deserialize leaves four fields uncoerced: towerName, builtWeddingHall, evaluatedTower, completeAt
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Scope widened by the full repository audit (2026-07-21, finding AUD-013; report at
_bmad-output/planning-artifacts/reviews/full-repository-audit-2026-07-21/): two more uncoerced fields found beyond the original pair. Backlog rowdeserialize-null-hardeningupdated to match.
Simulation.deserialize hardens nearly every field (money, star, minutes, ids, geometry, rent, schedules, transport arrays), but four assignments still ride raw:
sim.tower.towerName = data.towerName(src/engine/sim/serialization.ts:448): a forged non-string reaches the UI and re-serializes.sim.tower.builtWeddingHall = data.builtWeddingHall(:449): a forged truthy non-boolean survives.sim.evaluatedTower = data.evaluatedTower(:90): a forged truthy flows into the vipVisits backfill and TOWER-status gating.- Unit
completeAtrides the...uspread with nonum()coercion (unlikevacateAt): a forgedNaNmakesfinishConstruction'ssim.clock.minutes >= (u.completeAt ?? 0)false forever, so the unit is permanently stuck under construction, andserializeUnitwrites the NaN back out.
Fix: four one-liners in the existing coercion pattern (string coerce + cap for towerName, === true for the two booleans, num() for completeAt).
Required tests: forged-save fixtures for each field, including the stuck-construction repro (NaN completeAt, tick past the horizon, assert the unit finishes), in the storage integration suite alongside the #306 coverage.
Save round-trip work: /gds-code-review.
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 in src/engine/sim/serialization.ts at the assignments around lines 448-449, the evaluatedTower assignment near line 90, and the unit spread handling completeAt. Read the existing coercion patterns, then locate the storage integration suite and its #306 coverage. Done means forged-save tests cover all four fields, including ticking past a NaN completeAt horizon and confirming construction finishes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100