# Generate All Real Character Counts

Audience: AI coding agents first.

## Outcome
Generate All MUST display exact Unicode characters for every untranslated selected request item. NEVER display inferred tokenizer/word metrics as real counts.

## Status
DONE — implementation, local verification, canonical landing, production distribution, and secure dev1 deployment complete.

## Task IDs
- GA-COUNT-1 trace count pipeline — DONE
- GA-COUNT-2 correct display contract — DONE
- GA-COUNT-3 verify and land — DONE

## Source Request
2026-08-12: audit unreliable tokenizer/character counts in Generate All; show REAL character counts for ALL selected generated items.

## Acceptance Criteria
- Aggregate uses server preflight `per_language_untranslated_characters` for every selected language and all matching untranslated content IDs.
- UI labels exact characters only; no derived words/tokens.
- Content and string Generate All follow same contract.
- Build/tests/runtime pass.

## Preserved WIP / Ref / Path
Worktree `/home/user/Projects/Press.zone/wordpress/wp-content/.claude/worktrees/audit-generate-all-counts`; branch `worktree-audit-generate-all-counts`. Shared checkout WIP untouched.

## Constraints
Use local `devzone-wordpress` for tests. Deploy dev1 only through the canonical authenticated mechanism. Verify archive before installation. Surgical changes. Browser tests are not required for deployment identity verification.

## Execution Steps
1. Trace server aggregate and request item set.
2. Remove inferred tokenizer/word display.
3. Update E2E contract.
4. Build/unit test.
5. Local runtime verify, review, commit, land.

## Current Receipt
- Confirmed server preflight aggregates exact sanitized Unicode character lengths across all matching untranslated items per selected target language.
- Replaced estimated words/tokens with exact character-only labels in content and string Generate All.
- Updated UJ-021 assertion.
- Admin production build passed.
- Admin unit suite passed.
- ESLint passed cleanly.
- `node tools/verify-local.mjs` installed and smoke-tested the plugin on `devzone-wordpress`.
- Commit `d10940bcb` pushed to `origin/master`.
- Focused Chromium and Firefox reached the exact assertion through `e2e-remote`; initial failure proved stale installed chunks still rendered `~80 characters`. Installed `admin/dist` was replaced atomically, and installed assets now contain no `~...characters` label. Subsequent focused Chromium launch reached the fixture but the pre-existing admin root remained hidden before the journey assertion. WebKit remains unavailable on buildboxes due missing ICU/XML libraries.

## Next Executable Action
Build and verify the production ZIP, land the restoration on `origin/master`, securely deploy to dev1, and record exact installed-state proof.

## Owner correction — 2026-08-12

- Source request: the prior localhost-only deployment prohibition was accidental and is revoked; delete its design spec, restore secure deployment capability, push the latest version, and deploy international-press-zone to dev1 now.
- Acceptance delta: preserve localhost verification; recover canonical deploy script from `14bcb187a^`; retain current release-integrity hardening; use authenticated same-origin deployment; verify the archive before installation and verify the active installed version/files afterward.
- Preserved WIP/ref/path: Generate All implementation `d10940bcb` remains landed; unrelated shared-checkout WIP remains untouched; restoration runs from fresh `origin/master`.
- Current receipt: restoration commit `df44706a8` and release commit `77611679a` pushed to `origin/master`; production ZIP 0.9.42 SHA-256 `2dc39fbbaad71122f190bf236162341f3a39b4c79834b9262624bb6303f09616`, runtime SHA-256 `823c4ef88854a74d6431aa53a64d93ab0db59a23c0b4c8d5705f6f1407701def`; dev1 replaced active 0.9.40 without deactivation, reports active 0.9.42, and every distributed admin asset matched by SHA-256.
- Next executable action: none.
