Skip to content

fix: use plural 'attachments' item_type in attachment loader report#225

Merged
radovanjorgic merged 2 commits into
mainfrom
rado/ISS-349228
Jul 22, 2026
Merged

fix: use plural 'attachments' item_type in attachment loader report#225
radovanjorgic merged 2 commits into
mainfrom
rado/ISS-349228

Conversation

@radovanjorgic

@radovanjorgic radovanjorgic commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes WorkerAdapter.loadAttachment, which emitted its LoaderReport with the singular item_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 said attachment: N but the verifier looked up attachments, found 0, and failed with invalid_report_created_count even 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

  • Tests added/updated and ran with npm run test OR no tests needed.
  • Ran backwards compatibility tests with npm run test:backwards-compatibility.
  • Code formatted and checked with npm run lint.
  • Tested airdrop-template linked to this PR.
  • Documentation updated and provided a link to PR / new docs OR no docs needed.

radovanjorgic and others added 2 commits July 22, 2026 10:08
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
radovanjorgic marked this pull request as ready for review July 22, 2026 08:32
@radovanjorgic
radovanjorgic requested review from a team and gasperzgonec as code owners July 22, 2026 08:32
@radovanjorgic
radovanjorgic merged commit 3ed07c2 into main Jul 22, 2026
9 checks passed
@radovanjorgic
radovanjorgic deleted the rado/ISS-349228 branch July 22, 2026 08:52
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.
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.

2 participants