You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#106 fixed the two load-bearing instances — markers/read.ts, which decides which files survive the 3,000-path cap, and the markerScan path lists, whose skippedPaths order feeds cappedScanFinding's slice(0, 10). Both now use compareCodeUnits from packages/core/src/ordering/, which already existed.
The remaining sites are not merely display order. CheckOutcome documents itself as:
These arrays serialize into adr check --json, which @adrkit/ci consumes. Under a different ICU locale, identical inputs produce different output bytes. The set membership is fixed; the contract is about the bytes.
packages/core/src/markers/resolve.ts — compareDeclarations and the recordId sort.
packages/ci/src/changed-files.ts — the changedFiles / markerFiles sorts and the changed-dependency sort.
Worth a sweep rather than a spot fix, since compareCodeUnits already exists and the anomaly was reaching for localeCompare at all.
Worth considering alongside
A lint rule or test that fails on a new localeCompare in any path that reaches serialized output. Otherwise the next one lands the same way this batch did.
Raised by @davesheffer on #106 and partly fixed there. This covers the remainder.
Why it matters
localeComparedepends on the runtime's ICU locale, so two environments order the same string set differently:#106 fixed the two load-bearing instances —
markers/read.ts, which decides which files survive the 3,000-path cap, and themarkerScanpath lists, whoseskippedPathsorder feedscappedScanFinding'sslice(0, 10). Both now usecompareCodeUnitsfrompackages/core/src/ordering/, which already existed.The remaining sites are not merely display order.
CheckOutcomedocuments itself as:These arrays serialize into
adr check --json, which@adrkit/ciconsumes. Under a different ICU locale, identical inputs produce different output bytes. The set membership is fixed; the contract is about the bytes.Known sites
packages/core/src/check/index.ts—uniqueSorted, applied tochangedFiles. Pre-dates feat(core,ci): wire inbound @adr markers into check #106.packages/core/src/markers/resolve.ts—compareDeclarationsand therecordIdsort.packages/ci/src/changed-files.ts— thechangedFiles/markerFilessorts and the changed-dependency sort.Worth a sweep rather than a spot fix, since
compareCodeUnitsalready exists and the anomaly was reaching forlocaleCompareat all.Worth considering alongside
A lint rule or test that fails on a new
localeComparein any path that reaches serialized output. Otherwise the next one lands the same way this batch did.