Dev log - things that went wrongReport
English:Dev log - things that went wrong · Other
Faults made while building this site, each recorded as symptom, cause, fix and how it surfaced. They live here because the mechanics page has a rule: our own bugs must not be written up there as traps the game set.
- 1. The "most resupply" route ringed cannibal settlements as supply stops
- 2. A batch replacement from a stale glossary broke 13 place names
- 3. Video citations inside a table were split by the column separator
- 4. The site's own images were treated as missing, with no build error
- 5. A test was wrong: the 320 px table does scroll
- 6. Measured the live site too early after deploying. Six times.
- What these have in common
- See also
# Dev log - things that went wrong
All of these actually happened. They sit here rather than on the misread-mechanics page because that page set a rule: this site's own bugs are not listed there, since listing them would have readers guarding against something that does not exist.
1. The "most resupply" route ringed cannibal settlements as supply stops
Symptom: with "most resupply" selected, the map drew four bright green supply rings in the Cannibal Plains, on Cannibal Village #5, the Cannibal Capital, Old Village and Cannibal Village #2. Clicking any of them, the place panel read "What you can resupply here — No known vendor or facility". The map and the panel contradicted each other.

Cause: the pathing itself was fine, since cannibal-plains has an empty supply field and the cost function penalised it correctly. The fault was in the drawing. The code that circles supply points read "circle every settlement within three cells of the path", with no check for whether the settlement had a vendor.
Fix: look up the settlement's supply vector before circling, and skip it if empty. Three lines.
How it surfaced: the site owner hit it in normal use and saw a cannibal village ringed. Nothing threw, and the build was clean.
Follow-up: added a regression test asserting that every circled place has a non-empty supply vector. markSupply is now exposed out of its closure onto window.KenshiMap so the test can feed it coordinates directly.
The first version of that test was ineffective. It planned a route and checked whether any supply points got circled, but "most resupply" only appears when its path crosses more supplied regions than the fastest route does, and across two dozen start and end pairs it never appeared, so the assertion never ran. After switching to a direct call, a mutation test confirmed it works: removing the guard turns two assertions red in each language (30/30 → 24/30).
2. A batch replacement from a stale glossary broke 13 place names
Symptom: the video notes used inconsistent translations, so a batch replacement was run using the site's 606-entry trilingual glossary.
Cause: the glossary is stale and the article titles are authoritative. The two conflict on 41 entries, 13 of which had already been written into the data:
| Replaced with | Correct |
|---|---|
| 閃 ("flash") | 謝姆 (Shem) |
| 無 ("none") | 無名海岸 (None Coast) |
| 灰色沙漠 (glossary wording) | 灰漠 (Grey Desert) |
| 河之沼澤速龍 ("river swamp raptor") | 河猛禽 (River Raptor) |
| 咆哮迷宮島 ("Howler Maze Island") | 嚎叫迷宮 (Howler Maze) |
| 風暴口海岸 ("Stormmouth Coast") | 風暴隙海岸 (Stormgap Coast) |
None Coast was replaced with the single character for "none". The same pass also rewrote a word inside an English quotation that had been kept verbatim on purpose, to flag a spot where the auto-caption was unclear: the word "water" in a fair amount of water available was swapped for the Chinese for water.
Fix: rebuilt the lookup with article titles and zone files as the authority, then corrected each entry.
Note: the same class of conflict had come up earlier the same day, when the glossary and the article title disagreed on The Crags, and the decision then was that article titles win. That decision was not carried over to the batch replacement.
3. Video citations inside a table were split by the column separator
Symptom: siting notes in the route panel carry a timestamp written {{影片|videoId|time}}. Placed in a table cell, [V1 0:00:00] split into three cells and the whole table shifted right.
Cause: the table's column separator is also a pipe, and tables are parsed before templates. The README does say literal pipes inside tables need \|, but escaping them breaks the template.
Fix: use a list instead of a table. None of the site's other thousand-plus articles had put a video citation inside a table.
4. The site's own images were treated as missing, with no build error
Symptom: after adding a screenshot to an article, the page showed a grey "missing image" placeholder.
Cause: the list of available images was built only from raw/wiki/images/, the scraped wiki assets. Site-owned images live in the newer assets/img/ and were not in that list, so the renderer returned a placeholder and the exit code stayed 0.
Fix: merge the site-owned image directory into the available list, and add it as a second source in the copy loop.
5. A test was wrong: the 320 px table does scroll
Symptom: the responsive suite reported the trilingual place-name table's fourth column clipped at 320 px, and the test comment claimed that column genuinely could not be seen or scrolled to.
Cause: table.wikitable already carries display:block and overflow-x:auto. Measured, after scrolling right the last cell's right edge moves from 338 px to 308 px in a 320 px viewport, and the document's own horizontal overflow is 0. The assertion compared element coordinates against viewport width without checking whether an ancestor could scroll.
Fix: fixed the test, not the site. measure() now has a scrollable() check. Mutation-tested by removing the CSS overflow-x, which turns it red (164/164 → 159/164).
6. Measured the live site too early after deploying. Six times.
Symptom: curl the live file immediately after deploying, get the pre-rotation CDN copy, report "it did not take", and start investigating a problem that does not exist.
Fix: poll on the asset hash and only measure once the CDN has rotated.
What these have in common
None of the six throws an exception or fails a build. The output looks correct, and what is wrong is that the content and the behaviour disagree. There are two ways to find this class of fault, which are someone using the thing, or a test asking the right question. Item 1 demonstrates both, since it was caught by use and the first test did not ask the right question.
See also
- Commonly misread game mechanics (the game's own traps, kept separate from this page)
- How the map labels are classified
- Resupply points
- LogoCat (site creator)
Video citations
- Why You Should Settle Greenbeach | Kenshi Location GuidePaul Rogers Gaming