Commit Graph
14 Commits
Author SHA1 Message Date
DongHyeonka ee37dd86a2 fix(test): capability 파일·다운로드 테스트의 버튼을 앱 위 고정 층에 둔다
문제: FE-GATE-008의 test:browser-capabilities가 firefox에서 가끔 30초 시간
초과로 떨어졌다. browser-files.spec.ts의 두 test가 번갈아 걸렸다. 하나는
"filechooser"를, 다른 하나는 "download"를 기다리다 끝났다. desktop에서
firefox capability suite를 30회씩 돌리면 두 test 60건 중 3건이 떨어졌다(두
번 모두). 부하와는 상관없었다(1.05에서도 남). 리뷰 14.7절은 이것을 "알려진
flake"로 두었다(1103/11-10).

원인: 두 test는 `goto("/")` 직후 label·input·button을 `<body>` 끝, 앱 root
뒤에 붙이고 그 button을 누른다. 그때 앱은 아직 그리는 중이다. 실패한 6건의
event 기록(진단 branch, 커밋 안 함)은 모두 같았다.
- pointerdown·mousedown은 button("Choose test file"/"Download generated").
- 30~45 ms 뒤 pointerup·mouseup은 홈 화면 내용("프로젝트 시작점…").
- click은 둘의 공통 조상(앱 root)이라 button의 handler가 돌지 않았다
  (`__browserFileResult` 없음). 그래서 picker도 download도 없었다.
- 위치까지 적은 3건에서 그 사이 scrollY는 24로 같았다. body 높이는 744에서 756으로, button top은
  696에서 708로 둘 다 12 px 늘었다. 앱 내용이 클릭 도중 12 px 자랐고,
  viewport 아래 끝의 button 중앙 좌표가 button 밖이 됐다. 통과한 run은
  pointerdown 때 이미 756이었다.

고른 방법: 두 test가 붙이는 control을 `position: fixed` 층(왼쪽 위, 가장
높은 z-index)에 둔다. 앱의 흐름 밖이라 앱이 늦게 그려도 button이 움직이지
않는다. 제품 코드는 바꾸지 않는다.

버린 대안:
- 앱이 다 그려질 때까지 기다린다. "다 그려짐"을 정할 신호가 없다. 늦게 오는
  글꼴이나 내용이 생기면 다시 깨진다.
- `dispatchEvent("click")`이나 `force` click. 신뢰된 사용자 입력이 아니어서
  firefox가 file picker를 열지 않는다. test가 증명하려는 것을 지운다.
- 재시도·timeout 늘리기·worker 줄이기. 금지된 우회이고 원인이 남는다.

위험·한계: 고정 층이 앱 header 왼쪽 위를 덮는다. 두 test는 앱 UI를 누르지
않는다. 다른 capability spec은 body에 control을 붙이지 않는다(grep).

검증 (desktop):
- RED(커밋 안 한 재현): mousedown 때 앱 root에 400 px를 더하고 layout을
  다시 계산한다(앱이 늦게 그리는 것과 같은 일). 수정 전 spec은 세 엔진 두
  test 6/6 실패(filechooser·download 대기 시간 초과).
- GREEN: 같은 재현에서 수정 뒤 6/6 통과.
- 실제 조건 firefox capability suite ×30: 수정 전 두 번 다 3 failed /
  657 passed, 수정 뒤 660 passed.
2026-11-05 09:51:10 +09:00
DongHyeonka fbd8f7d148 chore(review): 1103 게이트·드릴 조치 브랜치를 합친다
Refs: docs/reviews/2026-11-03-maturity-review/README.md 02-06 11-06 12-09 10-01 11-03~11-05 12-02 12-04 12-05 12-08 14-04 16-02

# Conflicts:
#	docs/manual/01-add-a-feature.md
#	docs/manual/02-decision-tables.md
#	docs/manual/reference/patterns.md
2026-11-04 23:08:05 +09:00
DongHyeonka ed49973652 test(upload): resumable upload spec이 페이지 origin을 설정의 baseURL에서 읽는다
문제
tests/browser-capabilities/resumable-upload.spec.ts가 CORS 응답의 origin을
"http://127.0.0.1:4174"로 따로 적는다. playwright.capabilities.config.ts의
baseURL과 지금은 같아서 동작하지만, 설정의 포트를 바꾸면 이 spec만 CORS로
조용히 깨진다.

고른 방법
- 설정 파일을 import해 use.baseURL의 origin을 쓴다. test.info()는 route
  처리기 안에서 부를 수 있는지가 Playwright 내부 맥락에 달려 고르지 않았다.

검증
- check:types(tsconfig.test.json) 통과, eslint 통과. 브라우저 실행 결과는
  이 커밋 메시지에 적지 않았다(공유 잠금 대기).

