test(restart_drain): assert i18n catalog resolved#27070
Closed
haran2001 wants to merge 1 commit into
Closed
Conversation
The restart-drain test previously asserted equality between two calls
to t("gateway.draining", count=1), which masked the original
xdist failure mode in NousResearch#22266: if the locale catalog is not resolved
from the worker's import path, t() returns the bare key path and
both sides of the equality still match.
Add a guard that the resolved value is not the raw catalog key and
contains the English placeholder substitution. This keeps the test
loudly failing when locale resolution silently degrades.
This comment was marked as spam.
This comment was marked as spam.
teknium1
added a commit
that referenced
this pull request
May 17, 2026
…tors Adds release-note attribution mappings for the contributors from group 5: - @haran2001 (PR #27070, #27068) - @ms-alan (PR #26443) - @godlin-gh (PR #26118) - @wesleysimplicio (PR #25777, ext-email form) - @Carry00 (PR #26851) - @alaamohanad169-ship-it (PR #26036) - @hawknewton (PR #26294) (YanzhongSu PR #25879 and flamiinngo PR #27231 already mapped.)
Contributor
|
Merged via PR #27382 — your commit was cherry-picked onto current |
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…tors Adds release-note attribution mappings for the contributors from group 5: - @haran2001 (PR NousResearch#27070, NousResearch#27068) - @ms-alan (PR NousResearch#26443) - @godlin-gh (PR NousResearch#26118) - @wesleysimplicio (PR NousResearch#25777, ext-email form) - @Carry00 (PR NousResearch#26851) - @alaamohanad169-ship-it (PR NousResearch#26036) - @hawknewton (PR NousResearch#26294) (YanzhongSu PR NousResearch#25879 and flamiinngo PR NousResearch#27231 already mapped.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/gateway/test_restart_drain.py::test_restart_command_while_busy_requests_drain_without_interruptpreviously asserted that the runner's reply equalst("gateway.draining", count=1). If the i18n catalog could not be resolved (e.g. an xdist worker losing the locales path — the original failure mode in fix(test): restart drain test fails after i18n migration #22266),t()returns the bare key"gateway.draining"instead of the formatted English string and both sides of the equality still match silently.Drainingtext plus the{count}substitution, so locale resolution failures fail loudly here instead of being masked.Why test-only
The behavior bug in #22266 (test compared a hardcoded UI string to
t(...)) was already fixed in commita4289d74a fix(test): use i18n t() for restart drain assertion. The remaining gap is a regression hazard: the post-fix assertion happily passes even if i18n silently degrades. This PR keeps the existing assertion and adds the missing guardrail. No production code is touched.Test Plan
python -m pytest tests/gateway/test_restart_drain.py -q -o 'addopts='→ 16 passedpython -m pytest tests/agent/test_i18n.py -q -o 'addopts='→ 43 passedDuplicate PR check
Closes #22266