Repository navigation
Commit 890c2a6
fix(automation): describe the HTTP and approval flow nodes in business words (#28528)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XRERDPoU7siRNtZLg5zAnbF)_
Fixes #28234
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:流程设计器节点面板里两个节点的说明文字改成业务话:HTTP 节点的描述及 `method` / `durable` /
`timeoutMs` / `signingSecret` / `body`
五条配置提示,审批节点的描述。原来的工程细节(outbox、重试/死信、HMAC、CEL
值信封、「字面量照写」)挪进各条旁边的代码注释,没有丢。
- **为什么改**:卡 #28234(分诊 6531330544),#27838 的服务端半边:管理员在 Studio
搭流程时读到的是这些字,原文满是内部术语。规则同 PR #28233:首句业务话,不出现 ADR 编号、内部字段名或枚举字面量。
- **风险与回滚**:只改文案。键、类型、默认值、可接受的值、行为都没动;`packages/spec/**` 与 `ui/**`
没碰。仓里没有断言旧文字的测试,也没有这些字符串的手写翻译。回滚即 revert。
-
**先看**:`packages/services/service-automation/src/builtin/http-nodes.ts`(描述与五条提示及其注释);`packages/plugins/plugin-approvals/src/approval-node.ts`(审批描述)。
- **两分钟验证**:`git show HEAD --
packages/services/service-automation/src/builtin/http-nodes.ts`,预期只见
`description` 字符串与注释的改动,`configSchema` 的键与 `type` 一个没变。
- **需要你做的**:无,席位落地。
## What changes
The node description and config help on a flow node descriptor are the
text the Studio flow palette and node cards show an admin. Two
descriptors, copy only:
**HTTP node**
(`packages/services/service-automation/src/builtin/http-nodes.ts`)
| Entry | Before | After |
| :--- | :--- | :--- |
| description | Call an external HTTP endpoint. With `durable: true`,
the call is enqueued on the messaging outbox with retry / dead-letter;
otherwise it runs inline and returns the response. | Send a request to
an outside web service: wait for its answer, or hand it off to be
delivered in the background with automatic retries. |
| `method` | HTTP method (default GET; POST when durable) — a literal,
read as written | The kind of request, such as GET or POST. GET by
default; POST when the request is delivered in the background. |
| `durable` | Fire-and-forget via the durable outbox (retry/dead-letter)
instead of inline request/response | Deliver the request in the
background and keep retrying if it fails, instead of waiting for the
answer; the flow does not see the response. |
| `timeoutMs` | Per-request timeout (ms) | How long to wait for an
answer, in milliseconds. |
| `signingSecret` | HMAC-SHA256 secret → X-Objectstack-Signature — the
secret itself, read as written | A shared secret used to sign each
request, so the receiving service can check it came from you (sent as
the X-Objectstack-Signature header). |
| `body` | Request body (JSON-serialised) — a CEL value envelope `{
dialect: 'cel', source }` evaluated per run to the payload, or a literal
sent as written | What to send, as JSON: a fixed value, or an expression
worked out on each run. |
The engineer detail each old string carried now sits in a code comment
directly above its entry: the outbox arm and its retry / dead-letter,
the literal-read rule for `method` / `timeoutMs` / `signingSecret`, the
CEL value envelope shape for `body`, the HMAC-SHA256 scheme and the `''`
unsigned opt-out for `signingSecret`. `url` and `headers` are not in
this card's ruling and are untouched.
**Approval node**
(`packages/plugins/plugin-approvals/src/approval-node.ts`)
- Before: "Route a record for human approval; suspends the flow until a
decision, then continues down the approve / reject branch."
- After: "Ask people to approve or reject a record. The flow waits for
their decision, then continues down the approve or reject path." The
suspend / resume-edge detail is in a comment above it.
Wording starts from the card's proposal. One change: `body` adds "as
JSON", since the payload is JSON-serialised and an admin choosing a
fixed value needs to know that.
**Also:**
`packages/services/service-automation/src/builtin/http-node-signing.test.ts`
has a docblock that quoted the descriptor's old `signingSecret` text as
a fact. It now says the spec's `HttpConfigSchema.signingSecret` reads
that text and the descriptor says it signs each request. Comment only;
no assertion changed.
**Changeset:** `.changeset/28234-flow-node-help-business-words.md`,
`patch` on `@objectstack/service-automation` and
`@objectstack/plugin-approvals` (both ship `dist`, which carries these
strings), with both declaration lines.
## Tests
No red-first defect: this is copy. Pins searched on `origin/main`
`23d1303d1f` with `git grep -F` for each old string across the repo
(dogfood, docs and snapshots included):
- No test, dogfood fixture or docs snapshot asserts any of the old
descriptor strings. The
`content/docs/references/automation/io-node-config.mdx` rows that look
alike are generated from the spec's `HttpConfigSchema` describes, which
this card does not touch.
- `ui/packages/app-shell/.../useFlowNodePalette.test.ts` carries its own
fixture text "Route a record for human approval", not read from the
engine; `ui/**` is out of scope and the fixture stays green.
- No hand translation of these strings exists (no translation bundle or
locale file carries descriptor descriptions).
- Pins changed: none. Comment updated: the `http-node-signing.test.ts`
docblock above.
Results at `d13beb7a`:
- Build: `pnpm --filter '@objectstack/service-automation...' --filter
'@objectstack/plugin-approvals...' build` under the verify lock →
`VERDICT command-exit 0`.
- `pnpm --filter @objectstack/service-automation --filter
@objectstack/plugin-approvals test` → service-automation `Test Files 249
passed (249)`, `Tests 3162 passed (3162)`; plugin-approvals `Test Files
106 passed (106)`, `Tests 1366 passed (1366)`; `VERDICT command-exit 0`.
- Same filter, `typecheck` → `VERDICT command-exit 0`.
- `pnpm exec eslint --no-inline-config
packages/services/service-automation packages/plugins/plugin-approvals`
→ exit 0.
## Acceptance notes
- Merge overlap: server seat 2 has automation cards in flight (#28055,
#28202). The 17 open PRs were listed and each one's file list read (REST
`pulls/N/files`; the Version Packages PR read to its last page): none
touches `http-nodes.ts`, `approval-node.ts` or
`http-node-signing.test.ts`. The one open PR in the same package, #28357
(head `a91c84adc9`, `sys-connector-credential.object.ts`), merges
cleanly with this head: `git merge-tree --write-tree` exit 0.
- Out of scope, noted, not filed: the Console's hard-coded fallback
palette entry in
`ui/packages/app-shell/src/views/metadata-admin/previews/flow-canvas-parts.tsx`
still says "Call an external API" for the HTTP node; the engine
descriptor overlays it when present. Carrier: the ui half of #27838.
## Verification
Derived gate list (`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`, 61 commands on this diff), run at
`d13beb7a`, exit codes captured before any pipe, reconciled with
`--ran`: `✓ dispatch-gates --ran: 61 derived famil(ies) accounted for —
60 run, 1 NOT-MEASURED`.
<details><summary>Gate readings</summary>
- 60 of 61 exit 0.
- `node scripts/check-plugin-teardown-shape.mjs --self-test` first
exited 3 on the shallow clone; after `git fetch --depth=1 origin
621a487…` it exits 0 (`48 cases pass`).
- `pnpm check:i18n` first exited 3 (CLI not built); after the gate's own
prerequisite build it exits 0: `check-i18n-bundles: OK (10 package(s) —
all bundles in sync, no undeclared authoring keys)`.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, reason: needs a full
workspace build (34 packages without `dist`); CI's Lint & Repo Gates
runs it.
</details>
No `!` in the title and no `(narrowing)` arm, so no full dogfood
battery.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind. (no names
added)
- [x] 3. No formatter ran; `pnpm lint` passes. (scoped to the two
packages)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5oZiDbKQCsyey7KM7z)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 75c2658 commit 890c2a6
4 files changed
Lines changed: 58 additions & 14 deletions
File tree
- .changeset
- packages
- plugins/plugin-approvals/src
- services/service-automation/src/builtin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
126 | 132 | | |
127 | | - | |
128 | | - | |
| 133 | + | |
| 134 | + | |
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
| |||
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
| 175 | + | |
| 176 | + | |
169 | 177 | | |
170 | 178 | | |
171 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
172 | 182 | | |
173 | 183 | | |
174 | 184 | | |
| |||
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
183 | 196 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 197 | + | |
187 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
188 | 202 | | |
189 | 203 | | |
190 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
191 | 207 | | |
192 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
193 | 214 | | |
194 | 215 | | |
195 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
196 | 219 | | |
197 | 220 | | |
198 | 221 | | |
| |||
0 commit comments