Uh oh!
There was an error while loading. Please reload this page.
Pin Translation.translate_fields/6 validation order with a regression test - #563
Closed
mdon wants to merge 2 commits into
Closed
Pin Translation.translate_fields/6 validation order with a regression test#563mdon wants to merge 2 commits into
mdon wants to merge 2 commits into
Conversation
Backstop for the validation chain: `endpoint → prompt → non-empty → unique-markers → plugin-available`. Stacks multiple input violations and asserts which rejection wins, so a future refactor that reorders the `with` chain (e.g. moving `validate_non_empty` before `validate_uuid`) gets caught immediately.
Codex final review NIT: empty-map (`%{}`) can't also contain
duplicate normalized markers, so the regression-test comments
mentioning "empty fields + dups" were inaccurate. Trim those
mentions so the assertions read straight.5 tasks
mdon
commented
May 22, 2026
ContributorAuthor
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 freeto 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
Follow-up to PR #558 — codex flagged that the documented validation
order (
endpoint → prompt → non-empty → unique-markers → plugin- available) wasn't pinned by any test. A future refactor thatreorders the
withchain would change caller-facing precedencewithout any test catching it.
Added a regression test that stacks multiple input violations and
asserts which one wins:
:no_endpoint(endpoint wins):missing_prompt(prompt wins):no_markers{:duplicate_markers, _}Plus a comment-only tidy on the existing describe block (the order
list there was stale after #558 inserted
validate_non_empty).These two commits landed on my fork's branch after#558 was
merged, so they didn't make it into upstream/dev. Opening as a
separate small PR.
Test plan