# 0036 — Integration — Module Triage

**Milestone:** M3
**Owner:** TBD
**Status:** planning

## Goal

Consolidates 12 legacy issues from the
`MetaDrivenPlatform4AI` repo that share the same module / area label,
so they can be triaged together by the corresponding domain IC.

Module label scope: `module/integration`.

## Acceptance criteria

- [ ] All `ported` children below have a Story or Bug filed in pingcap-pack
- [ ] All filed Stories / Bugs have a linked test (existing or to-write task with scaffold)
- [ ] Engineering review confirms which children are still applicable under the new project's design

## Stories / Bugs (filed as GitHub issues)

12 children classified `ported`. Phase 3/4 will file each as
a Story (capability) or Bug (defect) in this repo and back-reference the
legacy issue. Initial child list:

- [ ] #TBD — legacy MetaDrivenPlatform4AI#1777 — refactor(integration/hubspot): replace substring-based isDuplicateKeyError with error code/type check
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1779 — meta: Phase 0 audit missed worker-lifecycle gap in HubSpot integration restore
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1902 — [hubspot] Cold-start metadata race in sync_worker.objectHasField causes silent association drops
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1903 — [hubspot] FK-association cache poisoning on transient DB error in outbound_worker
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1957 — [integration-queue] PATCH externalRecordId is not persisted to _System_IntegrationMapping
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1958 — [integration-queue] Auth/permission middleware tests missing for /integration/queue/*
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1959 — [integration-queue] PATCH handler issues 2 queries per request (FindByID + guarded UPDATE)
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1960 — [integration-queue] GET /outbound response omits Status field
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1961 — [integration-queue] lookupInboundByIdempotency relies on type-assertion instead of port interface
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1996 — [hubspot-v3] Runtime healthcheck readback for _System_PlatformExtensionStatus (replaces CI-stamped Status='verified')
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1997 — [hubspot-v3] e2e-case-debt: author tc-*.json cases for G0/G1/G3 obligations + M4/M5 coverage
- [ ] #TBD — legacy MetaDrivenPlatform4AI#2028 — [Outbox] processEventAtomic should call ClaimEvent OUTSIDE WithTransaction (architectural refactor for #1817 Bug B PR #2027)

## Non-goals

- Re-port legacy fixes that are no longer relevant under the new project's
  pure-platform design — engineering identifies these case-by-case
- Layer-belonging classification (L0 / L1 / L2) — engineering's job

## History

- 2026-05-03 — created during Phase 2 from clustered orphan issues.

## Stories (filed in Phase 3)

_Pending Phase 3 synthesis._
