Skip to content

feat(workflow-executor): audit trail for ai-filled and ai-submitted action forms (PRD-513)#1695

Open
Scra3 wants to merge 1 commit into
feature/prd-512-executor-full-ai-formsfrom
feature/prd-513-executor-action-form-audit
Open

feat(workflow-executor): audit trail for ai-filled and ai-submitted action forms (PRD-513)#1695
Scra3 wants to merge 1 commit into
feature/prd-512-executor-full-ai-formsfrom
feature/prd-513-executor-action-form-audit

Conversation

@Scra3

@Scra3 Scra3 commented Jun 21, 2026

Copy link
Copy Markdown
Member

What

Audit trail for the action-forms epic (PRD-57), on top of PRD-511/512. The raw data (AI-filled values, submitted values, submission outcome) is already persisted; this surfaces it.

Changes

  • submittedBy discriminator on the trigger-action executionResult: 'ai' (Full AI — executor submitted) vs 'user' (AI-assisted — human submitted natively).
  • Trigger-action step-summary formatter (downstream-AI context / audit): distinguishes an executed action from one submitted for approval ("AWAITING APPROVAL — has NOT been executed"), names the submitter, lists AI-pre-filled fields, and reports the fields the human edited (diff prefill ↔ submitted).

Full AI = first-hand executor data; AI-assisted = derived from the confirmation payload (per the settled architecture).

Tests

1106 tests pass. New formatter tests: pending-approval not-executed, Full AI submitted-by-AI, AI-assisted human-edit diff, skipped → null.

Stacked on feature/prd-512-executor-full-ai-forms. Completes the executor track (509 → 511 → 512 → 513).

fixes PRD-513

Note

Add audit trail for AI-filled and AI-submitted action forms in trigger-action steps

  • Extends TriggerRecordActionStepExecutionData to include an optional submittedBy field ('ai' | 'user') recorded when a trigger-action step completes.
  • Updates TriggerRecordActionStepExecutor.doExecute to persist submittedBy: 'ai' for fully automated runs and submittedBy: 'user' for user-confirmed flows.
  • Adds a formatTriggerAction formatter in StepExecutionFormatters that produces a human-readable audit summary: pending-approval state, submitter identity, AI pre-filled fields, and any fields edited by the user (diffed against AI values).

Macroscope summarized 2b56b54.

@linear-code

linear-code Bot commented Jun 21, 2026

Copy link
Copy Markdown

PRD-513

@qltysh

qltysh Bot commented Jun 21, 2026

Copy link
Copy Markdown

1 new issue

Tool Category Rule Count
qlty Structure Function with many returns (count = 5): format 1

…ction forms (PRD-513)

Surfaces the form-fill audit data already persisted by AI-assisted/Full AI:

- record submittedBy ('ai' = Full AI executor, 'user' = AI-assisted native submit)
  on the trigger-action executionResult
- new step-summary formatter for trigger-action: distinguishes an executed action
  from one only submitted for approval (downstream AI must NOT treat a
  pending-approval action as executed), names the submitter, lists the AI
  pre-filled fields and the fields the human edited (diff prefill vs submitted)

fixes PRD-513

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
@Scra3 Scra3 force-pushed the feature/prd-513-executor-action-form-audit branch from 09d1a9c to 2b56b54 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