refactor(v0.44): converge existing-DOM claim to one canonical execution path (#1211) - #1253
Merged
Merged
Conversation
…on path (#1211) Alpha.10 truth closure (H1): two claim engines existed — runtime.ts (production) and claim/index.ts (dead in production but owning the pre-upgrade helpers the facade imports), with duplicate claimExistingDom/PartProgramClaimError definitions. Behavior audit decided the canonical engine: runtime.ts stays canonical (zero-allocation claim, shared Region update machinery, ResourceScope disposal, serializer/fresh parity); from the deleted duplicate it absorbs the behaviors the production engine lacked: full staged plan→attach validation, bounded owning recovery (region-range or root, exactly one attempt), ClaimOwner ownership diagnostics (3-arg PartProgramClaimError), pre-upgrade capture/replay helpers (now in the canonical claim home), missing-attribute drift check, own-field each-item validation, and the detached-anchor update guard. - claim/index.ts deleted (1441 lines); no backup implementation - single-owner mechanical test pins one executor / one error class - kernel already used runtime.ts; facade import updated only - public interface snapshot unchanged (internal modules only) Implemented by fresh kimi-code/k3-256k HIGH session (.agents/v044-kimi-implementer.md), packet A10.3. No frozen paths, no publish, no tag.
Contributor
|
APIError: Insufficient Balance |
This was referenced Sep 2, 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 #1211 (umbrella #1155, Alpha.10, audit H1). Two claim engines with duplicate
claimExistingDom/PartProgramClaimErrorsemantics: engine A inruntime.ts(production, used by the Kernel) and engine B inclaim/index.ts(dead in production, but owning the pre-upgrade capture/replay helpers the facade imports). Forbidden multi-semantics (constitution 4.2).Owner
Canonical claim executor:
packages/element/src/internal/compiled/runtime.ts. The Kernel already used it; the semantic duplicate is deleted (1441 lines), no backup retained. This PR REMOVES a semantic authority and ports required behaviors into the canonical one.Before → After (behavior audit, full table in the commit/PR discussion)
Evidence
single-owner.test.tsfound 2 executors / 2 error classes; repointing the existing 16-test claim suite at engine A failed 8 tests (missing staging/recovery/owner diagnostics/pre-upgrade helpers).deno task testexit 0; fmt/lint/typecheck/arch/freeze-semantics/package-surface/interface:snapshot all exit 0; public snapshot unchanged.Scope / non-goals
Facade lifecycle/mode truth (willClaim) is A10.5's scope — the helpers now sit in the canonical home ready for it; kernel claim-option wiring likewise. No adapter-vite changes.
Risk
Claim error constructor contract unified to 3-arg (internal type; snapshot unchanged). Duplicate-key error message unified to engine B's wording. Rollback: revert.