fix: 개념 관계 라벨을 계약이 주는 이름에 맞추고 표를 계약에 묶는다

개념 화면에 `relatedRecords` 가 한글 라벨 없이 나왔다. 앞선 커밋에서 개념
라벨 표를 다른 유형에서 유추해 네 키(supportingCases 등)를 적었는데 계약이
주는 이름은 `relatedRecords` 하나였다 — 하나도 맞지 않았다.

같은 실수를 Reference 에서도 했다(`originCases` 라고 적혀 있었다). 세 번째라
표를 계약에 묶는다: 계약 문서에서 관계 이름을 읽어, 라벨이 없는 이름과
계약에 없는 이름을 양쪽으로 잡는다. `primaryProject` 는 관계가 아니라
소속이므로 제외한다 — 머리말이 이미 보여 준다.

개념은 관계를 한 묶음으로 받으므로 그 묶음만 명시적으로 골라 넘긴다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
DongHyeonka
2026-09-01 14:42:29 +09:00
co-authored by Claude Opus 5
parent 8996430d23
commit d835276296
2 changed files with 76 additions and 5 deletions
@@ -83,11 +83,15 @@ export const REFERENCE_RELATION_LABELS = Object.freeze({
relatedReferences: "함께 보는 기준",
});
/*
개념의 관계는 계약이 `relatedRecords` 한 묶음으로 준다 — 다른 유형처럼 여러 묶음으로
나뉘지 않는다. 처음에 다른 유형에서 유추해 네 키를 적었더니 하나도 맞지 않아 화면에
`relatedRecords` 가 그대로 나왔다. 응답을 보고 적은 이름이다.
`primaryProject` 는 관계가 아니라 이 개념이 속한 프로젝트다 — 머리말이 이미 보여 준다.
*/
export const CONCEPT_RELATION_LABELS = Object.freeze({
supportingCases: "이 개념을 확인한 기록",
relatedReferences: "함께 보는 기준",
relatedConcepts: "이어지는 개념",
relatedDecisions: "이 개념을 쓴 결정",
relatedRecords: "이 개념과 이어지는 기록",
});
export const QUESTION_RELATION_LABELS = Object.freeze({
@@ -290,7 +294,7 @@ export function createHttpPublicContentGateway(
primaryTopic: body.primaryTopic as never,
primaryProject: body.primaryProject as never,
publishedAt: body.publishedAt as string,
relations: flattenRelations(groups, CONCEPT_RELATION_LABELS),
relations: flattenRelations({ relatedRecords: groups.relatedRecords }, CONCEPT_RELATION_LABELS),
}),
kind: "CONCEPT",
basisVersion: (body.basisVersion as string) ?? "",