Repository navigation
fix: make locale planning and validation explicit - #15178
benceruleanlu wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright: ✅ 1809 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-14T00:03:48.893Z",
"gitSha": "b546b236ebf5b6dba7a0b8aa6729fad9e94c3947",
"branch": "bl/i18n-review-followups",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2042.1790000000044,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.585999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 511.19800000000004,
"heapDeltaBytes": 5806740,
"heapUsedBytes": 70675164,
"domNodes": 16,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 17.787999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2033.649999999966,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.290000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 549.9110000000001,
"heapDeltaBytes": 5932216,
"heapUsedBytes": 70669556,
"domNodes": 16,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 23.592,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1946.5089999999918,
"styleRecalcs": 78,
"styleRecalcDurationMs": 46.237,
"layouts": 12,
"layoutDurationMs": 4.0920000000000005,
"taskDurationMs": 945.414,
"heapDeltaBytes": -15215816,
"heapUsedBytes": 49753592,
"domNodes": -282,
"jsHeapTotalBytes": 23826432,
"scriptDurationMs": 124.19599999999998,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1916.3110000000643,
"styleRecalcs": 75,
"styleRecalcDurationMs": 42.201,
"layouts": 12,
"layoutDurationMs": 4.285000000000001,
"taskDurationMs": 974.297,
"heapDeltaBytes": -15002772,
"heapUsedBytes": 49761772,
"domNodes": -283,
"jsHeapTotalBytes": 23564288,
"scriptDurationMs": 128.776,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1736.6069999999922,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.892,
"layouts": 6,
"layoutDurationMs": 0.7839999999999998,
"taskDurationMs": 412.30899999999997,
"heapDeltaBytes": 8668956,
"heapUsedBytes": 73553276,
"domNodes": 77,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 22.994,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1735.3340000000799,
"styleRecalcs": 30,
"styleRecalcDurationMs": 18.164999999999996,
"layouts": 6,
"layoutDurationMs": 0.8029999999999999,
"taskDurationMs": 453.294,
"heapDeltaBytes": 8579800,
"heapUsedBytes": 73593272,
"domNodes": 75,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 27.554000000000002,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 640.0919999999815,
"styleRecalcs": 12,
"styleRecalcDurationMs": 10.362,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 435.7969999999999,
"heapDeltaBytes": -11206216,
"heapUsedBytes": 53508280,
"domNodes": 20,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 66.29599999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 614.7740000000113,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.737000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 411.088,
"heapDeltaBytes": -11172508,
"heapUsedBytes": 53553252,
"domNodes": 16,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 60.05799999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2060.8440000000314,
"styleRecalcs": 10,
"styleRecalcDurationMs": 13.422000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 781.5969999999999,
"heapDeltaBytes": 7249780,
"heapUsedBytes": 67009452,
"domNodes": -282,
"jsHeapTotalBytes": 3768320,
"scriptDurationMs": 122.047,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2028.1049999999823,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.417000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 791.447,
"heapDeltaBytes": 7319800,
"heapUsedBytes": 67231572,
"domNodes": -282,
"jsHeapTotalBytes": 3506176,
"scriptDurationMs": 119.71600000000001,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2162.8860000000145,
"styleRecalcs": 70,
"styleRecalcDurationMs": 17.284,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1348.869,
"heapDeltaBytes": 5159356,
"heapUsedBytes": 66149796,
"domNodes": -284,
"jsHeapTotalBytes": 4485120,
"scriptDurationMs": 431.554,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2156.4750000000004,
"styleRecalcs": 68,
"styleRecalcDurationMs": 15.358999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1355.5649999999998,
"heapDeltaBytes": 1180948,
"heapUsedBytes": 62795536,
"domNodes": -284,
"jsHeapTotalBytes": 4222976,
"scriptDurationMs": 426.509,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3277.9299999999694,
"styleRecalcs": 64,
"styleRecalcDurationMs": 16.503999999999998,
"layouts": 60,
"layoutDurationMs": 9.023,
"taskDurationMs": 1576.087,
"heapDeltaBytes": 25070380,
"heapUsedBytes": 87712956,
"domNodes": 10,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 556.315,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3240.0689999999486,
"styleRecalcs": 63,
"styleRecalcDurationMs": 14.825000000000001,
"layouts": 60,
"layoutDurationMs": 8.858,
"taskDurationMs": 1621.3570000000002,
"heapDeltaBytes": -1651648,
"heapUsedBytes": 61569380,
"domNodes": -288,
"jsHeapTotalBytes": 7176192,
"scriptDurationMs": 560.461,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2047.5580000000377,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.674999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 754.264,
"heapDeltaBytes": 7044804,
"heapUsedBytes": 67925324,
"domNodes": -284,
"jsHeapTotalBytes": 4554752,
"scriptDurationMs": 116.299,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2035.0000000000819,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.105,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 779.7960000000002,
"heapDeltaBytes": 7002152,
"heapUsedBytes": 67959868,
"domNodes": -283,
"jsHeapTotalBytes": 3768320,
"scriptDurationMs": 118.949,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 595.799999999997,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.312,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 412.702,
"heapDeltaBytes": -10596264,
"heapUsedBytes": 54211352,
"domNodes": 18,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 125.91199999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 627.0799999999781,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.605,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 432.38100000000003,
"heapDeltaBytes": -10729332,
"heapUsedBytes": 54298208,
"domNodes": 20,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 130.005,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1991.2800000000175,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.877,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 497.854,
"heapDeltaBytes": 5945876,
"heapUsedBytes": 70863700,
"domNodes": 20,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 17.849999999999998,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2009.5569999999725,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.632,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.87299999999993,
"heapDeltaBytes": 5943692,
"heapUsedBytes": 70763848,
"domNodes": 20,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 17.636,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1720.0520000000097,
"styleRecalcs": 75,
"styleRecalcDurationMs": 38.619,
"layouts": 16,
"layoutDurationMs": 4.814,
"taskDurationMs": 815.2909999999999,
"heapDeltaBytes": -3468616,
"heapUsedBytes": 61355820,
"domNodes": 60,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 100.30600000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1708.7080000000014,
"styleRecalcs": 76,
"styleRecalcDurationMs": 39.843999999999994,
"layouts": 16,
"layoutDurationMs": 4.871,
"taskDurationMs": 811.4440000000001,
"heapDeltaBytes": -3426296,
"heapUsedBytes": 61389284,
"domNodes": 62,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 101.102,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1419.7100000000091,
"styleRecalcs": 18,
"styleRecalcDurationMs": 30.223,
"layouts": 14,
"layoutDurationMs": 11.862000000000002,
"taskDurationMs": 1008.5070000000001,
"heapDeltaBytes": 30684712,
"heapUsedBytes": 100156660,
"domNodes": 13673,
"jsHeapTotalBytes": 15728640,
"scriptDurationMs": 38.124,
"eventListeners": 2375,
"totalBlockingTimeMs": 136,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8270.527000000016,
"styleRecalcs": 250,
"styleRecalcDurationMs": 44.142,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4629.365,
"heapDeltaBytes": 4985392,
"heapUsedBytes": 65079340,
"domNodes": -284,
"jsHeapTotalBytes": 5271552,
"scriptDurationMs": 1379.76,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8423.090000000002,
"styleRecalcs": 250,
"styleRecalcDurationMs": 45.62200000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4782.68,
"heapDeltaBytes": 12389568,
"heapUsedBytes": 72163356,
"domNodes": -282,
"jsHeapTotalBytes": 6320128,
"scriptDurationMs": 1408.79,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 18699.95399999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18639.956,
"heapDeltaBytes": -32920252,
"heapUsedBytes": 186958848,
"domNodes": -8312,
"jsHeapTotalBytes": -8331264,
"scriptDurationMs": 588.2,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18256.66799999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18243.2,
"heapDeltaBytes": -32719836,
"heapUsedBytes": 166159200,
"domNodes": -8312,
"jsHeapTotalBytes": -10690560,
"scriptDurationMs": 539.912,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22648.26899999997,
"styleRecalcs": 166,
"styleRecalcDurationMs": 25.411000000000016,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22605.456000000002,
"heapDeltaBytes": -37623520,
"heapUsedBytes": 177356176,
"domNodes": -8312,
"jsHeapTotalBytes": -9973760,
"scriptDurationMs": 960.4879999999999,
"eventListeners": -16381,
"totalBlockingTimeMs": 644,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 23406.35199999997,
"styleRecalcs": 174,
"styleRecalcDurationMs": 28.48499999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23373.911,
"heapDeltaBytes": -52439904,
"heapUsedBytes": 154403236,
"domNodes": -8312,
"jsHeapTotalBytes": -11735040,
"scriptDurationMs": 910.2949999999998,
"eventListeners": -16383,
"totalBlockingTimeMs": 1059,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 479.5909999999708,
"styleRecalcs": 15,
"styleRecalcDurationMs": 25.786,
"layouts": 4,
"layoutDurationMs": 1.4989999999999999,
"taskDurationMs": 133.382,
"heapDeltaBytes": 5167328,
"heapUsedBytes": 69030128,
"domNodes": 126,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 12.351999999999999,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 456.92699999995057,
"styleRecalcs": 14,
"styleRecalcDurationMs": 18.818,
"layouts": 2,
"layoutDurationMs": 0.4029999999999999,
"taskDurationMs": 104.974,
"heapDeltaBytes": 5044792,
"heapUsedBytes": 68659900,
"domNodes": 123,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 9.337,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 434ab4d94c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const auditSkipKeys = new Set([ | ||
| ...plan.invalidated, | ||
| ...plan.knownViolationKeys | ||
| ]) |
There was a problem hiding this comment.
Exclude shape-pending leaves from the audit
When an existing translation is present at the correct path but has the wrong shape—for example, the English value is a string while the translation is an array, or an array has the wrong length—collectPendingLeaves queues it with reason shape, but this skip set omits that pending key. auditProtectedLiterals consequently reports leaf type changed or array length changed, and the new audit preflight aborts the entire generation run before the queued translation can repair it. Include shape-pending keys in the audit exclusions, while continuing to validate the rebuilt output afterward.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## bl/i18n-corpus-model-rollout #15178 +/- ##
==============================================================
Coverage 81.11% 81.11%
==============================================================
Files 1882 1882
Lines 123772 123772
Branches 39016 39481 +465
==============================================================
Hits 100403 100403
Misses 22813 22813
Partials 556 556
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
christian-byrne
left a comment
There was a problem hiding this comment.
Follow-up review. Nearly everything from the #15062 pass is addressed here or was declined with reasoning I accept, so first the short version: this is good work and I am not blocking it.
Where I was wrong, stated plainly so it does not get re-filed later:
- Plural-form count equality — wrong invariant. Cardinality is a property of the target language, and your audit (35 of 46 English
|strings already differ in form count in at least one shipped locale) settles it.added plural separator+empty plural formis the better pair. git hash-object -w— you are right; the blob has to persist before the source file is necessarily committed, or the next local run cannot resolve it.- Sorted vs collector key order — I predicted a whole-file reorder diff on all 13 locales. You checked and the target trees were already fully sorted, so there is nothing to reorder.
- Content-hash rename detection — 6,188 of 9,082
nodeDefs.jsonleaves sharing duplicate English text is a decisive answer. Identity cannot be inferred from content in this corpus. Withdrawn.
Two things I would still like before this is done:
- The
knownViolationsallowlist arrived carrying 25 live defects and has no way back out. Detail inline —g.itemsSelected,workspacePanel.members.membersCount,g.searchPlaceholderandsubscription.creditsRemainingThisMonthare user-visible localization bugs in every non-English locale, and one of them is exactly the stale-English drift the pipeline was built to fix. The abort mechanism is right; the suppression list needs owners, links, and an expiry. - The model pin never happened.
gpt-5.6-terraat high reasoning effort merged with the framework change and that thread got no reply. The first production run has not happened yet, so there is still a window to either pingpt-4.1for it or dry-run two locales and have a native speaker look at the diff. After the nextversion-bump-*branch, the window closes.
Everything else — the recursive truncation split and its rewritten test, the hard failure on an unreadable source blob, the two ci-lint-format* workflows getting fetch-depth: 0 + filter: blob:none, per-leaf queue reasons, pruned-key logging, stateConcurrency, the pre-flight and post-run cost report, the protected-literal policy moving to config.ts, the linked-message tokens, per-entry-file persistence on partial failure, and the canonical-format documentation — all landed and all read correctly to me.
| // forms, @:key / @.modifier:key are linked messages | ||
| const pluralSeparatorPattern = /\|/ | ||
| const linkedMessagePattern = /@[.:]/ | ||
| const linkedMessagePattern = |
There was a problem hiding this comment.
The linked-message pattern is a real improvement over /@[.:]/ — it captures the full @:key / @.modifier:key token so a changed key produces missing/added rather than a boolean.
Separate question about the line above it: interpolationPattern lost its (?<!\\) negative lookbehind somewhere between the first review head and main, and I could not find a note explaining it. escapeI18nMessage doubles backslashes on the node-def side, so an escaped brace is a shape the corpus can actually contain. Was that deliberate, and is there a test pinning the intended behaviour for \\{name}?
| invalidIds.push(key) | ||
| } | ||
| } | ||
| if (invalidIds.length > 0) { |
There was a problem hiding this comment.
Rejecting non-string values instead of dropping them is right. One consequence to weigh: the throw discards the entire batch, so one bad value in a 40-item request re-runs 39 good translations at reasoningEffort: 'high'.
Since the retry has no feedback attached — unlike the retryNote path — the second attempt is another identical request, which is the same shape as the truncation bug this PR just fixed. Consider retrying only the offending ids, or attaching a note naming them the way translateLocaleItems does.
daefce0 to
5660c88
Compare
|
This PR has been superseded in its original combined form by four focused review units:
Please continue review and discussion on the corresponding PR for each unit separately. The existing discussion here remains available as historical context. |
## The bug
`.github/workflows/ci-binary-size-validation.yaml` subscribes to the
`labeled` and `unlabeled`
pull_request event types:
```yaml
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
```
So **any** label write starts a second binary-size run on the identical
commit, and
`cancel-in-progress` kills the one already in flight. A label change
cannot alter a bundle's
size, so there is nothing for the job to re-evaluate — the second run
just recomputes the same
answer and leaves a permanent `cancelled` check run behind on the
commit.
## Why it matters beyond wasted minutes
The cancelled check does not go away when the retry succeeds. Both check
runs stay attached to
the commit, so the commit's check rollup is `FAILURE` forever.
The PR risk grader reads that rollup. Its reversibility axis treats a
non-`SUCCESS` rollup as
`no_green_checks_tier`, which `.github/risk.json` sets to **R2** — so a
PR gets bumped to R2
because a label bot wrote a `size:*` label two seconds after CI started.
The chain, end to end:
1. `dosubot[bot]` writes a `size:*` label seconds after the PR opens or
is pushed to.
2. That `labeled` event re-triggers binary-size on the same commit;
`cancel-in-progress` cancels
the in-flight run.
3. The commit now permanently carries a `binary-size / CANCELLED` check
run.
4. The grader counts `CANCELLED` as a failing check, so the rollup is
not `SUCCESS`, so
reversibility is pinned at R2.
## Measured (re-verified for this PR, 2026-08-18)
| measure | value |
|---|---|
| binary-size runs, 30 days (created >= 2026-07-19) | 4,307 |
| ...concluded `cancelled` | **1,128 = 26.2%** |
| ...concluded `failure` | 39 = 0.9% |
| complete 2-day window (created >= 2026-08-16) | 819 runs |
| ...cancelled | 164 = 20.0% |
| cancels superseded by a later run on the **same head SHA** | **163 of
164 = 99.4%** |
| median gap to the superseding run | **2 s** (p25 0 s, p75 4 s) |
| distinct head SHAs in that window carrying **both** a `cancelled` and
a `success` run | 110 of 613 = **17.9%** |
Cancellations outrun real findings by roughly 29 to 1.
**Timed to the second on three live PRs** (label event → new run → prior
run cancelled):
- Comfy-Org#15413 — `size:XS` at 21:31:18Z → new run 21:31:20Z, prior run
(started 21:31:17Z) cancelled
- Comfy-Org#15414 — `size:L` at 21:35:47Z → new run 21:35:49Z, prior run
(21:35:45Z) cancelled
- Comfy-Org#15412 — `size:L` at 21:02:03Z → new run 21:02:06Z, prior run
(21:02:01Z) cancelled
**A settled rollup showing the consequence.** Commit `ce9ec9b4d0`
(Comfy-Org#15414, a `browser_tests/`-only
PR) — rollup state `FAILURE` over 85 contexts: 57 `SUCCESS`, 26
`SKIPPED`, and exactly one
failing-class context, `binary-size / CANCELLED`. That PR carries
`risk:R2`.
**Across the whole label population:** of the 112 PRs currently carrying
`risk:R2`, **17 (15.2%)
have a check rollup whose only failing-class context is `binary-size /
CANCELLED`** — Comfy-Org#14546,
Comfy-Org#15138, Comfy-Org#15173, Comfy-Org#15178, Comfy-Org#15261, Comfy-Org#15280, Comfy-Org#15307, Comfy-Org#15354, Comfy-Org#15371, Comfy-Org#15376,
Comfy-Org#15380, Comfy-Org#15388, Comfy-Org#15402,
Comfy-Org#15404, Comfy-Org#15410, Comfy-Org#15411, Comfy-Org#15414.
## Why removing the trigger is the right fix, and not the concurrency
group
Keying the concurrency group on `github.event.pull_request.head.sha`
does **not** help: a label
write happens on the identical commit, so it lands in the same group and
still cancels. The
re-trigger itself is what has to go.
`binary-size` is **not** a required check for merge — the `ProtectMain`
ruleset requires `test`,
`lint-and-format`, `e2e-status` and `website-e2e`, and `CLA Check`
requires `cla-assistant`.
## Trade-off, stated plainly
The `allow-large-binaries` bypass is read from
`github.event.pull_request.labels.*.name` at the
job `if:`. With `labeled` removed, applying that label no longer
re-evaluates the check
instantly — it takes effect on the next `synchronize`/`reopened`. That
costs nothing today:
**`allow-large-binaries` has been applied to 0 PRs, ever**, and the
check does not gate merge, so
a stale red never blocks anyone.
`scripts/cicd/check-binary-size.sh:165` prints "add the
'allow-large-binaries' label to the PR"
on failure; that advice still works, it just lands on the next push
rather than instantly. I have
deliberately not touched that file — happy to reword it in a follow-up
if a reviewer wants it.
## This PR demonstrates the fix on itself
`pull_request` workflow definitions are read from the PR head, so the
change is already live
here. Timeline:
- 22:50:13Z — PR opened
- 22:50:17Z — binary-size run `32194526247` starts
- 22:50:19Z — `dosubot[bot]` applies `size:XS`, **two seconds into the
run** — the exact pattern
that cancels the run on every other PR
Result: **one** binary-size run on this commit, no second trigger, no
cancellation,
`binary-size pass 35s`. Compare Comfy-Org#15413 / Comfy-Org#15414 / Comfy-Org#15412 above, where
the same two-second label
write killed the in-flight run and left a permanent `CANCELLED` on the
commit.
## Scope
This is half the loop. The other half is grader-side: `CANCELLED` is
counted as a *failing*
check in `Comfy-Org/github-workflows`
(`scripts/pr-risk/grade-pr-risk.sh`), which is what turns a
cancelled run into an R2. That fix has **not shipped** and is not in
this PR. So this PR removes
the largest source of the cancellations but does not fully close the
loop — a binary-size run
cancelled for any other reason would still red the rollup.
No other change to the file.
Stacked on #15230. This PR is retained for the planning/validation unit so its existing review history remains available.
Summary
Make locale preserve/regenerate planning, provenance, pruning, protected-token validation, final validation, and operator reporting explicit.
Changes
Review Focus
The pending planner redesign is intentionally not implemented here. The next design decision is an authoritative plan that classifies every leaf as preserve or regenerate, audits only preserved leaves before generation, and validates the entire rebuilt locale without exclusions before writes or provenance advancement.
Existing substantive review threads remain for reviewer follow-up, including the shape-pending preflight concern and escaped interpolation behavior. The unresolved non-string retry policy now belongs to #15229 and remains linked there.
Validation:
gpt-5.6-sol→gpt-5.6-terraand deletion of staleknownViolationsdocumentationmise exec -- pnpm test:unit scripts/i18n/update-locales.test.ts --run(29 passed)mise exec -- pnpm locale:check(exit 0; 0 protected-token violations)mise exec -- pnpm typecheck:scriptsmise exec -- pnpm typecheckmise exec -- pnpm lintmise exec -- pnpm knipmise exec -- pnpm format:check