Skip to content

fix(i18n): one shared response-language map with lv and pl (#18442) - #18471

Open
mrveiss wants to merge 5 commits into
mainfrom
issue-18442-language-map
Open

mrveiss wants to merge 5 commits into
mainfrom
issue-18442-language-map

Conversation

@mrveiss

@mrveiss mrveiss commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Thinking Path

Latvian and Polish are UI locales but had no response-language name, so the prompt said "respond in lv (lv)". The map also existed twice and the prompt_manager copy had drifted (13 vs 16). The module that owns the canonical map imports lazily, which is why the copy existed, so the fix is a leaf module in autobot_shared that both import.

What Changed

  • New autobot_shared/supported_languages.py holds the single SUPPORTED_LANGUAGES (18 entries, adds lv Latvian and pl Polish).
  • services/personality_service.py and prompt_manager.py import it; both inline definitions are deleted. Repo-wide grep of tracked files found no other definition; existing importers (api/personality.py, api/schemas_agent.py) keep working through the re-exported name.
  • prompt_manager.py shrank 1481 -> 1462 lines; the ceiling is lowered to 1462 in both records.
  • New autobot_shared/supported_languages_test.py: every frontend locale file has an entry; get_language_instruction("lv") contains Latvian (lv) and pl contains Polish (pl); prompt_manager uses the shared object.

Verification

  • New test: 4 passed. Old code: locales missing from the map were fa, ur, he, lv, pl; lv rendered as the bare code.
  • symbol_fork_ratchet_17312, python_file_size_ratchet, ceiling_record_parity_17872, guard_reach_meta: 83 passed. reach_scope_claim_17844 alone: 10 passed.
  • Backend -k "personality or prompt_manager or language": 56 passed, 1 skipped.
  • Pre-push hook ran its pytest selection and passed.

Model Used

Claude Sonnet 5.5

Closes #18442

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 823373d1-5c03-449a-9a09-d1fd99d9995e

📥 Commits

Reviewing files that changed from the base of the PR and between df211d3 and a13ac4d.


⛔ Files ignored due to path filters (2)
  • repo_tests/python_file_size_ratchet_baseline.py is excluded by !repo_tests/python_file_size_ratchet_baseline.py
  • scripts/python_file_size_known_large.py is excluded by !scripts/python_file_size_known_large.py

📒 Files selected for processing (18)
  • .claude/agents/code-refactorer.md
  • .claude/agents/code-skeptic.md
  • .claude/agents/content-writer.md
  • .claude/agents/frontend-designer.md
  • .claude/agents/prd-writer.md
  • .claude/agents/project-task-planner.md
  • .claude/agents/security-auditor.md
  • .claude/agents/senior-backend-engineer.md
  • .claude/agents/systems-architect.md
  • CLAUDE.md
  • autobot-backend/prompt_manager.py
  • autobot-backend/services/personality_service.py
  • autobot_shared/supported_languages.py
  • autobot_shared/supported_languages_test.py
  • docs/developer/CLAUDE_GIT.md
  • docs/developer/CLAUDE_REVIEW.md
  • docs/research/_index.md
  • docs/research/latvian-language-handling.md

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@mrveiss

mrveiss commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Review at 29b9073: approve.

  • One definition: SUPPORTED_LANGUAGES is defined only at autobot_shared/supported_languages.py:16 (18 entries, with Latvian and Polish added). The prompt_manager and personality_service copies are gone, both modules import the shared one, and personality_service re-exports it for api/personality.py and api/schemas_agent.py.
  • Behaviour: schemas_agent validates language_code against the map, so lv/pl are now accepted. That is the intended result of bug(i18n): response-language map lacks lv and pl — Latvian users get "respond in lv (lv)" #18442.
  • Tests: they pin get_language_instruction for lv and pl, and check every frontend locale has an entry. Against the old prompt_manager map this check fails for fa/ur/he/lv/pl.
  • Size: prompt_manager.py is down to 1462, with the ceiling lowered.

LOW: autobot-backend/conftest.py:442-444 (pre-existing, unchanged here) sets SUPPORTED_LANGUAGES = {} when personality_service is stubbed. The map now lives in a leaf module with no circular-import risk, so the stub could import autobot_shared.supported_languages.SUPPORTED_LANGUAGES instead of an empty dict, keeping test validation honest.

Queued for the next merge train.

@github-actions

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. The actual limit is the open-PR cap (AUTOBOT_OPEN_PR_CAP, default 40), enforced at pre-push against NEW branches only -- pushing more commits to this PR's own branch is never blocked by it.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Merge the ones whose CI has finished and review has passed: gh pr merge <number> --squash --delete-branch
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss

mrveiss commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Delta check at 3889982: approve. There is no code-logic change since 29b9073.

  • personality_service.py: exactly one added blank line, which black requires.
  • Docs passenger: docs/research/latvian-language-handling.md (39 lines) plus one _index.md line. It cites AutoBot code locations and in-repo dependencies only. A scan finds no URLs, IPs, internal paths, hostnames or emails, and no external source is described.

Queued for the next merge train.

@mrveiss

mrveiss commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Review of commit f5ddf00258 (instruction and agent-definition edits), done before it rides a train per the user's decision. Changes requested on one Medium.

  • Medium: CLAUDE.md "Never violate" deletes the repo-level "Say 'I don't know' — never fabricate" bullet without moving its text into any repo doc. Its specifics (leave the criterion unticked, file it, never drop it) would then live only in the private global instructions, invisible to other contributors' and CI agents. That weakens a never-violate rule. Keep a one-line bullet in CLAUDE.md, or move the full text to docs/developer/MEASUREMENT_DISCIPLINE.md and link it.
  • Low: the intro's list of what lives in the global instructions now says "PR batching", but batching moved to CLAUDE_REVIEW.md. Drop it from that list.

Verified fine:

  • docs only;
  • no weakening of the --no-verify, data/credential-deletion, outward-disclosure, protected-branch, evidence or merge-gate rules;
  • no change to tools: or model: in any of the 9 agent files (only description: shortened, with examples moved to the body);
  • no internal hosts, names or paths;
  • the PR-granularity text moved verbatim to CLAUDE_REVIEW.md with no duplicate left.

@mrveiss

mrveiss commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Delta check at a13ac4d: approve. The Medium is fixed.

  • CLAUDE.md:43 restores the never-violate bullet: "Say 'I don't know' — never fabricate." It links to MEASUREMENT_DISCIPLINE.md#a-stated-gap-is-a-finding-never-a-closure, whose heading exists (line 369) and holds the full text.
  • The intro no longer lists "I don't know" or "PR batching" as global-only.

Commit f5ddf00258 (instruction and agent docs) plus this fix are approved per the user's "review first" decision. Queued for the next merge train.

This branch has not been deployed

No deployments
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.

bug(i18n): response-language map lacks lv and pl — Latvian users get "respond in lv (lv)"

1 participant