Skip to content

refactor(agent-service): redesign the sync-execution result and error model #5750

Closed

Description

@bobbai00

Task Summary

Redesign the sync-execution result/error model. Replace the flat OperatorInfo with OperatorExecutionSummary (separating state, errors, result, and console-message projections), make sampleTuples a list of SampleRow { rowIndex, tuple } instead of embedding __row_index__ in the tuple, and reuse the engine's proto WorkflowFatalError for per-operator errors so compile and execution errors share one wire shape.

Current problems in the existing code:

  • OperatorInfo mixes unrelated concerns in one flat interface: execution state, tuple counts, input shapes, result payload, truncation/display flags, console logs, warnings, errors, and statistics.
  • Many fields are optional (result?, inputPortShapes?, totalRowCount?, displayedRows?, truncated?, consoleLogs?, error?, warnings?, resultStatistics?), so consumers must infer semantics from missing fields instead of explicit fields with clear meanings.
  • Result rows carry internal metadata such as __row_index__, which pollutes user tuple payloads and forces each consumer to filter special keys.
  • Error shapes are inconsistent: compilation errors use WorkflowFatalError, per-operator execution errors use bespoke strings, and workflow-level errors use a separate string list.
  • Backend, agent-service, REST, and frontend types overlap but are not aligned, which makes the wire contract harder to reason about and easier to drift.

Part of #5747. Implemented by #6009. Supersedes #5927.

Task Type

  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other

Activity

  1. added theissue type on Jun 17, 2026
  2. changed the title [-]refactor(agent-service): extract tool utilities and simplify server wiring[/-] [+]refactor(agent-service): redesign the sync-execution result and error model[/+] on Jun 24, 2026
  3. added 3 commits that reference this issue on Jun 29, 2026
    464381c
    1bb5fd1
    f311d2f
  4. added a commit that references this issue on Jul 11, 2026
    39af051
  5. added a commit that references this issue on Oct 19, 2026
    02afae0
  6. added 2 commits that reference this issue on Nov 3, 2026
    c4302a5
    8371dd1
  7. added a commit that references this issue on Nov 13, 2026
    7b2c48f
  8. added a commit that references this issue on Nov 13, 2026
    fa6a5de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-servicerefactor

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions