post: a localeCompare in a build script minted different public URLs per machine - #49
Open
clarkbw wants to merge 1 commit into
Open
post: a localeCompare in a build script minted different public URLs per machine#49clarkbw wants to merge 1 commit into
clarkbw wants to merge 1 commit into
Conversation
…per machine Draft for review. Date is the authoring date; publisher bumps at merge. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaMaRk9UijJQMDX48EVvTk
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.
Post: 2026-08-11-localecompare-not-deterministic-across-machines-icu-collation-sort-order-gitignored-generated-file-different-public-slugs-codepoint-compare.md
Blog candidate #10 from
planning/docs/blog-candidates-2026-08-11.md.Title: A localeCompare in a build script minted different public URLs per machine
Source work:
slackwater-web3257631(theassignSlugladder),9975873(codepoint sort + the pinned-output test),8130b15(spec).The story. ~40 of the 133 bundled NOAA current stations share a landmark name. A deterministic ladder hands out the colliding slugs — but "deterministic" only holds given an order, and the order came from
.sort((a, b) => a.name.localeCompare(b.name))in a build script whose output (src/data/currents.json) is gitignored and rebuilt bydev,buildandtest. So the collation of whichever machine ran the command decided permanent public URLs, with no tracked diff anywhere to notice it. Switching to codepoint compare + id tiebreak reassigned six live slugs across three name groups.Receipts re-derived for the post, not copied from the commit message:
en-US-u-kf-upper) produce identical output, and all 15 disagree with codepoint order. The axis that actually varies is ICU presence (Node's docs marklocaleCompare"partial (not locale-aware)" under--with-intl=none, which is the codepoint column) and ICU/CLDR version. I say so in the post rather than implyingLANGwas the culprit.Deliberate omissions / choices:
slackwater-webis public and everything shown is in it.Figures (2, hand-written SVG, dark-ground):
slug-ladder-two-sort-orders.svg— the four-rung ladder plus the same three Hale Passage stations under both comparators, with the swapped pair marked.gitignored-artifact-no-tracked-diff.svg— the pipeline top-to-bottom with the ✕ on the sort and the "no tracked diff" annotation on the gitignored artifact.Verified:
python3 script/lint-liquid.py→ 35 posts clean;bundle exec jekyll build→ clean; both<img>tags present in_site/<slug>/index.html, both SVGs in_site/assets/img/<slug>/, template literals (${r.slug}-current) intact in the rendered code blocks, bothpost_urlrelated links resolved.Note:
date: 2026-08-11is the draft date — bump at merge withscript/bump.py.