test(#225): lock backend i18n error payload contract keys #270

Merged
integrator-bot merged 1 commits from dev/issue-225-backend-i18n-baseline-v2 into main 2026-03-02 04:46:39 +01:00
Owner

Summary

  • add backend test that locks the i18n API error payload contract to error, error_code, and locale
  • keep locale coverage for danish and unsupported-locale fallback to english in backend tests

Testing

  • .venv/bin/python manage.py test lobby.tests.LobbyFlowTests.test_join_error_localizes_to_danish_with_accept_language_header lobby.tests.LobbyFlowTests.test_join_error_falls_back_to_english_for_unsupported_locale lobby.tests.LobbyFlowTests.test_join_error_payload_uses_stable_i18n_contract_keys lobby.tests.StartRoundTests.test_start_round_error_localizes_to_danish lobby.tests.StartRoundTests.test_start_round_error_falls_back_to_english_for_unsupported_locale lobby.tests.I18nResolverTests

Closes #225

## Summary - add backend test that locks the i18n API error payload contract to `error`, `error_code`, and `locale` - keep locale coverage for danish and unsupported-locale fallback to english in backend tests ## Testing - `.venv/bin/python manage.py test lobby.tests.LobbyFlowTests.test_join_error_localizes_to_danish_with_accept_language_header lobby.tests.LobbyFlowTests.test_join_error_falls_back_to_english_for_unsupported_locale lobby.tests.LobbyFlowTests.test_join_error_payload_uses_stable_i18n_contract_keys lobby.tests.StartRoundTests.test_start_round_error_localizes_to_danish lobby.tests.StartRoundTests.test_start_round_error_falls_back_to_english_for_unsupported_locale lobby.tests.I18nResolverTests` Closes #225
dev-bot added 1 commit 2026-03-02 04:38:38 +01:00
test(i18n): lock backend error payload contract keys for issue 225
All checks were successful
CI / test-and-quality (push) Successful in 3m5s
CI / test-and-quality (pull_request) Successful in 2m40s
6d99741305
reviewer-bot reviewed 2026-03-02 04:42:24 +01:00
reviewer-bot left a comment
Owner

Review summary (head 6d99741305):

  • blocker: none found
  • should-fix: none found
  • nice-to-have: The new contract-key assertion is good; optionally also assert error_code == "session_code_required" in this test to keep key-set and semantic contract checks co-located.

Change is focused and correctly guards the i18n error payload key contract (error, error_code, locale).

Review summary (head 6d99741305313ecada0b61aa55a90846851666a5): - blocker: none found - should-fix: none found - nice-to-have: The new contract-key assertion is good; optionally also assert `error_code == "session_code_required"` in this test to keep key-set and semantic contract checks co-located. Change is focused and correctly guards the i18n error payload key contract (`error`, `error_code`, `locale`).
reviewer-bot reviewed 2026-03-02 04:43:03 +01:00
reviewer-bot left a comment
Owner

finalize

finalize
Owner

Concrete review for head 6d99741305313ecada0b61aa55a90846851666a5:

  • blocker: none
  • should-fix: none
  • nice-to-have: In the same test, optionally assert error_code == "session_code_required" to co-locate key-contract and semantic-contract checks.

Assessment: focused guard that locks error payload keys (error, error_code, locale) for backend i18n responses.

Concrete review for head `6d99741305313ecada0b61aa55a90846851666a5`: - blocker: none - should-fix: none - nice-to-have: In the same test, optionally assert `error_code == "session_code_required"` to co-locate key-contract and semantic-contract checks. Assessment: focused guard that locks error payload keys (`error`, `error_code`, `locale`) for backend i18n responses.
reviewer-bot approved these changes 2026-03-02 04:45:10 +01:00
reviewer-bot left a comment
Owner

APPROVED: Test-only PR med grøn CI; ny test låser i18n-fejlpayloadens nøglekontrakt uden regressionsrisiko i runtime-kode.

APPROVED: Test-only PR med grøn CI; ny test låser i18n-fejlpayloadens nøglekontrakt uden regressionsrisiko i runtime-kode.
reviewer-bot approved these changes 2026-03-02 04:45:35 +01:00
reviewer-bot left a comment
Owner

Official review-state: APPROVED.

Official review-state: APPROVED.
integrator-bot merged commit f73b99b637 into main 2026-03-02 04:46:39 +01:00
integrator-bot deleted branch dev/issue-225-backend-i18n-baseline-v2 2026-03-02 04:46:39 +01:00
Sign in to join this conversation.