Skip to content

fix(native): match Intl clock patterns for four locales - #199

Merged
rynfar merged 2 commits into
nativefrom
nw/188-timestamps
Nov 4, 2026
Merged

rynfar merged 2 commits into
nativefrom
nw/188-timestamps

Conversation

@rynfar

@rynfar rynfar commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Native timestamps diverged from the web's Intl.DateTimeFormat for Colombian Spanish hour padding, Lithuanian 12-hour padding, Uyghur's default cycle, and Marathi's 24-hour separator. This slice ports the eight clock patterns and four default cycles selected by real V8 Intl into a generated supplement. ICU4X still supplies localized numbers and names; the existing hour-cycle selection, timezone conversion, and bounded host-locale cache continue to serve the native timestamp entry points and all three General time-format modes.

Generated-data checks compare case values and pattern bodies independently of Node/ICU provenance. Regeneration still writes the actual runtime versions into both JSON fixtures and the generated Rust header.

The existing oracle test now preserves the original 900 cases and adds 1,440 regression cases: exactly es-CO, lt-LT, ug-CN, mr-IN, each with no hour-cycle extension and hc-h11, hc-h12, hc-h23, hc-h24, all three modes, every hour, exact midnight/noon, and minute 05 otherwise. Provenance: Node v22.22.3 / ICU 78.2. Both ledger rows remain partial and now track #188; every other row and column is unchanged.

Validation:

  • Focused CLI proof: changing only process.version metadata to v22.23.2 passes; write mode records that metadata without changing values/patterns. Actual Node v25.6.1 / ICU 78.2 still rejects 40 real preexisting Korean value differences. An altered Rust pattern also fails. Evidence: /private/tmp/native-factory-2f5f764a/evidence-188/review-fix/.
  • Rebased onto e9d5ae92be4969e6ee0e890ccfa552de959f7ca4 after feat(native): add ACP registry search and sign-in wizard #198. Approved timestamp feature blobs match 405514f6e5b95276f2135a544a2e5559d95da1ee exactly; only the generator check changed. All ledger lines outside the two owned rows match the new base byte-for-byte, including provider rows. Exact blob/column proof and range-diff are in the evidence directory above.
  • cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace (1,329 passed), theme generation check, parity sync tests (42 passed), conformance generation check, timestamp generation check, and vp run check:changed e9d5ae92be4969e6ee0e890ccfa552de959f7ca4 pass.
  • Failing first: the expanded audit reproduced all 458 mismatches in the four owned locales; those are now zero. The committed 2,340-case oracle passes.
  • A reproducible 42-base-locale / 15,120-case audit also found 360 additional mismatches outside this slice: bg-BG (192, trailing ч.) and tr-TR (168, day-period position). These remain gaps under Timestamp locale gaps (ST-GENERAL, TR-WORK) #188. Run node scripts/gen-timestamp-oracle.mjs --sweep-output /absolute/path/sweep.json, then T3_TIMESTAMP_SWEEP=/absolute/path/sweep.json cargo test -p t3-core locale_options_match_node_intl_oracle from apps/native; the optional audit reports these failures rather than tolerating them.
  • Headless Rust runtime: 240 midnight/noon/AM/PM outputs across the four locales, all extensions and modes, independently compared with V8: zero differences. Transcript: /private/tmp/native-factory-2f5f764a/evidence-188/format-runtime.tsv.

Local PNG evidence, rendered offscreen from copied smoke state with per-process AppleLocale arguments:

  • es-CO: /private/tmp/native-factory-2f5f764a/evidence-188/before-es-CO.png → /private/tmp/native-factory-2f5f764a/evidence-188/after-es_CO.png
  • lt-LT: /private/tmp/native-factory-2f5f764a/evidence-188/before-lt_LT.png → /private/tmp/native-factory-2f5f764a/evidence-188/after-lt_LT.png
  • ug-CN: /private/tmp/native-factory-2f5f764a/evidence-188/before-ug_CN.png → /private/tmp/native-factory-2f5f764a/evidence-188/after-ug_CN.png
  • mr-IN: /private/tmp/native-factory-2f5f764a/evidence-188/before-mr_IN.png → /private/tmp/native-factory-2f5f764a/evidence-188/after-mr_IN.png

Remaining gaps: the wider audit above; Intl behavior outside the precise tested locale/extension/options matrix; non-macOS numeric dates still use the existing English fallback. Numeric date best-pattern/calendar selection needs its own verified slice. Non-macOS execution, live OS preference/timezone changes, and macOS 13 runtime remain unverified. Keep #188 open.

Built with GPT-6.1 Sol in Codex

@rynfar
rynfar force-pushed the nw/188-timestamps branch from 405514f to d8e9f93 Compare November 4, 2026 09:09
@rynfar
rynfar merged commit 0ee81fb into native Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant