Skip to content

automation: an approval node's escalation values are checked only at execution — timeoutHours 0.5 registers and activates, then every run fails and the record is created with no approval gate #21848

Description

@objectstack-fleet

QA-source: #21845 · approvals.sla-escalation · outside the item's clauses

Found in the follow-up run #21845 (subject 316be321e) and reproduced by an independent verifier (RUNNER rule 7) through a second door (an authored package): medium, predates 17.6.0.

Reproduction

  1. Register (admin POST /api/v1/automation, or ship in a package) an active record-triggered flow whose approval node has escalation {enabled:true, timeoutHours:0.5, action:'notify'} → 200 / loaded active.
  2. Create a record that matches the trigger → 201.
  • Expected: registration refuses the value (the schema says timeoutHours >= 1).
  • Actual: every trigger-fired run fails with Approval node 'gate' has invalid config: escalation.timeoutHours: Too small…; no approval request opens; the record exists without the gate and the user sees nothing.

Mechanism

packages/services/service-automation/src/engine.ts (~10425-10480) checks only undeclared config key names at registration; values are parsed only at execute (packages/plugins/plugin-approvals/src/approval-node.ts:133 against approval.zod.ts:666).

Done when

Registration (and package load) runs the node's full config schema and refuses invalid values with a located error; a test covers the 0.5-hour case.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowApprovals and automation — the work that runs without a person driving itbugSomething isn't workingdomain:servicespriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions