Skip to content

test(ui): Add service run history and service DAG state (part 10 of 12) - #3832

Draft
SCcagg5 wants to merge 47 commits into
dagucloud:mainfrom
SCcagg5:agentstack/38-service-history-10
Draft

SCcagg5 wants to merge 47 commits into
dagucloud:mainfrom
SCcagg5:agentstack/38-service-history-10

Conversation

@SCcagg5

@SCcagg5 SCcagg5 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Stack 38/41. Base branch: main. Review and merge in order; this PR builds on the previous one.
Size: 22 files changed, 7178 insertions(+), 18 deletions(-).
Checked: on branch agentstack/38-service-history-10 at commit c6949ac6e. pnpm typecheck: pass (57s); pnpm exec eslint on the changed files: pass (22 files); pnpm exec prettier --check on the changed files: pass (22 files); pnpm exec vitest run --maxWorkers=3 (changed tests, tests of the touched directories, tests that import a changed file): pass (270 passed (270); 5774 passed | 6 expected fail (5780); 218s [changed tests, tests of touched directories, tests that import a changed file]); pnpm build: pass (47s); go files: pass (no Go file changed: the Go checks of the parent apply).

Summary

Subject: Service run history and service DAG state. Adds the run history of service DAGs and carries the UI work around it (run bar actions, step panels, canvas toolbar, agent step cards, tool satellites): samples with uptime, events, availability, the scheduler recorder, the REST routes, the SSE stream, and the service state in the Workflows list, the page header and the Activity dock (specs 097 and 080). This PR is part 10 of 12 of the subject. This PR holds 34 files of UI tests.

Why

A service DAG runs for years. Its history must outlive the retention of run records. Real code dependencies: PRs 05, 06, 10, 30, 31, 33, 34, 37. All previous PRs of the stack are also its base.

Changes

Counts: 18 existing files modified, 16 new files (34 tests or test data).

  • ui/src/features/visual-editor/canvas: 18 files (DagCardNode.test.tsx, ModelCard.test.tsx, PromptCardNode.test.tsx, ToolSatelliteNodes.test.tsx, ...)
  • ui/src/features/dags/components: 7 files (DAGSpec.compactNotices.test.tsx, DAGSpec.hosted.test.tsx, DAGSpec.ndvSegments.test.tsx, NodeDetailsFrame.geometry.test.tsx, ...)
  • ui/src/features/visual-editor/__tests__: 6 files (ToolPanel.named.test.tsx, VisualEditor.addStep.test.tsx, VisualEditor.hosted.test.tsx, VisualEditor.launchers.test.tsx, ...)
  • ui/src/features/visual-editor/doc: 2 files (clipboard.test.ts, patch.test.ts)
  • ui/src/features/dag-runs/hooks: 1 file (usePaginatedDAGRuns.test.tsx)

How to review

  1. Read the spec documents first, when the PR has some.
  2. Read the non-test code, from the types to the callers.
  3. Read the tests last.

Summary by cubic

Adds the conformance suites for the agent stack and the shared test harness they rely on.

  • New conformance/aitest package provides a fake claude CLI, a fake model API, relay coordinator/worker fixtures, and helpers for local, server, and distributed stack tests. Tests that need the restricted user are skipped unless run as root with no-new-privileges.
  • New suites cover spec 090 (agent tools: skills, MCP servers, tool limits) and spec 091 (agent node: CLI flags, tool bridge, auth, retry).
  • Updates the chat suite to the new tool map and endpoint block, adds a step-run test that an uncarried step cannot be an outputsFromRuns source, and regenerates the API schema.
  • Registers the dagu egress-proxy command and ignores demo run artifacts in .dockerignore.

Written for commit e1c6a02. Summary will update on new commits.

View guided diff

…rt 1 of 2)

Adds the per-step `secrets` and `untrusted` keys, the restricted-user
isolation of untrusted steps, the egress proxy with key injection, the
configuration blocks for untrusted steps, worker pools, agent tools and
AI, the step secret path of the coordinator, and the `step_name` field
of the coordinator protocol.
This is part 1 of 2 of this change.
The limits UntrustedIDMin and UntrustedIDMax are untyped constants. The
largest one, 4294967294, does not fit in an int on a 32-bit build, so the
error message of untrustedID did not compile for GOARCH=386 (job Test
compatibility of the CI). Convert both limits to int64 in the call of
fmt.Errorf.
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

