Repository navigation
feat(graph): ship Graph V2 workflow engine - #3
Merged
Merged
Conversation
- Added graphProcessScope to manage process execution and termination for Graph commands. - Introduced graphProcessBackend to handle execution with built-in runtime overrides. - Created graphhttp package for executing HTTP requests with strict validation and response handling. - Implemented tests for graph HTTP execution, ensuring proper handling of private destinations, headers, and response limits. - Added GraphRuntimeSnapshot struct to encapsulate runtime selection and command semantics. - Established constants for daemon capabilities related to graph execution.
The WS claim path rebuilt the HTTP request from the connection identity but dropped X-Daemon-Instance-ID. Graph claims bind an attempt to the daemon process identity and refuse a claim without it, so every Graph task claimed over WebSocket was rejected with 409 and requeued in a loop; it only recovered when the daemon fell back to HTTP. Capture the header at connect, forward it when rebuilding the claim request, and cover the forwarded headers with a regression test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ervers
A published agent with no MCP servers freezes its configuration as `{}`. The
Graph path only substituted an empty server set for an absent or null value, so
Claude received `{}` and exited with "mcpServers: Invalid input: expected
record, received undefined".
Normalize the frozen configuration so mcpServers is always present, and cover
the absent, null, empty, partial and invalid cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d timed-out attempts When the server cancels a task, executeAndDrain returns from its drainCtx.Done branch immediately with a bare cancelled result, before the backend has finished tearing down its process tree. The backend computes ExecutionStopped only after that, so the result reached the daemon with no stop evidence. A Graph attempt is settled only from a stop receipt, so the daemon withheld the receipt (execution_unknown) and the engine, by design, kept the run blocked: a run cancelled mid-flight stayed in cancel_requested indefinitely, even though both processes had already been reaped within seconds. The idle-watchdog and drain-timeout branches had the same gap. For Graph attempts (DisableWholeRunRetry), wait up to 30s for the backend's terminal result in those branches and carry its ExecutionStopped. Ordinary tasks never read the evidence and are not delayed. Verified against real Codex and Claude runs: a run cancelled while both agent nodes were executing now reaches cancelled in about 6s; before the change it stayed in cancel_requested for more than 10 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The start form mounts with an empty issue search box and graphIssueSearchOptions was enabled whenever a workspace was present, so it called /api/issues/search with q="". The endpoint rejects an empty q with 400, and the form renders issues.error, so every open of the start form surfaced a bogus error. Only query once the trimmed search text is non-empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s what to use A produce_commit agent declared its commit SHA as the git_commit artifact id. The prompt never said what the id must be, and ValidateResult only checked that it was non-empty, so the submission was accepted. The id is persisted in a uuid column, so reconciliation then failed with "invalid_id: invalid Graph resource UUID" every 3 seconds, permanently, and the run could not advance; only cancelling it recovered. Validate the artifact id as a UUID when the result is submitted, so the agent gets a correctable error, and state the requirement in the node prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Merges the Graph V2 branch plus the acceptance fixes (Claude mcpServers record, empty start-form query, WebSocket instance id, stop evidence, artifact UUID). Where the hotfix already on main and the branch both carried the same fix, the sources are deduplicated.
… HTTP after termination Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Publish decoded the canonical definition over the draft in place. Canonical ordering can put a node where a differently configured one used to be, and encoding/json keeps fields absent from the JSON, so a loop node could inherit a stale http config and fail validation. Decode into a fresh value instead. An HTTP effect prepared in a scheduling pass was still dispatched after the commit even when the same pass requested termination (for example an exhausted loop budget). Cancel the effects prepared in that pass and release their slots. Both are covered by the existing dispatch-fence Postgres tests, which could not reach their assertions before.
…handler Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Fixes the no-unexpected-multiline lint error that failed frontend-build.
…CI runner Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> The fake-CLI tests re-exec the test binary and bounded it with 250ms to 1s. On a busy runner the process did not start in time and the attempt was reported as cancelled or timed out. The openclaw case also failed locally for the same reason (its version check inherits the execution timeout). Raise the execution timeouts and the outer wait; the tests still assert the same outcomes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings Graph V2 (
codex/graph-production) intomain, together with the fixes found while running it end to end against real Codex and Claude runtimes.schema_version2), durable run document, artifacts and managed git refs, stop receipts, visual editor, AI authoring.mcpServersrecord for agents without MCP servers, empty start-form query no longer searches issues.mainin v0.1.2; the sources are deduplicated in the merge (4 conflicts, all "keep both").CLAUDE.mdthey use no foreign keys and concurrent indexes.Verification
produce_commit/verify_commit, approval, and cancel.go build ./...,go veton touched packages,pnpm typecheck(6/6) pass locally.main; the only one not failing onmainis the OpenClaw adapter test, which needs the OpenClaw CLI (not installed here).Known gaps — shipped deliberately
Security and guardrail work was explicitly deferred:
--bare, which does not work with some API gateways.Rollout notes
Test plan
cancelledwithin seconds🤖 Generated with Claude Code