|
| 1 | +# ADR-0152: Three products, owned routing core and public 1.0 Alpha |
| 2 | + |
| 3 | +- Status: ACCEPTED (2026-09-07, explicit maintainer direction) |
| 4 | +- Supersedes: ADR-0151's future release topology; upstream-only URLPatternList |
| 5 | + policy in #1324; cleanup-only-at-Beta.2.3 sequencing; previous file-only Router |
| 6 | + proposal. Historical release evidence remains unchanged. |
| 7 | +- Preserves: ADR-0148 compiler/Vite boundary, exact-SHA release evidence, |
| 8 | + protected promotion and release GO requirements, human RC/Stable authority. |
| 9 | +- Tracking: [#1341](https://github.com/open-element/openelement/issues/1341). |
| 10 | + |
| 11 | +## Context |
| 12 | + |
| 13 | +Current package/tool boundaries obscure product responsibilities. Repeated route, |
| 14 | +request, document and governance owners increase maintenance work. The maintainer |
| 15 | +approved a three-working-day convergence target using existing implementations, |
| 16 | +with continuous deletion and a real application slice before public Alpha admission. |
| 17 | +This is a timebox target, not proof that implementation or publication is complete. |
| 18 | + |
| 19 | +## Decision |
| 20 | + |
| 21 | +### Products and dependencies |
| 22 | + |
| 23 | +The products are Element, UI and Router. Element owns compiled Web Components |
| 24 | +execution, serialization and DOM claim/update. UI is a selected component library |
| 25 | +built on Element, independent of Router. Router has two modes: |
| 26 | + |
| 27 | +- Route Mode consumes explicit records; its matching core is independent of |
| 28 | + Element, Hono, Vite and filesystem access. |
| 29 | +- Framework Mode defaults to file routing and adds page data, forms, Document, |
| 30 | + Element rendering, navigation, SSR/SSG and official Vite integration. UI is optional. |
| 31 | + |
| 32 | +Explicit and generated records converge on one RouteTable/RouteResolution. |
| 33 | +File paths own generated route paths; no duplicate `route.path` declaration. |
| 34 | +Composition declares mount boundaries, deterministic order and collision behavior. |
| 35 | +Explicit order is preserved; file generation owns its documented ordering policy. |
| 36 | +A selected URL record owns its method map: unsupported methods return 405 rather |
| 37 | +than falling through to a different URL pattern. Query parameters and path captures |
| 38 | +stay separate. Public browser projections exclude server handlers and host bindings. |
| 39 | + |
| 40 | +Products are not package counts. Existing `app`, `adapter-vite` and `create` remain |
| 41 | +implementation/distribution/tooling surfaces until a justified migration changes |
| 42 | +exports. No mandatory package renaming or new broad UI design system is implied. |
| 43 | + |
| 44 | +### URLPatternList is an owned core asset |
| 45 | + |
| 46 | +Start from Justin Fagnani's `url-pattern-list` v0.5.0, source commit |
| 47 | +`4911e649cc11860c7da90c9d0d9b05626c5cbb83`, with verified MIT attribution and a |
| 48 | +compact provenance/divergence record. Own list indexing, ordered traversal, |
| 49 | +differential tests and measured performance. Luca Casonato's proposals inform |
| 50 | +structured matching and conservative fallback; they are not merged production |
| 51 | +Deno implementations to transplant. |
| 52 | + |
| 53 | +URLPattern remains the platform/polyfill single-pattern grammar and capture |
| 54 | +owner. Candidate pruning must not discard a valid earlier match; final `exec` |
| 55 | +cannot recover a candidate already discarded by an incorrect index. Unproven |
| 56 | +optimizations use a conservative candidate path merged in the same sequence order. |
| 57 | +The linear reference oracle belongs in tests. No global API injection, claimed |
| 58 | +standard polyfill, public tree/parser contract, or full replacement URLPattern |
| 59 | +engine. Initial route tables may be rebuilt and atomically replaced; complex |
| 60 | +incremental mutation and speculative native/WASM optimization are deferred. |
| 61 | + |
| 62 | +References: [Justin's source](https://github.com/justinfagnani/url-pattern-list), |
| 63 | +[Luca's proposal](https://github.com/whatwg/urlpattern/pull/166), |
| 64 | +[Deno experiment](https://github.com/denoland/deno/pull/14502). |
| 65 | + |
| 66 | +### Framework responsibility |
| 67 | + |
| 68 | +Hono owns HTTP Context/middleware/Response integration without a second page |
| 69 | +winner. Useful page-data/form abstractions share one request lifecycle; preserve |
| 70 | +validation errors, status, redirects and serialization boundaries. Document owns |
| 71 | +resolved page meaning; Element serializes it. Layouts compose presentation without |
| 72 | +a second data scheduler. Vite owns the official build/development integration. |
| 73 | + |
| 74 | +SSG may read external build-time data; personalized results must not become public |
| 75 | +static output. Sitemap/search use eligible public route identity/catalog data, |
| 76 | +not an enumeration of private request-specific Documents. Navigation coordinates |
| 77 | +abort, stale results, history and required browser fallbacks. |
| 78 | + |
| 79 | +### Continuous reduction |
| 80 | + |
| 81 | +Every replacement retires its displaced implementation, callers, compatibility |
| 82 | +layers, duplicated facts and obsolete checks/docs in the same verified change. |
| 83 | +Cleanup begins in Beta.2.1, continues in Beta.2.2 and closes in Beta.2.3. Measure |
| 84 | +owners, execution hops, custom scripts/tasks/checkers and retained obligations; |
| 85 | +line deletion is not a quota. Preserve required behavior with regression evidence, |
| 86 | +not permanent duplicate paths. Git is the default operational-history archive. |
| 87 | + |
| 88 | +The obsolete `check-v044-orchestration` script/test/task is retired with this |
| 89 | +planning change: it pins current documents to completed Alpha workspace IDs and |
| 90 | +withdrawn Beta scheduling. Current workflow, version/release truth and exact-SHA |
| 91 | +release gates remain; no replacement historical-topology checker is introduced. |
| 92 | + |
| 93 | +### Release topology and timebox |
| 94 | + |
| 95 | +```text |
| 96 | +published v0.44.0-beta.2 |
| 97 | + -> beta.2.1 Router/core + continuous cleanup |
| 98 | + -> beta.2.2 Framework/Document + continuous cleanup |
| 99 | + -> beta.2.3 cleanup closure + application admission |
| 100 | + -> public v1.0.0-alpha.1 and subsequent Alpha iterations |
| 101 | + -> evidence-gated v1.0.0-rc.1 |
| 102 | + -> separately admitted Stable |
| 103 | +``` |
| 104 | + |
| 105 | +The former Beta.3 lane becomes 1.0 Alpha; its unfinished work remains tracked. |
| 106 | +Historic v0.44 alpha workspace IDs remain internal/unpublished. Public 1.0 Alpha |
| 107 | +uses npm `alpha`; npm `latest` stays on the last admitted stable release. |
| 108 | + |
| 109 | +Target three working days from implementation start: Day 1 core plus a minimal |
| 110 | +Cloudflare/Vite spike, Day 2 representative Framework flow, Day 3 remaining cleanup |
| 111 | +and admission evidence. Intermediate public Beta checkpoints retain release gates; |
| 112 | +development may proceed on an accepted contract without waiting for publication. |
| 113 | +No automatic deadline waiver or Beta.2.4. A preview may enter real application work |
| 114 | +while release blockers remain explicitly open; it is not a completed Beta release. |
| 115 | + |
| 116 | +## Acceptance and consequences |
| 117 | + |
| 118 | +[#1340](https://github.com/open-element/openelement/issues/1340) owns Alpha admission: |
| 119 | +matching/HTTP correctness, a packed real-app flow, SSR/SSG/claim/navigation/forms, |
| 120 | +server/client separation, required runtime/browser coverage, cleanup and exact |
| 121 | +candidate release evidence. Cloudflare is the first integration target; Node and |
| 122 | +Deno retain full qualification in their agreed contract, Bun/Nitro their smoke |
| 123 | +scope, Chromium/Firefox/WebKit their required browser coverage. Missing evidence |
| 124 | +is never a pass. Broader benchmarks, prolonged application qualification and UI |
| 125 | +expansion do not block entry unless they expose a core correctness failure. |
| 126 | + |
| 127 | +Release automation must implement the new successor/channel distinction (#1323, |
| 128 | +#1334) before publication. This ADR and its documentation PR do not change package |
| 129 | +versions, publish artifacts, grant Stable readiness, or claim runtime migration |
| 130 | +has already happened. Planning may change now while code still implements the |
| 131 | +published baseline; outstanding implementation is visible in the issue graph. |
0 commit comments