Skip to content

🧪🔧:pass the validateOneOf test in any locale - #116

Merged
openinf-commit-queue[bot] merged 1 commit into
mainfrom
claude/project-thread-xj2fx1-locale-test
Oct 9, 2026
Merged

openinf-commit-queue[bot] merged 1 commit into
mainfrom
claude/project-thread-xj2fx1-locale-test

Conversation

@DerekNonGeneric

@DerekNonGeneric DerekNonGeneric commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Requested by DerekNonGeneric

Before: pnpm test failed in @openinf/util on any machine without a UTF-8 locale (no LC_ALL, LC_CTYPE or LANG naming UTF-8, as in a bare container). The validateOneOf test spelled the expected message with curly quotes, but curlyQuote uses straight quotes there, so a correct message was reported as wrong.

After: the test passes with or without a UTF-8 locale.

How: the expected message is built with curlyQuote, the way the util-errors tests already build theirs. Test-only, so there's no changeset.

Summary by CodeRabbit

  • Tests
    • Updated validation test expectations to match locale-dependent quotation marks in error messages.

The test spelled the expected message with curly quotes, but
curlyQuote only uses them when LC_ALL, LC_CTYPE or LANG names UTF-8.
Without one, as in a bare container, pnpm test failed on a message
that was right. The expectation now uses curlyQuote too, as the
util-errors tests already do.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 58edd4b1-4371-4efa-b13b-33f38e8e14e0
📥 Commits

Reviewing files that changed from the base of the PR and between 12c915f and a81e0ff.

📒 Files selected for processing (1)
  • packages/util/test/validators/validate-one-of.ts

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The validate-one-of test imports curlyQuote and uses it to construct the expected error message. This replaces hard-coded curly quotes with locale-dependent quote formatting.

Changes

Validator test expectation

Layer / File(s) Summary
Build the expected error message
packages/util/test/validators/validate-one-of.ts
The test uses curlyQuote for the argument name, allowed values, received type, and received value in the expected error message.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to a81e0

This test-only adjustment aligns the expected message with locale-dependent quoting, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: making the validateOneOf test pass across locales. The emojis are unnecessary, but they do not obscure the title's meaning.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@DerekNonGeneric DerekNonGeneric self-assigned this Oct 8, 2026
@DerekNonGeneric DerekNonGeneric added the 🚀 Status: Commit Queue Land this pull request when its checks pass label Oct 9, 2026 — with Claude
@openinf-commit-queue
openinf-commit-queue Bot merged commit 96efca0 into main Oct 9, 2026
11 of 12 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the 🚀 Status: Commit Queue Land this pull request when its checks pass label Oct 9, 2026
@openinf-commit-queue
openinf-commit-queue Bot deleted the claude/project-thread-xj2fx1-locale-test branch October 9, 2026 00:13
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