Skip to content

feat(workflow-executor): align datasource activity-log labels with the browser engine [PRD-449]#1631

Open
nbouliol wants to merge 1 commit into
fix/prd-442-activity-log-targetfrom
feature/prd-449-align-executor-activity-log-labels
Open

feat(workflow-executor): align datasource activity-log labels with the browser engine [PRD-449]#1631
nbouliol wants to merge 1 commit into
fix/prd-442-activity-log-targetfrom
feature/prd-449-align-executor-activity-log-labels

Conversation

@nbouliol
Copy link
Copy Markdown
Member

@nbouliol nbouliol commented Jun 5, 2026

What

Aligns the datasource activity-log labels emitted by the workflow-executor with the legacy browser engine (ISO), fixing a production audit-trail crash on label-less entries.

fixes PRD-449

Context

Since the activity-log refactor (PRD-442), logs are emitted per datasource call in AgentWithLog.audit(), not per step. This dissolves the original dynamic-label problem (the name is now known at the call site, after AI resolution) — no executor or base-class refactor needed. The fix is just injecting the ISO label into each audit target.

Changes (agent-with-log.ts)

Operation Label Source
update updated static
action triggered the action "<technical name>" query.action
listRelatedData list relation "<displayName>" resolved from source schema, falls back to technical name
index (read) none ISO; getRecord is shared across step types, a blanket label would mislabel update/trigger/load reads
  • resolveCollectionId -> resolveSchema (returns the full CollectionSchema) so the relation displayName can be looked up.
  • action label only fires in FullyAutomated mode (preserved naturally: executeAction is only called in that branch; otherwise the front executes and logs).

Tests

  • agent-with-log.test.ts: exact-label assertions for update / action / relation displayName + technical-name fallback.
  • Updated existing createPending assertions in update / trigger / load-related executor tests.

Validation

  • yarn workspace @forestadmin/workflow-executor test -> 925/925
  • yarn workspace @forestadmin/workflow-executor lint -> 0 errors
  • yarn workspace @forestadmin/workflow-executor build -> ok

Out of scope

  • MCP executor (already labelled)
  • The N-logs-per-step behavior of load-related (pre-existing since PRD-442)
  • Rich \"...in workflow Y\" labels (requires orchestrator contract change)

🤖 Generated with Claude Code

Note

Align datasource activity-log labels in workflow executor with the browser engine

🖇️ Linked Issues

Addresses PRD-449.

Macroscope summarized 4fb6032.

…e browser engine [PRD-449]

Activity logs emitted by AgentWithLog now carry an ISO label matching the
legacy browser engine, so the audit-trail front renders them (a label-less
update entry was crashing it).

- update -> "updated" (static)
- action -> triggered the action "<technical name>" (from query.action)
- listRelatedData -> list relation "<displayName>" (resolved from source schema)
- index (read) -> no label (ISO; getRecord is shared across step types)

Labels are set at the call site in AgentWithLog, after name resolution by
construction, so no executor or base-class refactor is needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 5, 2026

PRD-449

@qltysh
Copy link
Copy Markdown

qltysh Bot commented Jun 5, 2026

Qlty


Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
packages/workflow-executor/src/executors/agent-with-log.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.

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