Skip to content

fix(extractor): reject unresolved structural styling inputs - #791

Open
owjs3901 wants to merge 5 commits into
mainfrom
fix/unresolved-global-inputs
Open

owjs3901 wants to merge 5 commits into
mainfrom
fix/unresolved-global-inputs

Conversation

@owjs3901

@owjs3901 owjs3901 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Refs #791 (최신 MAIN SETTLED 78d7c2b2를 실제 두 번째 merge로 반영한 독립 PR; 선행 PR 없음)

요약

PR791의 첫 merge(69a52863, parents 50b0da00 + 770aaac5) 위에 최신 settled main 78d7c2b2를 다시 실제 merge했습니다. #791의 global inputs/imports/fonts/params/absence 계약과 #798의 strict lexical recognition, located errors, semantic-ID-preserving clones, const-object tags를 모두 유지했으며, 스타일링 런타임이나 새 dependency는 추가하지 않았습니다.

동작

  • 전역 imports, fontFaces, selector params는 빌드가 증명할 수 있는 정적 입력만 출력하고, 읽을 수 없는 입력은 원래 위치의 build error로 남깁니다.
  • 순수 URL/import 및 정적 font descriptor/template은 기존 CSS와 dependency 순서를 유지합니다. optional undefined/null은 proven absence일 때만 생략합니다.
  • nested selectors, conditional/logical expressions, responsive arrays, computed members와 lowered JSX 경로에 StyleInputs와 LOCATE 정책을 함께 전달합니다.
  • #798의 quoted selector handling, strict comparisons, metadata-preserving clones, const-object extraction과 #791의 font terminal veto 및 values_run.is_none() 계약을 유지합니다.
  • build-time extractor만 변경했으며 emitted runtime helper/import/evaluator/schema는 추가하지 않았습니다.

새로 생기는 오류

다음처럼 구조를 빌드 타임에 알 수 없는 입력은 조용히 누락되거나 부분 CSS로 남지 않고 파일:행:열 오류가 됩니다.

globalCss({ imports: [{ url: unknownUrl }] })
globalCss({ imports: [{ url: 'base.css', query: tick() }] })
globalCss({ fontFaces: [{ ...unknownDescriptors, src: 'face.woff2' }] })
globalCss({ fontFaces: [`font-family: ${unknownFamily};`] })
<Box _nthChild={{ params: ['2n', unknownParam], color: 'red' }} />

남는 한계

빌드에서 증명할 수 없는 import/font descriptor/selector 인수는 정적인 표현식으로 바꾸어야 합니다. 일반 동적 element 값의 기존 CSS-variable 경로, selector cascade order, evaluator의 기존 지원 범위는 변경하지 않았습니다. ReferenceError, spread/eager-order, theme located-error, key-coercion, Windows PID 후속 수정은 별도 PR로 진행합니다.

검증

  • 실제 second-merge commit: 38e7ac2e24f0f66eec84683d7dc2d56ba8eb760e; tree ebabb6411b5b6f7f94d8cbdfb71ff8a9b1b89e4f; parents 정확히 69a5286317fb7cc8babb34ec1ed17c61ed9acab6 + 78d7c2b2673bdeaa0870bac6a2ec424706986de7.
  • fresh bun install, binding WASM build, root build, Rust 1.99 strict clippy, default-stack cargo test --workspace 통과. Workspace 결과는 extractor 5,719 pass 및 전체 0 fail입니다.
  • bun run test: 6,654 pass, 0 fail, 89 snapshots; 실제 All files 함수/라인 100.00/100.00.
  • bun lint: 0 errors, inherited React 19 warning 20건만 존재합니다. exact-tree hook은 한 번 PASS했습니다. Windows LLVM tarpaulin 참고값은 97.87%이며 Linux coverage 증명으로 사용하지 않습니다.
  • fresh public WASM/React QA는 per-file 및 single-CSS 46/46 pass, deterministic output과 effect trace 0을 확인했습니다. fresh shipped-name audit는 matches: []입니다.
  • independent staged-tree review는 PASS, findings 없음입니다. conflict marker와 runtime addition은 확인되지 않았습니다.
  • matching CI 39623046266 SUCCESS: publish, react-18, wasm-size, benchmark, release-compat, landing-next-e2e, vinext-rsc-css-e2e, webpack-extends-theme 모두 통과했습니다. publish job의 Linux Rust 100% 및 Bun All files 100% gate가 통과했습니다.

새로운 runtime 동작이나 dependency는 없습니다. CI의 Node.js 20 deprecation/ubuntu-latest migration 안내는 workflow 경고이며 실패가 아닙니다.

Refs #686

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
libs/css/src/lib.rs 100.00% <ø> (ø)
libs/css/src/selector_params.rs 100.00% <100.00%> (ø)
.../extractor/extract_global_style_from_expression.rs 100.00% <100.00%> (ø)
...src/extractor/extract_keyframes_from_expression.rs 100.00% <100.00%> (ø)
...tor/src/extractor/extract_style_from_expression.rs 100.00% <100.00%> (ø)
.../extractor/src/extractor/extract_style_from_jsx.rs 100.00% <100.00%> (ø)
.../extractor/extract_style_from_member_expression.rs 100.00% <100.00%> (ø)
...tractor/src/extractor/extract_style_from_styled.rs 100.00% <ø> (ø)
libs/extractor/src/extractor/global_inputs.rs 100.00% <100.00%> (ø)
...ibs/extractor/src/extractor/global_inputs/fonts.rs 100.00% <100.00%> (ø)
... and 9 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

owjs3901 and others added 4 commits October 20, 2026 12:06
Refs #686

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #686

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #686

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #791

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant