Skip to content

[codex] Recover the separate StyleX Next development adapter - #59

Draft
0thernet wants to merge 27 commits into
mainfrom
codex/stylex-next-dev-current-main-20260908
Draft

[codex] Recover the separate StyleX Next development adapter#59
0thernet wants to merge 27 commits into
mainfrom
codex/stylex-next-dev-current-main-20260908

Conversation

@0thernet

@0thernet 0thernet commented Sep 8, 2026

Copy link
Copy Markdown
Member

Status

Draft and incomplete. Current pushed checkpoint: bf45c1ade1a69fd679d0ea5152d03101ea515cef, tree 4584266fc94ca37d1b92d577e34702efa0d026c8, branch codex/stylex-next-dev-current-main-20260908.

This normal merge preserves parents d47a6b9dfbb9b117f6bcf0b440c6d547e9bf41a4 and released UI 0.5.14 main 8626e82f9aeed4de085e418e6cae4e7dc3d8e80f. No history was rewritten. The branch is pushed and clean; it is not ready to merge or release.

Current-main join receipt

  • Independent static review passed: all 73 main-only paths are byte/mode-equal to main, all 60 draft-only paths equal the retained draft, and all 27 private development-source paths are unchanged.
  • Reviewed conflicts preserve the union of package files/exports, types and artifact gates. Production Next 16.2.12 and 16.3.3 checks remain mandatory alongside the separate development gate.
  • The exact released manifest blob 31523d321ac1637dce051d8cb07b0d655459ac7c is retained. It is not an acceptance manifest for this combined development draft. Development generated files must be regenerated only after the remaining implementation is complete.
  • README now explicitly marks the adapter unreleased and incomplete. Its example is a proposed successor interface, not an export supplied by immutable 0.5.14.
  • Unmerged/index/sequencer and diff checks passed before sealing. No install, build, typecheck, test, browser or complete gate was run for this merge-only checkpoint. Earlier results below remain historical to their exact inputs.

Retained private implementation history

The prior checkpoint cc518e8 added nine private, unintegrated protocol, native-owner, browser-bootstrap and emitted-runtime-generator files. They are not exported through the package, connected to the adapter, or adopted by the packed fixture. Checkpoint 4e30183 adds an unexported captured CSS materializer and repairs the existing development snapshot's transitive rule/coverage authority; 9d87ab4 adds its private producer. Checkpoint 6b430f7 adds private public-Webpack-hook wiring. Checkpoint 42e5116 preserves historical union coverage for delayed initial SSR and binds bootstrap census to native document readiness. The latest four-file checkpoint adds private per-module marker stamping and per-instance response request ownership. Production runtime, common compiler, package, generated artifact, fixture and browser assertions remain unchanged. These checkpoints do not establish native acceptance of the Next adapter.

Development adapter and fixture

The existing candidate adds a separate opt-in Next 16.2.12 Webpack development adapter. Bounded source snapshots and package manifests feed the package-and-graph union; client, Node and Edge compiler participation is tracked. Stable defineVars and createTheme replacements remain explicit restart boundaries. Production adapters and existing Vite support remain unchanged. The recovered output-settlement helper is not wired into production authority.

The packed matrix runs Playwright in genuine Node 24 and requires owned process, browser, stream and listener collection before acceptance. It binds packed inputs and proves exact existing and missing watch-input recovery.

The fixture activates the untouched server route with an exact loopback HTTP request, without a second HMR socket. It retains the original root epoch, counter, draft, frame audit, stale-rule checks and recovery cases. After sealing that document, it deliberately navigates the same page and repeats the server recipe to retain original and edited native computed-style observations. No epoch is reset, HMR frame suppressed, dependency implementation patched, or coherence assertion removed. The six-probe inventory includes the cold route warm-up.

Retained native failure

The native run at 82f3a1a failed on the first client recipe edit in the Edge variant: the frame audit retained 50 JavaScript/CSS mismatches. Eventual style settlement and preserved client state did not turn that run into success. The Edge/no-Edge matrix remains unaccepted. Its failure inputs and lifecycle evidence are retained.

Compiler completion is not evidence that a browser has loaded new CSS or that every live client/RSC consumer has committed its replacement. This checkpoint keeps those boundaries separate instead of changing the frame or state checks.

