Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(i18n-gate): require a key boundary in the pack sweep's text net (objectui#8701) - #8753

Merged
os-justin merged 1 commit into
mainfrom
claude/issue-8701-i18n-key-boundary-pack-sweep
Sep 9, 2026
Merged

os-justin merged 1 commit into
mainfrom
claude/issue-8701-i18n-key-boundary-pack-sweep

Conversation

@os-justin

Copy link
Copy Markdown
Collaborator

Fixes #8701

What changed

textFootprint()'s full-key probe now requires a key boundary on the pack sweep too: keyBoundary flips from opt-in to on by default, so both corpora run with it. sweepDesignerTable() drops its now-redundant explicit keyBoundary: true; keyBoundary: false still reaches the substring behaviour and the self-test uses it to keep that shape demonstrable.

Why the default rather than a keyBoundary: true passed from sweep(): after this card both corpora want it, so the documented reason the option existed ("the two corpora want opposite defaults") is factually gone. textFootprint() is exported, and its default is its contract — leaving the default at the behaviour we just measured as an artefact hands it to the next caller silently. The option survives as an explicit opt-out, which is what keeps the old behaviour measurable for exactly this kind of comparison.

⛔ No key is deleted here. All 13 are read and classified below; the deletions are a separate, per-key decision.

1. The tier split, before and after

Reproduced first, on the card's own commit, by running the shipped script there in a throwaway worktree:

