Repository navigation
Commit c893b3d
docs(spec): state the notify click-through default in the sourceObject / sourceId / actionUrl describes (#30742)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuKB8Sg6c6sVpL96ruVvdxaf)_
Fixes #30689
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`notify` 节点 `sourceObject` / `sourceId` / `actionUrl` 三个字段的 spec
说明文字(及其注释、生成的参考文档页),补上"三者都不写时,通知自动链接到触发本次运行的记录"这条默认行为及其例外。
- 为什么改:运行时早已默认链接到触发记录,但 spec 文档只说"成对生效、缺一半会被丢弃",元数据作者和 AI 读到的说明与实际行为不一致。
- 风险与回滚:只改说明文字,不改任何键、结构、默认值或校验;回滚即 revert 本 PR,无数据或行为影响。
- 先看:`packages/spec/src/automation/io-node-config.zod.ts` 的三个
`.describe()` 与 `NotifyConfigSchema` 文档块;其次
`content/docs/references/automation/io-node-config.mdx` 的生成差异。
- 两分钟验证:`pnpm --filter @objectstack/spec check:generated`,预期输出 "All 14
generated artifacts are up to date"。
- 需要你做的:无,席位落地。
## What changes
- `packages/spec/src/automation/io-node-config.zod.ts`
- `sourceObject` and `sourceId` `.describe()`: keep the pair rule (a
half-written pair is dropped, now "not defaulted"), and add the default:
when `sourceObject`, `sourceId` and `actionUrl` are all left out, a run
started by a record (a record change other than a delete, a
time-relative sweep, an action on a record) links to that record, a run
with no trigger record links nowhere, and an explicit pair or an
`actionUrl` is kept as written.
- `actionUrl` `.describe()`: adds "written alone keeps the notification
from linking to the record that started the run". This is the runtime's
own sentence from `notify-node.ts`.
- The JSDoc of the three keys, and a new "Click-through default" bullet
in the `NotifyConfigSchema` docblock that names every exception the
executor applies: delete events, runs with no trigger record, an
explicit pair or `actionUrl`, a half pair.
- `content/docs/references/automation/io-node-config.mdx`: regenerated
by `gen:docs`, not edited by hand.
- `.changeset/30689-notify-click-through-default-describe.md`:
`@objectstack/spec` patch.
No key, shape, default, refinement or export changes. Nothing outside
`packages/spec/**` changes, apart from the generated page and the
changeset.
**The claims, checked against the runtime on `origin/main` `ab44ec94b`**
(`packages/services/service-automation/src/builtin/notify-node.ts`, read
only):
- `triggerRecordOf` returns a trigger record only when the run context
has both `object` and `record.id`.
- `defaultClickThroughOf` returns nothing when any of the three keys is
written, and nothing for `beforeDelete` / `afterDelete`.
- The executor uses the explicit pair only when both halves resolve, and
otherwise falls back to `defaultClickThroughOf`. So a half pair is
dropped and is not defaulted.
- Which runs carry `object` + `record`:
- record change: yes, through `trigger-record-change`;
- time-relative sweep: yes (`time-relative-trigger.ts`, `event:
'time_relative'`);
- action on a record: yes (`action-execution.ts`, which passes `record`
and `object`).
- Which runs do not:
- inbound API post: `trigger-api` passes `record: payload` and no
`object`;
- manual REST start: `buildAutomationContext` sets `object` and no
`record`;
- schedule tick: neither.
- The six tests in `notify-node.test.ts` under "notify click-through
defaults to the trigger record" pin each case.
## Tests
All readings below are on head `5c4599568` (`git rev-parse --short
HEAD`), worktree off base `ab44ec94b`. Exit codes were captured before
any pipe.
- `pnpm --filter @objectstack/spec build` under the verify lock:
`VERDICT command-exit 0`.
- `pnpm --filter @objectstack/spec check:generated`:
- before regenerating: exit 1, `content/docs/references/** stale`;
- after `gen:docs`: exit 0, `All 14 generated artifacts are up to date`.
- The nine `@objectstack/spec` test files that import or cover
`io-node-config`, under the lock: `Test Files 9 passed (9)`, `Tests 628
passed (628)`. They include `io-node-config.test.ts`, whose `/dropped at
execute time/i` pin still holds.
- `pnpm --filter @objectstack/spec typecheck` (tsc, scripts typecheck,
test typecheck): exit 0.
- `npx eslint --no-inline-config
packages/spec/src/automation/io-node-config.zod.ts`: exit 0.
- `node scripts/check-changeset-no-major.mjs --base ab44ec9 --event`
with an offline PR event that carries this body's two declaration lines:
exit 0. Its verdict: "LEVEL AXIS: this PR declares clause-② `no` and
metadata-protocol `none` … a non-protocol change at `patch`".
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: 96 commands, and every one ran.
- Five first exited 3 (PREREQUISITE NOT MET: unbuilt `lint`, `formula`,
`client-react` and `objectql` dists). A sixth also exited 3 because it
needs the full workspace build. After `turbo run build` of those
closures, and then the full build, all six re-ran at exit 0.
- `--ran` reconciliation: `96 derived, 96 run, 0 NOT-MEASURED, 0 UNRUN`.
- Local-only gates: `pnpm check:dev-prereqs` exit 0, `pnpm
check:skill-frame-freshness` exit 0, `node scripts/check-nul-bytes.mjs`
exit 0.
- No ablation: this diff changes no tested behaviour, only describe text
and docs.
## Acceptance notes
- **Pair note in `NOTIFY_KEY_GUIDANCE.source` (≈:137) is left as it is,
on purpose.** It says "the pair only takes effect together: a
half-specified target is dropped". That is still true under the default.
It speaks to an author who is moving a nested `source: { object, id }`
onto the flat pair, so it is about a pair that is written, and the
default never applies to such a pair. Nothing in it became false or
incomplete for that reader.
- **Skill wording:** `skills/objectstack-automation/SKILL.md:124`
comments the example as `click-through: a PAIR, else dropped`. That is
still true, and it is not the old "only takes effect together" sentence.
It does not mention the trigger-record default. Not edited here, because
`skills/**` is outside this card's surface.
- **Hand-written docs:** `content/docs/automation/flows.mdx:352` says "a
half-specified click-through pair is dropped, as before". That is still
true, and the page does not mention the default either. Not edited here:
it is outside this card's surface.
- **Not merged with `origin/main`.** The branch is 6 commits behind
`447226b22`. Those commits touch
`packages/spec/src/system/i18n-resolver*` and `platform-locales*` plus
five unrelated changesets, and none of them touches this diff's files.
The dispatch-gates derivation says none of them touched what its answer
derives from.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgTqqeHSwZYJmApbDCa)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgTqqeHSwZYJmApbDCa
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3214615 commit c893b3d
3 files changed
Lines changed: 39 additions & 11 deletions
File tree
- .changeset
- content/docs/references/automation
- packages/spec/src/automation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
| 107 | + | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
646 | 656 | | |
647 | 657 | | |
648 | 658 | | |
| |||
744 | 754 | | |
745 | 755 | | |
746 | 756 | | |
747 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
748 | 761 | | |
749 | 762 | | |
750 | | - | |
| 763 | + | |
751 | 764 | | |
752 | 765 | | |
753 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
754 | 770 | | |
755 | 771 | | |
756 | | - | |
| 772 | + | |
757 | 773 | | |
758 | 774 | | |
759 | 775 | | |
760 | 776 | | |
761 | | - | |
762 | | - | |
763 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
764 | 782 | | |
765 | 783 | | |
766 | | - | |
| 784 | + | |
767 | 785 | | |
768 | 786 | | |
769 | 787 | | |
| |||
0 commit comments