Skip to content

test(cli): cover non-English base locale colliding with an en translation - #17539

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1787761000-port-base-locale-collision-test
Open

test(cli): cover non-English base locale colliding with an en translation#17539
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1787761000-port-base-locale-collision-test

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Linear ticket: Refs #17531, refs Pylon issue 23045

Targets devin/1787702962-cli-default-locale-manifest-key (#17531), not main. #17536 was closed as redundant with #17531; this ports the one regression case #17531's tests don't cover.

#17531's tests assert that a configured default locale is stamped on the base segment (en-US, de-DE) and that an explicit translation locale round-trips. What they don't exercise is the collision that made the bug data-destructive rather than merely cosmetic: a non-English default plus a real en translation. Because the ledger manifest keys locales as a record (buildLedgerManifest.ts), a base segment flattened to "en" doesn't just mislabel itself — it occupies the key the site's actual en translation needs, and one entry silently overwrites the other.

Changes Made

  • One test in buildLedgerInput.test.ts: nl default + ["en", "de"] translations, asserting base and en translation segments come back as ["nl", "en"] — i.e. two distinct manifest keys.
  • No production code, no changelog, no other changes.

Testing

  • Unit tests added/updated
  • Manual testing completed

Run against this branch (which is #17531's head plus this test):

pnpm turbo run test --filter @fern-api/remote-workspace-runner
  → src/__test__/buildLedgerInput.test.ts (28 tests) passing
  → Test Files 24 passed (24) / Tests 270 passed (270)

pnpm lint:biome --fix   → Checked 4990 files. No fixes applied.
pnpm format:fix         → Formatted 5067 files. No fixes applied.

Unit-level only — no real docs publish was exercised, and the reader-side pieces (the FDR registerTranslation en guard, ledger-docs-loader's <html lang="en"> fallback, and the Astro fallback in fern-platform#14141) are untouched and unvalidated here.


Open in Devin Review

Ryan-Amirthan and others added 2 commits August 26, 2026 00:09
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@nitpickybot nitpickybot 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.

Adds a single regression test covering a non-English default locale alongside a real en translation, asserting the base and translation segments produce distinct locale keys. Test-only change, consistent with the surrounding test style, and the assertion directly targets the described collision. No issues found.


To request another review, comment /ai-review on this pull request.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Base automatically changed from devin/1787702962-cli-default-locale-manifest-key to main August 26, 2026 18:00
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