Commit f570c28
fix(cli): the i18n provenance companion accompanies a module, and names its sections from their payloads (#16871)
`os i18n extract --source-hashes` narrowed the provenance table to "the
sections this run commits" and built that list from two literals. The half
deciding WHICH modules were emitted already read the emitted set; the half
naming them pushed 'objects' / 'metadataForms'.
Two consequences, one cause:
- With no module emitted the list is empty, narrowToCommittedSections
returns {}, and {} is truthy at the emit gate — so the run wrote a
zero-record companion with no bundle module beside it. Because --check
compares the companion by bytes like any other emitted file, that
orphan once committed is a file the gate demands forever.
- Under kind: 'stack' the module holds every group the stack authors
while the caller named one of them — correct only for as long as no
other section can reach the table.
translationModuleSections() now sits beside translationModulePayload and is
switched on the same kind, so what a module holds and which sections it
commits are one decision. The emit gate returns undefined for an empty set.
No provenance record moves in this repository: the tables only ever carry the
two sections collectFilledFromHashes walks, so 'objects' was the right name
for both stack sub-tree modes — correct by coincidence, now by construction.
Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8
Co-authored-by: Claude <noreply@anthropic.com>1 parent 4771bd9 commit f570c28
5 files changed
Lines changed: 406 additions & 5 deletions
File tree
- .changeset
- packages/cli
- src
- commands/i18n
- utils
- test
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
451 | | - | |
452 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
453 | 474 | | |
454 | 475 | | |
455 | 476 | | |
456 | 477 | | |
457 | | - | |
458 | | - | |
459 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
460 | 490 | | |
461 | 491 | | |
462 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1904 | 1904 | | |
1905 | 1905 | | |
1906 | 1906 | | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
1907 | 1953 | | |
1908 | 1954 | | |
1909 | 1955 | | |
| |||
0 commit comments