Skip to content

Fix literal-brace failures with explicit message syntax - #7

Merged
Tom-R-Main merged 1 commit into
mainfrom
codex/message-syntax-contract
Sep 4, 2026
Merged

Tom-R-Main merged 1 commit into
mainfrom
codex/message-syntax-contract

Conversation

@Tom-R-Main

Copy link
Copy Markdown
Owner

Problem and behavior

The published CLI treats ExecuFunction's literal {.sift,.claude,.codex,.agents} documentation text as ICU, producing the same source error for every target locale. Add message_syntax: auto | i18next | icu | plain with global defaults and bundle overrides. Source units carry their resolved grammar through validation, provider/TM checks, adoption, pseudo generation, and review approval. Explicit ICU remains strict; parsing failures never fall back to plain text.

The i18next profile preserves double-brace variables, nested paths, escaping/formatting modifiers, and plural-key families. HTML code contents are protected alongside existing Markdown code checks. Invalid source findings are reported once per bundle with affected locales, and dry-run reports planned work as “Would translate”.

Compatibility

auto remains the default. Fluent resources retain their own grammar. Custom i18next delimiters and nesting expressions are outside this profile. Syntax now participates in policy identity, and the prompt contract advances to v3: existing records become policy-stale and require refresh or validated adoption, followed by explicit review. Documentation includes the ExecuFunction web bundle mapping and distinguishes it from the temporary marketing catalogs. No ExecuFunction files or published npm versions are changed.

Validation

  • Regression reproduced on the v0.1.2 baseline before implementation.
  • Full go test ./... -race -covermode=atomic passed; coverage 75.0% (required 60%). Build, vet, lint, npm wrapper tests, and package version checks passed.
  • CLI acceptance fixture covers i18next and ICU bundles, both pseudo strategies, read-only dry-run, adoption without approval, policy/approval invalidation, and source-error deduplication. Provider tests reject damaged code/placeholders and prevent incompatible TM reuse.
  • Read-only smoke test against ExecuFunction's marketing artifacts: all 21 ICU source errors removed, dry-run succeeds, and structural coverage is 100%. Validation now reports 53 protected-content findings (30 HTML code, 21 inline code, 2 HTML structure), including existing translated command placeholders and outdated exf commands. Those catalog findings need separate review; this PR does not change them.

Signed-off-by: Tom Main <tom@execufunction.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-04T19:13:26.103028Z 29a7cfe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Tom-R-Main
Tom-R-Main merged commit c8697b2 into main Sep 4, 2026
8 checks passed
@Tom-R-Main
Tom-R-Main deleted the codex/message-syntax-contract branch September 4, 2026 19:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29a7cfedae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +58 to 59
default:
output = transformLiteral(input)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Transform literal braces under explicit non-ICU syntax

When message_syntax is plain—or i18next with a single-brace expression—this branch still calls transformPreserving, whose syntax-independent regex protects {identifier}, %{identifier}, and {{...}}. Consequently, pseudolocalizing a plain value such as Read {draft} leaves draft untranslated even though the new syntax contract defines those braces as literal text; similarly, i18next incorrectly preserves single-brace prose. Make protected-span selection syntax-aware so only runtime placeholders for the resolved grammar are excluded from transformation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant