Repository navigation
fix: structured standalone detail for missing map keys (#107) - #245
Open
felipeofdev-ai wants to merge 1 commit into
Open
felipeofdev-ai wants to merge 1 commit into
felipeofdev-ai wants to merge 1 commit into
Conversation
Surface :missing-keys and :missing in standalone :mismatch/detail when expected map keys are absent, instead of embedding Missing records that read like partial mismatches. Signed-off-by: Felipe Fernandes <felipe.of.dev@gmail.com>
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
matcher-combinators.standalone/match:mismatch/detailwhen map mismatches include missing keys.:missing-keys,:missing(expected values), and:unexpected-keysinstead of embeddingMissingrecords that read like partial mismatches.Why
When an expected map key is absent, the standalone API returned entries like
:a #Missing{:expected 1}inside the detail map. That reads like a value mismatch missing an:actualfield rather than an absent key — exactly the ambiguity @dchelimsky described in #107 and the TODO instandalone_test.clj.Example before:
After:
Core
matchresults and pretty-print output are unchanged; only the standalone:mismatch/detailshape changes when missing keys are present. Value mismatches on present keys keep the prior annotated-map shape.Fixes #107
Test plan
clojure -M:dev:clj-test:test-runner(78 tests, 0 failures)clojure -M:dev:clj-test:test-runner -n matcher-combinators.standalone-testbb test— cljs + midje)— Felipe Oliveira Fernandes · Systems & Agentic AI Engineer
https://github.com/felipeofdev-ai · https://felipeofdev-ai.github.io/
Made with Cursor