Repository navigation
docs(protocol): lifecycle wire contract v2 + Python goldens for refresh/cancel/replace (#101, 1/2) - #107
Merged
Conversation
…ancel/replace) Additive to v1 (status unchanged, v1 files untouched): explicit capability set, POST framing and headers, Python-exact canonical replacement bytes (code-point key order, lexeme-kind numbers, repr floats), replace binding to the descriptor digest plus lineage, lost-acknowledgement semantics and the rule that a cancel response is not cancellation. Canonicalisation claims were checked against nano_qsearch.canonical before freezing. Refs #101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests Add fixtures/regen.py and the five v2 fixture files (canonical replacement bytes, control signing, control histories, control errors, control negatives) produced from the real Python service and client with injected clocks, synthetic keys and a fake provider adapter, plus SHA256SUMS over every v2 file. tests/test_qsearch_lifecycle_wire_v2.py checks regen --check, the sums, wire.v2.json against the Python constants, every vector against an independent reference reader and canonicaliser, one transport call per control, POST transport failure as MANUAL_RECONCILIATION, and v1 byte identity. Python discrepancies are strict xfails: duplicate members and depth 65 in replacement text, and the missing capability set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ives The v1 contract leaves 'field' unspecified for INVALID_RESPONSE (a client may report null or a static schema path) and v1 negatives never pin it. The v2 negatives pinned Python's null on all 15 such cases, which over-specified the contract and failed the TypeScript client on a schema-invalid replace body. Negatives now carry only the mandated keys; comparisons check those keys. Refs #101 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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
Publishes
nano.qsearch.lifecycle-wire.v2, an additive contract that lets non-Python hosts use the existing explicit refresh / cancel / replace controls. It comes with golden fixtures generated by the real service and Python client, using fake providers only. v1 (status) and its files are unchanged, and the service, lifecycle and client code are untouched. PR 1 of 2 for #101; the TypeScript client (PR 2) stacks on this branch.Key Changes
reprfloats. Every rule was checked againstnano_qsearch.canonicalbefore freezing.replacetakes an already-parsed Mapping (so duplicates and depth are the caller's), and Python has no capability set.Verification
regen.py --checkand SHA256SUMS pass, and v1 files and sums are byte-identical..ruff_cachethat is not in CI.j6_a2×2,quantum_prepare) or that local cache.🤖 Generated with Claude Code