Refs: docs/reviews/2026-11-03-maturity-review/11-tests-browser-release-scale.md (2절 FOLLOW-UP resumable-upload 포트)
2026-11-04 21:24:06 +09:00
DongHyeonka 8d328c9cea test(indexeddb): 차단 업그레이드 테스트가 500 ms 전이 상태를 폴링하지 않는다
문제
tests/browser-capabilities/indexeddb-runtime.spec.ts의 차단 업그레이드
테스트는 v2 runtime을 blockedTimeoutMs 500으로 시작한 뒤
expect.poll(lifecycleStatus)로 BLOCKED 상태를 기다린다. 이 상태는
500 ms 뒤 CLOSED/NOT_OPENED로 바뀌고, 폴링 한 번은 page.evaluate
왕복이다. 그래서 바쁜 호스트에서는 첫 관찰 전에 창이 닫혀 FE-GATE-008이
코드와 무관하게 떨어진다(리뷰 전체 실행에서 chromium·webkit 실패).

고른 방법
- 전이 상태 폴링을 지우고, 바로 뒤 settleLifecycleRuntime 결과
  (opened.error.code BLOCKED, recovery RELOAD_OTHER_CONTEXTS, status
  CLOSED/NOT_OPENED)로 차단을 판정한다. 전이 상태 BLOCKED는 제어한
  scheduler로 tests/unit/indexeddb-runtime.test.ts가 이미 고정한다.
- 버린 대안: blockedTimeoutMs를 늘리기. 창이 넓어질 뿐 경쟁이 남는다.
  runtime이 상태 변화를 기록하게 하기. 운영 코드에 테스트용 기록이
  생긴다.

위험·한계
- 실제 브라우저에서 getStatus()가 BLOCKED를 돌려주는 순간은 이 spec이
  더는 보지 않는다(단위 테스트가 본다).

검증
- RED: 창을 20 ms로 줄이면 수정 전 테스트가 chromium·webkit에서
  CLOSED/NOT_OPENED를 받아 실패했다(리뷰 실패와 같은 모양). 수정 뒤 같은
  20 ms에서 세 엔진 통과. 값은 500으로 되돌렸다.
- test:browser-capabilities 전체 63 passed(load 15~20). 5회 반복은 하지
  않았다.

Refs: docs/reviews/2026-11-03-maturity-review/11-tests-browser-release-scale.md 11-05
2026-11-04 20:34:22 +09:00
DongHyeonka d13a393600 fix(storage): 계정 삭제 purge가 끝나지 않은 put을 보면 partition을 지운다
문제: 손상이 없는 LOGOUT·ACCOUNT_DELETION purge는 commit된 object 행과
참조 없는 chunk만 본다. 같은 partition의 끝나지 않은 journal 행
(PREPARING·FILES_READY)은 보지 않고, sweep은 staging receipt가 가리키는
chunk를 건너뛰면서도 COMPLETED를 돌려준다. 그래서
- 다른 탭이 put 중이면 purge가 "COMPLETED"를 보고한 뒤 그 객체가
  그대로 읽힌다(X1, 실제 Chromium·Firefox에서도 같음).
- commit 직전에 멈춘 put(FILES_READY)은 purge 뒤 다음 reconcile이
  commit해 계정 삭제한 사용자 파일이 객체로 다시 생긴다(X2).
- 업로드 중 멈춘 put(PREPARING)은 chunk가 grace 기간 동안 남고(X2b),
  그 행이 손상됐으면 partition 삭제도 일어나지 않아 영원히 남는다(X3).
손상이 있을 때만 partition 삭제가 진행 중 put까지 기다렸다 지웠다.

고른 방법(리뷰 5.1절 (c)): LOGOUT·ACCOUNT_DELETION이 객체를 다 돈 뒤
그 partition 키를 가진 journal 행 수를 센다. 하나라도 있으면(읽을 수
있든 없든) sweep 대신 이미 있는 partition 삭제로 넘긴다. partition
삭제는 exclusive partition lock으로 진행 중 put·delete가 돌아오기를
기다린 뒤 디렉터리와 그 partition의 행을 모두 지운다(e5b7b3e).
OpfsJournalPort에 countPartitionTransactions(scope)를 더했다.
removePartition이 지우는 같은 LOGICAL_KEY_INDEX 범위를 세므로, 센 행은
삭제가 지운다.
버린 대안: (a) 문서에 "reconcile 먼저" 안내 — X1·X3을 막지 못한다.
(b) report에 수만 추가 — 지울 방법이 없다(X3). (d) 항상 partition
삭제 — 더 단순하지만 끝나지 않은 행이 없을 때의 예산 단위 진행과
removedObjects·releasedBytes 보고를 잃는다.

위험·한계:
- 공개 포트에 필수 메서드가 하나 는다. OpfsJournalPort를 직접 구현한
  쪽은 추가해야 한다([계약]).
- 끝나지 않은 행이 하나라도 있으면 purge가 예산 없는 partition 삭제가
  되고, 다른 탭의 진행 중 put이 끝날 때까지 기다린다. 그 put의 결과도
  지운다(손상 경로와 같은 의미). purge가 행을 센 뒤 시작한 put은
  남는다(point-in-time).
- 기존 테스트 "never sweeps the chunk of a put that runs while the purge
  does"는 X1 동작을 기대값으로 고정하고 있었다. 새 의미로 바꿨다.
  0929/05-02 테스트는 덮어쓰기가 purge의 목록과 remove 사이에 끝나도록
  바꿔 CONFLICT 경로를 계속 본다.
