Repository navigation
OpenConceptLab/ocl_online#456 | Order a concept's mappings by id (fixes flaky inverse-mappings test) - #954
Merged
Conversation
…appings list tests fail test_inverse_mappings_are_unchanged failed on master CI twice at 0c4bae2, with a diff truncated to its first difference (checksum key order). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph
…hen the inverse-mappings test fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph
…PI responses The per-concept mapping querysets had no ORDER BY, so two identical requests could list a concept's mappings in different orders once rows were rewritten (the first request saves their checksums). That made test_inverse_mappings_are_unchanged fail intermittently on CI. Both get_mappings implementations now order by id, as the batched path from #949 already does. The test compares plain lists, so a failure shows the differing element, and checks the mapping order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph
paynejd
commented
Oct 22, 2026
paynejd
left a comment
Member
Author
There was a problem hiding this comment.
Codex review, pass 1 (codex-cli 0.163.0, commit 155eaf3)
Scope: net diff origin/master...155eaf30b6067ba552bd0c46805dd381604a7bed (the per-concept mapping ordering fix and the test change). Reasoning effort xhigh, read-only.
Verdict: clean. No findings.
findings.json
{
"reviewer": "codex-cli 0.163.0",
"perspective": "defects",
"mode": "full",
"commit": "155eaf30",
"verdict": "clean",
"prior": [],
"findings": []
}
Member
Author
|
Simplification review (fresh Claude subagent, commit 155eaf3) Verdict: clean, nothing to cut. The change is four |
paynejd
marked this pull request as ready for review
October 22, 2026 21:37
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.
test_inverse_mappings_are_unchanged(added in #949) failed intermittently on CI: three of five runs on the same tree on 2026-10-22, including both attempts of master's Build at 0c4bae2, which blocked the deploy. It passed locally every time (alone, in its module, and in the full 2,720-test suite).Cause. The per-concept mapping querysets in
ConceptAbstractSerializer.get_mappingsandConceptVersionDetailSerializer.get_mappingshave noORDER BY, andMappinghas no default ordering. The test makes the same request twice. The first request saves checksums on the mapping rows it serializes, which rewrites them, so on a database with earlier tests' leftovers the second request can return a concept's mappings in a different order. The failing reprs had identical lengths, which fits reordered mappings of the same shape. #949's batched path already orders by id.Fix. Both
get_mappingsimplementations order a concept's mappings by id, for inverse and direct, collection and non-collection. Which mappings are returned doesn't change. The test now compares plain lists, so a failure names the differing element. (response.datais aReturnList, soassertEqualnever printed a diff before.) It also asserts each concept's mappings are id-ordered.Verified. Locally, 446 tests pass (core.concepts, core.mappings and the concepts integration module) and pylint rates 10.00. CI ran on this PR. The branch's earlier commits added and then removed a temporary diagnostic, so squash-merge it.
Part of OpenConceptLab/ocl_online#456
🤖 Generated with Claude Code
https://claude.ai/code/session_01TjM9dGow2KV1Gwr2dWQdph