fix(studio): filter runtime-generated nodes from resolver-shadow telemetry (#1795)

The sdk_resolver_shadow tripwire flagged element_not_found for nodes a
composition <script> creates at runtime (caption word/group spans, etc.).
These have no static data-hf-id, so the SDK session (a static parse) cannot
model them by design; the divergence is noise, not a resolver bug.

- Runtime-node filter: suppress element_not_found when the resolved hf-id is
  absent from the on-disk source. An id PRESENT in source but missing from the
  session stays flagged (the genuine v0.6.110-class resolver divergence).
- Add sessionElementCount to all element_not_found / animation_not_found emits
  (0 = empty/broken session, >0 = element-specific).
- Add sourceHfIdCount to emitted element_not_found: =1 = static node the parse
  dropped (foreign-content exclusion / sub-comp gap), >1 = duplicate-id
  resolver ambiguity.

Scoped to the DOM-edit path. Telemetry-only; no disk writes, no edit change.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-06-30 00:16:20 -07:00
committed by GitHub
co-authored by Claude Opus 4.8
parent f24a1a9ce7
commit a4eacaec37
3 changed files with 85 additions and 3 deletions
@@ -260,7 +260,9 @@ export function useDomEditSession({
onTrySdkPersist: sdkSession
? (selection, operations, originalContent, targetPath, options) => {
// Resolver shadow runs regardless of the cutover flag — decoupled tripwire.
runResolverShadow(sdkSession, selection.hfId, operations);
// Pass originalContent so the runtime-node filter can suppress hf-ids
// absent from source (script-created nodes the SDK can't model).
runResolverShadow(sdkSession, selection.hfId, operations, originalContent);
return sdkCutoverPersist(
selection,
operations,