Symptom
PUT /api/v1/meta/email_template/:name returns 200 and logs [Registry] Registered email_template, but the row never reaches sys_email_template. Neither of the subscription's own log lines fires — 0 occurrences of "materialized from a runtime write", 0 of "runtime email-template sync failed" — even though the boot line "subscribed to email_template metadata changes" is present. Decisive control: restarting on the same DB materializes it immediately ({seeded:1, skipped:1}), so the bridge itself works and only the live event path is dead.
Root cause
Not fully located by the run. The callback registered at packages/plugins/plugin-email/src/email-plugin.ts (~line 968) via metadataService.subscribe('email_template', ...) never runs on the PUT /meta path, so the upsertDeclaredEmailTemplate write inside it — and its two log lines (~lines 983/986) — never execute. The subscription registers without error (its boot log at ~line 991 prints), so the gap is upstream of the callback: the metadata service does not deliver an added/changed event for the email_template namespace on the runtime-write path that the plugin's own comment names ("Studio saves / PUT /meta land as added/changed events"). The declared-bootstrap and restart paths handle the item fine.
Stale-premise check: email-plugin.ts has zero diff between the 92f26f75 pin and origin/main — not fixed upstream.
Reproduction
- Boot with plugin-email; confirm "subscribed to email_template metadata changes" in the log.
PUT /api/v1/meta/email_template/:name with a valid template body; observe 200 and [Registry] Registered email_template.- Query
sys_email_template for the name.
Expected: the row is materialized and a "materialized from a runtime write" line is logged. Actual: no row, neither callback log line fires; a restart on the same DB then materializes it.
Source
Extracted from the QA run #7690 (framework 92f26f7, console 09987b680).
Symptom
PUT /api/v1/meta/email_template/:namereturns 200 and logs[Registry] Registered email_template, but the row never reachessys_email_template. Neither of the subscription's own log lines fires — 0 occurrences of "materialized from a runtime write", 0 of "runtime email-template sync failed" — even though the boot line "subscribed to email_template metadata changes" is present. Decisive control: restarting on the same DB materializes it immediately ({seeded:1, skipped:1}), so the bridge itself works and only the live event path is dead.Root cause
Not fully located by the run. The callback registered at
packages/plugins/plugin-email/src/email-plugin.ts(~line 968) viametadataService.subscribe('email_template', ...)never runs on the PUT /meta path, so theupsertDeclaredEmailTemplatewrite inside it — and its two log lines (~lines 983/986) — never execute. The subscription registers without error (its boot log at ~line 991 prints), so the gap is upstream of the callback: the metadata service does not deliver anadded/changedevent for theemail_templatenamespace on the runtime-write path that the plugin's own comment names ("Studio saves / PUT /meta land as added/changed events"). The declared-bootstrap and restart paths handle the item fine.Stale-premise check:
email-plugin.tshas zero diff between the92f26f75pin andorigin/main— not fixed upstream.Reproduction
PUT /api/v1/meta/email_template/:namewith a valid template body; observe 200 and[Registry] Registered email_template.sys_email_templatefor the name.Expected: the row is materialized and a "materialized from a runtime write" line is logged. Actual: no row, neither callback log line fires; a restart on the same DB then materializes it.
Source
Extracted from the QA run #7690 (framework 92f26f7, console 09987b680).