Skip to content

refactor(i18n): share Apple catalog reader - #144848

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/apple-catalog-reader-rank131
Sep 11, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/apple-catalog-reader-rank131

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

The head branch is in openclaw/openclaw.

What Problem This Solves

Apple localization tooling maintains the same catalog-reading flow separately for iOS and macOS. This maintainer-requested refactor removes that duplication while preserving the platform-specific builders.

Why This Change Was Made

One private reader takes an explicit catalog path and existing builder. All four callers preserve platform pairings, sequential reads and parsing, error propagation, and verification followed by an independent reread. No caching is introduced.

User Impact

No user-facing behavior change is intended. Exported builders, serialization, locale policy, and native app code are unchanged.

This reader-only refactor changes neither catalog format nor persistent state, so migration proof is not applicable.

Evidence

Paired CLI proof uses frozen candidate source/data at 5ea54a9889e76bbbb1724f20c96858e81b78f00d, restoring only the original reader from parent 0a4447ecc53e24449cbc2b8c2f9725faeee1213a for the baseline.

  • Existing focused tests: the same two files passed 54/54 tests before and after the refactor.
  • Actual local CLI: compile-macos followed by sync-ios --write in each isolated copy; all four commands exited successfully. Each variant produced 43 compiled files, and all 86 sync targets matched in membership, modes, hashes, and bytes. Sync was idempotent, not a stale-catalog rewrite exercise. Source and dependencies stayed unchanged; child processes joined and scratch was removed.
  • Selected check components passed, including the targeted typecheck and deadcode checks after dependency-ownership/resolution repairs. The original aggregate failure remains recorded, not relabeled as a passing rerun. Scoped P2 code review and independent CLI-proof review found no actionable issues.
  • This is frozen-source local Node/filesystem proof, not Linux/Testbox, native Apple build/app/device, current-main catalog-data, or hosted CI proof. The separate remote-allocation hold remains unchanged.

@vincentkoc vincentkoc self-assigned this Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Sep 11, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 8:56 AM ET / 12:56 UTC (Revision 2).

ClawSweeper review

What this changes

Shares the Apple localization catalog reader across iOS and macOS while retaining their existing builders and generated outputs.

Merge readiness

⛔ Blocked before merge - 1 item remains

The refactor remains useful and has no actionable correctness findings. The updated evidence addresses the previous review's output-equivalence request, and the PR is now ready for ordinary maintainer review.

Priority: P3
Reviewed head: 5ea54a9889e76bbbb1724f20c96858e81b78f00d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving refactor with relevant CLI equivalence results and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body reports paired real local CLI runs through the changed catalog reader: compile-macos and sync-ios --write produced equivalent files on baseline and candidate. This satisfies the earlier equivalence request for the reader-only change; native application or device behavior is not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body reports paired real local CLI runs through the changed catalog reader: compile-macos and sync-ios --write produced equivalent files on baseline and candidate. This satisfies the earlier equivalence request for the reader-only change; native application or device behavior is not claimed.
Evidence reviewed 7 items Introduced change preserves reader behavior: The complete introduced patch replaces two private readers with one parameterized reader. All four callers retain the correct catalog and builder pairing; sequential reads, parsing, error propagation, and the independent post-verification reread remain intact.
Current main still has separate readers: Fetched main retains readIosCatalogBuild and readMacosCatalogBuild, so this consolidation is not already implemented there.
Latest release retains separate readers: The v2026.9.4 source also retains both private readers and their callers; this refactor has not already shipped in the supplied latest release.
Findings None None.
Security None None.

How this fits together

Apple localization tooling combines existing catalogs, the native string inventory, and translations into platform-specific catalogs. Synchronization and macOS packaging consume those catalogs to produce app localization resources.

flowchart TD
  A[Existing platform catalog] --> D[Shared catalog reader]
  B[Native string inventory] --> D
  C[Locale translations] --> D
  D --> E[Platform-specific builder]
  E --> F[Catalog verification and sync]
  E --> G[macOS localization resources]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Other -8. Total -8 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 10 18 -8
Total 1 10 18 -8

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: scripts/apple-app-i18n.ts, unknown-data-model-change: scripts/apple-app-i18n.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one private reader with explicit platform builders, preserving existing catalog formats, read ordering, and generated bytes.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR removes duplicate implementation rather than fixing a reported runtime defect; the duplication is directly visible in current main.

Is this the best way to solve the issue?

