Skip to content

feat(workflow-executor): full-ai action forms, fill and submit with fallback (PRD-512)#1694

Open
Scra3 wants to merge 1 commit into
feature/prd-511-executor-ai-assisted-formsfrom
feature/prd-512-executor-full-ai-forms
Open

feat(workflow-executor): full-ai action forms, fill and submit with fallback (PRD-512)#1694
Scra3 wants to merge 1 commit into
feature/prd-511-executor-ai-assisted-formsfrom
feature/prd-512-executor-full-ai-forms

Conversation

@Scra3

@Scra3 Scra3 commented Jun 21, 2026

Copy link
Copy Markdown
Member

What

Full AI mode of the action-forms epic (PRD-57), built on PRD-511. A FullyAutomated Trigger Action on a form-bearing action now fills + submits automatically instead of throwing UnsupportedActionFormError.

Behaviour (reuses the shared fillFormWithAi loop)

  • All required fields filled → executeOnExecutor submits the AI values (idempotency write-ahead executing→done) and records submissionOutcome: 'executed' + submittedValues + the AI prefill.
  • A required field left empty → fall back to the exact AI-assisted review state, carrying what was filled.
  • Validation rejection / approval-required 403 (ActionFormValidationError / ActionRequiresApprovalError) → same fallback; the fallback pause cleanly overwrites the executing marker (no stuck-step on re-dispatch — asserted).
  • Plain permission 403 / infra error → real step error (a reviewing human couldn't fix it).
  • The executor never self-signs an approval (the 403 just triggers the human fallback).

Tests

1102 tests pass. New: fill+submit happy path (values asserted), fallback on incomplete / approval / validation (+ clean-marker assertion), plain-error → step error.

Stacked on feature/prd-511-executor-ai-assisted-forms.

fixes PRD-512

Note

Add AI auto-fill and submit with fallback for FullyAutomated action form steps

  • TriggerRecordActionStepExecutor.doExecute now runs AI fill (fillFormWithAi) for all form-bearing actions, including FullyAutomated mode, instead of throwing an unsupported error.
  • For FullyAutomated steps where the form is fully filled and executable, the executor calls executeOnExecutor to submit values automatically.
  • If submission fails with ActionFormValidationError or ActionRequiresApprovalError, the step falls back to pausing for user review (awaiting-input) with AI-prefilled values.
  • executeOnExecutor now accepts form payload and records submissionOutcome, submittedValues, and aiFilledValues in the step execution log.
  • Behavioral Change: FullyAutomated steps with forms no longer error out; they either auto-submit or pause for input depending on fill completeness and submission outcome.

Macroscope summarized c12364a.

@linear-code

linear-code Bot commented Jun 21, 2026

Copy link
Copy Markdown

PRD-512

@qltysh

qltysh Bot commented Jun 21, 2026

Copy link
Copy Markdown

3 new issues

Tool Category Rule Count
qlty Structure Function with many returns (count = 6): handleFirstCall 1
qlty Structure Function with high complexity (count = 12): handleFirstCall 1
qlty Structure Function with many parameters (count = 4): executeOnExecutor 1

@qltysh

qltysh Bot commented Jun 21, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
New Coverage rating: A
...-executor/src/executors/trigger-record-action-step-executor.ts100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

…allback (PRD-512)

Full AI (FullyAutomated) on a form-bearing action now fills and submits the form
automatically instead of throwing UnsupportedActionFormError. Reuses the shared
fillFormWithAi loop from PRD-511, then:

- all required fields filled -> executeOnExecutor submits the AI values
  (idempotency write-ahead) and records submissionOutcome 'executed' +
  submittedValues + the AI prefill (audit, PRD-513)
- a required field left empty -> fall back to the exact AI-assisted review state,
  carrying what was filled
- validation rejection / approval-required 403 -> same fallback (a human finishes
  natively); the fallback pause cleanly overwrites the 'executing' marker
- plain permission 403 / infra error -> real step error (no fallback)

Removes the UnsupportedActionFormError path for FullyAutomated + form.

fixes PRD-512

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Scra3 Scra3 force-pushed the feature/prd-512-executor-full-ai-forms branch from f53a663 to c12364a Compare June 21, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant