Repository navigation
fix(qsearch): refuse duplicate JSON members in lifecycle client (#86, 2/3) - #92
Merged
Merged
Conversation
…nses LifecycleClient parsed responses with json.loads, which silently keeps the last of duplicate member names, so two clients could read different values from one body. Wire contract v1 section 2.1 requires INVALID_RESPONSE. Reproduced first by three strict-xfail compatibility cases and a new unit test (RED 3/3); fixed with an object_pairs_hook that refuses duplicates in success and error bodies. Fixture python_client metadata regenerated (accepts -> agrees for the three cases) and CONTRACT section 4 updated to list the remaining, still-recorded discrepancies. Refs #86 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Independent review follow-ups: - CONTRACT section 4 claimed the service never emits numbers above 2^53-1; job_state projects any finite non-negative record value, so state the real bound and the fail-closed client behaviour instead. - The Python client accepts UTF-8 BOM, UTF-16 and UTF-32 bodies via json.loads encoding detection; section 2.1 requires UTF-8. Recorded as three new negative fixtures that the Python client 'accepts' (strict xfail). - Drop the stale duplicate-key xfail reason. Refs #86 Co-Authored-By: Claude Opus 5.5 <[email protected]>
AetherAI3
changed the base branch from
claude/nano86-lifecycle-wire-contract
to
main
November 8, 2026 02:16
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
The Python
LifecycleClientsilently kept the last of duplicate JSON members, so two clients could read different values from one response. It now refuses them asINVALID_RESPONSE, matching wire contract v1 §2.1. This also corrects two false contract statements found in review. PR 2 of 3 for #86; based on PR 1.Key Changes
object_pairs_hookon the client's only parse path covers success and error bodies, at any depth.Verification
Risk / Follow-ups
Hashes
CONTRACT.md be60cd4a786b79fe · negative.v1.json 0dc5ac0e08908cc9 · SHA256SUMS b988622065113bcf. Head 7ea82b6.
🤖 Generated with Claude Code