fix: use plural 'attachments' item_type in attachment loader report#225
Merged
Conversation
loadAttachment emitted item_type: 'attachment' (singular) in its LoaderReport for both the CREATED and FAILED branches, while every other producer and consumer of the sync report uses 'attachments' (plural): the AirSyncDefaultItemTypes.ATTACHMENTS constant, extraction telemetry, the DevRev platform's source_items[*].type, native connectors, and E2E verifier entity-type mappings. As a result, destination-side report-count verification for reverse-sync attachments via any ts-adaas-based connector failed with invalid_report_created_count -- the report said attachment: N while the verifier looked up attachments, found 0, and flagged a mismatch despite the attachments being created successfully. Align the loader report with the rest of the platform and update the co-located test assertions. supportedItemTypes: ['attachment'] is left singular intentionally -- it is the stats-file batch-routing key, a separate channel from the telemetry report.
radovanjorgic
marked this pull request as ready for review
July 22, 2026 08:32
gasperzgonec
approved these changes
Jul 22, 2026
radovanjorgic
added a commit
that referenced
this pull request
Jul 22, 2026
…gration docs Forward-port three main commits onto the refactored v2 code: - #225: attachment loader report emits plural 'attachments' item_type (loading-adapter.ts, both CREATED and FAILED branches; supportedItemTypes stays singular as the stats-file routing key) - #223: axios 1.17.0 -> 1.18.1 (lockfile-only; 10 Snyk fixes) - #227: fast-uri 3.1.3 -> 3.1.4 (lockfile-only, transitive; SNYK-JS-FASTURI-18021349) Correct MIGRATION.md and the migrate-v2 skill against the actual v2 source (from the doc/skill verification audit): fix the npm install version (@beta / newest 2.x, not @2.0.0 which 404s), broaden the WorkerAdapter detect to catch value-context construction, add dispositions for the removed dist/state/state State class and createAdapterState, document the ProcessTaskInterface and TaskAdapterInterface generic flip, correct the mappers *Response count and the ExternalSystemAttachmentIteratorFunction symbol name, and remove stale "MIGRATION.md is wrong" callouts.
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.
Description
This PR fixes
WorkerAdapter.loadAttachment, which emitted itsLoaderReportwith the singularitem_type: 'attachment'(CREATED and FAILED branches) while the rest of the SDK and platform use the plural'attachments'. This broke destination-side report-count verification for reverse-synced attachments — the report saidattachment: Nbut the verifier looked upattachments, found 0, and failed withinvalid_report_created_counteven though the attachments were created.Both report branches now emit
'attachments'; the co-located test assertions are updated.supportedItemTypes: ['attachment']is intentionally left singular — it is the stats-file batch-routing key, a separate channel from the report. Needs a forward-port to v2 (loading-adapter.ts).Connected Issues
https://app.devrev.ai/devrev/works/ISS-349228
Checklist
npm run testOR no tests needed.npm run test:backwards-compatibility.npm run lint.