Skip to content

fix(next-plugin): isolate coordinator sessions and enforce complete CSS - #752

Open
owjs3901 wants to merge 69 commits into
mainfrom
fix/next-coordinator
Open

owjs3901 wants to merge 69 commits into
mainfrom
fix/next-coordinator

Conversation

@owjs3901

@owjs3901 owjs3901 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Refs #686 #694 (NXT-01~20). #743과 #755 위에 쌓은 PR이며 두 PR이 먼저 병합되어야 합니다. #755의 resolver/ordered alias API 03d8e845와 parser-independent scanner e8abf152를 승인된 정확한 커밋으로 병합했습니다. NXT-19 전체 수명주기는 아직 미완료이고 landing Next 성공 및 전체 CI green을 주장하지 않습니다.

요약

앱·실행별 WASM/coordinator 격리, 경로 순 prewarm, strict production completion과 transactional sealed 재추출을 유지합니다. root/src App·Pages Router entry, 특수 파일과 현대 확장자, 동일한 절대 output 제외 목록은 연결·검증했습니다. 이번 단계는 초기 엔진 allocator rollback, 불변 final settings, 준비된 소스의 공통 추출/오류 재매핑, 네이티브 옵션 바인딩 인프라와 Linux 테스트 회귀를 추가합니다. 런타임 스타일링·새 의존성·Next peer 버전 하한 없이 모두 Patch입니다.

동작

항목 현재 상태
NXT-01 dev 초기 경로 순 번호/추출, 이후 append; MDX 집합은 NXT-19 최종 연결 대기
NXT-02·03 root/src App·Pages 및 _app·_document 등 실제 entry 집합 연결, 공유 graph/closure 사용
NXT-04~08 앱별 endpoint/소유권, restart 복구, bounded HTTP, 독립 엔진·실행 경로 유지
NXT-09~11 삭제/rename replay, debug 명시 적용, config extends chain watch 유지
NXT-12~14 reachable-only prewarm/cache 및 원자적 checkpoint, fresh prepared startup/replay 인프라
NXT-15~18 부분 CSS 성공 제공 금지, validated atomic endpoint, awaited drain, 위치 있는 계획/추출 오류
NXT-19 실제 프로젝트 MDX compiler/options/bridge/adapter/cache·resolver·바인딩 준비 API 검증; 최종 setup 및 dev refresh 연결 미완료
NXT-20 .mts·.cts·.mjs·.cjs 등 graph/entry/Turbo source 확장자 연결

graph와 numbering에 동일하게 실제 Next output과 Devup output의 절대 경로를 전달합니다. src/build, src/df 같은 동명 소스 폴더는 제외하지 않습니다. 이 제외는 discovery 경계이며 resolver는 네이티브처럼 실제 import를 따릅니다. 현재 계획 밖 compiled cache는 제공하지 않으며, 준비할 수 없는 Markdown은 공유 resolver의 위치 있는 오류가 됩니다.

버전·번들러별 MDX 계약

