Skip to content

feat: 도메인 소유 축 이관과 레코드 표 신설 - #122

Merged
yessjun merged 1 commit into
mainfrom
feat/domain-resource-schema
Sep 10, 2026
Merged

feat: 도메인 소유 축 이관과 레코드 표 신설#122
yessjun merged 1 commit into
mainfrom
feat/domain-resource-schema

Conversation

@yessjun

@yessjun yessjun commented Sep 10, 2026

Copy link
Copy Markdown
Member

📝 작업내용

  • 도메인 행의 소유 축을 VM에서 워크스페이스로 이관
  • vm_id는 「이 이름이 어느 VM을 서빙하는가」로 축소하고 nullable화
  • 종류와 vm_id를 등가식으로 결속. 서빙하지 않는 종류의 VM 보유와 서빙하는 종류의 VM 상실을 양방향 차단
  • 기관을 행에 담음. 워크스페이스에 기관 열이 없어 조인 불가이고 vmsllm_api_keys가 같은 형태
  • 관리자 스코프 판정의 기관 출처를 VM에서 행으로 교체. 종전에는 목록과 판정의 출처가 서로 다름
  • VM 스코프 가드 둘의 인자를 Long으로 바꿔 null을 404로 거절. 종전에는 언박싱 NPE로 500
  • domain_records 신설. 한 행이 rrset 하나이고 제공자가 받는 단위와 동일
  • 세대 카운터는 도메인 단위. 편집이 도메인의 세트 전체를 바꾸므로 한 푸시가 전부를 운반
  • renew_due_at 추가. EXTERNAL 이름의 연장 기한이고 인덱스에서 REMOVED 제외
  • resource_typeDOMAIN, domain_kindEXTERNAL 추가. 값 전용 파일로 분리

⭐️ 검증

  • 테스트 1364개 통과, 실패 0, 오류 0
  • 스키마 제약 시험 여덟 신설. 등가식을 한쪽 함의로 약화시켜 빨간불 확인 후 원복
  • 교체한 dns 상태 제약의 구 규칙 보존 고정. CUSTOM은 NONE 고정, AUTO와 PLATFORM은 APPLIED 가능
  • 기존 도메인 목록 시험이 행 수 변화 없이 통과
  • 적대 검토 기록 존재. 지적 열둘 전부 처분

💬 리뷰 포인트

  • 두 새 열에 NOT NULL 미부여. 헬스 창을 놓친 배포는 이전 릴리스 jar를 되살리되 적용된 마이그레이션은 미복구이므로, 그 jar가 모르는 NOT NULL 열은 그 jar의 도메인 생성을 전부 실패시킴. 다음 릴리스로 이연했고 그때까지 불변식은 매핑이 부담
  • rrdatastext[] 채택. 이 스키마의 유일한 배열이고 다른 다치 컬럼은 전부 jsonb이며, 제공자 호출과의 1:1 대응이 근거
  • nullable이 된 vmId를 언박싱하는 잔여 세 자리. 라우트 기점 루프 둘과 CUSTOM 조기 반환 검증기라 구조적 도달 불가로 판단

A domain row has always named a VM, and everything about it was reached
through that VM: who may see it, which organisation scopes it, who hears
when its name is reclaimed. A name issued on its own has no VM to reach
any of that through, so ownership moves to the workspace, which is what
the VM was being asked about. The organisation comes with it, held on the
row because workspaces carry none — vms and llm_api_keys hold their own
for the same reason.

vm_id becomes nullable and answers the narrower question of which VM the
name serves. An equality constraint ties it to the kind in both
directions, so a kind that serves none cannot claim one and a kind that
serves one cannot lose it.

domain_records is one row per record set, which is the unit the provider
takes and therefore the unit that succeeds or fails. Split per value, two
rows of one set could disagree about whether the set is in the zone. The
generation counter beside it is per domain: an edit changes a domain's set
as a whole, and one counter orders those pushes where one per set would
let two edits race.

The NOT NULL on the two new columns is deliberately absent. A deploy that
fails its health window restores the previous release's jar and does not
undo the migrations the new one applied, so a NOT NULL column that jar's
entity does not know would leave it unable to insert here at all.
Tightening belongs to the release after the one that writes them.

The admin scope guard now reads the organisation off the domain, which is
where the listing beside it already read it; two sources for one decision
is a row that lists and then 404s. The VM-scoped guards take a nullable id
and refuse it as "no such domain" rather than unboxing it into a 500.
@yessjun
yessjun merged commit 15db272 into main Sep 10, 2026
1 check passed
@yessjun
yessjun deleted the feat/domain-resource-schema branch September 10, 2026 06:01
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