Skip to content

fix(communication-transfer): reject malformed binding collections instead of silently dropping them - #169

Merged
lostlight530 merged 1 commit into
mainfrom
agent/20261024-communication-binding-shape
Oct 23, 2026
Merged

lostlight530 merged 1 commit into
mainfrom
agent/20261024-communication-binding-shape

Conversation

@lostlight530

@lostlight530 lostlight530 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Confirmed current defect

Base main: 04acde76af9f1058ed8abdd5c1c3e791423767dc

core/communication_transfer.py accepts a source-profile-correct figure-evidence sidecar whose claim_communication.bindings is not a list of JSON objects, then silently reports binding_count: 0 and copies bindings: [] rather than explicitly failing
This 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 copying
  • tests/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 case
  • metadata/communication_transfer.contract.yaml — declare accepted binding collection shape and fail-closed policy
  • docs/02-examples-and-contracts/COMMUNICATION_TRANSFER_CONTRACT.md — align the current handoff contract with implemented input validation
  • No historical materials, broad refactoring, date-only edits, unrelated adapters, or default-branch writes

Evidence grades

  • REMOTE_STATE_VERIFIED: GitHub current tree/main/PR/branch facts checked
  • STATIC_SOURCE_REVIEW: current producer, consumer, machine contract and relevant test paths examined
  • ISOLATED_REPRO_EXECUTED: source-equivalent minimal Python reproducer observed malformed dict bindings silently becoming [] and coverage 0
  • Native pre-fix repository tests: NOT_EXECUTED (no reachable checkout)
  • GitHub Actions exact-head run: TEST_EXECUTED / SUCCESS — run 40036383261, head b9eb4ad78d080989db4462ab9b72225c6232bc95
  • python -m unittest tests.test_tool_cli -v: 11 tests OK, including both newly added malformed-binding and valid-binding regressions
  • make test: success — core 10 tests, accessibility 13, Tool/Agent 16, offline UI 3; all actual job steps completed successfully
  • Python compilation and JSON/HTML catalog generation: success
  • Original maintenance scanner: NOT_EXECUTED
  • No scientific truth, publisher acceptance, statistical certification or independent-reproduction claim

Freshness

Original base: 04acde76af9f1058ed8abdd5c1c3e791423767dc
Proposed head: b9eb4ad78d080989db4462ab9b72225c6232bc95
main...head at PR preparation: ahead 1 / behind 0, exactly four current files changed

READY_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

@lostlight530
lostlight530 marked this pull request as ready for review October 23, 2026 23:37
@lostlight530
lostlight530 merged commit 42bb5e2 into main Oct 23, 2026
1 check passed
@lostlight530
lostlight530 deleted the agent/20261024-communication-binding-shape branch October 23, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant