Skip to content

fix(spec): the script.config.template tombstone points at the notify node's own template key - #25085

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-24965-script-template-tombstone
Oct 21, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-24965-script-template-tombstone

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Closes #24965

Clause-②: no (prose only: no shape, key, default or accepted value moves)

What changed

The script.config.template tombstone in packages/spec/src/automation/schemaless-node-config.zod.ts told authors that "stored templates live in the messaging service (sys_notification_template), not on the node". That text predates the notify node's own template key. This is the spec-lane half of execution card ② of ruling D on #24770 (decision 6290342354, recorded by triage in 6293376907). The services half is #24924.

The prescription now reads:

Delete the key. For templated content use a notify node and name an email template (email_template) in its own template key, with templateData filling its placeholders: the email and in-app inbox channels render that template in each recipient's locale. Otherwise the node carries inline title/message. The messaging service's sys_notification_template rows are read only by the email and sms channels, email only when the node names no template.

The retiredKey() call, the key's rejection and every other tombstone are unchanged. The generated reference content/docs/references/automation/schemaless-node-config.mdx was regenerated with gen:docs and carries the same text. No test pins the old wording (git grep "stored templates live" on the base finds only the source and the generated page).

Claims verified against the runtime (origin/main 2b1382a5b3)

Claim in the new text Evidence
notify has its own template key naming an email_template, and templateData fills its placeholders packages/spec/src/automation/io-node-config.zod.ts:585 (template, described as an email_template item's name), :593 (templateData); email_template is a metadata type at packages/spec/src/kernel/metadata-plugin.zod.ts:162
The executor forwards the template reference, not inline content, when one is named packages/services/service-automation/src/builtin/notify-node.ts:465 reads cfg.template; :614-616 puts { template, templateData } in the payload, else { title, body }
The email channel renders the named template per recipient locale and does not read sys_notification_template then packages/services/service-messaging/src/email-channel.ts:330-333 takes payload.template, :345 calls email.sendTemplate, and that branch returns before :378, the only store.load(…, 'email', …)
The inbox channel renders the named template per recipient locale packages/services/service-messaging/src/inbox-channel.ts:163-166 takes payload.template, :182 resolves the recipient locale, :188 calls email.renderTemplate
The inbox never reads sys_notification_template packages/services/service-messaging/src/messaging-service-plugin.ts:285 builds the inbox channel with no store; only the email (:398) and sms (:417) channels get templateStore
sms reads sys_notification_template whether or not a template is named packages/services/service-messaging/src/sms-channel.ts:285 calls store.load(topic, 'sms', …) unconditionally; the file reads no payload.template
Without a template, the node carries inline title/message notify-node.ts:508 (title required when no template), io-node-config.zod.ts:559/:562

The services side states the same reader set: packages/services/service-messaging/src/objects/notification-template.object.ts:6-27 (TEMPLATE_CHANNELS = ['email', 'sms']).

One deviation from the dispatch wording. The dispatch said a named template "is used on every channel". The runtime shows otherwise for sms: it has no template path and reads sys_notification_template (falling back to the topic) even when the node names an email template. So the text names email and inbox as the channels that render the named template. It says sys_notification_template is read by email only when no template is named, and it does not say the same of sms.

Verification (head 2318cdd237)

  • pnpm --filter @objectstack/spec build: VERDICT command-exit 0.
  • pnpm --filter @objectstack/spec check:generated: before gen:docs, ✗ 1 of 14 artifact(s) stale: content/docs/references/**. After it: ✓ All 14 generated artifacts are up to date.
  • pnpm --filter @objectstack/spec test: Test Files 705 passed (705), Tests 21424 passed | 1 todo.
  • pnpm --filter @objectstack/spec typecheck: exit 0.
  • pnpm --filter @objectstack/spec test:repo: Test Files 72 passed (72), Tests 1237 passed (1237).
  • node scripts/pm/dispatch-gates.mjs --commands derived 105 commands: 104 exit 0 (six of them after building the @objectstack/lint closure, @objectstack/client and @objectstack/client-react, which they read as built output). check:dual-build-cjs-loads is NOT MEASURED: it exited 3 (PREREQUISITE NOT MET) because it reads every workspace package's dist/, which needs a whole-workspace build. CI runs it. dispatch-gates --ran: 105 derived famil(ies) accounted for — 104 run, 1 NOT-MEASURED.

Acceptance notes

  • Changeset .changeset/24965-script-template-tombstone.md: @objectstack/spec patch, because the tombstone text ships in the published runtime's rejection message. Not breaking, so it has no ADR-0087 marker.
  • No open PR touched schemaless-node-config.zod.ts when this was opened (all 14 open PRs' file lists were read).

Generated by Claude Code

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 144 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json a39389eb51738cc91fa450a1f3035d221ec65642 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 0a8549c523031e70eed5dc4ae335ee3ef60f409b — the merge of head 2318cdd2373e4c1404b2bade24fc928aff576af1 into base a39389eb51738cc91fa450a1f3035d221ec65642, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0a8549c523031e70eed5dc4ae335ee3ef60f409b && git checkout 0a8549c523031e70eed5dc4ae335ee3ef60f409b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a39389eb51738cc91fa450a1f3035d221ec65642 2318cdd2373e4c1404b2bade24fc928aff576af1 && git checkout -B drift-repro a39389eb51738cc91fa450a1f3035d221ec65642 && git merge --no-ff 2318cdd2373e4c1404b2bade24fc928aff576af1

node scripts/docs-audit/affected-docs.mjs --json a39389eb51738cc91fa450a1f3035d221ec65642

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 2318cdd2373e4c1404b2bade24fc928aff576af1
Local-runs: none
Scope: packages/spec/src/automation/schemaless-node-config.zod.ts, content/docs/references/automation/schemaless-node-config.mdx + .changeset/24965-script-template-tombstone.md

① Derived judgments

  • Prose only. The diff changes only the guidance string inside the existing retiredKey(...) call (schemaless-node-config.zod.ts:353-363). retiredKey() (shared/retired-key.ts) is unchanged, so the key is refused exactly as before. No test pins the text.
  • The notify node:
    • template names an email_template (io-node-config.zod.ts:585), and templateData fills its placeholders (:593).
    • The executor forwards { template, templateData } (notify-node.ts:465, :614-616).
  • Channels that render a named template, in each recipient's locale:
    • email: email-channel.ts:329-345, returning before its only store read at :378;
    • inbox: inbox-channel.ts:162-188; inbox has no store at all.
  • SMS reads sys_notification_template unconditionally (sms-channel.ts:285) and never reads payload.template.
  • Every claim in the new text checks out on origin/main. The dev's departure from the dispatch wording ("used on every channel") is correct, and it matches the reader set the merged services half (service-messaging: sys_notification_template takes only the channels that read it (email, sms), by the maintainer's ruling D on #24770 #24924) records at notification-template.object.ts:6-27.
  • Nit, not acted on: "read only by the email and sms channels" leaves out plugin-auth's OTP / invitation SMS reads of channel: 'sms' rows. That is acceptable in a notify-node tombstone.
  • Generated docs: the regenerated mdx row is byte-equal to '[REMOVED] ' + guidance.

② Semver level

@objectstack/spec patch: the corrected error string ships in the published runtime, and nothing an author can write changes. Clause-②: no (prose only …) matches the claim. No ADR-0087 marker is owed.

③ Boundary flags

No governed surface is touched, and content/docs/releases/ is untouched. The decision record 6290342354 on #24770 says every channel skips the template rows when a template is named, but SMS does not. The seat posts a factual note on #24770 and leaves the ruling as it is. check:dual-build-cjs-loads was not measured locally and is left to CI; a string-only change cannot affect it.

Implemented-by: claude/issue-24965-script-template-tombstone
Reviewed-by: session_01D6F9axfoPzR7t8G1J7Ytzz

VERDICT: PASS

Seat re-read of the check-runs at landing: all 42 runs on 2318cdd237 have completed: 36 succeeded, the rest were skipped, and none is red.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 21, 2026 09:07
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 1862d8d Oct 21, 2026
43 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-24965-script-template-tombstone branch October 21, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec: the script.config.template tombstone points authors at sys_notification_template, which notify's own template key superseded (ruling D on #24770)

2 participants