Yes. A private reader parameterized by catalog path and existing builder removes duplication without introducing another policy owner, cache, or public API.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 66c7fad06385.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports paired real local CLI runs through the changed catalog reader: compile-macos and sync-ios --write produced equivalent files on baseline and candidate. This satisfies the earlier equivalence request for the reader-only change; native application or device behavior is not claimed.

Label justifications:

  • P3: This is a bounded internal deduplication with no intended user-facing behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports paired real local CLI runs through the changed catalog reader: compile-macos and sync-ios --write produced equivalent files on baseline and candidate. This satisfies the earlier equivalence request for the reader-only change; native application or device behavior is not claimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports paired real local CLI runs through the changed catalog reader: compile-macos and sync-ios --write produced equivalent files on baseline and candidate. This satisfies the earlier equivalence request for the reader-only change; native application or device behavior is not claimed.

Evidence

What I checked:

  • Introduced change preserves reader behavior: The complete introduced patch replaces two private readers with one parameterized reader. All four callers retain the correct catalog and builder pairing; sequential reads, parsing, error propagation, and the independent post-verification reread remain intact. (scripts/apple-app-i18n.ts:727, 5ea54a9889e7)
  • Current main still has separate readers: Fetched main retains readIosCatalogBuild and readMacosCatalogBuild, so this consolidation is not already implemented there. (scripts/apple-app-i18n.ts:735, 66c7fad06385)
  • Latest release retains separate readers: The v2026.9.4 source also retains both private readers and their callers; this refactor has not already shipped in the supplied latest release. (scripts/apple-app-i18n.ts:727, 3a9d69db306c)
  • Verified test-merge scope: Raw test-merge parents match the pinned base followed by the exact PR head. Comparing the merge result with that base yields the same reader-only patch, without attributing unrelated base changes to this PR. (scripts/apple-app-i18n.ts:727, c07370406201)
  • Previous proof request addressed: The supplied complete PR body, captured under sourceRevision eed0df810decc5e5257997730bff27b4df2afdf623262049e6370d7beaae6e60, records baseline/candidate compile-macos and sync-ios --write runs on frozen head source/data. All four commands succeeded; each variant produced 43 compiled files, and 86 sync targets matched in membership, modes, hashes, and bytes. This addresses the prior request at refactor(i18n): share Apple catalog reader #144848 (comment). The body explicitly limits the claim to local Node/filesystem equivalence and reports idempotent sync, not stale-catalog rewriting. (5ea54a9889e7)
  • Existing behavioral coverage: Inspected tests exercise platform-specific projection, preservation of translated values, stale-catalog rejection, verification before compilation, and generated macOS localization files. The PR reports 54/54 focused tests before and after; tests were not executed during this read-only review. (test/scripts/apple-app-i18n.test.ts:570, 5ea54a9889e7)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-11T10:31:59.690Z sha 5ea54a9 :: blocked before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 11, 2026 12:51
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 11, 2026
@vincentkoc
vincentkoc merged commit d1c9e46 into main Sep 11, 2026
145 checks passed
@vincentkoc
vincentkoc deleted the refactor/apple-catalog-reader-rank131 branch September 11, 2026 13:43
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 11, 2026
* commit 'f2ce199238e974b1d4caff8f11112aa51eb00d9e': (310 commits)
  refactor(copilot): deduplicate transcript user text (#144888)
  refactor(sessions): await discovery and config readiness (#144854)
  refactor(e2e): deduplicate release file assertions (#144904)
  ci: keep growing hosted test plans within the job cap (#144965)
  fix(macos): avoid stale dashboard command assertions (#144710)
  refactor(memory): await standing intent operations (#144832)
  refactor(ui): derive native device settings types from schemas (#144705)
  refactor(memory): await journal operations and allocate sequences atomically (#144824)
  refactor(tests): share command field assertions (#144955)
  refactor(matrix): share bounded context cache insertion (#144939)
  refactor(i18n): share Apple catalog reader (#144848)
  fix(doctor): preserve legacy registry files when quarantine fails (#144787)
  refactor(tests): reuse PixVerse auth fixtures (#144926)
  fix(bonjour): silence transient ENODEV socket warnings (#144870)
  fix(matrix): preserve unrelated files when migration fails (#144883)
  feat(sqlite): run Team Reports storage in owned workers (#144871)
  fix(update): install explicit same-version artifacts (#144894)
  refactor(ui): share cached message extraction (#144244)
  refactor: normalize Claude usage responses at one boundary (#144707)
  refactor: simplify CLI child listener registration (#144929)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant