fix(test-run): FE-GATE-009와 test:e2e:dev가 e2e 결과를 덮지 않는다 #78

Merged
donghyeon.kang merged 2 commits from donghyeon.kang/ci/browser-gate-result-paths AGit into main 2026-11-20 14:07:14 +00:00
2 Commits
Author SHA1 Message Date
DongHyeonka 8d491833dd docs(changelog): FE-GATE-009가 자기 결과 경로에 쓰는 것을 적는다
frontend-quality-gates / merge / tests (pull_request) Successful in 15m25s
frontend-quality-gates / merge / static checks (pull_request) Successful in 1m17s
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
frontend-quality-gates / merge / browser tests (pull_request) Successful in 6m11s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / self-tests and removal drills (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
문제: 미출시 절의 FE-6 행은 「두 실행은 같은 Playwright 설정이라」라고
적는다. `ede99cb9` 뒤에는 `test:a11y`가 e2e 설정을 펼친
`playwright.a11y.config.ts`로 돌아 결과 경로만 다르다. 결과 경로 변경과
새 시험은 이 절에 없다.

고친 것:
- FE-6 행을 최종 상태로 고치고 커밋 칸에 `ede99cb9`을 더한다.
- [계약] 행 하나: 009 증거의 a11y `results.xml`·`report/index.html`,
  `test:a11y`의 `--config`, `test:e2e:dev`의 `artifacts/tests/e2e-dev/`,
  새 시험, 제거 fixture가 두 새 결과 폴더를 복사하지 않는 것, a11y
  설정의 글자 `testDir`(FE-GATE-029).
- 「먼저 할 일」 한 줄: 자기 `test:a11y`를 고쳐 쓴 프로젝트는
  `--config playwright.a11y.config.ts`를 넣는다. 빠지면 새 시험이
  실패한다.

위험·한계: 문서만 바뀐다.

검증: `scripts/verify.sh docs`, desktop `script verify:documentation`.
2026-11-20 22:20:28 +09:00
DongHyeonka ede99cb9b9 fix(test-run): FE-GATE-009와 test:e2e:dev가 e2e 결과를 덮지 않는다
문제: `test:a11y`(FE-GATE-009)가 `playwright.config.ts`를 그대로 써서
e2e의 결과 폴더·HTML report·`results.xml`에 쓴다. merge browser job은
한 checkout에서 FE-GATE-008 다음 FE-GATE-009를 돌고 `artifacts/`를
올리므로, 올린 e2e 증거는 a11y 실행의 것이다. FE-GATE-009에는 자기
JUnit·report 증거가 없다. 게이트 밖 `test:e2e:dev`도 e2e 설정을 펼쳐
같은 경로에 쓰므로, 로컬 실행이 FE-GATE-008 결과를 지운다
(Playwright는 시작할 때 결과 폴더를 비운다).

고른 방법:
- `playwright.a11y.config.ts`가 e2e 설정을 펼치고 결과 경로만
  `artifacts/tests/a11y/`로 바꾼다. `forbidOnly: true`는 글자로 둔다
  (`check-test-evidence.ts`가 등록 설정마다 그 글자를 찾는다).
  `test:a11y`는 `--config playwright.a11y.config.ts --grep @a11y`.
- `playwright.dev.config.ts`도 결과 경로를 `artifacts/tests/e2e-dev/`로
  둔다.
- `config/ci/gates.json`: a11y `results.xml`·`report/index.html`
  증거(producer `test-a11y`)를 더하고 FE-GATE-009 증거에 넣는다.
- 새 시험 `tests/unit/playwright-result-paths.test.ts`: package script가
  부르는 Playwright 설정을 run ID 없이 불러 결과 경로를 모은다.
  (1) 서로 다른 설정 둘이 같은 경로(또는 한쪽 안의 경로)에 쓰면 실패,
  (2) 게이트 명령 둘이 같은 경로에 쓰면 실패, (3) 게이트 명령이 쓰는
  JUnit·report가 그 게이트의 증거이고 producer가 그 명령이 아니면 실패.
- FE-6 시험의 Playwright 쪽(`test:e2e`·`test:a11y`의 `playwright test`
  두 줄과 「같은 설정이라 project가 같다」)을
  `ci-workflow-generation.test.ts`에서 새 시험으로 옮긴다. 글자로 보던
  것을, 같은 포트로 두 설정을 불러 결과 경로 밖 설정 전체가 같은지 보는
  단언으로 바꾼다. gate 계약 쪽(008·009의 commandIds, merge browser
  job)은 그 자리에 둔다.
- 제거 fixture 사본(FE-GATE-013·020)은 `artifacts/`에서 재생성 트리만
  빼고 복사한다. 결과 경로를 옮기면 a11y·dev 결과와 report(실패하면
  trace까지)가 사본에 들어가므로, `scripts/lib/removal-fixture.ts`의
  목록에 `artifacts/tests/a11y`·`artifacts/tests/e2e-dev`를 더한다.
  새 시험 (4): 각 Playwright 설정의 results·report 폴더가 그 목록 안에
  있다. `a11y.json`·`a11y-data-state/`는 계속 복사되는지 fixture 시험이
  본다.
- `playwright.a11y.config.ts`가 `testDir: "./tests/e2e"`를 글자로 둔다.
  FE-GATE-029는 게이트 명령이 부르는 설정 파일 본문에서 `testDir:`를
  찾으므로, 펼치기만 하면 `test:a11y`가 게이트하는 폴더가 0개다.
  새 시험(`ungated-tests.test.ts`): 게이트 명령이 닿는
  `playwright test`마다 testDir을 찾는다.
- decisions.md FE-6 행은 옮긴 단언의 자리
  `tests/unit/playwright-result-paths.test.ts`를 백틱으로 적는다.
  샘플 제거 드릴(FE-GATE-020)은 사본에서 `ci-workflow-generation.test.ts`를
  지우고, 사본의 `verify:documentation`은 살아 있는 문서의 백틱 경로를
  대조한다. 그 시험 경로를 백틱으로 적은 첫 판은 020에서 실패했다.
  버린 안: 경로를 백틱 없이 적기. `.claude/rules/docs.md`가 「검사를
  피하려고 백틱을 빼지 않는다」고 정한다(1105/14-03). 드릴 쪽(문서
  검사에 예외 경로 넘기기, 그 시험을 지우지 않기)은 b6bfc9b7에서 버린
  안이라 손대지 않는다. 다른 살아 있는 문서에는 드릴이 지우는 네
  파일을 백틱으로 적은 곳이 없다(`git grep`).
- 시험 helper(설정 찾기·경로 겹침)에 거절 입력 시험을 둔다.
- 버린 안: `test:a11y`에 `--output`·`--reporter` 인자를 붙이기. 결과
  경로가 설정과 script 두 곳에 나뉘고, run ID 격리(`testRunPath`)를
  다시 만들어야 한다.
- 막지 않은 것: `test:visual:update`는 `test:visual`과 같은 설정이라 같은
  경로에 쓴다. 같은 시험을 골든 갱신으로 도는 것이라 그 결과가 visual
  결과다. 시험 (1)은 설정 단위라 이것을 막지 않는다.

위험·한계: FE-GATE-009의 증거가 둘 늘어 그 게이트가 JUnit·report 없이
끝나면 실패한다. 하류 프로젝트가 `test:a11y`를 고쳐 `--config` 없이 쓰면
새 시험이 실패한다(CHANGELOG 「먼저 할 일」). 결과 경로를 script 인자로
바꾸는 설정(`--output` 등)은 새 시험이 읽지 않는다. FE-GATE-029
파서는 `--grep-invert @a11y`를 읽지 않아 `@a11y` 시험을 008이 도는
것으로 센다(FE-6부터 있던 것, 이 커밋 밖).

검증(desktop `scripts/verify.sh exec`):
- RED(트리 1e2c4a8f, 고치기 전): 새 시험 3개 모두 실패. dev 설정이 e2e
  경로 셋, test-e2e·test-a11y가 같은 경로 셋, test-a11y의 JUnit·report가
  FE-GATE-009 증거가 아니고 producer가 test-e2e.
- GREEN: 새 시험, playwright-run-isolation, ci-workflow-generation,
  repository-layout, test-evidence-repository-configs 503개 통과.
- 변이: a11y 결과 경로를 e2e로 → 새 시험 3개와 a11y 결과 폴더 시험
  실패. dev 설정의 결과 경로 빼기 → 새 시험 (1)과 dev 결과 폴더 시험
  실패. a11y 설정에 `workers: 1` → FE-6 시험 실패.
- `check:types`·바꾼 파일 eslint·`check:ci` rc=0.
- 리뷰 반영 RED(트리 a36e8676, 시험만 더함): 새 시험 (4)가 a11y·dev의
  results·report 4개로, testDir 시험이 `test:a11y` 한 줄로 실패.
  거절 입력 시험 둘과 fixture 형제 경로 단언은 통과.
- 리뷰 반영 GREEN(트리 155a93de): 위 시험과 removal-fixture,
  ungated-tests, documentation-readiness 7파일 549개 통과,
  `check:types`·바꾼 파일 eslint rc=0.
- FE-GATE-020: 첫 판(트리 ac0ea6d7)의 desktop merge에서 rc=1
  (「decisions.md names paths that do not exist」).
- FE-6 단언 옮김 RED(트리 eed3c87f): a11y 설정에 `retries: 7` 변이 →
  옮긴 단언이 새 시험에서 실패(1 failed, 6 passed). 옛 자리에 그 단언이
  없다(`ci-workflow-generation.test.ts`에서 `loadConfigFile`·
  `withoutResultPaths`·`playwrightRuns` grep 0건).
- GREEN(트리 d2d941c3): 새 시험, ci-workflow-generation, ungated-tests,
  removal-fixture 4파일 485개 통과, `check:types`·바꾼 파일 eslint rc=0.

Refs: 1106 리뷰 11 영역 3.2 (3) 증거 읽기 주의
2026-11-20 22:20:28 +09:00