Repository navigation
fix(builds): give every export its own path that Builder accepts - #1015
Merged
Merged
Conversation
Builder now refuses BuildSpecs whose export output paths collide, name a Gold artifact, or leave the Gold directory (kpubdata-builder#1320). Create Table stamped the typed path on every chosen format, and New Build put the Hugging Face folder around the other exports. With several formats, file exports now go below the folder and the Hugging Face folder is a numbered sibling; a single format keeps its existing path. Both forms check paths with Builder's rules before submitting, and Builder's three refusal codes are shown with Korean and English messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을 바꿨나
Builder가 이제 내보내기(export)
output_path가 서로 같거나 하나가 다른 하나를 포함하거나, 실행이 직접 쓰는 Gold 파일(table.parquet,package.json,splits,README.md,card.json)을 가리키거나, 절대 경로·..인 BuildSpec을 거부합니다(kpubdata-builder#1357). Studio의 두 흐름이 거부될 스펙을 만들고 있었습니다.src/features/add-data/model.ts): 출력 경로를 입력하고 형식을 둘 이상 고르면 모든 export가 같은 경로를 받았습니다.newBuildModel.ts+specMapping.ts): Hugging Face 폴더가<base>이고 다른 형식이<base>/data*.<ext>로 그 안에 들어갔습니다(입력 경로가 없을 때 테이블 만들기의 HF+다른 형식 조합도 같음).변경:
src/shared/lib/exportPaths.ts(신규, UI 의존 없음):defaultExportPath— 파일 형식은<base>/data.<ext>(두 번째부터-N), Hugging Face 폴더는 유일한 export일 때만<base>, 그 밖에는 형제 폴더<base>-N.exportPathProblems— Builder의export_path_parts/export_layout_conflicts를 그대로 옮긴 검사(NFC·대소문자 무시·끝의 점/공백 제거 비교, Kaggle 메타데이터·카드 파일 포함).src/shared/lib/exportPathMessages.ts(신규): 세 코드의 한국어/영어 안내. Builder가structured_problems로unsafe_export_path/reserved_export_path/export_path_collision을 돌려주면 검증 화면(asInvalidDetails)과 빌드·미리보기 오류(formatApiErrorMessage)에서 같은 안내로 보여 줍니다.defaultExportPath를 씁니다. 제출 전buildSpecFromDraft가 경로 규칙을 검사해 기존 오류 자리에 안내를 띄웁니다(YAML로 붙여 넣은 충돌 경로 포함).defaultExportPath를 씁니다. 출력 단계 입력란이 바로 검사해 다음 단계로 넘어가지 않고 이유를 보여 주며,toBuildSpec도 전체 스펙을 검사합니다.artifacts/builds/<id>/data.<ext>는 바뀌지 않습니다.__tests__/newBuildRoundTrip.test.ts의 두 단언은 충돌하는 배치(out안의out/data.jsonl)를 기대하고 있어 새 경로(out-2,aq2-3)로 고쳤습니다.확인
__tests__/exportPathLayouts.test.ts: 제공되는 4개 형식의 순서 있는 모든 선택(64가지)을 두 흐름 × (기본 경로, 입력 경로)로 돌려, 테스트 안에 따로 적은 Builder 규칙 오라클로 거부 사유가 없는지 확인합니다. 수정 전 코드에서 8개 중 5개 실패(new-build 2, add-data 2, HF 형제 폴더 1), 수정 후 통과.__tests__/exportPathRules.test.ts(10개): 절대 경로·드라이브·..·빈 세그먼트, Gold 이름(대소문자 무시), 포함/동일/정규화 충돌, Kaggle 부속 파일, ko/en 키, 두 폼의 차단, Builder 코드 안내.__tests__/newBuildExportPath.test.tsx: 출력 단계에서../station입력 시 머무르며 안내, HF 추가 시 통과.e2e/real-builder.spec.ts): HF + JSONL 두 형식 스펙을 Studio 매핑으로 만들어/validatevalid,/buildok 확인.i18n:check,i18n:keys,ko-mixed-terms,legacy-terms,real-builder-switch, 한국어 주석 검사, plain codes,check:stale-ui, license inventory,test:coverage(324 files, 3784 passed / 21 skipped), build(번들 예산 안) 모두 통과.Scope exception: NO
Existing flow or risk: 기존 테이블 만들기·새 빌드 흐름에서 형식을 둘 이상 고르면 Builder 1320 이후 스펙이 거부되던 것을 고칩니다. 단일 형식 경로는 그대로이고, 여러 형식일 때만 HF 폴더가
<경로>-N형제 폴더로, 입력 경로가 폴더로 해석됩니다.Refs kpubdata-lab/kpubdata-builder#1320
🤖 Generated with Claude Code