Private preservation checkpoint

  • A finite, captured consumer ledger separates publication, native acquisition, activation, commit, physical retirement and bootstrap hydration. Parked/older consumers retain their required revisions; opaque acquisition handles preserve in-flight metadata. Invalid descriptors, replay, conflicting digests and unsupported bounds fail closed.
  • The native link owner requires each exact trusted load, immutable URL/SRI identity and its accepted native stylesheet. Links enter final order before loading. Activation never reparents an accepted sheet; changed identity, order or ownership is rejected. Failure collects candidate work while retaining last-good active CSS.
  • The document owner combines physical-root commit leases, a hydration census and synchronous immutable store snapshots. The bootstrap admits captured metadata before waiting for hydration. Reversed initial/replacement load ordering still requires the initial trusted load and complete active coverage of its pinned revisions.
  • The runtime generator binds the actual native hot-update manifest to session and predecessor/successor Webpack hashes, then gates initial entry startup and hot application on the owned readiness boundaries. CSS/protocol failure has one explicitly owned terminal freeze, rather than a false empty update or a rejection that makes Next discard the document. Independent Next reload/runtime-error paths are not claimed suppressed.

These are private source and deterministic DOM/VM controls, not real emitted Next/browser proof.

The native CSS helper flattens the complete union and recursively captured package foundations into one immutable, hash-bound asset using genuine Node 24. It has no disk resolver fallback, rejects foreign imports and external asset loads, and binds source digests even when a parser removes comments. Development snapshots capture exact stylesheet bytes; retained transitions reject foundation drift and preserve both complete rule content and transitive revision coverage, including wider sheets sharing one source revision. Empty retention remains explicit and coverage is bounded to 32 revisions.

The private producer binds captured source, map, CSS and package identities to a finite process-session catalogue. Exact terminal emitted asset bytes are required before publication; failed candidates do not enter later catalogues. Source reversion advances the sequence, and prior immutable assets remain resident within explicit 32-snapshot and 32-MiB limits. Server/Edge lookup requires exact published authority. This owner is not yet connected to native Webpack emission, application source markers or the packed fixture.

The latest private repair also emits an immutable retained-history union before a selected pruned artifact. A delayed initial response carrying revision 1 can therefore start with revision 3 JavaScript after two edit/prune cycles, while actual consumer commit leases retain the older rules. Native parser EOF pins the exact delivered root census independently of gated application startup. An early synthetic DOMContentLoaded cannot establish EOF or consume the real listener. Startup still requires the exact initial trusted CSS load, intact active coverage and its finite deadline. Unknown historical responses, root-census drift and missing covering unions require restart; none is silently relabeled current. The catalogue remains bounded to 32 captured rows, including additional union rows, and 32 MiB of immutable CSS.

The marker transform replaces one exact compiler-only revision call on the complete owned native root with producer-captured metadata and composes the authored source map. Shadowing, aliases, alternate client return paths, unknown spreads and authored revision/URL values cannot provide authority. This per-module transform still requires the complete finite source/import profile before adapter use.

The private response owner allocates no shared work during render. Committed outer instances hold separate finite requests, exact expected descriptors and monotone commit floors. One sibling cannot discharge another's request. Each pending request retains its original 15-second deadline; readiness signals do not acknowledge commits. A mounted document refresh owner coalesces a dispatch-before-callback epoch, and generation-fenced request cleanup preserves immediate Strict Mode replay. Request cancellation never authorizes native DOM or CSS retirement. Throwing observers cannot prevent terminal collection. The actual React outer-owner/inner-Suspense wiring, native catalogue classifier and public router refresh are not integrated yet.

