Skip to content

fix(integrations): Linear 동기화·백로그 선택·레지스트리 조회 페이지네이션과 상한 (AGT-3421) - #901

Open
unohee wants to merge 1 commit into
mainfrom
heewonoh/agt-3421-pagination
Open

unohee wants to merge 1 commit into
mainfrom
heewonoh/agt-3421-pagination

Conversation

@unohee

@unohee unohee commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

무엇

  • Linear 인바운드 동기화(syncFromLinear)가 limit을 페이지 누적 import 총량에 적용하고(페이지 50, 최대 20페이지), 중간 실패 시 지금까지 반영된 created/updated 수를 보고한다.
  • drainLinearConnection이 endCursor가 없거나 직전과 같으면 명시적 에러를 낸다(커서 루프 방지). 페이지 상수와 함께 src/linear/linearPagination.ts로 옮기고 linear.ts에서 re-export한다.
  • getNextBacklogIssue가 첫 페이지 10개가 아니라 drain한 전체 후보(최대 20페이지/200건)에서 우선순위를 정렬한다.
  • fetchIssue의 comments/labels 조회에 first: 50 상한.
  • 레지스트리 deprecated/untested/high-risk helper에 limit/offset(상한 200), 이슈 ID별 엔티티를 chunked IN 배치 로딩(이슈당 상한 200, N+1 제거).
  • row 매핑을 sqliteStoreRows.ts로 분리.

왜

b159fa8(sprint/cycle5-30pt, 09-15)에 구현돼 있었지만 main에 들어오지 않았다. #794는 taskSource 부분만 가져갔다. 이 PR은 나머지를 현재 main 위로 옮긴 것이다(linearTasks.ts는 그 사이 linear.ts로 합쳐져 해당 변경을 linear.ts에 적용).

검증

  • tsc --noEmit -p tsconfig.check.json 통과, oxlint 0 warning, pre-commit(파일 크기 게이트 포함) 통과
  • 대상 테스트: src/issues src/linear src/registry src/automation 113 files / 1399 tests 통과
  • 전체 스위트: 7996 통과 / 6 실패였으나, 실패 6건(src/adapters/diagnosticsTool.test.ts)은 vitest를 node로 직접 띄워 node_modules/.bin이 PATH에 없었기 때문이다. PATH를 넣고 다시 돌리면 11/11 통과. CI Tests도 통과.

…ick and registry helpers (AGT-3421)

Port of the remaining parts of b159fa8 (sprint/cycle5-30pt), which never
reached main; the taskSource part already landed in #794.

- Linear inbound sync applies its limit to the total imported count across
  pages and reports the durable created/updated count when it fails partway.
- drainLinearConnection rejects a missing or repeated endCursor instead of
  looping or duplicating nodes. It moves to linearPagination.ts with the page
  constants (re-exported from linear.ts) to keep linear.ts under its size base.
- getNextBacklogIssue ranks over every drained page (bounded), not page one.
- fetchIssue bounds comments/labels reads (first: 50); the change originally
  targeted linearTasks.ts, which has since been folded into linear.ts.
- Registry risk/status helpers take limit/offset (cap 200); entities by issue
  id are batch-loaded with a per-issue cap of 200.
- Row mapping moved to sqliteStoreRows.ts to keep sqliteStore.ts small.
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