A malformed ai.upstream.proxy_url was echoed verbatim in the startup
error, password included, and a parsed URL still showed its user name,
which can hold a token. The error now replaces all user information
with xxxxx, whether or not the URL parses.

The ai block tests come from the AI endpoints PR, without the check
against Spec 093, which is not in this PR yet.
The parsers of agent_tools, coordinator.worker_pools and
coordinator.dispatchers had no tests in this PR, and the loader test
pointed to tests that did not exist yet. The files come unchanged from
the agent tools and agent workers PRs of the stack, so those rebase
cleanly.
Spec 069 says a registry ref that starts with ai/ is a validation
error, but only the resolver refused it, so dagu validate accepted a
DAG that failed at run time. The check is the same as the one in the
chat completion PR of the stack, so that PR rebases cleanly.
The comment described a 90-second wait for a matched dispatch that the
coordinator does not have in this PR. It goes back to the text on main
until the PR that adds that wait.
The status listed the agent worker, isolation, the egress proxy and
the verify loop as implemented, but this PR only parses the untrusted
and worker pool blocks. The README also requires black-box coverage
for a partial implementation. The status can move again as the rest
of the stack lands.
@yohamta0
yohamta0 force-pushed the agentstack/38-service-history-10 branch from c6949ac to 0f5d4a6 Compare November 19, 2026 07:02

@yohamta0 yohamta0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Opus 5.5 with xhigh responding on behalf of Yota

No, #3832 is not safe to merge into main. It targets main directly but is PR 38 of a 41-PR stack, and none of the 37 PRs below it (#3720 to #3831) has merged. Merging it now would put the whole stack into main at once, and most of that has had no human review.

Blockers

  • Size: the diff against main is 1,397 files, +185,483 / -20,121. It includes step secrets, untrusted steps, the egress proxy, the AI gateway, agent workers, proto changes and deploy/agent-worker.

  • Merge conflicts: GitHub reports it as CONFLICTING. A trial merge conflicts in 7 files:

    • api/v1/api.gen.go
    • ui/src/features/visual-editor/VisualEditor.tsx
    • ui/src/features/visual-editor/contracts.ts
    • ui/src/features/visual-editor/doc/index.ts
    • ui/src/features/visual-editor/inspector/TextField.tsx
    • ui/src/features/visual-editor/launchers/LauncherPanel.tsx
    • ui/src/lib/__tests__/dagSchedule.test.ts

    Most of these overlap the visual editor and schedule work from #3978 and #3987.

  • No CI: no workflow ran on the head commit 0f5d4a67f. The "Checked: pass" lines in the body are for c6949ac6e, a commit from before the rebase. The head differs from it in 54 files in the UI areas this PR touches.

  • Broken on macOS (I ran this locally at the head):

    • pnpm typecheck fails with TS1149/TS1192 because ActivityBars.tsx and activityBars.ts sit in the same folder, ui/src/features/dags/components/dag-list/.
    • 47 tests in DAGTable.test.tsx and LastRunCell.test.tsx fail with "Element type is invalid".
    • This is the case-collision bug noted on #3831. It is still there at #3832's head, and Linux CI will not catch it.

This PR's own part (#3831's head to #3832's head)

  • 22 test-only files, +7,178 / -18. No production code.
  • All 22 files pass locally (398 tests). No .only, .skip, fake timers or snapshots. The tests mostly check behavior.
  • Minor issues:
    • perf.test.ts adds a 200 ms CPU budget for laying out 100 agent steps (with retry: 3 and the existing busy-machine ceiling). It could still flake on slow runners.
    • Some assertions pin Tailwind classes and pixel offsets (md:hidden, !opacity-0, 104 px and 336 px in stalks.test.tsx), so styling changes will break them.
    • The body is inaccurate. It claims 34 files and lists DAGSpec.*, NodeDetailsFrame.geometry, VisualEditor.addStep/hosted/launchers and clipboard.test.ts, which earlier stack PRs added, not this one. The cubic summary describes conformance suites, which are not in this PR either.

