Repository navigation
fix(service-automation,types,objectql): a switched-off packaged flow is refused with the same plain sentence a switched-off action reads as - #28097
Conversation
…is refused with the same plain sentence a switched-off action reads as The FLOW_DISABLED ledger message named sys_metadata_activation and ADR-0126 §7.2 in a string the caller reads. It now reads as the one switched-off packaged item sentence, built by describeTurnedOffPackagedItem in @objectstack/types, which the ACTION_DISABLED refusal now reads from too (its wording unchanged). The code, the status and what is refused do not move; the table and the ADR go to an info log line written when the engine refuses. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cyizCEEdpjyVi8Kmw1
📓 Docs Drift CheckThis PR changes 3 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 32 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 912c97b41b4ea9dbb03ce977467029c8a7b232ee && git checkout 912c97b41b4ea9dbb03ce977467029c8a7b232ee
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8cb8c7f461eb5302aa0bea7205a3fc5ef7bd443a 4ffb37d9fbdcb460f081dfe0c66d710361750d55 && git checkout -B drift-repro 8cb8c7f461eb5302aa0bea7205a3fc5ef7bd443a && git merge --no-ff 4ffb37d9fbdcb460f081dfe0c66d710361750d55
node scripts/docs-audit/affected-docs.mjs --json 8cb8c7f461eb5302aa0bea7205a3fc5ef7bd443a
|
|
domain:server#4 · os-elon-musk · session_016WV4d1Np3hU7RQnA13YZcL 维护者速读
席位意见:ACCEPT。 席位核对Head-sha:
|
Requested by Elon · project thread
domain:server#4 · os-elon-musk · session_016WV4cyizCEEdpjyVi8Kmw1
Fixes #27966
Clause-②: no
Metadata-protocol: none
Skills-docs: none — no authorable metadata changes; only the text of an existing refusal moves
维护者速读
FLOW_DISABLED拒绝,但提示改成一句给人看的话:「This flow is turned off for this deployment. An administrator can turn it on again under Setup › Packaged automation, or copy it there under a new name.」sys_metadata_activation和 ADR-0126 §7.2 写给终端用户看。分诊裁定复用 feat(spec,metadata-protocol,rest,objectql,runtime): GET /meta/object serves switched-off packaged actions beside the item, and the disabled-action refusal reads as a plain sentence #27964 给动作定下的那一句,而不是再写一份。feat(spec,metadata-protocol,rest,objectql,runtime): GET /meta/object serves switched-off packaged actions beside the item, and the disabled-action refusal reads as a plain sentence #27964 的句子是写死在 objectql 里的字符串,service-automation 运行时又不依赖 objectql,所以把这句抽成@objectstack/types里的一个构建器,动作和流程共用(席位已改认领扩面)。packages/types/src/packaged-item-turned-off.ts、packages/services/service-automation/src/engine.ts(describeDisabledFlow)、src/flow-activation-ledger.test.ts。pnpm --filter @objectstack/service-automation exec vitest run src/flow-activation-ledger.test.ts,预期 49 个测试全绿。Measured before the change (
origin/main2e955dd, scratch test, not committed)codeerrorengine.execute, the run the REST trigger route calls)FLOW_DISABLEDFlow 'lone' is disabled — it is switched off for this installation in the packaged-metadata activation ledger (sys_metadata_activation, ADR-0126 §7.2). Re-enable the packaged flow to arm it again, or run a clone of it under a new name.Node 'call' failed: subflow 'child' failed: Flow 'child' is disabled — it is switched off … (sys_metadata_activation, ADR-0126 §7.2). …FLOW_DISABLEDFlow 'obs' is disabledThe REST trigger door forwards
result.errorverbatim aserror.message(pinned atpackages/runtime/src/domains/automation-trigger-route-status.test.ts:285), so it reads whatever the engine says. The retry exit indag-traversal.tsasks the samedescribeDisabledFlowand is unreachable throughexecute()today (its own comment).Why a new builder in
@objectstack/typesTriage ruled that the flow sentence reuse "the one builder PR #27964 settles, not a second copy". Measured: #27964's sentence is a string literal inside
ActionActivationProjection.describeDisabled()(packages/objectql/src/action-activation.ts), and@objectstack/objectqlis only a devDependency of@objectstack/service-automation, so the flow engine cannot call it at runtime. Both packages already depend on@objectstack/types, so the sentence moved there asdescribeTurnedOffPackagedItem('action' | 'flow'). objectql'sdescribeDisabled()now returns its action form, byte-identical to #27964's. The seat amended the claim's file surface for this.What changes
@objectstack/types: newpackaged-item-turned-off.tswithdescribeTurnedOffPackagedItem, exported from the package entry. The two kinds share one shape and differ only in the last clause: flow clone is chartered (ADR-0126 §7.2,POST /automation/:name/clone, offered on the Setup page), so the flow sentence offers a copy; action-clone is not (§8 item 2), so the action sentence keeps "or you can use another action".@objectstack/service-automation: the ledger branch ofdescribeDisabledFlow(subflow-guards.ts) returns the flow sentence. The engine'sdescribeDisabledFlowwrites aninfoline naming the code, the flow,sys_metadata_activationand ADR-0126 §7.2 whenever it refuses a ledger-disabled flow (the feat(spec,metadata-protocol,rest,objectql,runtime): GET /meta/object serves switched-off packaged actions beside the item, and the disabled-action refusal reads as a plain sentence #27964 log-line pattern). The status-dimension sentence is unchanged.@objectstack/objectql:describeDisabled()delegates to the builder; its existing meta: GET /meta/object serves which packaged actions are switched off beside the item, and the disabled-action refusal reads as a plain sentence #27842 pin is untouched and still green.automation.packaged-flow-disable-durable(revision 8) — acceptance[1] and negative[3] now key on the new sentence; the verdict is unchanged (the message still separates the ledger dimension from the status one, the code is stillFLOW_DISABLED).@objectstack/service-automation,@objectstack/types,@objectstack/objectql.Tests
flow-activation-ledger.test.ts: the four entry-path cases now pin the exact sentence; new cases pin the plain sentence (no table, no ADR) plus exactly oneFLOW_DISABLED:info line naming the flow, the table and the ADR, and the subflow door (Node 'call' failed: subflow 'child' failed:followed by the sentence, so the child is still named). The status-disabled case now asserts it never mentions Packaged automation.engine.test.ts: two toggle cases follow the new wording.packages/types/src/packaged-item-turned-off.test.ts(new, 4): both sentences byte for byte, neither names a table, an ADR or a tracker number.packages/objectql/src/action-activation.test.ts: new pin thatdescribeDisabled()IS the builder's action sentence.Ablations through scripts/ablation-replace.mjs (fix committed first)
Verification (head 4ffb37d,
mainmerged after #27951 landed)@objectstack/service-automation226 files / 2864 tests,@objectstack/objectql494 / 9601,@objectstack/types34 / 836 — all green.pnpm --filter PKG typecheck(includescheck:test-typecheck) exit 0 with PKG each of the three packages.dispatch-gates.mjs --commands: 67 derived, 67 run, all exit 0 (check:dual-build-cjs-loadsafter building the 7 packages it named);--ranreconcile: 0 NOT-MEASURED, 0 UNRUN.pnpm lintexit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cyizCEEdpjyVi8Kmw1