Repository navigation
[DONE] 빌드 경로 둘이 이상한 몸과 이름에 500 이나 빈 200 대신 400 과 404 를 돌려주고, 처음 시험을 얻는다 - #287
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VpxviUVNcAM8zhftzDuzY
…th 400 and 404 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VpxviUVNcAM8zhftzDuzY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VpxviUVNcAM8zhftzDuzY
patternflow-bot
marked this pull request as ready for review
October 26, 2026 16:54
This was referenced Oct 26, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 27, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 27, 2026
Patternflow-lab#268 Patternflow-lab#271 Patternflow-lab#275 Patternflow-lab#276 Patternflow-lab#277 Patternflow-lab#279 Patternflow-lab#280 Patternflow-lab#281 Patternflow-lab#283 Patternflow-lab#284 Patternflow-lab#285 Patternflow-lab#286 Patternflow-lab#287 Patternflow-lab#288 Patternflow-lab#289 Patternflow-lab#290 Patternflow-lab#291 Patternflow-lab#292 Patternflow-lab#293 Patternflow-lab#294 Patternflow-lab#295 Patternflow-lab#296 Patternflow-lab#297 Patternflow-lab#298 Patternflow-lab#299 Patternflow-lab#300 Patternflow-lab#301 Patternflow-lab#302 Patternflow-lab#303
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.
lsh / https://claude.ai/code/session_018VpxviUVNcAM8zhftzDuzY
커뮤니티의 모듈 빌드 POST 는
patterns에 null 하나만 들어도 던져서 CORS 없는 500 을 냈고, 모듈 GET 은?file=__proto__같은 이름에 빈 200 을 줬어요. 머지하면 앞은 까닭을 적은 400 을, 뒤는 404 를 돌려주고, 시험이 하나도 없던 빌드 경로 셋이 처음 시험 22개를 얻어요.좋아지는 것: 없음
할 일
52816f8) · 겹치는 [DONE] PR 없음한 일
web/src/app/api/community/builds/route.ts:patterns의 칸이 null, 수, 참거짓, 글, 배열이면Pattern N: expected an object with the header in "code".로 400 이에요. 전에는 null 만.code에서 던졌고 나머지는 「header is empty」 400 이었어요. 칸이 없거나 20개를 넘는 요청과 빈 헤더의 답은 그대로예요.web/src/app/api/community/builds/[id]/modules/route.ts:?file=을Object.hasOwn(entries, wantedFile)로 찾아요. zip 에 든 이름만 나가고,__proto__,constructor,toString,hasOwnProperty는 없는 이름처럼 404 예요.web/src/app/api/community/builds/route.test.ts: 제 DB 와 산출물 폴더에 가입한 ada 로 세 처리기를 진짜로 불러요.queued와queuePosition: 1로 읽는지.modulesUrl과 크기, 없는 id 의 404..pfm과.json의 Content-Type 과 길이), 없는 이름과 프로토타입 이름 넷의 404, 산출물 폴더 밖을 가리키는 행의 400, 디스크에서 사라진 zip 의 410, 줄에 선 빌드와 없는 id 의 404.증거
새 시험을 dev 의 두 경로로 돌렸을 때(
web/에서):고친 뒤, 이 시험과 같은 POST 를 돌리는
nullBody.test.ts를 같이:진짜 Next 경로로도 쟀어요. dev 경로 둘과 이 PR 을 각각
npm run build하고, 같은 스크래치 DB 로next start(COMMUNITY_ENABLED=1,BUILD_ENABLED=1,COMMUNITY_ALLOWED_ORIGINS=https://lab.patternflow.test)를 띄워 curl 로 보냈어요. 모듈 GET 은 POST 로 줄에 세운 빌드를done으로 돌리고 zip(265바이트,route_test.pfm8바이트와route_test.json)을 둔 뒤 재었어요.다섯 검사(
web/에서,75a031b. 그 뒤 커밋은 시험 머리 주석만 바꿨어요):화면은 바뀌지 않아서 사진은 없어요.
실행법
# web/ 에서 npx vitest run src/app/api/community/builds/route.test.ts가정
{ label, code }칸)의 답은 그대로예요.Object.hasOwn은 tsconfig 의lib: esnext안이고 이 경로는 Node 22 에서만 돌아요.builds/[id]/route.ts는 이미 바르게 답해서 시험만 붙였어요.strToU8가 준 바이트를zipSync가 파일로 받지 않고 바이트마다 폴더를 만들었어요. 시험의 JSON 항목은Uint8Array.from으로 만들었고, 경로 코드는 Node 의Buffer를 받아서 상관없어요.Changelog
Web
POST /api/community/buildsthrew on anullinpatternsand came back a 500 without CORS headers, andGET …/modules?file=__proto__(orconstructor,toString,hasOwnProperty) answered 200 with an empty body. The three build routes have their first tests.경험
언제: jsdom 에서 도는 Vitest 시험에서 fflate 의
zipSync로 zip 을 만들 때교훈:
strToU8나 TextEncoder 가 준 바이트는 다른 realm 의 Uint8Array 라zipSync가 파일 대신 바이트마다 폴더를 만드니, 항목은Uint8Array.from이나new Uint8Array([...])로 만들어요근거: #287 에서
route_test.json항목이route_test.json/0/부터/20/까지 폴더 스물하나가 되어 목록 시험과 파일 시험이 빨갰어요바퀴
바퀴 116 · 후보 11 「빌드 경로 둘이 이상한 몸과 이름에 500 이나 빈 200 대신 400 과 404 를 돌려주고, 처음 시험을 얻는다」
다음 바퀴
https://claude.ai/code/session_018VpxviUVNcAM8zhftzDuzY
Generated by Claude Code