tree candidates CONFIRMED NEEDS-REVIEW
da5e4f69e (the card's measurement) 361 114 247
4857776cb (main today), pre-fix 364 114 250
19ae390c8 (this branch) 364 127 237

The card's 114 / 247 reproduces exactly. Drift from that commit to today's main is +3 NEEDS-REVIEW and +3 candidates, CONFIRMED unchanged — the three are new pack keys notifications.arrivalMany, notifications.arrivalOpen, notifications.arrivalRepeats, not a behaviour change.

After the fix: exactly the 13 keys move, the candidate set does not change, nothing leaves CONFIRMED, and the designer corpus is byte-identical (58 candidates, 57 CONFIRMED / 1 NEEDS-REVIEW before and after) — which is the check that dropping its explicit opt-in was a no-op.

2. The re-measured false-positive rate, by objectui#4658's own method

The method, recovered from PR #4731's body (the PR that landed the sweep for objectui#4658) rather than re-invented — it reports the tier split and then reads it as one number:

Run against this PR's tree (d3d028631): 2927 pack keys, 13776 referenced. 626 candidates, 384 CONFIRMED, 242 NEEDS-REVIEW (38.7%) — i.e. a naive AST-only reverse sweep (no text safety net) would have been wrong about 2 in 5 of its own candidates.

So the rate is NEEDS-REVIEW / candidates: the share of the AST pass's own candidates that the text safety net rescues from a false CONFIRMED. Same arithmetic, same script, run the same way:

tree rate
d3d028631 (as measured in PR #4731, quoted, not re-run) 38.7 %
4857776cb pre-fix 250 / 364 = 68.7 %
19ae390c8 post-fix 237 / 364 = 65.1 %

Does objectui#4658's ruling still stand? Yes, and with room to spare. The ruling is "report-only, --strict stays unwired, every CONFIRMED entry still needs a human before deletion", taken on a 38.7 % reading. This change moves the rate down 3.6 points to 65.1 % — still nearly twice the number that already settled the question, and moving in the direction that would loosen it rather than tighten it. Nothing here approaches the threshold that could reopen enforcement.

Two honest readings of that 3.6-point drop:

  • It is not the instrument getting better at finding readers. It is 13 rescues that were themselves false being withdrawn: the pre-fix 68.7 % overstated the AST pass's error rate by exactly those 13 candidates, because the "rescue" was evidence about a different key.
  • The rate has drifted 38.7 % → 68.7 % between d3d028631 and today with nothing to do with this change (the candidate population fell 626 → 364 while NEEDS-REVIEW's share grew). ⚠️ NOT INVESTIGATED here — it is a separate question about a year of tree movement, and it is not what this card asked.

3. All 13, classified — and none deleted

Every one of the 13 was demoted by a longer key, never by its own spelling. Buckets: 13 genuinely dead (no reader by any probe available in this repo), 0 live-but-unevidenced.

# key what demoted it pre-fix (the other key) verdict + evidence
1 appDesigner.noNavItems appDesigner.noNavItemsHint — AppCreationWizard.tsx:515, useDesignerTranslation.ts:60 dead. The live control is …Hint. DESIGNER_DEFAULT_TRANSLATIONS is a static full-key map and has only …Hint; no t() call, no bounded text hit anywhere, no quoted call site in history.
2 appDesigner.separator appDesigner.separatorLabel — AppCreationWizard.tsx:529, NavigationDesigner.tsx:238, hook map :61 dead. The one shape worth ruling out: item.type === 'separator' next door could imply a per-type lookup, but the label renders through the literal key appDesigner.separatorLabel, and there is no concatenation-built key anywhere in the repo (measured, control below).
3 approvals.reject approvals.rejectConfirm — in packages/app-shell/CHANGELOG.md only dead, and its whole namespace is. approvals.approve, approvals.approveSuccess, approvals.comment, approvals.rejectSuccess are already CONFIRMED today; only reject/rejectConfirm were held out, by changelog prose. The live approvals surface is a different namespace — approvalsInbox.* (RecordApprovalsPanel.tsx:206, DeclaredActionsBar.tsx, ApprovalsInboxPage.tsx). Zero live spellings of approvals.* anywhere.
4 console.objectView.groupBy console.objectView.groupByField, …GroupByFieldHelp — CreateViewDialog.tsx:187-188 dead. Residue of the view-editor unification; the two live spellings are the …Field pair, reached as i18nKey: properties.
5 console.objectView.toolbar console.objectView.toolbarEnabledCount — packages/i18n/src/__tests__/i18n.test.ts:82 dead. The only spelling is a longer key inside a test, which never establishes liveness (the script's own header says so).
6 dashboard.removeWidget engine.inspector.dashboard.removeWidget — the designer table, DashboardDefaultInspector.tsx:232-233 dead in the pack. A cross-corpus collision: the live string belongs to the metadata-admin designer's own table. Corroboration: its sibling dashboard.addWidget is already CONFIRMED.
7 form.addItem engine.form.addItem — designer table + SchemaForm.tsx:2240 dead in the pack. Same cross-corpus shape; the "Add item" button on screen is the designer's key, not this one.
8 home.recent engine.home.recent (designer) and home.recentApps.* dead. The live console spelling is home.recentApps.title (HomeRail.tsx, RecentApps.tsx); the home.recentApps.itemType.* family is template-built and already excluded from candidates by the dynamic-head leg.
9 home.starred home.starredApps.title — StarredApps.tsx:66 dead. Same rename shape as #8.
10 home.subtitle engine.home.subtitle — designer table + StudioHomePage.tsx:258 dead. History shows a call site in the original Home Dashboard work; nothing spells it today. The live pack sibling is home.build.subtitle.
11 marketplace.pricing.free marketplace.pricing.freemium — untranslated-identity-4376.test.ts:105 dead, and the whole 6-key family is. contact-sales, paid, subscription, usage-based are already CONFIRMED; freemium is held out only by that test line. No pricing consumer exists in packages/app-shell or apps/ at all, and no marketplace.pricing. template head exists (if one did, none of the family would be a candidate).
12 sidebar.help sidebar.helpTooltip — AppHeader.tsx:716 dead. The help control renders through …Tooltip.
13 workspace.create workspace.createFailed / …Title / …Description / …Button (CreateWorkspaceDialog.tsx), and vscode.workspace.createFileSystemWatcher in packages/vscode-extension dead. The purest illustration in the set: one of its "textual hits" was an unrelated VS Code API call that merely contains the key's characters.

How each verdict was closed against the instrument's own known blind spots (header, "What CONFIRMED does NOT guarantee"):

  • Template-built keys — structurally impossible for all 13: any key reachable from a collected dynamic head is removed from the candidate set before the text net runs, so a candidate is proof no head reaches it.
  • Concatenation-built keys — measured repo-wide: t('ns.' + x)-shaped call sites in packages/+apps/ = 0 files, beside a lit control of 388 files for t('ns.key'). A zero with a live control beside it.
  • Pack-object property readers — the header's own re-derivation grep was re-run (28 matches today) and every non-test importer it returns was read: chrome/LoadingScreen.tsx (whole-subtree spreads), console/ai/outboundAgentText.ts (dynamic ai?.[key], console.ai.* only), the two plugin-grid/demo/* files (whole-pack resources wiring), and react/src/utils/nonGridRowCeiling.tsx (common.*, spelled literally at its t() call anyway). None reads any of the 13.
  • Consumers outside packages/+apps/ — the text net already greps the whole repo (examples/, e2e/, content/, scripts/), and after the fix none of the 13 has a bounded occurrence anywhere in it.

⚠️ The one risk no in-repo probe can close, and it applies to all 13 equally: @object-ui/i18n is a published package, so an out-of-repo consumer could call any of these keys. That is a deletion-time risk for whoever files the follow-up, not an instrument artefact, and it is the standing reason CONFIRMED is "read this first" rather than "safe to bulk delete".

⚠️ Why the 13 are not pinned in a test. Spelling them in scripts/__tests__/ would make that file a textual hit for each of them and push all 13 straight back into NEEDS-REVIEW — the self-pollution trap this script's own header records from an earlier draft, and the reason its real-repo control group assembles keys from segments. The census-guard obligation was met where the numbers actually live instead: the measurement harness asserts the exact set sizes (13 keys, 250 NEEDS-REVIEW, 364 candidates) before reading anything, and each guard was proven to throw on an emptied set.

4. The boundary predicate is load-bearing in both directions

Eleven pins, each naming the shape it holds. Which degenerate predicate each half catches:

pin group what it asserts reddens for
REJECTS (5) identifier-continued, dot-continued, hyphen-continued, left-side longer key, prose ending on a full stop a predicate that answers true for everything — including the shipped content.includes(key)
ACCEPTS (6) quoted call site, double-quoted data value, unquoted prose with a comma, end-of-line with no trailing char, start of line, a real hit on a line that also carries a longer key a predicate that answers false for everything

The ACCEPTS half is also what rules out implementations strictly worse than the bug: "the key must be the whole line" and "the key must be quoted" both pass every REJECTS pin while reporting no evidence about anything, and each is killed by a specific ACCEPTS pin (end-of-line comment / unquoted prose). The last ACCEPTS pin kills a predicate that stops at the first occurrence on a line.

Plus four sweep()-level pins, so the deliverable itself is held and not just the predicate: three prefix/suffix shapes must land in CONFIRMED, and a genuinely-spelled key must still land in NEEDS-REVIEW with the file named.

Ablation — every new pin observed red, from a committed tree

Three legs, all with trap … EXIT INT TERM and absolute paths, restore by git checkout HEAD -- ABSOLUTE_PATH, and restore proven by state (git diff HEAD --quiet), not by exit code. The script is imported by the test through a relative source specifier, so there is no dist/ hop for a mutation to fail to reach.

leg provenance red
A — the real pre-fix predicate, restored from the base blob on-disk git hash-object = 30039ec6e9b6a0e8c3701c28d62482a36793beab = git rev-parse 4857776cb:scripts/check-i18n-dead-keys.mjs, and ≠ the HEAD blob f16406c5… 8 red — all 5 REJECTS pins + all 3 sweep() CONFIRMED pins
B — occursAtKeyBoundary returns true injected marker counted on disk (1), blob ≠ HEAD blob 24 red — the 5 REJECTS + 3 sweep() pins, plus the pre-existing property-chain and designer-table controls
C — occursAtKeyBoundary returns false injected marker counted on disk (1), blob ≠ HEAD blob 12 red — all 6 ACCEPTS pins + the sweep() "still demotes a real hit" pin, plus pre-existing footprint controls

After each leg: restore proven by state: git diff HEAD --quiet is clean, and the on-disk blob back to f16406c5….

5. ⚠️ The chain-probe guard would not have done it — measured, not assumed

occursAtPropertyBoundary() refuses only a next character that continues an identifier. Re-running the full-key probe over the pre-fix 250 with four predicates, one grep pass each:

predicate keys still demoted (of 250) of the 13
content.includes(key) (shipped) 250 13 still wrong
right-only, identifier class — the chain guard reused 241 4 still wrong
right-only, key class (adds . and - on the right) 241 4 still wrong
both sides, key class (this PR) 237 0

So reusing the chain guard corrects 9 of 13 and leaves 4 wrong — form.addItem, home.recent, home.subtitle, dashboard.removeWidget, each demoted by a longer key that ends with it (engine.form.addItem and friends). The left side is what catches them, and no amount of widening the right-hand character class reaches them.

⚠️ A refinement of the card's own reasoning, measured: the card and the dispatch both explain the insufficiency through the right-hand hole (. is not an identifier character, so ns.group.leaf + .detail sails through). That hole is real, but on this tree it rescues 0 keys — every key that has a key.more hit also has a keyMore one. The insufficiency that actually bites here is the left side, which the chain guard does not check at all. Both are guarded; the pins cover both; but a report that repeated only the right-hand argument would be citing the wrong half.

6. Isolation: the two probes still do not interact

The card claims the 13 are identical whether the property-chain probe is on or off. Confirmed after the change rather than inherited — one grep pass per option set over the post-fix candidate list (364, asserted before reading):

propertyChain=true : CONFIRMED boundary-off 114, boundary-on 127, moved 13
propertyChain=false: CONFIRMED boundary-off 114, boundary-on 127, moved 13
moved sets identical across chain on/off: true
and equal to the 13: true

The isolation claim still holds. One observation that falls out of it and is not a defect: with the chain probe off, the pack CONFIRMED count is unchanged in both worlds — the property-chain leg demotes zero pack keys on this tree today. That is what a safety net looks like when the shape it guards is absent (its real-repo control group in the self-test still passes, so the leg itself works), but it is worth knowing that the leg costs the pack tier nothing right now.

7. The one cost this change adds, stated rather than discovered

For a two-segment key the substring test used to catch a pack-object property reader by accident — somePack.topNs.leaf spells topNs.leaf with a . on its left — and the boundary refuses exactly that. The property-chain leg does not take over below three segments (it returns null there on purpose). So for two-segment keys the enumerated importer list is the only remaining check, read by hand. This is now class 4 in the header's "What CONFIRMED does NOT guarantee", and it is why every non-test pack-object importer was re-read for the 13 (section 3).

Tests

All from the final commit — git rev-parse --short HEAD = 19ae390c8. Per-test outcomes from the JSON reporter; every run from the repo root with path filters.

pnpm exec vitest run scripts/ --maxWorkers=3 --reporter=json
  Test Files 133   Tests 3768   passed 3766   failed 0   (2 skipped: the deliberate real-socket fixtures)   76s

pnpm exec vitest run scripts/__tests__/check-i18n-dead-keys.test.ts \
    scripts/__tests__/check-i18n-call-site-keys.test.ts \
    scripts/__tests__/check-unreferenced-sources.test.ts \
    packages/i18n/ packages/plugin-timeline/src/__tests__/timeline-relative-defaults-retired-7874.test.ts
  Test Files 67   Tests 1313   passed 1313   failed 0   23s

pnpm run type-check:scripts          # tsc -p tsconfig.scripts.json — clean, exit 0
node_modules/.bin/eslint scripts/check-i18n-dead-keys.mjs scripts/__tests__/check-i18n-dead-keys.test.ts
  (no output, exit 0)

pnpm run check:control-bytes
  ✅  check-control-bytes: OK (scanned 6955 tracked text file(s); skipped 85 binary).

node scripts/check-governed-queue-guard.mjs --test scripts/check-i18n-dead-keys.mjs scripts/__tests__/check-i18n-dead-keys.test.ts
  ✅ NOT GOVERNED — 2 path(s) checked against 5 governed surface(s); none matched.

node scripts/check-i18n-dead-keys.mjs        # the instrument itself, exit 0, report-only

Every exit code was captured before any pipe (cmd > file 2>&1; EXIT=$?), and each verdict above is the gate's own printed line rather than a bare $?.

Changeset

None owed, and the gate says so rather than me:

node scripts/check-changeset-presence.mjs
Compared the working tree with 4857776cb (merge-base with origin/main): 2 file(s) changed,
0 of them published source of a package the release covers, 0 of them a manifest whose
published contract moved, 0 under a package changesets ignores, 0 changeset(s) added.
✅  No source or published contract of a released package changed in this range, so no changeset is owed.

scripts/ is not under any released package's src/, so this needs neither a bump nor an empty-frontmatter declaration. No skip-changeset label is applied — that label is inert in this repo.

Out-of-scope finding, filed not fixed

objectui#8752 — the header's enumerated pack-object importer list is stale: its own re-derivation grep returns 28 matches and five non-test importers today, against the "19 matches today, of which these four" in prose. The fifth (packages/react/src/utils/nonGridRowCeiling.tsx) is harmless — its keys are literal t() arguments — so there is no wrong verdict on the tree, but a reader nobody has classified is exactly what that section exists to prevent. Not fixed here: different class from this card's predicate, and the fix is a per-importer reading rather than a mechanical edit. objectui#8752 is not addressed by this PR.

NOT MEASURED

  • The repo-wide pnpm lint and the full test suite — left to CI. Local coverage was scripts/ in full plus the i18n packages, which is the population this diff can reach.
  • Why the false-positive rate drifted 38.7 % → 68.7 % since PR fix(i18n): remove five dead objectView/appDesigner locale keys, add reverse sweep #4731. Out of scope; flagged in section 2.
  • Whether any of the 13 has a consumer outside this repository (published package). Unmeasurable from here; stated in section 3 as the standing deletion-time risk.
  • The dedup read behind objectui#8752 is one repo-scoped REST page of the 100 most recently updated open finding issues, not the whole label — the global search endpoint is blocked for this session and one MCP search_issues returned API rate limit already exceeded.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S


Generated by Claude Code

`textFootprint()` decided the CONFIRMED / NEEDS-REVIEW split with
`content.includes(key)`, so a pack key that is a strict prefix — or a
strict suffix — of a longer key collected that longer key's line as its
own "textual hit" and was demoted on evidence about a DIFFERENT key. The
report then sent a reader to a line that never mentions the key they were
hunting.

PR #8699 built the boundary as an opt-in `keyBoundary` option and left it
off for the packs, deliberately: objectui#4658's ruling rests on a
false-positive rate measured with the substring test. This flips the
default now that the rate has been re-measured (see the PR body), so both
corpora run with it; `keyBoundary: false` still reaches the old behaviour
and the self-test uses it to keep that shape demonstrable.

Measured on the pack sweep: 114 CONFIRMED / 250 NEEDS-REVIEW becomes
127 / 237. Exactly 13 keys move, the candidate set does not change, and
no key is deleted here — each of the 13 is read and reported in the PR
body instead, since a dead i18n key is a per-key decision of its own.

Reusing `occursAtPropertyBoundary()` would not have done it: it refuses
only a next character that continues an IDENTIFIER, which corrects 9 of
the 13 and leaves 4 demoted by a longer key ENDING in them. Both sides of
the match are checked, against a character class wider than the
identifier one by exactly `.` and `-`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
@github-actions github-actions Bot added the tests label Sep 9, 2026
@os-justin
os-justin marked this pull request as ready for review September 9, 2026 03:36
@os-justin
os-justin enabled auto-merge September 9, 2026 03:37

Copy link
Copy Markdown
Collaborator Author

Contract review — accepted, flipped out of draft, auto-merge armed.

⭐ The most valuable thing here corrects both the card and my ruling, in the same place. We both explained occursAtPropertyBoundary's insufficiency through the right-hand hole — . is not an identifier character, so ns.group.leaf followed by .detail sails through. That hole is real and on this tree it rescues zero keys: every key with a key.more hit also has a keyMore one. The insufficiency that actually bites is the left side, which that guard does not check at all — 4 of the 13 (form.addItem, home.recent, home.subtitle, dashboard.removeWidget) are demoted by a longer key that ends with them. Your line for it is the right one: "a report repeating only the right-hand argument would be citing the wrong half." Both halves are guarded and both are pinned, which is what makes the fix correct rather than lucky.

The obligation I set was the re-measurement, and it was met properly. You recovered the original method from PR #4731's own body rather than inventing a comparable one — NEEDS-REVIEW / candidates, same script, same arithmetic — and reported 38.7% (original) → 68.7% (today, pre-fix) → 65.1% (post-fix), with objectui#4658's ruling standing with room to spare and moving in the loosening direction. And then the honest reading, which is the part that would have been easy to leave out: the 3.6-point drop is not the instrument finding more readers, it is 13 rescues that were themselves false being withdrawn. A rate that improves for the wrong reason is worse than one that does not move.

The census guard is where the real thinking is. Pinning the 13 by spelling them in scripts/__tests__/ would make that file a textual hit for each and push all 13 straight back into NEEDS-REVIEW — the self-pollution trap the script's own header records. Recognising that the obvious pin would destroy the thing it pins, and meeting the guard obligation in the measurement harness instead (exact set sizes asserted before any reading, each guard proven to throw on an emptied set), is exactly the judgement this contract asks for and rarely gets.

Two-direction proof, and the ACCEPTS half is the one that matters: 5 REJECTS pins redden for a predicate that answers true for everything (the shipped content.includes(key) included); 6 ACCEPTS pins redden for one that answers false for everything — and as you say, that half is what kills implementations strictly worse than the bug, since "must be the whole line" and "must be quoted" pass every rejection while reporting no evidence at all. Ablation leg A against the real pre-fix predicate restored from the base blob, with git hash-object matched to 4857776cb's blob, is the provenance standard.

Classification: 13 dead / 0 live-but-unevidenced, each demoted by a longer key, each with its own evidence — and the blind spots closed rather than assumed: template-built keys structurally impossible, concatenation-built keys zero repo-wide against a lit control of 388, and every non-test pack-object importer re-read by hand. workspace.create demoted partly by vscode.workspace.createFileSystemWatcher is the purest illustration in the set.

On the follow-up scope — B, as you recommend. The per-key evidence for both families is already written, the ten-pack edit cost is per-key however the cards are cut, and a deletion PR that removes approvals.reject while leaving approvals.approve invites the exact question your classification just answered. I am filing it with the published-package risk in the body: @object-ui/i18n ships, so an out-of-repo consumer could call any of these, and no in-repo probe can close that — it is a deletion-time risk, not an instrument artefact.

Good calls on the two smaller things: no changeset because the gate said none was owed (rather than adding an empty one because the dispatch guessed there would be), and documenting the new two-segment cost as a fourth "What CONFIRMED does NOT guarantee" class instead of letting the fix quietly buy an improvement in one direction with a loss in another.


Generated by Claude Code

@os-justin
os-justin added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit e3fb3b6 Sep 9, 2026
32 checks passed
@os-justin
os-justin deleted the claude/issue-8701-i18n-key-boundary-pack-sweep branch September 9, 2026 04:03
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…bjectui#8754) (objectstack-ai#9487)

Fixes objectstack-ai#8754

Round 2 of the director seat's summon objectstack-ai#22 ruling (2026-09-12):
**instrument first, deletion second**. Round 1 — the instrument repair —
landed `c4a1d39fe9` (PR objectstack-ai#9222). This is the deletion.

## The admission criterion was a measurement, not this card's body

⭐ **The 25 keys in the card's body were not the input.** `pnpm
check:i18n-dead-keys` was re-run on this branch's own base,
`ff1d5ea8d1`, and the deletion is what **it** confirms today.

Its verdict, quoted from its own output:

> Pack keys (en, assumed parity-identical across all ten): 3010.
Referenced by a t()/tt() call site (literal + plural-suffixed +
returnObjects branch + dynamic-template-reachable): 15806.
>
> 358 candidate(s) with no call site this pass can see, across 46
namespace(s): 119 CONFIRMED (no textual footprint anywhere else in the
repo either), 239 NEEDS-REVIEW …

**The population named in words:** 3010 keys defined by the `en` pack
(the ten packs are parity-identical, which
`all-locales-key-parity.test.ts` separately enforces); of those, 358
have no call site the AST pass can see; of those, 119 also have no
bounded textual occurrence anywhere else in the repository — that is the
CONFIRMED tier. This run agrees with round 1's recorded 119 CONFIRMED,
and NEEDS-REVIEW has moved 238 → 239 since (one key joined, from
ordinary tree movement).

### Does it agree with the card's 25? No — the measured population is
23, and the difference is the card's arithmetic

Every one of the 13 keys PR objectstack-ai#8753 uncovered is **still CONFIRMED today**
— none moved tier. Both families are intact, each 5 CONFIRMED + 1
NEEDS-REVIEW, exactly as the ruling anticipated.

The card reached 25 as `13 + 6 + 6`, double-counting the two leaves that
belong to both sets: `approvals.reject` and `marketplace.pricing.free`
are each one of the 13 **and** a member of one of the families. The true
union is **23**. ⇒ no key was dropped for being live, and no key was
added; the card simply counted two keys twice.

## Family completeness, each zero carrying a control that fires

The ruling's family rule: a family is whole when every member is
CONFIRMED, **or** is NEEDS-REVIEW whose only hits are non-liveness. Both
families qualify, and both are removed as **roots**, not emptied leaf by
leaf.

Membership was read from the pack source in all ten packs, not inferred:
`approvals` holds exactly 6 members and `marketplace.pricing` exactly 6,
in every pack. All 12 are candidates ⇒ no member has a call site.

**`approvals.*`** — probe and control in the same command, over
`packages/ apps/ examples/ e2e/ content/ scripts/` minus the ten locale
packs (which define every key by construction):

| probe | result |
|---|---|
|
`approvals.(approve\|approveSuccess\|comment\|reject\|rejectSuccess\|rejectConfirm)`
at key boundary | **1 hit**, and it is
`packages/app-shell/CHANGELOG.md:6161` — changelog prose about a past
change. Zero source hits. |
| **control:** `approvalsInbox.` , same command shape | **HITS** —
`DeclaredActionsBar.tsx:230/236/241`, `approverIdentity.ts:365/373`, … |

`approvalsInbox` hitting while `approvals.` does not is the reading the
card predicted.

**`marketplace.pricing.*`**:

| probe | result |
|---|---|
| `marketplace.pricing.` at key boundary | **1 hit**,
`packages/i18n/src/__tests__/untranslated-identity-4376.test.ts:105` — a
pin-test allowlist entry |
| any `t()`/`tt()` call whose key mentions `pricing` at all | **0** |
| the word `pricing` anywhere in
`packages/app-shell/src/console/marketplace/` | **0** |
| **control:** `marketplace.category.` , same command shape | **HITS** —
`MarketplacePackagePage.tsx:654`, `MarketplacePage.tsx:185` |
| **control:** any `t()` call whose key mentions `category` | **HITS** —
3 call sites |

`marketplace.category.` is a collected dynamic template head, which is
exactly why none of *that* family was ever a candidate — and why
`marketplace.pricing.`, which has no head, was.

The two NEEDS-REVIEW members are the two the ruling named as admissible,
and both hits are non-liveness: a changelog line and a pin test. ⇒ both
families retire whole.

## The eleven individual leaves

Each was held out of an earlier sweep by a **longer live sibling that
merely contains it**, until PR objectstack-ai#8753 put a key-boundary requirement on
both sides of the text probe. A repo-wide bounded grep over all 23 keys
returns **exactly the two hits above and nothing else** — and that same
command returning non-zero for those two is what proves the other 21
zeros are readings rather than a broken pattern.

## Firing control on the deletion itself

⭐ Without this, "the keys are gone" is indistinguishable from "the pack
reader broke".

`dead-pack-keys-retired-8754.test.ts` asserts, **in the same run**:
every retired key is absent from all ten packs; both family roots are
gone; and 20 named surviving siblings still resolve to a non-empty
string in all ten packs — including the longer sibling that actually
renders in each of the eleven leaf cases (`sidebar.helpTooltip` for
`sidebar.help`, `home.starredApps.title` for `home.starred`, …). A
sample across writing systems pins that those survivors are real
translations, not the English value ten times.

**Reverse-verified.** One retired key was restored into **one** pack
(`zh`) on the committed tree, proven to have landed on disk by blob hash
(`3aab235a78` → `de6dff3fa1`) and by the leaf spelling going `0 → 1`:

```
FAIL  all-locales-key-parity.test.ts > zh defines no key that en lacks
  AssertionError: zh has 1 key(s) absent from en: expected [ 'sidebar.help' ] to deeply equal []
FAIL  dead-pack-keys-retired-8754.test.ts > no pack defines any retired key, in any of the ten packs
  AssertionError: … expected [ 'zh :: sidebar.help' ] to deeply equal []
Test Files  2 failed (2)
     Tests  2 failed | 35 passed (37)
```

Both pins red and **name the pack and the key**, while **35 tests in the
same run stay green** — that green half is the survivor assertion, so
the red is about the retired key and not about the reader. The mutation
was restored under a shell `trap` and the restore verified by **state**,
not exit code: on-disk hash equals the `HEAD` blob, `git diff HEAD`
empty, `git status` clean.

## All-locales key parity — before and after

Measured on two real trees, not inferred.

| | tree | test files | tests |
|---|---|---|---|
| **before** | `ff1d5ea8d1` (this branch's base, in its own worktree) |
66 passed | **1120 passed** |
| **after** | `ebcbb22e5f` | 67 passed | **1125 passed** |

Parity passes on both sides; the `+1 file / +5 tests` is exactly this
PR's new pin. Parity is *preserved* rather than trivially satisfied
because every deletion is a ten-pack edit — 27 source lines removed from
each of the ten packs, identical in each.

## ⚠️ The self-pollution trap, walked into and measured

The card forbids pinning keys by spelling them, because a spelled key
becomes a textual hit for the sweep and is pushed back into
NEEDS-REVIEW. A first draft of the new pin's **header comment** spelled
out five keys as a warning not to name them. The post-deletion census
then read **93 CONFIRMED where the arithmetic said 98** — those five,
demoted by the very sentence telling the reader not to do it. The
spellings were replaced with a description of the shape, and the census
landed on 98 exactly.

Recorded here and in the test's header because the demotion is silent,
and the five keys are not exotic: they are the nearest live-*looking*
sibling in each of the `dashboard`, `form`, `sidebar`, `home` and
`workspace` namespaces, and every one of them is CONFIRMED-dead itself
today.

## Census, before → after, with every number accounted for

| | before (`ff1d5ea8d1`) | after (`ebcbb22e5f`) | delta |
|---|---|---|---|
| pack keys (`en`) | 3010 | 2987 | −23 |
| candidates | 358 | 335 | −23 |
| CONFIRMED | 119 | 98 | −21 |
| NEEDS-REVIEW | 239 | 237 | −2 |

The set that left the candidate list **is exactly the 23 deleted keys**;
**no key joined**, and **no surviving key changed tier**. 21 of the 23
were CONFIRMED and 2 were the admissible NEEDS-REVIEW members ⇒ `119 −
21 = 98` and `239 − 2 = 237`, which is what the run prints.

## Bytes — re-measured, ⛔ no budget constant moved

The ruling asks for the `i18n-locales` chunk figure. ⚠️ **That chunk no
longer exists**: objectui#7479 made nine of the ten catalogues lazy and
re-keyed the ceiling to `i18n-locale-en`. Reported against the
successor, from two real console builds:

| | before | after | delta |
|---|---|---|---|
| eager `i18n-locale-en` chunk | 39.6 KB gz | 39.4 KB gz | −152 bytes |
| ten catalogues, gzipped | 456,642 B | 454,801 B | **−1,841 B
(−0.40%)** |
| ten catalogues, uncompressed | 1,495,158 B | 1,488,126 B | −7,032 B
(−0.47%) |
| aggregate console eager closure | 3061.4 KB | 3061.3 KB | −0.1 KB |

`check:eager-closure` green on both trees. ⛔ `PER_CHUNK_GZIP_CEILINGS`,
`PER_CHUNK_BASELINE` and `MAX_EAGER_CLOSURE_GZIP_BYTES` are
**untouched** — this PR changes no file under `scripts/`.

## Gates run

| gate | exit | reading |
|---|---|---|
| `pnpm --filter @object-ui/i18n test` | 0 | 67 files / 1125 tests |
| `pnpm --filter @object-ui/i18n type-check` | 0 | `tsc --noEmit` + test
tsconfig |
| `pnpm --filter @object-ui/i18n lint` | 0 | 0 errors, 33 pre-existing
warnings |
| `check:i18n-keys` | 0 | *"Every in-scope call-site key resolves
against the en pack (2987 keys)"* — the direct proof no call site asks
for a deleted key |
| `check:i18n-drift` | 0 | 0 `en` values changed in range |
| `check:i18n-designer-parity` | 0 | every `en` row has a `zh` row |
| `check:i18n-dead-keys` | 0 | the census above |
| `check:eager-closure` | 0 | table above |
| `check:eager-locale-catalogues` | 0 | ⚠️ first returned **exit 2
PREREQUISITE NOT MET** (needs a built bundle) — re-run after building, ⛔
not recorded as a pass |
| `check:control-bytes` | 0 | 7658 tracked text files |
| `check:test-path-roots` | 0 | new pin's roots classified |
| `check:new-line-citations` | 0 | 0 new citations |
| `check-changeset-presence` | 0 | measured the obligation: 12 published
source files of 1 released package ⇒ 1 changeset |
| `check-changeset-no-major` | 0 | no `major` declared |

`gates_weakened:` **NONE** — no threshold lowered, no ceiling raised, no
non-vacuity floor moved (the `> 2000` floors read 2987), no test
skipped.

Repo-wide `eslint .` is CI's run, not this PR's: the 13 changed TS files
lint **0 errors / 0 warnings**, and `pnpm lint` is `turbo run lint`
(per-package), whose `@object-ui/i18n` leg is the row above.

## Changeset — measured, not assumed

Owed, and `check-changeset-presence` said so in its own words.
`@object-ui/i18n` is published (`private` unset, `v17.6.0`) and in the
40-package fixed release group, and this PR changes 12 files under its
`src/`. `.changeset/8754-dead-pack-keys-retired.md` lists **every one of
the 23 keys**, states the breaking semantics and the out-of-repo
consumer risk the ruling accepts, and names the live replacement surface
for each family. Marked `minor` per this repo's rule that a changeset
never declares `major`.

## 维护者速读(草稿)

**改了什么**:从十个语言包里删掉 23 条已确认没人用的句子 —— 两个完整的功能族(审批 `approvals.*`、应用市场定价
`marketplace.pricing.*`),外加 11 条零散的旧句子。

**为什么改**:这些句子仓库里没有任何地方再引用,但仍随每个版本发布、占着打包预算。卡片正文写的是 25
条,但那是算错了(有两条被数了两遍);本次按仪器**当天实测**的结果删了 23 条,不是照抄卡片上的数字。

**风险与代价(含回滚)**:`@object-ui/i18n`
是对外发布的包。仓库外如果有人在用被删的句子,那里会显示原始键名而不是句子,**不报错**。这个风险是维护者 2026-08-27
已经拍板接受的(「项目在创业阶段,用户也很少,短期不考虑渐进」)。回滚 = 一次 revert,把键加回去即可。打包体积减少约 1.8
KB(gzip,十个语言包合计)。

**席位意见**:(留空,待评审)

**你要做的**:确认「立即退役、不设过渡期」这一条仍然成立;如果您希望改成保留一段时间,请说一声,这个 PR 需要重做。

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_013VGeMu3p6qEFWR6K6GGLaW

---
_Generated by [Claude
Code](https://claude.ai/code/session_013VGeMu3p6qEFWR6K6GGLaW)_

Co-authored-by: claude[bot] <claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: os-try-charles <mqmscharles@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

1 participant