아래는 검증된 helper 계약과 남은 연결 목표입니다. 실제 전체 Next build 수락은 아직 아닙니다.

  • top-level adapterPath와 awaited modifyConfig capability를 탐지합니다(16.2+ API). caller hook을 한 번 await하고 caller의 최종 adapter 경로 변경/제거를 복원합니다.
  • Turbopack은 최종 config에서 준비를 바인딩·await합니다. webpack finalizer는 준비만 등록하고 반환하며, Next가 진짜 MDX rules를 만든 후 실제 beforeCompile에서 준비를 await합니다. 미래 webpack callback을 modifyConfig 안에서 기다리지 않습니다.
  • 구형 API 없는 Next는 DevupUI outermost의 이미 존재하는 chain을 사용합니다. 인식할 수 없는 필수 chain/반대 순서는 MDX 위치와 DevupUI outermost 또는 Next 16.2+ 해결 방법을 가진 오류여야 합니다.
  • 추출 loader는 같은 right-to-left chain에서 MDX compiler 왼쪽, SWC/Flight 이전입니다. 실제 filename·options·다른 loader 순서·조건·as: '*.tsx'를 유지합니다.
  • prewarm-only rejection bridge는 설치된 @next/mdx@16.3.6, @mdx-js/loader@3.1.1의 정확한 버전과 파일 해시에만 적용합니다. 동일 ESM loader/명명 plugin 해석을 사용하며 unknown wrapper는 원본 chain과 bounded 오류/timeout으로 실행합니다. unknown wrapper의 upstream unhandled rejection 출력 가능성을 숨기지 않습니다. 프로덕션 전역 listener·compiler 대체는 없습니다.
  • Turbopack options는 실제 Next 직렬화/worker payload와 같은 변환·non-JSON 거부를 사용합니다. webpack 준비만 root·plugin 배열·tuple shell을 shallow copy하고 다른 함수/옵션 객체는 네이티브 참조를 유지합니다. plugin의 공유 옵션 객체 변경은 준비한 파일 수만큼 누적되어 실제 빌드가 볼 수 있고, unknown wrapper의 더 깊은 변경을 막는다고 주장하지 않습니다. 원래 config container와 직렬화 bytes를 prewarm이 변경하지 않습니다.
  • 원래 옵션을 네이티브 tuple 변경 전에 캡처합니다. loader module/version/hash와 원시 값, 함수·nonplain leaf identity, 관찰 가능한 옵션 키 순서를 비교하되 container identity는 비교하지 않습니다. 정상 client/server maps·layer·isServer 차이는 별도 delivery/cache 차원입니다. 다른 실제 pipeline을 이미 준비한 owner에 다시 제시하면 config 위치·owner·첫 차이 경로·해결 방법이 있는 오류입니다.
  • compiler 입력은 resource와 loader가 보고한 file/build/context/missing dependency입니다. 준비당 한 번 컴파일하며 dev는 네이티브 timestamp margin, production은 CSS 최종화 시 hash/listing/absence 재검증을 사용합니다. remark/rehype/recma plugin은 읽은 파일을 bundler 계약대로 보고해야 하며, 보고하지 않은 읽기는 계약 밖입니다. 실제 watcher/refresh 연결은 미완료입니다.

Config 평가 경계

설치된 Next 16.3.6 소스를 읽은 표이며 아래 정상 흐름의 실제 MDX 수락 matrix는 남아 있습니다.

평가 지점 바인딩 목표
dev supervisor config 준비 없음
dev child의 첫 실제 config Turbo final rules / webpack 실제 compiler 경계에서 바인딩
render-server cache hit, Turbo raw-config warning 새 pipeline 바인딩 없음
config 편집 후 dev 재시작 새 process/isolate owner가 새 pipeline 사용
build main, webpack worker on/off, Turbo worker on/off 실제 compilation을 받는 isolate별 소유권; 같은 PID라도 thread globals 공유로 가정하지 않음
static generation/export workers, next start, telemetry flush compiler 바인딩 없음; caller adapter 동작은 보존

새로 생기는 오류

  • 다른 앱/실행 descriptor, coordinator deadline·연결 실패, 누락/실패 completion, 잘못된 config/checkpoint 경로는 파일:줄:열과 수정 방법을 가진 build error입니다.
  • 이미 제공한 production CSS와 다른 base/bucket/import/font-face가 필요한 재추출은 격리된 candidate에서 거부하며 live/checkpoint를 바꾸지 않습니다.
  • 필수 prepared cache 누락·async resolver 반환·인식 불가 pipeline·서로 다른 native binding은 위치 있는 오류입니다. 준비된 코드의 own/imported 위치는 공유 resolver.remapError를 거치며 map이 없으면 compiled output으로 표시합니다. imported native 위치 자체의 확장은 fix(extractor): locate diagnostics and enforce deterministic evaluation #757 경계입니다.
  • custom MDX 확장자는 #755의 명시적 source-type API 대기 중입니다. 연결 시 .md/.mdx 이외 rule은 config 위치에서 확장자와 수정 방법을 밝혀 실패해야 하며, 파일명 변경이나 raw Markdown fallback은 없습니다.

남는 한계

최종 MDX lifecycle/setup, 선택적 dev compiler refresh, 실제 provider closure, ordinary upstream-loader resend·원자적 게시, production dependency 최종 재검증 연결이 남아 있습니다. both wrapper orders × webpack/Turbo, config object/phase function, webpack worker on/off, dev plugin 변경·재시작, 실제 landing build/E2E는 아직 완료하지 않았습니다.