- 소속을 알 수 없는(logicalKey가 깨진) 행은 여기서도 세지 못한다(05-03).
- WebKit은 기본 정책에서 OPFS 지원 판정을 통과하지 못해 browser spec이
  일찍 끝난다. offline-indexeddb 번들 37,423 → 37,521 / 38,500 gzip B.

검증:
- RED: opfs-worker-runtime.test.ts 새 4건(X1, FILES_READY, PREPARING,
  손상 행)이 partitionDeleted 없음으로 실패.
- GREEN: OPFS 단위 3파일 + optional-runtime-host + tests/recipes +
  tests/contract 172건 통과. journal에 countPartitionTransactions 테스트
  1건(손상 행 포함, 다른 partition 제외, 삭제 뒤 0).
- browser: opfs-runtime.spec.ts에 X1 2탭 판을 더했다. heavy lock 안에서
  3엔진 9/9 통과(WebKit은 지원 판정에서 끝남).
- check:types, 바꾼 파일 eslint, check:optional-recipes:source PASS,
  verify:documentation 통과.

Refs: docs/reviews/2026-11-03-maturity-review/05-adapters-storage-kernel.md 05-01
2026-11-04 20:29:34 +09:00
DongHyeonkaandClaude Opus 5.5 7f45afac7d fix(storage): report a future IndexedDB schema as INCOMPATIBLE and online-only (05-06)
An older tab that met a schema a newer release had upgraded got
MIGRATION_FAILED / READ_ONLY, but could not even read, and operators were sent
to the migration runbook. The VersionError on open now yields UNSUPPORTED /
ONLINE_ONLY with status INCOMPATIBLE, reads and writes give the same answer,
and the OPFS journal answers the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:37:40 +09:00
DongHyeonkaandClaude Opus 5.5 3e37fbf0ed fix(storage): delete a partition's IndexedDB dataset when an authorized purge cannot open it (05-03)
LOGOUT and ACCOUNT_DELETION purged row by row and so needed an open that a
corrupt budget or binding row always rejected, leaving personal rows on the
device. After authority approval, a purge that finds the dataset rejected by
admission now deletes that partition's own database and reports it; healthy
datasets and other partitions are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:24:55 +09:00
DongHyeonkaandClaude Opus 5.5 8fc816ee25 fix(storage): hold a per-transaction lock so reconcile skips a live OPFS put (05-01)
Reconcile cleaned up any incomplete journal row, including a put still
running in another tab, and the put then reported success for deleted files.
Put and delete now hold a Web Lock per transaction from begin to return;
reconcile takes those locks with ifAvailable, re-reads the page under them
and reports the rows it skipped (D-3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:09:30 +09:00
DongHyeonkaandClaude Opus 5.5 d7fc464426 test(browser-capabilities): pin chunk-failure wording on all three engines (R3-7)
Run the app's isChunkLoadFailure (served by the dev server) against the real
error each engine raises for a missing dynamic-import chunk. Passes on
Chromium, Firefox and WebKit. Record the WebKit run (e2e 39, capabilities 17).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:48:57 +09:00
DongHyeonkaandClaude Opus 5.5 407046407a test(browser-capabilities): real unbound showOpenFilePicker call and Vary: Accept-Encoding cache lookup (R3-6)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:32:42 +09:00
donghyeon-ka ec7f20e2ee refactor: 프론트엔드 리펙토링 2026-09-18 22:05:42 +09:00
DongHyeonkaandClaude Opus 5 7485cd86e4 fix: let the browser, visual and performance evidence describe the product again
Four browser-capability specs never reached the code they were named for. The
`PRESIGNED_TRANSFER_V1` envelope gained a top-level `protocol` field, and the
fixtures kept answering without it, so every capability was refused before any
object request was made: the download and part-upload success paths were
asserting against an empty transcript rather than exercising a real GET or PUT.
The fixtures now speak the protocol they claim to, and the part-deletion
expectation carries the physical effect the adapter reports.

A refused capability document also answered `recovery: NONE`, telling the
caller there was nothing to be done. The design record fixes this class of
refusal as re-issuable and the vault already answers `REISSUE_CAPABILITY` for
it, so the HTTP decoder disagreed with both. It now agrees.

Lab performance produced no evidence at all. Playwright matches accessible
names by substring, so the navigation entry "플랫폼 구성" also matched the home
page's "플랫폼 구성 보기" call to action; the locator resolved to two links and
the run died on a strict-mode violation before the first measurement. With an
exact match the metrics are collected, and they show the named-interaction
budget is missed on this machine — a real signal that was previously invisible.

The platform overview baseline was captured before the reference routes moved
from `integration-defined` to `session-required` and was never regenerated, so
the only visual gate that could catch a regression on that page was failing for
its own staleness. Regenerated after confirming the diff is exactly that label.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 16:49:48 +09:00
DongHyeonka c6da03369c refactor: 리펙토링 2026-08-01 19:39:59 +09:00
donghyeon-ka 6c52cdb916 feat: 기능 추가 과정중 2026-07-30 15:58:20 +09:00