Skip to content

fix: document safe template default editing - #3485

Merged
jrusso1020 merged 2 commits into
mainfrom
fix/template-editor-safe-defaults
Aug 25, 2026
Merged

fix: document safe template default editing#3485
jrusso1020 merged 2 commits into
mainfrom
fix/template-editor-safe-defaults

Conversation

@jrusso1020

Copy link
Copy Markdown
Collaborator

Summary

  • document the parser-backed safe default-editing workflow in all eight promoted TEMPLATE.md contracts
  • prohibit direct rewrites of entity-encoded composition-variable declarations
  • enforce the safe mechanics contract in the promoted-template registry test

Testing

  • pnpm --filter @hyperframes/cli exec vitest run src/registry/registryBlocks.test.ts (3 passed)
  • repository pre-commit lint, format, typecheck, artifact and fallow checks passed

E2E

This SHA will be published immutably and exercised against the local dev template-editor runtime before the internal gallery pin is merged.

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The promoted contracts now make the safe mutation path explicit and test-visible.

  • registryBlocks.test.ts:62-69 positively pins the safe-editing section, the exact set_template_variable_defaults tool name, and the HTML-entity-encoded JSON warning for every promoted template.
  • Each of the eight TEMPLATE.md files instructs one parser-backed default update, forbids direct index.html / declaration / baseline edits, and requires validation afterward; image-bearing contracts additionally require image-tool tokens.
  • The change is documentation/test-only and does not alter composition bytes or the live gallery.

Fresh CI was still running at review time. Immutable publication of this exact commit and the downstream dev E2E remain separate landing gates. No merge action.

Verdict: APPROVE
Reasoning: all promoted contracts now direct the model to the deterministic mutation boundary and the registry test prevents that load-bearing guidance from disappearing. — Magi

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-head re-review at 3cacac5b.

The new delta fixes the source of the validation workaround: readJsonAttr now delegates to the parser-backed, browser-equivalent readDecodedAttr, so entity-encoded JSON attributes are decoded exactly as getAttribute() exposes them. composition.test.ts pins a quoted/entity-encoded declaration and all current OSS checks are green. The eight safe-editing contracts from the previously approved head are unchanged.

Immutable publication of this exact head plus package/preview/poster smoke remains the downstream gate. No merge action.

Verdict: APPROVE
Reasoning: the linter now parses entity-encoded declaration JSON with browser-equivalent semantics, and the current head is fully green without changing template runtime bytes. — Magi

@jrusso1020
jrusso1020 merged commit 6eaa2cb into main Aug 25, 2026
49 checks passed
@jrusso1020
jrusso1020 deleted the fix/template-editor-safe-defaults branch August 25, 2026 09:14
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.

2 participants