Repository navigation
fix(communication-transfer): reject malformed binding collections instead of silently dropping them - #169
Merged
Conversation
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.
Confirmed current defect
Base
main:04acde76af9f1058ed8abdd5c1c3e791423767dccore/communication_transfer.pyaccepts a source-profile-correct figure-evidence sidecar whoseclaim_communication.bindingsis not a list of JSON objects, then silently reportsbinding_count: 0and copiesbindings: []rather than explicitly failingThis loses caller-declared visual-to-claim relationships and contradicts the bounded transfer contract's preservation semantics
Minimal correction
core/communication_transfer.py— reject supplied non-null malformed binding collections before counting or copyingtests/test_tool_cli.py— exercise malformed dict/list/scalar/mixed binding inputs, one real CLI JSON + exit-code path, and a valid explicit binding preservation casemetadata/communication_transfer.contract.yaml— declare accepted binding collection shape and fail-closed policydocs/02-examples-and-contracts/COMMUNICATION_TRANSFER_CONTRACT.md— align the current handoff contract with implemented input validationEvidence grades
b9eb4ad78d080989db4462ab9b72225c6232bc95python -m unittest tests.test_tool_cli -v: 11 tests OK, including both newly added malformed-binding and valid-binding regressionsmake test: success — core 10 tests, accessibility 13, Tool/Agent 16, offline UI 3; all actual job steps completed successfullyFreshness
Original base:
04acde76af9f1058ed8abdd5c1c3e791423767dcProposed head:
b9eb4ad78d080989db4462ab9b72225c6232bc95main...headat PR preparation: ahead 1 / behind 0, exactly four current files changedREADY_FOR_MAINTAINER_REVIEW after exact-head CI success — retain Draft; separate independent review and fresh base/head check are required before any authorized merge
No author self-merge, no auto-merge, no force push