Skip to content

test(i18n): the UI-literal ratchet covers label: and zeroText:, with a one-time freeze of 120 (#19885) - #20676

Closed
mrveiss wants to merge 5 commits into
mainfrom
issue-19885-literal-detector
Closed

mrveiss wants to merge 5 commits into
mainfrom
issue-19885-literal-detector

Conversation

@mrveiss

@mrveiss mrveiss commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Closes #19885

Thinking Path

  • Maintainer decision (2026-11-02): extend the UI-literal detector to label: and zeroText:, freezing existing entries once as a recorded exception to shrink-only.
  • The number shown when deciding was a rough regex, so this measures with the real matcher and reconciles the two.
  • The fields join the existing script-literal rule (capital then lowercase, at least 5 characters), so no second rule exists.

What Changed

  • repo_tests/_ui_literal_scan.py: _SCRIPT_LITERAL also matches label: and zeroText:. The scan stays .vue only, under both apps' src.
  • Baseline: 120 digests added, none removed.
  • docs/developer/RATCHET_BASELINES.md: the recorded exception, with the decision, date, count and reconciliation. It is one time and not a precedent.
  • The failure message gives label: t('area.thing.label') and names i18n: the zero-size file text and the performance tab labels render untranslated #19885.
  • No UI code changes.

True count

App Field Hits Files
autobot-frontend label: 46 11
autobot-slm-frontend label: 74 13
both zeroText: 0 0
Total 120 24

Reconciliation with the 187 lines in 32 files seen when deciding: a plain regex reproduces exactly that. 120 are detected. 66 are under 5 characters or have no lowercase letter (Info, PDF, Chat), which the shared rule skips for every key. 1 is in a template expression. The issue's "about 24" is the file count.

Blind spot left in place: those 66 include real visible text such as Chat. Catching them means a different rule for every key, so it wasn't done here.

Verification

  • hardcoded_ui_literal_ratchet_12732_test.py, slm_frontend_bare_ui_literals_test.py: 68 passed. New TestLabelAndZeroTextFields: positive and negative controls per field, a real component (FleetSummary.vue), and a new literal failing the frozen baseline per field.
  • With the old baseline restored, no_file_gains failed naming these literals; then regenerated.
  • Sample of 20 hits, 10 per app, seeded: 20 are visible UI text, 3 of them product names (GitHub, Redis, WebSocket).
  • Not run: frontend tests and full suites. .ts files are not scanned or measured. zeroText: has no real hit, so its controls are synthetic.

Model Used

Claude Opus 5.5

@mrveiss mrveiss added this to the M3 - Refined GUI complete milestone Nov 2, 2026
@mrveiss mrveiss added the phase:M3.3 Shared kit primitives label Nov 2, 2026
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. There is no cap on open PRs (#19397) -- nothing blocks opening or pushing a PR.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Approved PRs land through the merge train the coordinator sequences (merge commits, never squash) -- check the open chore(merge-train) PR is moving, not each PR on its own
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@mrveiss

mrveiss commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

Code review on PR #20676 (head f7c2d73): approve.

Read against the diff; tests not run.

  • The baseline diff is additions only: 124 digest lines added and 4 removed, and those 4 reappear with a trailing comma, so 120 net, which matches the stated count.
  • The exception says it's one-time and not a precedent, and new label: and zeroText: literals fail, with positive, negative and growth controls.
  • The 187-versus-120 difference is explained: it's the same population, with 66 values the shared shape rule doesn't match for any key and 1 not in script.

Stays visible as a limit, not blocking: short literals such as label: 'Chat' remain unwatched, and .ts files aren't scanned. The exception says so.

The entry cites an owner decision of 2026-11-02. I did not see that decision directly; #19885 records it as a maintainer decision.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss

mrveiss commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Landed in merge train #20715 as 6f8c8d9 (merged 2026-11-03 21:34 Riga). Closing; the train carried this PR's frozen head.

@mrveiss

mrveiss commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Branch audit (zero-change deletion). This PR shows 0 changed files against main (head fd9cb3a897): every change it carried is already in main. Closing and deleting the branch through this PR; it can be restored with the Restore branch button below.

@mrveiss mrveiss closed this Nov 18, 2026
@mrveiss
mrveiss deleted the issue-19885-literal-detector branch November 18, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

phase:M3.3 Shared kit primitives

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n: the zero-size file text and the performance tab labels render untranslated

1 participant