Path to merge

  1. Land #3720 through #3831 in order, and fix the ActivityBars name collision in #3831 by renaming one of the two files.
  2. Rebase #3832 onto main so its diff is only these 22 test files.
  3. Merge once CI on the rebased head is green. The tests themselves are fine to land then.

yohamta0 and others added 17 commits November 19, 2026 17:03
…part 2 of 2)

Adds the per-step `secrets` and `untrusted` keys, the restricted-user
isolation of untrusted steps, the egress proxy with key injection, the
configuration blocks for untrusted steps, worker pools, agent tools and
AI, the step secret path of the coordinator, and the `step_name` field
of the coordinator protocol.
This is part 2 of 2 of this change.

Also includes:
- Fix the 32-bit build, a Windows test and the unused constants
- cmd: Accept the quoted form of a path in the egress proxy tests
Refines the workflow list, the run page links and the YAML editor of the
DAG pages that are already merged. These files are shared by the agent
UI and by the service state UI. They have no new backend dependency.

Also includes:
- test(ui): Update the status style test for the graph tokens of this PR
Adds AI endpoints and MCP server entries: the `aiendpoint` package, the
stores, the REST routes under `/ai`, the JSON schema entries, and the
part of the AI page of the UI that does not import files of the later
PRs (specs 093 and 095).
This is part 1 of 3 of this change.

Also includes:
- config: Read the spec of the AI keys with LF line ends in its test
Adds AI endpoints and MCP server entries: the `aiendpoint` package, the
stores, the REST routes under `/ai`, the JSON schema entries, and the
part of the AI page of the UI that does not import files of the later
PRs (specs 093 and 095).
This is part 2 of 3 of this change.
Adds AI endpoints and MCP server entries: the `aiendpoint` package, the
stores, the REST routes under `/ai`, the JSON schema entries, and the
part of the AI page of the UI that does not import files of the later
PRs (specs 093 and 095).
This is part 3 of 3 of this change.
Adds the AI gateway: the relay of model API requests with the key of the
endpoint, its limits and checks, and the first part of the coordinator
stream for the relay (spec 094).
Refines the canvas and the run model of the visual editor that is
already merged: link routing, zoom ladder, output cache for step runs of
a draft, references.
Refines the workflow workspace UI that is already merged: docks, run
timeline, addresses of runs and sub-runs, and settings. These changes
are independent of the agent features. Later UI PRs (AI page, tools,
agent node) import some of these files.
Adds skills: the `skill` package, the REST routes for skills, the ZIP
download, the Skills tab of the AI page, and the Skills card (spec 096).
A skill gives instructions to chat and agent steps from plain files.
Files are the only source of truth.
This is part 1 of 2 of this change.

Also includes:
- skill: Skip the tests of POSIX files on Windows and let a reader meet a write
Adds skills: the `skill` package, the REST routes for skills, the ZIP
download, the Skills tab of the AI page, and the Skills card (spec 096).
A skill gives instructions to chat and agent steps from plain files.
Files are the only source of truth.
This is part 2 of 2 of this change.
Adds the agent node (spec 091): the `agent.run` action, the loader and
IR types, the harness with the tool bridge, the typed result and failure
kinds, and the tool runtime of chat and agent steps (package
`agenttools`). The UI cards of an agent step come in a later PR.
This is part 1 of 3 of this change.

Also includes:
- harness: Check the mode of a mounted skill file on POSIX only
Adds the agent node (spec 091): the `agent.run` action, the loader and
IR types, the harness with the tool bridge, the typed result and failure
kinds, and the tool runtime of chat and agent steps (package
`agenttools`). The UI cards of an agent step come in a later PR.
This is part 2 of 3 of this change.

Also includes:
- ui: Give the add step panel a valid agent.run step
Adds the agent node (spec 091): the `agent.run` action, the loader and
IR types, the harness with the tool bridge, the typed result and failure
kinds, and the tool runtime of chat and agent steps (package
`agenttools`). The UI cards of an agent step come in a later PR.
This is part 3 of 3 of this change.

