Skip to content

test(contract): list Builder's publish recovery examples in the drift test - #746

Merged
yeongseon merged 1 commit into
mainfrom
fix/contract-drift-publish-recovery-examples
Oct 5, 2026
Merged

yeongseon merged 1 commit into
mainfrom
fix/contract-drift-publish-recovery-examples

Conversation

@yeongseon

Copy link
Copy Markdown
Collaborator

Refs kpubdata-lab/kpubdata-builder#994, #728

문제

kpubdata-lab/kpubdata-builder#1009 가 Builder main 에 들어가면서 계약이 1.81.0 이 됐고, publish 복구 라우트 네 개(getPublishReceipt, resetPublishReceipt, reconcilePublish, getPublishAudit)가 이름 붙은 예시와 함께 선언됐다. Studio 의 Builder contract drift 잡은 Builder main 의 계약을 읽고, 파싱하지도 목록에 올리지도 않은 예시가 있으면 실패한다. 그래서 지금 main 기준의 모든 PR 에서 이 잡이 실패한다.

#744 의 잡 로그(재실행, Builder 1.81.0)가 근거다: no Studio schema for getPublishReceipt; map it in OPERATION_SCHEMAS, 그리고 ERROR_READERS 에 없는 에러 예시 5개.

순서를 제가 잘못 잡았다 — builder#1023 때처럼 Studio 가 예시를 먼저 알고 있어야 했는데 builder#1009 를 먼저 머지했다.

변경

src/shared/lib/contractDrift.test.ts 만 바꾼다. Studio 는 main 에서 네 라우트 중 어느 것도 부르지 않는다.

  • OPERATION_SCHEMAS: 네 operation 을 skip 으로 (부르지 않으므로 파싱할 본문이 없다).
  • ERROR_READERS: 에러 예시 5개를 notHandled 로, code(receipt_not_found, reconcile_unavailable)와 since: "1.81.0" 과 함께.
  • CHANGELOG [Unreleased].

#728(#744)이 reconcilePublish·resetPublishReceipt 를 부르기 시작하면 그 둘의 skip 과 notHandled 항목을 실제 스키마·reader 로 바꿔야 한다.

검증

로컬에서 테스트를 돌리지 못했다 — 이 환경에서 npm ci 가 실패한다. 이 PR 의 Builder contract drift 잡이 Builder main(1.81.0)으로 도는 것이 첫 실행이자 판정이다.

🤖 Generated with Claude Code

… test

Builder's contract 1.81.0 (builder#994) declares the four publish recovery
routes with named examples. Studio calls none of them yet, so the drift test
failed on every pull request once that contract reached Builder's main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yeongseon
yeongseon merged commit d13062e into main Oct 5, 2026
17 checks passed
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