Repository navigation
Fix #522 — world-graph sorts use the §4.2 canonical comparators - #564
Merged
Merged
Conversation
Argument-less localeCompare collated by the host locale and put incident:10 before incident:2. Runtime-entity projections now sort by numeric ordinal, definition ids and StateChange path/reason by code unit (stated in 12 §12), and the determinism lint block rejects localeCompare without a locale.
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.
Closes #522.
World-graph sorted with argument-less
localeCompare, which collates by the host locale and ordersincident:10beforeincident:2. 12 §4.2 already names the canonical orders; this applies them.buildings,constructionSites,guests,staff,incidents,alerts,map.scenery) sort withcompareRuntimeEntityId.view.ts,source.tsandtick/effects.tsusescompareDefinitionId.StateChangerows compare path and reason by ordinal code unit; 12 §12 now says so.localeComparewith fewer than two arguments. The simulation kind'slocaleCompare(x, "en-US-POSIX")(10 §2.2) is still allowed.90-decisions.md; one bullet added to the guide's determinism rules.Verified
npm run typecheck,npm run lint: clean.npm test: 110 files, 2040 tests passed. No fixture or golden changed order, because no shipped campaign has ten instances under one prefix.kind.test.tsfail with the source fix reverted and pass with it../build/Test-Documentation.ps1: passed.git diff --check: clean../docs.ps1 -BuildOnlynot run locally; the Verify Documentation Build check covers it.