Repository navigation
Conversation
…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.
WalkthroughWarning Review details and warnings were omitted to fit the comment limit. |
…crets-1 # Conflicts: # specs/README.md
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.
f994adc to
a4df1ee
Compare
yohamta0
left a comment
There was a problem hiding this comment.
Note
Opus 5.5 with xhigh responding on behalf of Yota
No, #3833 is not safe to merge. Merging it would land all 39 stacked PRs at once, and none of them is reviewed or merged.
Blockers
- It merges the whole stack. The PR targets
main, and #3720 to #3832 (stack PRs 1 to 38) are all still open. Against main the diff is 1,422 files, +192,564 / -20,121, in 47 commits. This PR's own part is one commit,a4df1ee4b: 25 test files, +7,081 lines. - It conflicts with main in 7 files. A local test merge conflicts in
api/v1/api.gen.go,VisualEditor.tsx,contracts.ts,doc/index.ts,TextField.tsx,LauncherPanel.tsxanddagSchedule.test.ts. The conflicts come from #3987. - No CI ran. The only checks are CodeRabbit (skipped) and cubic (neutral).
- 2 of its own tests fail on the PR head. I ran the PR's 24 test files: 455 tests pass, 2 fail. The patch is the same as before the 11-19 rebase (pre-rebase commit
f994adc17, same patch-id), so the rebase broke these, not the author. They will be fixed in the next restack.doc/__tests__/schedule.test.ts, "reads the schedule of document 0 in a multi-document file": thetoEquallacks theparams: [{}]field that main added toreadSchedule. The fix istoMatchObject, like the tests next to it.launchers/__tests__/CronLauncherPanel.test.tsx, "removes the cron expressions...": it looks for the "Remove all cron expressions" button. That button was dropped in the #3826 rebase, because main replaced it with a delete button on each row. The other test in that file, "shows no remove button...", now passes for any panel, because the button no longer exists. Both tests should be rewritten for the per-row delete, or removed.
Smaller points
- The body is wrong. It says 30 files (9 modified, 21 new) and lists 4 test files that are not in this diff:
WorkspaceCanvas.notices,useStepCommandHost,selectionandStepRunView. The diff has 25 files: 4 modified, 21 new.- "Specs 097 and 080" is stale; the spec is now 099.
- The cubic summary describes conformance work from another PR.
- The AGENTS.md sections Core change, Testing and Performance are missing. For a test-only PR, Performance can be one line.
- One new test mostly repeats an existing one. In
serverOrder.test.ts, "matches by explicit name when the details are stale" covers the same case as the existing "matches a step by its explicit name when the position disagrees". The new one only adds abyNamecheck. tscfails on the PR head on macOS. The cause is theActivityBars.tsx/activityBars.tsfile-name clash from #3831, already noted on that PR. No type errors come from this PR's files.
What holds up
- The PR changes only tests, so it adds no runtime risk by itself.
- The other 22 test files pass, and prettier and eslint pass on all 25 files.
- The tests check behavior through roles and labels. The AI page tests check that an API key never shows up in the page, localStorage or sessionStorage. The YAML edit tests check that later documents in a multi-document file are left unchanged.
Recommendation: don't merge it. When its turn in the stack comes, it needs the two test fixes and a corrected body.
…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 a note to spec 083 on the state of a service DAG. Spec 083 and spec 097 share the samples and the chart. Main paths: `specs/083-continuous-runs.md`.
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 1 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 2 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 3 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 4 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 5 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 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.
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 11 of 12 of this change.
a4df1ee to
2a7713b
Compare
|
Rebase note: the stack is rebased again onto current main (#3987 included). The two test failures above are fixed here: the multi-document schedule test uses |
|
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. |
The editor checks `restart_policy` and `restart_wait_sec` as the loader does (Spec 080). It reports on the line of the key an unknown policy, a schedule or a retry_policy with a policy, and a negative wait. A missing wait is left to the server, which knows the base configuration. Carved from #3826, #3829, #3833 of the agent stack.
Cron and Always on share one launcher slot of the canvas, because a restart policy cannot go with a schedule (Spec 080). With neither set, the slot draws one dashed placeholder whose panel chooses between them; the Always on panel sets the policy, the wait and the runs kept, and a Manual card reads Available instead of Always on. Carved from #3826, #3827, #3829, #3833 of the agent stack.
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 11 of 12 of the subject. This PR holds 30 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, 09, 10, 30, 33, 34, 35, 36, 37. All previous PRs of the stack are also its base.
Changes
Counts: 9 existing files modified, 21 new files (30 tests or test data).
ui/src/features/visual-editor/inspector: 12 files (ChatForm.endpoint.test.tsx,ChatForm.test.tsx,Security.test.tsx,StepInspector.agentRun.test.tsx, ...)ui/src/pages: 4 files (endpoints.test.tsx,mcp.test.tsx,models.test.tsx,skillFiles.test.tsx)ui/src/features/visual-editor/doc: 3 files (restart.test.ts,schedule.test.ts,serverOrder.test.ts)ui/src/features/visual-editor/launchers: 3 files (AlwaysOnLauncherPanel.test.tsx,CronLauncherPanel.test.tsx,SlotLauncherPanel.test.tsx)ui/src/features/visual-editor/run: 2 files (runSpecDiff.test.ts,useStepHashes.test.tsx)ui/src/features/workflow-workspace/canvas: 2 files (WorkspaceCanvas.notices.test.tsx,useStepCommandHost.test.tsx)ui/src/features/visual-editor/references: 1 file (ReferenceInput.suggestions.test.tsx)ui/src/features/workflow-workspace/__tests__: 1 file (selection.test.tsx)ui/src/features/workflow-workspace/data: 1 file (useRetainedRuns.test.tsx)ui/src/features/workflow-workspace/step: 1 file (StepRunView.test.tsx)How to review
Summary by cubic
Adds the conformance test infrastructure and black-box suites for the agent features: a shared
conformance/aitestpackage with a fake claude CLI, a fake model API, and local, server, and stack launchers, plus suites for agent tools (spec 090) and the agent node (spec 091). The chat suite (spec 059) now uses thedagstool map; the oldtoolslist stays valid but deprecated and warns ondagu validate.conformance/harnesswith thread-safe live process output, an endpoint seeder, and helpers for unrestricted-user runs and skipping restricted-user tests outside Linux.api/v1/api.yamlandapi/v1/api.gen.go, registers the egress proxy command, and excludesexamples/agent-worker-demo/run/from Docker builds.Written for commit 2a7713b. Summary will update on new commits.