Commit Graph
7 Commits
Author SHA1 Message Date
DongHyeonka c024182951 test(system): exact-five CLI의 current 모드 PASS 문구를 기대한다 (0929/11-01)
문제: 13-04(839205c)가 `verify-exact-promotion-bundle.ts`에
`--archived` 모드를 넣으면서 성공 출력이
`Exact promotion bundle verification (<freshness>): PASS`로 바뀌었다.
"passes the downstream CLI for a real finalized exact-five" 테스트는
옛 문구 `Exact promotion bundle verification: PASS`를 기대해서 항상
실패하고, FE-GATE-013(`test:system`)이 코드와 무관하게 빨갛다.

고른 방법: 기대 문구를 `... (current): PASS` 전체로 바꿨다. 이 테스트는
`--archived` 없이 CLI를 부른다. `(current)`는 "기본 모드는 지금 시각
기준으로 freshness를 판정한다"는 주장의 일부다. repo에서 CLI의 기본
모드를 확인하는 테스트는 이것 하나다.

버린 대안: `/verification .*: PASS/`처럼 PASS만 본다. 문구 변경에는
강하지만 기본 모드가 `archived`(기록된 승격 시각 기준, 더 느슨한 판정)로
바뀌어도 통과한다. 출력 문구가 다시 바뀌면 이 테스트가 같이 바뀌어야
하는 편이 낫다고 판단했다.

위험·한계: 이 테스트는 base fixture가
`corepack pnpm build:release-candidate`를 부르므로 worktree에서
실행하지 않았다. 메인 checkout의 `test:system`에서 확인해야 한다.

검증:
- RED: 게이트 로그 test_system.log(d99301b, 메인 checkout 실행)에서
  `:1259:27` 실패. Expected `Exact promotion bundle verification: PASS`,
  Received `Exact promotion bundle verification (current): PASS`.
  d99301b..402e1db 사이 scripts·tests/system 변경 없음.
- 새 기대 문구가 그 Received 줄과 글자 그대로 같다
  (`grep -F` 1건 일치).
- `npx tsc --project tsconfig.test.json --noEmit` 통과.
  `npx eslint tests/system/ci-runner/ci-artifact-contract.test.ts` 통과.

Fixes: 839205c134 ("feat(release): re-verify a promoted release in archived mode (13-04)")
Refs: docs/reviews/2026-09-29-maturity-review/11-tests-browser-release-scale.md 11-01
2026-11-01 19:05:32 +09:00
DongHyeonka 185a2aee68 test(system): supervisor argv를 실행 중 기록에서 확인한다 (11-01)
문제: cgroup 테스트("applies effective aggregate cgroup limits ...")는
`await execution.completion` 뒤에 `showProcessArguments(child.pid)`로
supervisor의 argv를 다시 조회한다. completion은 child의 `close`에서
풀리고, 그때 Node는 이미 child를 회수했다. `/proc/<pid>/cmdline`도
`ps -p`도 실패해서 이 테스트는 부하와 관계없이 항상
`ps failed: `로 끝난다. 바로 위 주석은 "아래는 실행 기록을 읽는다"고
적어서 코드와 반대로 말했다. 완료 전의 live 조회(`:793`)도 provider가
1.5초 뒤 끝나므로 부하가 있으면 같은 이유로 실패할 수 있다.

고른 방법: 이미 있는 샘플러 `recordProviderProcessTree`가 5ms마다
supervisor 자신의 argv도 읽어서, 서로 다른 값을 모두 기록한다.
완료 전 live 조회와 완료 후 조회를 이 기록으로 바꿨다. 단언은 줄이지
않았다.
- supervisor argv에 command와 credential이 없다(`:793`의 정규식 그대로).
- 기록에 `run-and-validate-provider.ts`가 있다. 기록이 비어서 위
  단언이 공짜로 통과하는 경우를 막는다.
- 실행 중 `process.title`로 argv를 바꿔도 값마다 남기므로, 순간 한
  번을 본 live 조회보다 넓게 본다.