Also includes:
- harness: Skip the agent binary test on Windows and write the MCP config in one step
Updates the chat executor to the new tool map and to the endpoint block,
and updates the chat conformance suite (spec 059). The old `tools` list
of chat steps is replaced by the tool map of spec 090.
Adds spec 090 (agent tools), the tests of the tool entries
(configuration limits, JSON schema), the deprecation of the old `tools`
list, and the model code of the tools editor (`visual-editor/tools`:
entry YAML, builtin list, DAG catalog, skill choices). The runtime of
the tools is in the agent node PRs. The canvas and dock UI of the tools
comes in a later PR.
Adds the workspace demo workflows and the mock model server. The demo
shows agent tools, skills and the workspace with no external service.
Main paths: `examples/workspace-demo`.
Adds the run history of service DAGs and carries the UI work around it
(run bar actions, step panels, canvas toolbar, agent step cards, tool
satellites): samples with uptime, events, availability, the scheduler
recorder, the REST routes, the SSE stream, and the service state in the
Workflows list, the page header and the Activity dock (specs 097 and
080).
This is part 6 of 12 of this change.
Adds the run history of service DAGs and carries the UI work around it
(run bar actions, step panels, canvas toolbar, agent step cards, tool
satellites): samples with uptime, events, availability, the scheduler
recorder, the REST routes, the SSE stream, and the service state in the
Workflows list, the page header and the Activity dock (specs 097 and
080).
This is part 7 of 12 of this change.
Adds the run history of service DAGs and carries the UI work around it
(run bar actions, step panels, canvas toolbar, agent step cards, tool
satellites): samples with uptime, events, availability, the scheduler
recorder, the REST routes, the SSE stream, and the service state in the
Workflows list, the page header and the Activity dock (specs 097 and
080).
This is part 8 of 12 of this change.
Adds the run history of service DAGs and carries the UI work around it
(run bar actions, step panels, canvas toolbar, agent step cards, tool
satellites): samples with uptime, events, availability, the scheduler
recorder, the REST routes, the SSE stream, and the service state in the
Workflows list, the page header and the Activity dock (specs 097 and
080).
This is part 9 of 12 of this change.
Adds the run history of service DAGs and carries the UI work around it
(run bar actions, step panels, canvas toolbar, agent step cards, tool
satellites): samples with uptime, events, availability, the scheduler
recorder, the REST routes, the SSE stream, and the service state in the
Workflows list, the page header and the Activity dock (specs 097 and
080).
This is part 10 of 12 of this change.
@yohamta0
yohamta0 force-pushed the agentstack/38-service-history-10 branch from 0f5d4a6 to e1c6a02 Compare November 19, 2026 08:24
@yohamta0 yohamta0 added perf:network May change UI polling, SSE traffic, or worker and coordinator messages perf:disk-io May read run or DAG files on a request or tick path perf:storage May store more bytes per run: status, logs, outputs, indexes, artifacts perf:cpu May add a ticker, watcher, scan, or hot-path work, or idle cost perf:memory May add caches or maps keyed by run or DAG, or long-lived goroutines perf:upgrade May bump an index version or add a migration with a one-time cost perf:none and removed perf:network May change UI polling, SSE traffic, or worker and coordinator messages perf:disk-io May read run or DAG files on a request or tick path perf:storage May store more bytes per run: status, logs, outputs, indexes, artifacts perf:cpu May add a ticker, watcher, scan, or hot-path work, or idle cost perf:memory May add caches or maps keyed by run or DAG, or long-lived goroutines perf:upgrade May bump an index version or add a migration with a one-time cost perf:none labels Nov 19, 2026
@yohamta0
yohamta0 marked this pull request as draft November 21, 2026 09:22
@yohamta0

Copy link
Copy Markdown
Member

Moving this to draft while I re-slice the stack into feature-sized PRs, tracked in #4002. It stays open as the reference and I will close it once its content has landed through the new PRs.

yohamta0 pushed a commit that referenced this pull request Nov 24, 2026
The Workflows list gets a pin column that also pins a whole group, a
checkbox on a group row, a Group switch for a flat list, Schedule and
Webhook columns with their switches, and a Last Run column that shows
the status, or the state of a service DAG (Spec 100).

Carved from #3823, #3824, #3831, #3832 of the agent stack.

This branch has not been deployed

No deployments
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