Skip to content

fix(v0.44): preserve canonical Part paths through nested when/each claim (#1212) - #1255

Merged
SisyphusZheng merged 1 commit into
devfrom
v044/a10.4-nested-claim-paths
Sep 2, 2026
Merged

fix(v0.44): preserve canonical Part paths through nested when/each claim (#1212)#1255
SisyphusZheng merged 1 commit into
devfrom
v044/a10.4-nested-claim-paths

Conversation

@SisyphusZheng

Copy link
Copy Markdown
Member

Problem

Issue #1212 (umbrella #1155, Alpha.10). The conformance fixtures mandated by the issue exposed REAL drift, correcting the earlier audit note that had read M2 as impossible: the canonical claim executor (post-A10.3) and the SSR serializer reset the program path to [] when recursing into Region content, so Region-relative position 0 collided with template-level sink path [0].

Before (RED, proven at base SHA ec0ef89)

  • serializeProgramContent emitted <span title="static-on" title="DYN"> — a when-branch element received the sibling signal's value; serializeToHtml/fresh emitted the correct static-only form → SSR/fresh NOT observationally equivalent.
  • Claim silently ACCEPTED tampered static attributes inside when branches and each items (false-negative drift detection).

After (GREEN)

Recursion carries the anchor's canonical path (validator-proven incapable of hosting fixed-Part targets — program.ts:629-645,673-688,1035-1038 invariant re-verified and now locked by tests). One code path in the canonical executor/serializer; no grammar/validator change; no second claim path.

Evidence

8 new conformance tests (nested-region-part-paths.test.ts), each proving the full chain serialize → browser DOM → claim → exact Part/Region identity → update mutates the exact sink with node identity: when/each/dynamic-attr/deeper combinations + fail-closed validator locks at all four entry points (both serializers, fresh, claim). RED 4/8 at base SHA → GREEN 8/8. Element suite 240 passed; adapter suite 739 passed; full deno task test exit 0; all static gates green.

Risk

SSR payload bytes change for the previously-broken case only (duplicate attribute removed) — that output was wrong. Rollback: revert.

Implemented by fresh kimi-code/k3-256k HIGH implementer session; orchestrator re-ran the conformance suite independently (8/8).

…aim (#1212)

Alpha.10 truth closure: the new conformance fixtures exposed REAL drift
(the earlier audit read of M2 as impossible was wrong): the canonical
claim executor and the SSR serializer reset the program path to [] when
recursing into Region content, so a Region-relative position collided
with a template-level sink path — the when-branch serializer emitted the
sibling sink's dynamic value onto static content (SSR/fresh not
observationally equivalent), and claim silently accepted tampered static
attributes inside Region subtrees.

- claim recursion (when branch, each item) and the SSR serializer now
  carry the anchor's canonical path, which the validator guarantees can
  never host a fixed-Part target — one code path, no grammar change
- 8 conformance tests prove serialize → claim → exact identity →
  exact-sink update across when/each/nested combinations, plus
  fail-closed validator locks at all four entry points

Implemented by fresh kimi-code/k3-256k HIGH session
(.agents/v044-kimi-implementer.md), packet A10.4. 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

Copy link
Copy Markdown

Deploying openelement with  Cloudflare Pages  Cloudflare Pages

Latest commit: b4250eb
Status: ✅  Deploy successful!
Preview URL: https://0d194e28.lessjs.pages.dev
Branch Preview URL: https://v044-a10-4-nested-claim-path.lessjs.pages.dev

View logs

@SisyphusZheng
SisyphusZheng merged commit 1c4e74a into dev Sep 2, 2026
9 checks passed
@SisyphusZheng
SisyphusZheng deleted the v044/a10.4-nested-claim-paths branch September 3, 2026 09:50
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