Skip to content

fix(v0.44): small correctness sweep for Beta admission (#1220) - #1258

Merged
SisyphusZheng merged 2 commits into
devfrom
v044/a10.12-correctness-sweep
Sep 2, 2026
Merged

fix(v0.44): small correctness sweep for Beta admission (#1220)#1258
SisyphusZheng merged 2 commits into
devfrom
v044/a10.12-correctness-sweep

Conversation

@SisyphusZheng

Copy link
Copy Markdown
Member

Problem

Issue #1220 (umbrella #1155, Alpha.10): low-cost high-certainty defects confirmed at baseline — M4 (6 independent VOID_TAGS definitions, drifting: 2 included 'param', 4 didn't), M8 (start.ts async request callback without try/catch → unhandledRejection crash), M13 (hand-built file:// URL breaks on spaces/#), L1 (runtime vs server attribute escaping byte-divergent), M3 (latent triplicated when-operator), version-truth files partially unanchored.

Amendment authority

ADR-0151 — touches ADR-0122 §4 frozen path packages/adapter-vite/src/cli/start.ts.

Owner

VOID_TAGS canonical home: element/src/internal/core/html-escape.ts (documented byte-mirrors only where an import edge is architecturally forbidden — sanitize.ts per ADR-0126, the two program.ts exchange artifacts per ADR-0148 — pinned by a byte-identity guard test). Escape contract: one canonical implementation shared by both serializers. No second semantics created anywhere.

Evidence

  • RED at base SHA: serializers byte-diverged (…c<d>e'f vs …c&lt;d&gt;e&#39;f); old file-URL concat failed Module not found on a spaced/# path; start.ts had no containment seam (TS2305 on the new hostile tests); unhandledRejection crash demonstrated on the old pattern.
  • GREEN: 12 new hostile/guard tests (escape parity byte-identity, VOID_TAGS mirror identity, 500 containment incl. zero unhandledRejection, pathToFileURL hostile paths, when-operator closure, version anchors).
  • Suites: element+adapter 994 passed / 0 failed; full deno task test exit 0; fmt/lint/typecheck/arch/freeze-semantics/docs:truth/package-surface/interface:snapshot all exit 0 (snapshot unchanged).
  • Fresh kimi-code/k3-256k HIGH implementer session; orchestrator re-ran the 12 new tests independently.

Scope / non-goals

No general cleanup; runtime.ts edits are import-swap only (claim engine untouched); sanitize escapeAttr twin untouched (documented intentional).

Risk

'param' convergence makes validators/compiler fail closed on <param> with children (spec-correct tightening); SSR attribute bytes change only where they were previously wrong. Rollback: revert.

Alpha.10 truth closure. Amendment authority: ADR-0151 (touches ADR-0122
§4 frozen path packages/adapter-vite/src/cli/start.ts).

- M4 VOID_TAGS: one canonical definition (html-escape.ts, full HTML
  Standard list incl. 'param'); server/runtime import it; the sanitize
  twin and the two program.ts exchange artifacts stay documented
  byte-mirrors pinned by a guard test
- L1 escapeAttr: runtime and server serializers converge on the single
  canonical escape (previously byte-divergent DSD attribute output)
- M8: start.ts request callback delegates to a contained handler in
  internal/static-serve.ts — sync throw / rejection / write failure
  become a contained 500 instead of an unhandledRejection crash
- M13: build-ssg uses pathToFileURL (spaces/#/?/non-ASCII paths import
  correctly; hostile test proves the old concat failed)
- M3: guard test pins both when-operator evaluation sites and both
  validators to the closed 'greater-than' operator set (no claim edits)
- version anchors: create/src/version.ts and www/app/data/version.ts are
  now value-anchored (3 new anchors; fixtures updated)

Implemented by fresh kimi-code/k3-256k HIGH session
(.agents/v044-kimi-implementer.md), packet A10.12. Public interface
snapshot unchanged. No publish, no tag.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploying openelement with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2a48010
Status: ✅  Deploy successful!
Preview URL: https://82f87c00.lessjs.pages.dev
Branch Preview URL: https://v044-a10-12-correctness-swee.lessjs.pages.dev

View logs

Type the dispatch seam as StartRequestHandlerOptions['dispatch'] instead
of an unsafe cast (type-safety:check gate).
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

@SisyphusZheng
SisyphusZheng merged commit 493548a into dev Sep 2, 2026
9 checks passed
@SisyphusZheng
SisyphusZheng deleted the v044/a10.12-correctness-sweep branch September 3, 2026 09:49
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