refactor(element,tools): B2.13 cleanup — #1273 O1/O2 + dead v0.43 residue audit gate - #1310
Merged
Merged
Conversation
added 3 commits
September 4, 2026 19:43
…e doc (#1273 O1) The module doc documented routes/products/[...slug].tsx as /products/*, but scanRoutes (#556) converts a catch-all segment to the Hono named-regex parameter :slug{.+} matching across '/'. Pinned by __tests__/route-manifest.test.ts ('catch-all [...slug].tsx → /products/:slug{.+}'). Comment only; no behavior change. Refs #1273
…O2, B2.13) Dead-code proof (import graph from every deno.json exports entrypoint + CLI/bin entries, plus repo-wide symbol search incl. tests, www, tools, examples): zero consumers for each removal. All five deleted modules were shipped to npm because every package publishes src/**. Deleted: - src/types.ts (ElementDefinition render()->VNode typing of the removed runtime renderer) - src/internal/protocol/vnode.ts (VNode/ComponentFn/ComponentCtor/RenderFn) - src/internal/protocol/prop.ts (ADR-0052 static prop-decl typing, superseded by compiler __compiledProperties) - src/internal/core/dom-utils.ts (clearChildren, unused since #902-era renderer removal) - src/internal/core/dsd-shadow-root.ts (hasPopulatedShadowRoot, unused) Slimmed: - internal/protocol/render.ts: dropped the legacy DSD-pipeline interfaces (RenderPhase, RenderInput, RenderHooks, DsdOptions, RenderErrorCode, DsdComponentConstructor, DsdComponent) and the VNode import; kept the live RenderError/RenderOutput/HydrationHint/DsdRenderMetrics/ SsrAdmissionDecision contract unchanged (snapshot shapes identical). - internal/protocol/hydration-markers.ts: removed the v0.43 marker constants (DATA_SIGNAL*, DATA_EID, DATA_SSR_PROPS, BRANCH_MARKER_PREFIX, FOR_ITEM_PREFIX, FOR_END_PREFIX) and parseSignalAttrSpec. The compiled model claims through oe:pN program anchors; the marker literals are already forbidden in built artifacts by check-v044-legacy-absence.ts. DATA_OE_LIGHT stays: it is the live ADR-0142 light-mode marker, consumed via literals across the generated-code boundary by design. Public surface: DATA_SSR_PROPS re-export removed from src/index.ts and src/public-runtime.ts. The data-ssr-props channel was already documented as gone (app/preact.ts); the export was classed internal-importable, had no consumer anywhere in the repo, and is deleted rather than deprecated per the B2.13 removal authority. Interface snapshot, package-surface class map and content graph regenerated; the only snapshot delta is the DATA_SSR_PROPS symbol removal. Also fixes the stale reader list in ssr-registry-markers.ts (element's define-element.ts no longer exists; the SSR stub marker is read by app/preact.ts). Refs #1273. Stage #1288 risk #8.
…, B2.13) check-package-artifacts.ts scans the packed npm tarballs (which ship src/**), so it is the cheapest honest place to keep the B2.13 deletions from silently reappearing in a release: - FORBIDDEN_LEGACY_PATHS: the five proven-dead @openelement/element modules removed in the B2.13 audit fail the gate if they ever re-enter the packed artifact. - FORBIDDEN_LEGACY_SOURCE_PATTERNS: the removed marker-hydration channel (DATA_SSR_PROPS export, data-eid/data-signal* attributes, oe-branch:/oe-for-item: comment markers) is rejected in comment-stripped packed sources, extending the check-v044-legacy-absence.ts dist contract to the published src payload. The gate is already wired at ci+release tiers in tools/autoflow/policy.ts (package-artifacts:check) and runs before consumer:packaged. Unit tests cover both rules plus comment/other-package false-positive guards. Refs #1273. Stage #1288 risk #8.
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Issue #1273 records two observations from the v0.44 hostile admission audit
(
docs/evidence/2026-09-03-v044-hostile-admission-audit.md):route-manifest.tsdocumented the catch-all file convention as/products/*while the tested behavior is the Hono named-regex parameter/products/:slug{.+}(route-manifest.test.ts:144).data-signal*,data-eid,oe-branch:,oe-for-item:) and the publicDATA_SSR_PROPSre-export outlive their removed channel — the compiled model claims through
oe:pNprogram anchors, andapp/preact.tsalready documents thedata-ssr-propschannel as gone.Stage risk #8 on #1288 additionally asks: what do the published v0.44 package
artifacts ship that the v0.44 execution/authoring model no longer consumes?
Every package publishes
src/**, so any dead source module goes straight tonpm.
Owner
Single-owner cleanup:
@openelement/elementinternal protocol/core modulesplus one adapter doc comment. No architectural ownership moves.
Before
/products/*(never the tested semantics).DATA_SSR_PROPSpublicly exported from@openelement/elementroot,classed
internal-importable, zero consumers repo-wide.@openelement/elementtarball (see audit table).
artifacts.
After
/products/:slug{.+}semantics.DATA_SSR_PROPSre-export removed; the five dead modules deleted;hydration-markers.tsslimmed to the one live marker (DATA_OE_LIGHT,ADR-0142) with a corrected contract header;
render.tsslimmed to its livetypes (public
RenderOutput/SsrAdmissionDecisionshapes unchanged).check-package-artifacts.ts(already ci+release tier, runs on the packedtarballs) now rejects the deleted paths and the removed marker-channel
strings in packed sources.
Why-not-second-owner
No second implementation or owner exists: the audit's D13 classified the
markers as an observation, not a live duplicate. The compiled Part Program
runtime (
internal/compiled/*) is the single reactive/SSR path; nothing herecreates or moves an owner.
Residue audit (stage #1288 risk #8)
Method: import-graph reachability from every
deno.jsonexportsentrypointand CLI/bin entry of all five published packages, plus repo-wide symbol
search (
rg) overpackages/,www/,tools/,examples/,e2e/including all test dirs; cross-checked against the packed tarball file list
(
pack:dry-run), the public-interface snapshot, and PACKAGE_SURFACE.md.Hits in
e2e/starter-smoke/work/deps/are stale copies of an old publishedpackage, not consumers.
element/src/types.ts(ElementDefinition,render(): VNode)element/src/internal/protocol/vnode.ts(VNode& friends)types.ts(deleted) andrender.ts'sDsdComponent(removed); no other consumerelement/src/internal/protocol/prop.ts(PropDecl*,PropsFrom)__compiledPropertiesmetadataelement/src/internal/core/dom-utils.ts(clearChildren)replaceChildren()directlyelement/src/internal/core/dsd-shadow-root.ts(hasPopulatedShadowRoot)hydration-markers.tslegacy constants +parseSignalAttrSpecdata-eid,data-signal*,oe-branch:,oe-for-item:) are already forbidden in built artifacts bycheck-v044-legacy-absence.ts; claim usesoe:pNanchorsDATA_SSR_PROPSpublic re-export (index.ts,public-runtime.ts)app/preact.ts:14); classedinternal-importable, not stable; snapshot + surface + content-graph regenerated (only delta: this symbol)render.ts:RenderPhase,RenderInput,RenderHooks,DsdOptions,RenderErrorCode,DsdComponentConstructor,DsdComponentrenderDsdcarries its ownRenderDsdOptionsinpublic-runtime.ts; remaining public shapes byte-identical in the snapshothydration-markers.tsDATA_OE_LIGHTssr-registry-markers.ts)element/src/internal/protocol/ssr-registry-markers.tsdefine-element.tsno longer exists)adapter-vite:enhance-client.ts,form-enhance.ts,morph-align.ts,morph-focus-restore.ts,morph-scroll-restore.ts,morph-webkit-fix.ts,island-lifecycle.ts,island-scheduler.tsdev-island-client.ts:69-72andcli/build-client.ts:534-537resolve them by file path viavirtual:open-client-runtime(#868);form-enhance.ts/morph-*are additionally ADR-0122 frozenrender.tslive types (RenderError,RenderOutput,HydrationHint,DsdRenderMetrics,SsrAdmissionDecision)RenderOutput,SsrAdmissionDecision) or imported by the error protocol (RenderError); snapshot-pinnedsrc/**filesAnti-regression gate
tools/check-package-artifacts.ts(runspack:dry-run, then scans theextracted tarballs; gated at ci+release tiers in
tools/autoflow/policy.ts,triggered by any
packages/**change):FORBIDDEN_LEGACY_PATHS— the five deleted modules fail the gate if theyreappear in a packed artifact.
FORBIDDEN_LEGACY_SOURCE_PATTERNS—DATA_SSR_PROPS,data-eid/data-signal*attribute strings andoe-branch:/oe-for-item:commentmarkers are rejected in comment-stripped packed sources, extending the
check-v044-legacy-absence.tsdist contract to the publishedsrc/**payload.
Unit tests cover both rules plus comment/other-package false-positive guards
(
tools/check-package-artifacts.test.ts, 3 new tests).Evidence
All at branch tip on macOS arm64, Deno 2.x:
deno task test→ exit 0 (ok | 1870 passed (105 steps) | 0 failed | 1 ignored; supabase starter suite150 passed | 0 failed)deno task interface:snapshot→ exit 0 (regenerated; sole delta is theDATA_SSR_PROPSsymbol removal)deno task package-surface:check→ exit 0deno task content-graph:check/api-reference:check→ exit 0(byte-identical regeneration)
deno task graph:check/export-files:check→ exit 0deno task freeze:semantics:check→ no frozen path touched by this change(verified against
FROZEN_PATHS; no ADR-0151 citation required)deno task package-artifacts:check(includespack:dry-run, publint,attw) → exit 0 for all 5 packages
deno lint/deno fmt --checkon all touched files → cleanPacked-artifact diff (intentional, recorded):
@openelement/elementtarball loses exactly
src/types.ts,src/internal/protocol/vnode.ts,src/internal/protocol/prop.ts,src/internal/core/dom-utils.ts,src/internal/core/dsd-shadow-root.ts;src/internal/protocol/render.ts,src/internal/protocol/hydration-markers.ts,src/index.ts,src/public-runtime.tsshrink. Verified viatar -tzfon the dry-runtarball (118 entries; none of the deleted paths present). Other four
packages: no content change (adapter-vite ships the corrected comment only).
Scope
In: #1273 O1/O2, B2.13 residue audit + gate. Out: no compiler/Part
Program/runtime/public-architecture redesign; no ADR-0122 frozen path
touched; adapter browser runtimes and charter modules kept with documented
proof.
Risk
Low. Every deletion is backed by zero-consumer proof across the repo and the
packed artifact; the public-surface delta is one
internal-importablesymbolwhose channel is already documented as removed. External deep imports of
deleted modules are not part of the supported surface (not in any exports
map). If a downstream pin relied on
DATA_SSR_PROPS, the constant's valuewas the string
'data-ssr-props'from a channel that no runtime reads.Closes #1273. Stage #1288 risk #8.