#755 custom source type 후속 커밋과 #751/W31의 atomHoist/class naming 소유 범위는 별도이며 우회하지 않습니다. source import를 끊은 일반 TSX에서 기존 globalCss/@import/font-face가 남는 dev 동작은 실제 WASM으로 확인해 코디네이터에게 별도 보고했고, 이번 MDX 경로만 다르게 제거하지 않았습니다.

검증

  • 승인된 scanner 병합 head a0178595: install/WASM/root build 통과, hook lint/Rust gates 통과, 전체 Bun 7,220 통과 / 0 실패 / 89 snapshots / 28,830 assertions / coverage 100%.
  • 단계별 exact-tree hooks: allocator 6,461/0, final context 6,465/0, 공통 prepared 추출 6,496/0, binding 6,542/0. 모든 훅에서 Bun 100%; skip/amend/force push 없음.
  • Linux portability: 잘못된 handoff 쓰기는 stale token까지 제거하고 불필요한 owner 정리를 만들지 않음; native fixture는 OS tmpdir 아래 unique directory. 실제 Node webpack/HTTP/WASM slow-preparation·CSS·한 엔진 검사 11/0.
  • 준비된 actual compiler map의 MDX 원본 9행 오류를 request/prewarm 및 maps on/off에서 검증. imported mapping synthetic contract는 native fix(extractor): locate diagnostics and enforce deterministic evaluation #757 위치 생산 증거와 구분합니다.
  • 실제 native MDX + fresh WASM으로 maps on/off compiler/code/class/CSS byte equality 검증. 옵션 key order가 red/blue CSS를 달리 만드는 음성 대조도 실제 컴파일로 확인하고 rebind 거부 수정.
  • real legacy fallback 출력 free/remap 회귀: 수정 전 0/3, 수정 후 loader 포함 22/0, 관련 source 100%. LSP는 이전 설치 거절로 unavailable; native TypeScript와 ESLint 검증으로 대체하고 clean LSP라 하지 않습니다.
  • CI 37258474384, 9f90fb06: Linux 테스트·lint·build·publish의 landing gates 통과, benchmark/vinext 통과. publish는 Codecov download SSL handshake와 누락 GPG signature 외부 장애에서만 실패했습니다. 별도 landing-next는 아직 MDX strict omission 실패입니다. workflow 변경/무한 rerun 없음.
  • 새 CI 37271055514, a0178595는 확인 중입니다. 완료·green으로 미리 적지 않습니다.

owjs3901 and others added 30 commits October 1, 2026 01:50
…nd StyleX imports

The generated stylesheet always resolved to an empty module, so Bun.build dropped every style, and the pre-parse gate only accepted import declarations of @devup-ui/react, so files using the alias packages, StyleX, subpaths or re-exports ran the runtime stubs. DevupUI() now serves the complete sheet to the CSS loader after defer(), and the gate reads the real imports with Bun.Transpiler.scanImports.

Refs #686

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
… built stylesheets

A stylesheet module is built on its first import, and the shared base is read from disk past the plugin, so styles extracted later were missing from webpack and Rsbuild output; Rsbuild also served a module-wide string kept only when it grew. The files the entries reach are now extracted before the build, the base on disk is kept current, and a compilation whose stylesheets changed is run once more, writing only the complete result. Rsbuild serves each stylesheet from the current sheet.

Refs #686

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…into feat/deterministic-numbering

# Conflicts:
#	packages/next-plugin/src/loader.ts
…ing order

Refs #694

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

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

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
… forwarding alone

Refs #694

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

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

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

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

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

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

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

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

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

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

Refs #686 #694

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

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

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 #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 #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 #686

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

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

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

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

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 #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>
owjs3901 and others added 30 commits October 4, 2026 22:26
Refs #686

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

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

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

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

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 #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 #694

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…es and exclusions

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>
…rors

Refs #686

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…ite proof

Refs #686

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

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

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

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

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

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

Refs #686 #694

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 #686 #694

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 #694

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

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

Refs #686 #694

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>
…ctionally

Refs #686 #694

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

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

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…reed boundary

Refs #686 #694

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…y assumptions

Refs #686 #694

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

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

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

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

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

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

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

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

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