Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or request
Description
테스트 격리, CI 보안, 성능 측정, 미지수를 확인할 테스트 인프라입니다.
전체 계획과 결정 사항은 추적 이슈(#682)에 있습니다. 조사 기준 커밋: 77daad74 (현재 main d0b84255).
결정에 따른 작업
- (필수)
#[serial]누락(INF-01, KNOWN-16): 전역 theme 상태를 쓰는 테스트 - (권장) 미지수 해소 테스트 인프라: Firefox·WebKit, 실제 번들러 end-to-end(next dev/build, vite, rsbuild), React 18 fixture
발견 항목
심각도: P0 = 흔한 사용에서 조용히 틀리거나 크래시, P1 = 흔한 패턴이 명시적 에러로 막히거나 드물게 조용히 틀림, P2 = 드문 경우·도구/문서 불일치, P3 = 있으면 좋음.
필수 (1)
- INF-01 (P1, NONDET) TOKEN_REGISTRY has multiple non-serial writers
- 근거:
theme_tokens.rs:82-119has three plain#[test]writers;sheet::test_get_theme_interface(2663+) andtest_theme_layer_in_css(3025+) also callset_theme; serial tests such astest_conditional_typography_pipelinedepend on the same registry. - 수정 방향: mark every registry reader/writer serial or replace process-global registration with scoped/per-sheet state and a reset guard.
- 근거:
권장 (7)
- INF-03 (P1, NONDET) Bun files share persistent WASM and plugin process state
- 근거: root
bunfig.tomlruns package tests together;next-plugin/src/wasm.ts:10-61caches modules;wasm.test.ts:39-112resets overrides/CWD but not caches or Rust global state. - 수정 방향: expose/use a test-only aggregate reset, avoid process CWD mutation, and serialize stateful files.
- 근거: root
- INF-04 (P1, TEST) Rust 100% excludes the actual JS/WASM ABI
- 근거: all public extraction/map/theme/resolver/query wrappers at binding lines
51,226-329,468-671arecfg(not(tarpaulin_include)); wasm32RefCellpaths are also excluded. - 수정 방향: add wasm-bindgen/Node integration coverage and report ABI coverage separately instead of counting only internal native helpers.
- 근거: all public extraction/map/theme/resolver/query wrappers at binding lines
- INF-18 (P1, SEC) Privileged publish action is mutable and PR-eligible
- 근거:
changepacks/action@mainatpublish.yml:319; job has contents/OIDC/Pages/PR write and no push-main job condition (141-148,289-322). - 수정 방향: pin SHA; split validation from a push-main/environment-protected publish job with minimal permissions.
- 근거:
- INF-19 (P1, MAINT) CI toolchain is mutable/deprecated
- 근거: KNOWN-19
jetli/wasm-pack-action@v0.4.0,version: latest,ubuntu-latest, and remote cargo-binstall shell installer (publish.yml:45-46,100-101,160-187). - 수정 방향: pin runner/tool/action versions and checksum a fixed cargo-binstall release.
- 근거: KNOWN-19
- INF-21 (P2, TEST) E2E is broad for landing but narrow for release compatibility
- 근거: Chromium-only static landing runs; no npm-packed consumer, browser matrix, or each-bundler consumer (
playwright.config.ts:3-49). - 수정 방향: add small tarball consumer smoke projects for CJS/ESM and each plugin; add at least WebKit/Firefox where CSS/browser compatibility matters.
- 근거: Chromium-only static landing runs; no npm-packed consumer, browser matrix, or each-bundler consumer (
- INF-22 (P2, SEC) Validation job can create and commit snapshots
- 근거: missing snapshots trigger generation/commit (
publish.yml:257-271) in the same write-capable job. - 수정 방향: fail with uploaded artifacts or use a separate explicit maintainer workflow.
- 근거: missing snapshots trigger generation/commit (
- INF-25 (P3, TEST) CI jobs can hang indefinitely
- 근거: no
timeout-minuteson any of three jobs (publish.yml:18-322). - 수정 방향: set realistic per-job limits above measured normal duration.
- 근거: no
선택 (13)
- NXT-21 (P1, TEST) Benchmark CI cannot catch a performance regression
- 근거:
.github/workflows/publish.yml:55-56runsbun run benchmark;benchmark.js:74-104,126-139only prints times/sizes and has no baseline, threshold, assertion, or nonzero regression exit. - 수정 방향: Persist a baseline artifact, compare medians/output/CSS sizes with explicit tolerances, and fail only statistically/materially significant regressions.
- 근거:
- INF-02 (P2, TEST) Global test cleanup is manual and non-transactional
- 근거: prefix/debug/atom-hoist/custom-shorthand and four related maps are reset independently; a panic before cleanup leaks state, and custom shorthands have no named reset API.
- 수정 방향: introduce one RAII test-state guard/snapshot restoring all globals on drop.
- INF-05 (P2, TEST) Bun's “100%” is a scoped metric that omits production behavior
- 근거:
bunfig.toml:2-11excludespkg,dist, andbun-plugin/src/plugin.ts; the regression harness bypasses root coverage. - 수정 방향: document scoped coverage and add artifact/plugin registration integration gates.
- 근거:
- INF-09 (P2, MAINT) Removed lite engine remains as stale generated artifacts
- 근거: removal changepack dated 2026-09-29 says export/API removed, but
pkg/lite/index.d.tsstill exportshasBuildTimeValues; stale WASM is 1,501,575 bytes. - 수정 방향: remove stale directory in the next legitimate generated-package build and add a release check that forbidden removed subpaths are absent.
- 근거: removal changepack dated 2026-09-29 says export/API removed, but
- INF-16 (P2, PERF) Benchmark CI cannot detect regressions
- 근거:
benchmark.jsprints times/sizes and medians but compares against no baseline or threshold; job passes if commands run. - 수정 방향: store machine-normalized baselines and gate statistically significant regressions with an explicit tolerance.
- 근거:
- INF-17 (P2, PERF) SemanticBuilder pass cost is still not isolated
- 근거: conditional pass at
visit.rs:1062-1069and error-only pass at418-448; no dedicated criterion group. Fresh-process style-value fixture measured 4.058 ms median vs 2.732 ms control (+1.326 ms, +48.5%), but the fixture also has 51 more bytes and performs extraction, so this is only an upper bound. - 수정 방향: criterion benchmarks over the same parsed program with pass on/off instrumentation, separately for
style_valuesandreport_compiled_reads.
- 근거: conditional pass at
- INF-20 (P2, TEST) CI cache keys omit relevant toolchain dimensions
- 근거: keys include OS/lockfile but omit runner image and Rust/Bun/Node/wasm-pack/Playwright versions (
publish.yml:26-44,81-122,165-184,249-256). - 수정 방향: include explicit runtime/tool versions and browser revision in keys.
- 근거: keys include OS/lockfile but omit runner image and Rust/Bun/Node/wasm-pack/Playwright versions (
- INF-26 (P2, PERF) WASM size has no tracked trend or budget
- 근거: current full WASM is 5,387,595 bytes and ignored generated binary has no
git loghistory; CI verifies loadability but not size. - 수정 방향: record compressed/uncompressed artifact size in CI, compare to main, and fail above an approved budget.
- 근거: current full WASM is 5,387,595 bytes and ignored generated binary has no
- NXT-22 (P2, TEST) Benchmark sampling policy makes most rows incomparable and flaky
- 근거: fixture list is at
benchmark.js:86-104, but only threeturboTargetsget six alternating samples/medians atbenchmark.js:110-123; Webpack and other fixtures are one cold observation. - 수정 방향: Define targets and sampling policy in a manifest; warm/alternate consistently and report spread plus median for every published comparison.
- 근거: fixture list is at
- NXT-23 (P2, MISMATCH) English and Korean benchmark tables are from different runs
- 근거:
README.md:82-104links run33254030962;README_ko.md:82-104links run33239265133and reports different values for the same rows. - 수정 방향: Generate both tables and links from one checked benchmark result artifact.
- 근거:
- PLG-26 (P2, TEST) Important plugin behavior is untested despite 100% line coverage
- 근거: Bun tests simulate private helper logic and assert spies are “defined”; they never invoke captured
onLoadcallbacks, so PLG-01/02/03-extension behavior passes. Rsbuild tests mock both mkdir/write as immediately resolved and miss PLG-10. No suite covers deletion/rename, extends watches, same-length CSS edits, multi-environment order, or write reordering. - 수정 방향: Add hook-level mocked-context tests plus small end-to-end bundler fixtures for CSS assets, HMR removal, cold directories, and concurrent revisions.
- 근거: Bun tests simulate private helper logic and assert spies are “defined”; they never invoke captured
- INF-24 (P3, MAINT) WASM package documentation is stale template content
- 근거: binding and packaged READMEs still say wasm-pack-template and show obsolete Travis/template setup.
- 수정 방향: replace generated-package README input with current API/usage/error/state notes.
- NXT-24 (P3, MISMATCH) README “Build Size” hides the separately measured CSS size
- 근거:
benchmark.js:68-70computes total output and CSS output separately, butREADME.md:86andREADME_ko.md:86publish only an ambiguous “Build Size” total. - 수정 방향: Publish separate total-output and CSS-byte columns with the measured directories/files.
- 근거:
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
test: serialize every test touching global theme, class and file state (
ci: give the pull request changepacks check the local main it compare…
ci: calibrate the benchmark baseline, results and WASM budget from th…
chore: merge main into React 18 fixture CI
chore: merge updated React 18 CI into hardening
chore: merge hardened main CI into benchmark regressions
fix(test): handle exited Linux processes and retain early build evidence
ci(benchmark): recalibrate for main Tailwind v4 output
test(wasm): cover deterministic build-state ABI
fix(benchmark): measure shipped CSS without compiler caches
ci(wasm): align size budget with attributed parent growth
fix(benchmark): tighten single and vinext CSS baselines
ci: merge updated React 18 fixture into hardening
ci: merge updated hardening parent into benchmark regressions
23 remaining items
test: guard process trees and check browser-applied production styles
test: build packed release consumers and report compatibility findings
ci: gate release compatibility with cached timed production fixtures
test: restore global state and scoped spies
fix(release): validate managed changepack paths
ci(benchmark): recalibrate the baseline after the Next 16.4 update
test: restore complete coverage on latest Bun
fix(eslint-plugin): preserve sparse responsive values in autofixes
chore(deps): update all dependencies to the latest versions
merge: integrate settled main 7af8166 into PR #810
fix(ci): stabilize landing dev GitHub requests
test(next-plugin): avoid historical PID reuse in cleanup assertions
fix(ci): use latest stable tools and preserve the release lockfile
owjs3901 commentedon Nov 15, 2026
main(
1160bf646)에 병합된 수정을 확인해 체크리스트를 갱신했습니다.새로 체크한 항목 (12건 + 결정 항목 1건)
resetStateForTesting())bunfig.toml에 범위 명시, packed consumer gate)libs/extractor/benches/semantic_pass_benchmark.rs)benchmark.js의 같은 샘플 수, 중앙값과 범위)#[serial]누락: test: serialize every test touching global theme, class and file state #696아직 열린 PR로만 다루는 항목: INF-03 (#971), INF-04 (#952), INF-26 (#948), PLG-26 (#957)
wasm-abi.test.ts, INF-26은 #746의 상대 크기 예산이 main에 있습니다. 다만 열린 PR이 남은 부분을 다루고 있어 체크하지 않았습니다.제외 항목 (체크하지 않음): NXT-21, INF-16, INF-18, INF-19, INF-20
test(plugins): stop changing the process directory in tests (#971)