Repository navigation
Commit 6af2901
fix(platform-objects): decide the report/dataset panel en-echoes per leaf, and pin the decisions as a ledger (#19401)
Fixes #19355
Clause-②: no
## What this is
The card's deliverable is a **per-leaf judgement with its reason
recorded**, not twelve translations. Every leaf below was decided on its
own evidence; the verdicts and their reasons live in a ledger the suite
reads (`report-dataset-panel-echo-decisions.test.ts`), not only in this
body.
## The reading, re-taken on this base
Re-derived mechanically on the worktree base `3ff6ddf1e`, over the four
keys the card names, in `zh-CN` / `ja-JP` / `es-ES`:
- **12 label leaves byte-identical to their `en` source — the card's
count is CONFIRMED**, key for key and locale for locale.
- **9 further `helpText` leaves at the same four keys** were also byte
copies (`report.fields.dataset` / `values` / `rows`, three locales
each). They are the same authored unit as the label they sit on, so a
fix that left them English would leave a panel whose field name is
Chinese and whose tooltip is not.
- `dataset.fields.measures.helpText` was **already translated** in all
three locales. That leaf is this change's negative control and is
recorded as such.
⇒ decided population: 4 keys × 8 string leaves × 3 locales = **24
decisions**, of which 21 were echoes and 3 were already authored.
## The instrument, with both controls
This package ships its own provenance table,
`PACKAGE/src/apps/translations/LOCALE.source-hashes.generated.ts`: an
entry exists exactly while that leaf is still a byte copy of the source
revision.
- positive control — every one of the 21 echoing leaves carried an
entry, in all three locales;
- negative control — `dataset.fields.measures.helpText`, the one leaf
here a translator had already written, carried none in any of them.
After the translations, `pnpm i18n:extract` dropped exactly 21 rows (7
keys × 3 locales), 0 added. The table now records these leaves as
authored rather than copied.
## Per-leaf decisions
Every verdict below is `translate` — the echo was an unauthored
extractor fill. That is a conclusion per leaf, not a policy: the
ledger's `echo` verdict exists and costs one recorded sentence per
locale, and no leaf here earned it.
| leaf | why it is a fill, not a rendering |
|:---|:---|
| `report.fields.dataset` (label) | The same panel's `blocks.dataset`
carries authored text in all three locales — 数据集 / データセット / Conjunto de
datos — landed deliberately by #19345. Note this settles the one case
triage flagged as possibly legitimate (`Dataset` in `es-ES`): this
catalog's own authored answer for that word, in that locale, is
"Conjunto de datos". |
| `report.fields.dataset` (helpText) | Prose, not a term of art, and a
byte copy in all three locales while the sibling helpTexts on the same
panel (`type`, `columns`, `order`, `chart`) were authored. |
| `report.fields.values` (label) | `blocks.values` on the same panel is
authored 度量 / メジャー / Medidas. |
| `report.fields.values` (helpText) | Prose. Its own sibling
`order.helpText` names the same two vocabularies (rows/columns
dimensions, values measures) in authored text in every locale — the
vocabulary existed; this leaf never got it. |
| `report.fields.rows` (label) | `blocks.rows` is authored 行 / 行 /
Filas, and the adjacent top-level `columns` is authored 列 / 列 / Columnas
on the same panel. |
| `report.fields.rows` (helpText) | The neighbouring `columns.helpText`
— the same sentence for the other axis — is authored in all three
locales. |
| `dataset.fields.measures` (label) | The sharpest case: the **same
leaf** carried a hand-authored `helpText` in all three locales while its
`label` was a byte copy. One leaf cannot be a decision and a fill at
once. |
| `dataset.fields.measures` (helpText) | Already authored before this
card. No change; recorded because it is the negative control above. |
The shared shape of the first seven: a translator who judged the English
word right at the top level would not have written the translated one a
few entries below it, in the same catalog, on the same panel, for the
same concept.
## The pin question, answered
**The derived pin is not widened. A listed ledger is added instead.**
`repeater-row-properties.test.ts` derives its population from the forms,
and that derivation is the reason it is good: a repeater enumerated
tomorrow is red the day it lands. Measured on this base:
- its population is **124** enumerated repeater row properties, and
**0** of them is an en-echo — these four keys are top-level form fields,
outside it;
- the only widening that would reach them is "all declared form-field
paths", which is **417** paths — and that population is red on **230
further echo leaves across 82 keys** today, none of them decided by this
card.
A pin that lands red is not a pin, and widening it would also
retro-scope #17508's carrier ruling. So the derived population stays as
#17508 drew it, and the DECIDED leaves are enumerated in a new file
whose header states the split. This is the ledger row the card asks for
rather than prose: a future deliberate echo is a `verdict: 'echo'` row
that must carry its own per-locale reason, and the suite refuses one
without it.
Each row is also pinned to the `en` source it was decided against, so a
reworded source reds the file instead of leaving a decision standing
over text nobody judged.
## Reverse verification
Both mutations ran through `scripts/ablation-replace.mjs` (anchor must
hit; on-disk blob before/after; restore proven equal to the `HEAD` blob
with `git diff HEAD` empty). Baseline first: 7 passed.
- **A — put one decided leaf back to its `en` source** (`zh-CN`
`report.fields.values.label`): blob `34c532953acf` to `3f7269b0789b`,
run **1 failed / 6 passed**, `AssertionError: zh-CN
report.fields.values.label reads its en source again`. Restored, blob
back to `34c532953acf`.
- **B — reword the `en` source a ledger row is pinned to** (`Values` to
`Value`): blob `b8a246889186` to `689bf01a679d`, run **2 failed / 5
passed** — the source pin AND the dark control (`expected 7 to be 8`),
so the control is live too. Restored, blob back to `b8a246889186`.
An earlier attempt at A is reported as a no-op rather than quietly
re-run: the mutation and its restore trap sat in one shell that exited
between them, so the file was already restored when the suite ran and
the green it printed measured nothing.
## The generated-bundle hazard the claim flagged
These bundles are generated and `git check-attr merge` reads
`unspecified` for all of them (control:
`packages/spec/spec-changes.json` reads `os-regen`), so two branches
adding i18n keys would merge clean and drop one side. Nothing collides
here — this change adds and removes **no keys at all**, only leaf values
— and the bundles were regenerated with the repo's own tooling, never by
hand:
pnpm i18n:extract
It rewrote all eleven bundles; the three translated `metadata-forms`
bundles round-tripped byte-identical to the hand-edited values, which is
itself the evidence that the edits are exactly what the extractor's
merge baseline produces.
## Changeset, measured
`@objectstack/platform-objects` is not `private`, `publishConfig.access`
is `public`, and `files[]` ships `dist`. Built, then grepped `dist` for
a new string with a pre-existing translated leaf on the same panel as
the positive control: both reach the same five published entry points
(`index.js`, `index.mjs`, `plugin.js`, `plugin.mjs`,
`metadata-translations/index.*`). A test-only string reaches none of
them. ⇒ the diff publishes, `skip-changeset` would be wrong, and a
`patch` changeset is included.
## Verification
Head `68049082b`.
- `pnpm --filter @objectstack/platform-objects test` — 43 files, 599
tests passed (was 43/592 with the new file's 7 tests added; the
translations directory alone goes 9 files/108 tests to 10/115).
- `pnpm --filter @objectstack/platform-objects typecheck` — green,
including `check:test-typecheck`. The new test file is in
`tsconfig.test.json`'s program (counted with `--listFiles`) and, by
design, not in the main one.
- Derived gate families: `node scripts/pm/dispatch-gates.mjs --repo
objectstack-ai/objectstack` — **59 derived, 59 run, 0 NOT-MEASURED**,
every one recorded with its exit code. Includes `check:i18n`,
`check:i18n-stale-fill`, `check:nul-bytes`, `check:published-files`,
`check:type-check-coverage`, `check:type-check-debt`,
`check:cross-package-test-inputs`, `check:test-source-alias`.
- Two adjacent i18n gates not in the derivation, run anyway:
`check:i18n-coverage` (13 configs, 621 baselined, none new) and
`check:i18n-walk-parity` — both green.
- `pnpm lint` — the whole repo, exit 0, no output.
- One honest note on the sweep: `check:dual-build-cjs-loads` answered
`PREREQUISITE NOT MET` (exit 3) on its first run because twelve packages
had no `dist` yet. That is not a red and was not recorded as one; once
the workspace was fully built it ran for real and passed (104 entry
points across 67 packages).
## Acceptance notes
Noted, not filed — observations, no defect named:
- The `dataset` panel's own `label`, `description` and all four
`sections` are still `en` echoes in all three locales, as are seven
further top-level `dataset.fields.*` keys. Same class as this card,
outside its four keys.
- `report.sections.dataset_binding` (label and description) and
`report.fields.drilldown` / `runtimeFilter` are echoes on the panel this
change touches.
To file (reproducible defect, class (a)) — handed to the seat, not filed
by this PR:
- **The metadata-form catalogs carry 82 further en-echo label keys (230
leaves) beyond the four #19355 decides.** Measured on `3ff6ddf1e` over
all 417 declared form-field paths; 0 of them are inside
`repeater-row-properties.test.ts`'s 124-property population, so no pin
sees them. A user in a translated locale reads English on those keys. It
is the same class as this card and explicitly not mechanical — each key
needs the same per-leaf judgement — so it is not taken in-place here.
Dedupe words: `en echo translated locale` · `metadata form field label
untranslated` · `dataset.fields.dimensions object.fields.enable
page.fields.interfaceConfig` · `declared form field echo census` ·
`translated leaf copy of source`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01NcPSwnmJHczmTu6FG7NMjE)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0870fb5 commit 6af2901
8 files changed
Lines changed: 252 additions & 42 deletions
File tree
- .changeset
- packages/platform-objects/src/apps/translations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1398 | 1398 | | |
1399 | 1399 | | |
1400 | 1400 | | |
1401 | | - | |
1402 | | - | |
| 1401 | + | |
| 1402 | + | |
1403 | 1403 | | |
1404 | 1404 | | |
1405 | | - | |
1406 | | - | |
| 1405 | + | |
| 1406 | + | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
1410 | | - | |
| 1409 | + | |
| 1410 | + | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | | - | |
| 1543 | + | |
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
195 | 194 | | |
196 | 195 | | |
197 | 196 | | |
198 | | - | |
199 | | - | |
200 | 197 | | |
201 | 198 | | |
202 | | - | |
203 | | - | |
204 | 199 | | |
205 | 200 | | |
206 | | - | |
207 | | - | |
208 | 201 | | |
209 | 202 | | |
210 | 203 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1398 | 1398 | | |
1399 | 1399 | | |
1400 | 1400 | | |
1401 | | - | |
1402 | | - | |
| 1401 | + | |
| 1402 | + | |
1403 | 1403 | | |
1404 | 1404 | | |
1405 | | - | |
1406 | | - | |
| 1405 | + | |
| 1406 | + | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
1410 | | - | |
| 1409 | + | |
| 1410 | + | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | | - | |
| 1543 | + | |
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
195 | 194 | | |
196 | 195 | | |
197 | 196 | | |
198 | | - | |
199 | | - | |
200 | 197 | | |
201 | 198 | | |
202 | | - | |
203 | | - | |
204 | 199 | | |
205 | 200 | | |
206 | | - | |
207 | | - | |
208 | 201 | | |
209 | 202 | | |
210 | 203 | | |
| |||
Lines changed: 224 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 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1398 | 1398 | | |
1399 | 1399 | | |
1400 | 1400 | | |
1401 | | - | |
1402 | | - | |
| 1401 | + | |
| 1402 | + | |
1403 | 1403 | | |
1404 | 1404 | | |
1405 | | - | |
1406 | | - | |
| 1405 | + | |
| 1406 | + | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
1410 | | - | |
| 1409 | + | |
| 1410 | + | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | | - | |
| 1543 | + | |
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
| |||
0 commit comments