Repository navigation
Conversation
…version floor had deleted; undef.test guards every name The estates (gw 72, 34_settle.js) were written while STR still gated planned street profiles; the generator version floor deleted that gate, and the two met only on main: ReferenceError in every town or village with an estate. - 34_settle.js: the estate lanes take the street profile as all streets do now. - tools/undef.test.mjs: no name in src/game is used without being declared (the rule of ESLint's no-undef over the language's scopes, with acorn; build names from build/build.mjs and build/items). - tools/farrec.test.mjs builds worlds of the current numbers (it pinned gh 2, gl 2, gw 9, below the floor). - docs/ARCHITECTURE.md: rule 7, every name is declared. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiczdvJyHJBSpA2HKuTs6m
Owner
Author
|
Closing: main already has this fix. Commit 571951f (build 482) made the same change in Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Anton · project thread
What
A fix forward for the seam between two PRs that met on main in the combined merge (#506): the generator version floor (#466) and the estates (gw 72).
34_settle.jswas written while the constantSTRstill gated planned street profiles. The floor deleted that gate (it is always on now). Each PR was green alone; together every town or village with an estate threwReferenceError: STR is not definedwhile it was planned. The estate lanes now take the street profile as every street does.docs/ARCHITECTURE.md: every name is declared, withtools/undef.test.mjs. The game is one script, so a name deleted by one PR can still be read by code another PR wrote before. The test finds any name insrc/gamethat no scope declares. It runs in under 2 s.tools/farrec.test.mjsbuilds worlds of the current numbers. It pinnedgh 2, gl 2, gw 9, below the floor, sotools/genv.test.mjswas red on main and the test never met the estates.Proof
node tools/estate.test.mjsandnode tools/farrec.test.mjsstop withReferenceError: STR is not defined;node tools/genv.test.mjsnames the three pins of farrec.estate.test: all passed(5 estates in 18 towns, 10 of 48 villages are one estate),farrec OK 195 checks,genv: ok,golden: 1028 checks(no world hash moved),dupkeys ok.tools/undef.test.mjsis red on main's sources (STR is not declared anywhere: 34_settle.js:451, 454) and green here (174 files, 53 555 lines). Its own cases cover hoisting, block scopes, patterns, classes, switch blocks,typeofguards and the fault itself.Sources
no-undef, the rule this test applies: https://eslint.org/docs/latest/rules/no-undefvarand function declarations, block scopes forlet,const,class), the model the test follows with the parser the repo already has (acorn): https://github.com/eslint/eslint-scopeScreenshots
tools/shots/482.mjsreuses two scenes of the estates' own recipe (an estate inside a town, a village that is one estate); the release workflow adds them to the release and comments them here.Generated by Claude Code