Skip to content

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

Merged
nbouliol merged 2 commits into
feat/prd-214-server-step-mapperfrom
feature/prd-449-align-executor-activity-log-labels
Jun 8, 2026
Merged

feat(workflow-executor): align datasource activity-log labels with the browser engine [PRD-449]#1631
nbouliol merged 2 commits into
feat/prd-214-server-step-mapperfrom
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

Add labels to datasource activity-log entries in AgentWithLog

  • getRelatedData and getSingleRelatedData now include a label of 'list relation "<displayName>"' (falling back to the technical relation name) in their activity log payloads.
  • updateRecord adds a static 'updated' label; executeAction adds 'triggered the action "<action>"' using the technical action name.
  • A new resolveSchema helper replaces the removed resolveCollectionId helper, returning the full CollectionSchema so call sites can access both the collectionId and field metadata needed for label computation.

🖇️ Linked Issues

Relates to PRD-449.

Changes since #1631 opened

  • Modified AgentWithLog.relationLabel method in workflow-executor package to filter schema fields by relationship status before resolving display names [4dad2f2]

Macroscope summarized c7d7642.

@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

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
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.

@Scra3 Scra3 force-pushed the fix/prd-442-activity-log-target branch from 8bb1ba6 to b69167d Compare June 8, 2026 09:42
Base automatically changed from fix/prd-442-activity-log-target to feat/prd-214-server-step-mapper June 8, 2026 13:22
@qltysh
Copy link
Copy Markdown

qltysh Bot commented Jun 8, 2026

All good ✅

…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>
@nbouliol nbouliol force-pushed the feature/prd-449-align-executor-activity-log-labels branch from 4fb6032 to c7d7642 Compare June 8, 2026 13:31
Comment thread packages/workflow-executor/src/executors/agent-with-log.ts Outdated
@nbouliol nbouliol merged commit 1c886c7 into feat/prd-214-server-step-mapper Jun 8, 2026
30 checks passed
@nbouliol nbouliol deleted the feature/prd-449-align-executor-activity-log-labels branch June 8, 2026 14:34
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.

2 participants