Evidence

  • The joined nine-file checkpoint passes 52 direct tests with 527 assertions under Bun 1.3.14.
  • The exact nine-file strict TypeScript check passes, including unchecked-index and exact-optional-property controls.
  • Independent source review completed. Both review repairs, loaded-link final positioning and reversed bootstrap load order, are covered by deterministic controls.
  • The latest snapshot tests pass 21 tests with 321 assertions. The new chained-union control first failed because serialized retained rules were absent from the returned snapshot; the repair preserves those rules and their transitive coverage. That initial failed result is retained.
  • The private CSS helper passes 6 tests with 29 assertions and bounded genuine Node 24 child checks, with exact output/deadline/EOF/terminal-child controls. Its initial direct Bun native resolver abort is retained; Bun is now rejected before entering that native callback. The four changed files pass strict TypeScript, and independent review is complete.
  • The private producer passes 6 tests, 6 Bun expectations and 52 checked genuine Node assertions. Its exact two files pass strict TypeScript and independent review. These use constructed captured snapshots and the real native materializer, not a packed Next build or browser CSS acknowledgement.
  • The private public-hook wiring passes 8 tests with 61 assertions, exact two-file strict TypeScript and independent review. It preserves the complete startup Source, orders BASIC/TRIGGER runtime modules around native JSONP setup, annotates actual HMR JSON, and revalidates terminal CSS/HMR bytes. Missing startup gates, outer export returns, unsupported output profiles, late mutations and empty real entries fail closed. Runtime-only empty startup is preserved. These use public-hook doubles, not emitted native Next evidence.
  • The joined seven-file delayed-SSR checkpoint passes 59 focused tests with 640 Bun expectations and 62 checked genuine Node assertions, exact seven-file strict TypeScript, diff checks and independent review. The late-SSR regression and synthetic early-EOF regression each failed before their repairs; both failed results are retained. The latter control preserves listener progress after a spoof, then requires revision 1 SSR and revision 3 JavaScript coverage at actual EOF. These remain deterministic document doubles and native CSS materialization controls, not emitted Next/browser acceptance.
  • The latest four private marker/response files pass 15 focused tests with 112 assertions, exact four-file strict TypeScript and independent review. Marker tests use actual StyleX output and composed source maps. Response tests use deterministic commit/request doubles and retain explicit sibling, first-mount, deadline, reentrancy, Strict Mode, unknown-acknowledgement and observer-failure controls. The client early-return review finding is fixed without rejecting ordinary nested callback returns. This evidence does not prove the planned React/Suspense or native Flight integration.
  • Earlier frozen scripts-disabled installation, canonical build/type checks and six focused fixture tests with 102 assertions remain historical evidence for their exact earlier inputs. No build, install, browser or complete repository gate ran for this private checkpoint.

Remaining integration and acceptance gates

Implement and enforce the finite React page/client/lazy consumer boundary, old-response rejection/reacquisition, producer-captured markers/catalogue, immutable native CSS asset emission, and actual public Webpack hook wiring. Reject unsupported source/framework composition, returnExportsFromRuntime, unsupported library/output shapes and any startup/export path not covered by the real emitted hook. Keep production adapters and UI runtime separate.

Then adopt the shipped dev-only bridge in the packed fixture, finalize the successor version/generated artifacts, and pass current-tree types/artifact checks, the unchanged packed Edge/no-Edge frame/state/prune/recovery matrix, cancellation during acquisition and connected operation, unchanged production/Vite regressions, the complete repository gate and review/CI. Only then merge and publish an immutable successor. Retain PR58 and prior failures until the replacement is accepted. Production packaging and deployment remain separately governed.

@0thernet

0thernet commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Pushed candidate checkpoint 45728bc. Typecheck, build, exact compiler artifacts (701 canonical rules, 11 build-tool files, six adopter stylesheets) and portfolio inventory pass. Independent native-transport review is clear; focused network/input/restart checks pass 10 tests, 92 assertions. Version 0.5.7 is an untagged candidate, not a published release. The first packed native run stopped before browser acquisition on archive ctime drift with unchanged content and other identity fields; the failed fixture/evidence is preserved. A bounded one-time data-admission repair is in progress, followed by native HMR/cancellation and complete regression gates. Production adapter and prior immutable releases remain unchanged.

@0thernet

0thernet commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Pushed the reviewed compiler/link and native archive repair in a80c6bc with regenerated artifacts. The Atet native renderer diagnosed the React edge failure as a rejected standard Bun isolated installation link, not missing React code. The fix admits only a canonical relative link to an ordinary same-package directory in the root-owned .bun store, binds its identity, and rechecks both graph fences. A path-cancellation near miss found during independent review is rejected. Exact focused evidence: 105 tests, 1,045 assertions, TypeScript and candidate build green. Next native/full/package/CI acceptance and immutable v0.5.7 release remain pending. Prior failed receipts remain failed.

@0thernet

0thernet commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Checkpoint de619ac adds origin-scoped local-network permission, a positively hydrated initial counter/draft state, and bounded HTTP/HMR diagnostics. Typecheck and 14 focused tests (139 assertions) pass. Native validation remains red: first compilation of the second route reloads the first document before any source edit, despite a successful text/x-component response with RSC/router-state/HMR headers. The original epoch, counter, draft and frame-coherence assertions remain strict. The next investigation targets the exact Next router fallback branch; no compiler or transport cause is being inferred from the server-component-reload-page event name. Native resources and scheduler admission were collected. No v0.5.7 tag or release has been published.

@0thernet