버린 대안:
- 완료 후 조회 줄을 지운다: supervisor argv 검사가 사라진다.
- 완료 전 스냅샷을 한 번 더 찍는다: `:793`과 같은 방식이라 부하에서
  provider 종료와 경쟁한다.
- `ps` 실패를 무시한다: 결함을 숨기고 검사가 공짜로 통과한다.

위험·한계: 샘플링 간격(5ms)보다 짧게 바뀌었다 돌아오는 argv는 놓칠 수
있다. 다른 프로세스 기록과 같은 한계다. 이 테스트는 base fixture가
`corepack pnpm build:release-candidate`를 부르므로 worktree에서
실행하지 않았다. `-t 'aggregate cgroup'` 반복 실행과 `test:system` 전체
통과는 메인 checkout에서 확인해야 한다.

검증:
- RED: 게이트 로그 test_system.log(d99301b, 메인 checkout 실행)에서 이
  테스트가 `Error: ps failed: `로 `:810:7`에서 실패. 2 failed /
  110 passed. d99301b..402e1db 사이 scripts·tests/system 변경 없음.
- 메커니즘: 테스트 파일에서 `readProcessArguments`·`showProcessArguments`·
  `recordProviderProcessTree` 원문을 잘라 타입만 지우고, 수명이 짧은
  child에 돌렸다(scratchpad/fix-11-01/recorder-check.mjs).
  - 수정 전 20회: close 뒤 조회 실패 20, supervisor argv 기록 0,
    실행 중 title 유출 기록 0
  - 수정 후 20회(loadavg 1.6): 조회 실패 20, 기록 20, 유출 기록 20
  - 수정 후 30회, busy loop 20개(loadavg 17.9): 기록 30, 유출 기록 30
- `npx tsc --project tsconfig.test.json --noEmit`, `tsconfig.node.json`
  통과. `npx eslint tests/system/ci-runner/ci-artifact-contract.test.ts`
  통과.

Fixes: 5cc41467ae ("refactor: 프론트 템플릿 리펙토링")
Refs: docs/reviews/2026-11-01-maturity-review/11-tests-browser-release-scale.md 11-01
2026-11-01 19:05:32 +09:00
donghyeon-kaandClaude Opus 5.5 49413af045 fix(types): turn on noUnusedLocals and drop the unused declarations (12-12)
VD-01 decision 3 hands unused diagnostics to tsc and turns off ESLint's
no-unused-vars for TS files, but tsconfig.base.json never enabled the
tsc check (D-19). The flag found 46 unused imports, types and helpers
across 22 files; none of them were read, so removing them changes no
behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:32:33 +09:00
donghyeon-kaandClaude Opus 5.5 d1aaaf69c9 test(ci-runner): run fixture gates without pnpm's install check (F-12)
The freshness fixtures have a package.json but no node_modules. Started
outside pnpm, the gate's pnpm run began an install there and failed with
ERR_PNPM_IGNORED_BUILDS instead of testing the gate runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:20:12 +09:00
donghyeon-kaandClaude Opus 5.5 a8520f6dfb fix(fixtures): keep pnpm in a linked fixture from installing (F-4)
pnpm verifies the install before a script, and a fixture running it with
CI=true against an install made without CI saw other settings and installed
through the linked .pnpm and .bin, rewriting the shared lock.yaml and shims.
Every fixture pnpm run now turns that check off; a test pins it for all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:20:12 +09:00
DongHyeonkaandClaude Opus 5.5 0114b1e58b fix(ci): move CI contract counts and gate hash to an owned baseline file (14-02)
Gate/command/artifact counts and the gate-shape SHA-256 were code
constants, so any real removal or addition failed check:ci and removal
fixtures passed only in a relaxed mode. They now live in
config/ci/contract-baseline.json (owner, reason) with
update:ci-contract-baseline; update:registry-baseline wraps the existing
registry script. Removal fixtures re-baseline and run canonical check:ci
and check:registries; CI_CONTRACT_MODE, --reduced-removal-fixture and
check:registries:structure are gone. ci-quality-gates.md lists the
baselines a new project resets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:34:12 +09:00
donghyeon-ka 5cc41467ae refactor: 프론트 템플릿 리펙토링 2026-09-18 15:16:58 +09:00