Mirrors _sync_attachments. Idempotent dedup keyed on (parentItemID, title) so re-syncing is a no-op. Wired into both the create-item and update-existing-item branches of push_to_zotero. Adds 'notes' counter to the stats dict. Fixes test_sync_deeper mocks: both _sync_attachments and _sync_notes call store._con().execute(); updated the MagicMock side_effect to route by SQL fragment so the notes query returns [] while attachment queries return the fixture rows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9.1 KiB
9.1 KiB