Repository navigation
feat: add workflow report tool and step plumbing behind fork-workflows - #228
Conversation
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d1d0c7506
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…i docs Addresses the Codex review of #228: - The workflow_report reservation (tool injection, turn stop, dynamic tool parsing) now gates on chatIsWorkflowStep: a child chat carrying the fork's run label, which no caller-supplied path can set. Chats the fork did not create keep the upstream client-side behavior for caller-supplied dynamic tools of that name, with the experiment off or on. chatd.parseDynamicToolNames is upstream again; the chat-aware call sites apply the step filter. - The deterministic step chat ID is selected before the user prompt hooks dispatch, so hook events carry the chat ID the step chat is persisted with and consumers can correlate them. - The report tool's parameter shape inlines local $refs, so schemas using $defs reach the provider without dangling references; refs that cannot inline faithfully (remote, sibling keywords, recursion) are refused at step creation. - Regenerate the public experiment enum with fork-workflows: coderd/apidoc docs and swagger, site/src/api/typesGenerated.ts, docs/reference/api/schemas.md. - Add fork-workflows TODOs to the chatd architecture document for the affected child-creation and tool sections. Part of #226
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd0008a75c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Round-2 review and CI fixes for the fork-workflows step plumbing: - inline step refs before resolving the schema, so a remote reference is refused by the ref policy instead of surfacing the resolver's missing loader error (TestForkWorkflowReport/RejectsUninlinableRefs) - copy const, default, enum and examples values verbatim while inlining: a ref-shaped object inside them is data, not a schema - reject plan-mode changes on workflow step chats (PATCH and message send), whose system prompt requires the workflow_report server tool that plan-mode turns filter out - reserve the coder_workflow_run label: a step chat's label update must keep its current value and no other chat may claim it - align the fork-workflows x-enum-descriptions entry with its enum value in docs.go and swagger.json - put each workflow TODO in ARCHITECTURE.md on its own line
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a520a83fe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be8555f3f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3665fbd384
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b95ff34a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ties, and resolve array pointers
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6673c55f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b10646647
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…dependency schemas
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06840df3b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…in report schemas
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ada86307c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ses, and lock step chats against owner edits
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d039392c70
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merge evidence for head
|
Part of #226. First PR of the chat-workflows stack: the
workflow_reportserver tool and the step-chat plumbing that the later Starlark-run PRs build on, behind the newfork-workflowsexperiment. With the flag off, chatd behaves exactly like upstream. The Starlark runtime, run lifecycle, and therun_workflow/await_workflowtools follow in the next stack PR.What this adds
codersdk.ExperimentForkWorkflows(fork-workflows), a user-scoped experiment wired through the fork'sp.experimentsconvention.fork_workflow_report.go: theworkflow_reportserver tool with strict schema validation, the per-step tool gating for step chats, andforkStopAfterWorkflowReport, which ends a step chat's turn once it has reported (hooked into the existingforkStopAfterToolsfork hook).fork_workflow_step.go: deterministic workflow and step IDs (SHA-1 over the call ID / step spec), the step spec and key types, andcreateWorkflowStepChat, which reuses the step's existing child chat when a run is resumed instead of creating a duplicate.subagent_operations.gogains a singlefork *forkChildChatOverridesfield plus a one-line call change (opts.forkCreate(...)), so fork code can override child-chat options;turn_environment.gokeeps the report tool available to explore-type steps;chatd.go,chatstate/synthetics.go, andtasks.goskip dynamic tool-name parsing for the report tool since chatd serves it.TestForkWorkflowReportandTestForkWorkflowStepChat(create vs reuse, deterministic IDs, default report schema, malformed report rejected).Differences from the upstream prototype this ports (coder#31189)
p.experiments,fork-workflows) instead of upstream's user-scoped experiment, and tool gating moves intoappendForkTools.fork_workflow_*.gowith fork headers; symbol names are kept identical to the prototype for a mechanical diff.withWorkflowReportStopbecomesforkStopAfterWorkflowReport(stop, chat)readingchat.DynamicTools, called from the existingforkStopAfterToolshook.childSubagentChatOptionsas one fork field plus one changed call line, rather than the prototype's three new fields and three read sites.