feat(v0.44): emit real Source Map v3 mappings with exact line/column provenance (#1210) - #1252
Merged
Merged
Conversation
…provenance (#1210) Alpha.10 truth closure: the compiler emitted a map object with mappings:'' plus x_openElement metadata, and the Vite layer built VLQ mappings by trimmed line-text equality (first match wins, no columns, duplicate lines mis-mapped). - new semantic-core/source-map.ts: base64-VLQ segment builder owned by the bundler-neutral core (ADR-0148), x_openElement demoted to supplementary metadata - compile.ts records per-line emission provenance: verbatim blocks map line/column-exact; synthesized lines map to authored AST node starts; embedded program records map to authored spans - open:core returns the real map object as the single Vite composition input; the inline-comment substitute is stripped at the boundary - consumer-based tests via @jridgewell/trace-mapping (already in deno.lock): every program source record resolves to its authored file/line/column; byte-identical generated handler lines map to distinct authored positions; diagnostics keep authored positions Implemented by fresh kimi-code/k3-256k HIGH session (.agents/v044-kimi-implementer.md), packet A10.2. No frozen paths, no new dependencies, no publish, no tag.
Contributor
|
APIError: Insufficient Balance |
Deploying openelement with
|
| Latest commit: |
5b636f5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c4b5efbe.lessjs.pages.dev |
| Branch Preview URL: | https://v044-a10-2-source-maps.lessjs.pages.dev |
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 #1210 (umbrella #1155, Alpha.10). Two invalid map stories coexisted: an inline map with
mappings: ''+x_openElementmetadata (compile.ts), and a naive VLQ builder using trimmed line-text equality — first match wins, line-granularity only, no columns, duplicate source lines mis-mapped (plugin.ts).Owner
Compiler semantic core owns original spans + generated emission provenance (new
semantic-core/source-map.ts, Vite/Rollup-free per ADR-0148); the Vite shell owns composition (open:corereturns the real map object as the single composition input; inline comment stripped at the boundary — one map story).Before
mappings: ''+ custom metadata; or line-text-equality guessing.After
Real Source Map v3 segments with line/column fidelity derived from ProgramSourceMap records and per-line emission provenance.
x_openElementretained as supplementary metadata only.Why this is not a second semantic owner
One emitter, one composition handoff; the naive second emitter is deleted.
Evidence
compiler-source-map-v3.test.ts: 9 consumer-based tests via@jridgewell/trace-mapping(already in deno.lock — no new dependency). Everyprogram.sourceMap.recordsentry resolves viaoriginalPositionForto its authored file/line/column; the mandatory duplicate-location fixture (two byte-identical generated event-handler lines) maps to two distinct authored positions; diagnostics keep authored positions.CompileElementResult.mapdid not exist (10 type errors); GREEN after.deno task test(1639 + 150, 0 failed).Scope / non-goals
No spec extensions; no snapshot-equality-only evidence; segment granularity is construct-start (not intra-line expression-level for JSON payloads) — recorded as residual.
Risk
Dev/HMR map pipeline output changes shape (real maps now); green e2e/island-delivery suites cover the boundary. Rollback: revert.