0thernet commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Normal current-main join de95322 incorporates released UI 0.5.8 and preserves its exact runtime/CSS/VisuallyHidden bytes; candidate remains 0.5.9. Follow-up 82f3a1a updates the closed six-probe inventory to include the existing cold unvisited-route warm-up. All six focused Next development contract suites passed across bounded runs. Genuine Node 24 browser matrix and complete package gate remain pending; no Next development release has been claimed.

@0thernet

0thernet commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Takeover checkpoint: the finite source-admission profile and private development bridge are now preserved as separate reviewable commits. The bridge checkpoint adds a document-local singleton, captured-native-catalogue/stylesheet readiness wiring, and deterministic document tests (18 pass, 162 assertions on these unchanged inputs). These are not native/HMR acceptance receipts and not a production security boundary. Native delivery, response ordering, and consumer-retirement proof remain open. This work is off the product migration critical path: actual Next products are using the separately supported compiled-preview rebuild, owned restart, and manual-refresh route. PR remains a draft; no merge or release readiness claim.

@0thernet

Copy link
Copy Markdown
Member Author

Current takeover disposition (2026-09-10): this draft remains incomplete at d47a6b9dfbb9b117f6bcf0b440c6d547e9bf41a4, tree f4aead439dac8db173002386d1da0d79b0ee4280. It is not ready to merge or release, and its old version metadata is not publication authority.

Independent read-only comparison against released main 682180c939eefaf76102472f3f93b7c54c73ba6c and immutable UI v0.5.12 confirms that the private development bridge is still distinct and not connected to the public development fixture. The retained native frame-coherence failure remains failed evidence. Deterministic helper tests do not establish real Next/browser acceptance; do not replay this branch wholesale over current production code.

All 25 Next-development/output-settlement paths from PR #58 are represented here (16 unchanged, 9 evolved); PR #58 also retains five unique packed-Bun diagnostic source files that are not recovered here or on main. Preserve that source and its historical evidence rather than labeling the whole older draft landed.

This experiment is explicitly off the current product migration critical path. The approved product workflow uses the released production adapter with a fresh complete generation, an owned server restart and manual refresh, with no HMR or preserved-state claim. Current released Next support remains exact 16.2.12 and explicit 16.3.3; each product still needs its own profile, source census, native comparison and deployment proof. Current compiler adoption also requires freshly compatible package manifests. No source, branch, tag, release or acceptance assertion was changed by this status update.

@0thernet

Copy link
Copy Markdown
Member Author

Current recovery head

The actual pushed head is d47a6b9dfbb9b117f6bcf0b440c6d547e9bf41a4,
tree f4aead439dac8db173002386d1da0d79b0ee4280. The description's initial
ecbbb187 checkpoint is historical, not the current head.

Subsequent checkpoints retain the finite authored-source admission policy and
the private document-local owner installation/bootstrap. Static inspection
still finds no public stylex-build/next-dev-client export or integrated React
consumer boundary. The existing readNextDevBrowserOwner accessor is used only
by deterministic controls, not by the packed application. These are preserved
implementation pieces, not native acceptance.

The production adapter is now independently released in immutable UI 0.5.14.
This branch still needs a reviewed current-main integration, the actual
React/Suspense and Flight response ownership join, native asset/runtime wiring,
and the unchanged packed Edge/no-Edge matrix. Preserve the retained 50-frame
JavaScript/CSS mismatch failure; eventual computed-style settlement does not
close it. Keep the finite Next 16.2.12, Webpack and genuine Node 24
development profile separate from production support.

No source, generated artifact, package export, fixture, or assertion changed in
this clarification. No new test or native success is claimed. This PR remains
draft, and PR 58 remains a preserved recovery boundary rather than a branch to
merge wholesale.

@0thernet

Copy link
Copy Markdown
Member Author

Takeover checkpoint: d741c4a (tree 4c8762d822d6cf52ec28cfa5f8089d3bac357166) is normally pushed. The private browser packaging and seven-file generated artifact join have independent review. The actual minified adapter/loaders/runtime/startup/HMR bytes now pass a genuine-Node constructed-hook probe: 81 internal checks, exact child collection and zero remaining deterministic timers/listeners/observers; focused TypeScript and inventory are green. This is explicitly not native Next or tarball-completeness acceptance. No public client export, version, lock, runtime CSS or production adapter changed. The next in-progress slice connects the existing native fixture to the private document/consumer bridge while retaining every frame/state/failure/restart oracle. PR remains draft until the native and complete final gates pass.

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