Skip to content

docs: fork-workflows user docs and pstack adapter rows - #408

Merged
ibetitsmike merged 5 commits into
mainfrom
mike/issue-329-workflows-docs
Nov 21, 2026
Merged

ibetitsmike merged 5 commits into
mainfrom
mike/issue-329-workflows-docs

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Coder Agents opened this PR on behalf of @ibetitsmike.

Closes #329.

What

User docs for the fork-workflows experiment.

  • New page docs/fork/workflows.md: who can run a workflow, script writing and builtins, limits, run and await, stop, interrupt, and resume, saved workflows, the web UI, API routes, and what is not built yet. Saving a workflow from the run card is not built yet. It is tracked in site: Save workflow action on the run card #326, and this PR does not build it.
  • docs/fork/pstack-adapter.md: a Tools table row for the parallel agent pool mapping to run_workflow and await_workflow, an updated Cursor Automations row, and a new Workflows reference section.
  • docs/coder-agents/index.md: whitespace-only table padding from the markdown table formatter.

Every number, limit, route, and label in the two pages was verified against the code at fork main 5c8c0e2c7a, and both pages carry an Evidence section with file and line citations.

Codex review

The first Codex review (on ec588a59d0) left 3 P1 and 8 P2 threads. All were verified against the code, fixed in ec588a59d0, replied to with the code evidence, and resolved. The P1 fixes per the lead's direction:

  • The page stays in docs/fork/ and is not added to docs/manifest.json, so upstream syncs cannot conflict. One link to it was added from docs/coder-agents/index.md.
  • The one-audience rule was followed by splitting the admin material into its own page, docs/fork/workflow-administration.md, linked from docs/fork/workflows.md.
  • File paths and line offsets came out of the user page Evidence section. They stay in docs/fork/pstack-adapter.md rows and in this body.

A second Codex review ran on a448df3f90 and left 6 P2 threads. All 6 were verified true against the code and fixed in 92cef7925b, each thread replied to with the code evidence and resolved:

  • run_workflow accepts args alongside a saved workflow name; only name versus script or script_path is exclusive (runWorkflowArgs in coderd/x/chatd/fork_workflow.go).
  • The supported schema subset is stated exactly: no allOf or oneOf, no additionalProperties: false, local non-recursive $refs (checkStepSchema in coderd/x/chatd/fork_workflow_report.go).
  • The step limit is now stated as a 1 hour wait deadline per wait, and the log cap as 50 lines, 4 KiB per line, 64 KiB total, oldest dropped first (coderd/x/chatd/fork_workflow.go).
  • Share grants are the initial defaults the owner and Everyone get at share time, which an organization admin can change later (coderd/database/forkdb/queries/saved_workflows.sql).
  • Ended runs are kept for 30 days after their last activity, then deleted by the cleanup job (Fork-workflows retention note in coderd/x/chatd/ARCHITECTURE.md).

A third Codex review ran on 92cef7925b and left 1 P1 and 3 P2 threads. All 4 were verified true against the code and fixed in e04d895d7d, each thread replied to with the code evidence and resolved:

  • The guidance sentence in docs/fork/pstack-adapter.md joined two independent clauses with a semicolon, which the docs contract bans. Split into sentences.
  • await_workflow on a replica that does not own the run answers the saved state at once; the pstack copy now carries the same qualification as the user page (known gap in coderd/x/chatd/ARCHITECTURE.md).
  • The end-of-run notice is deleted only when it sat queued in a busy chat. An idle chat starts a turn with it and it stays in the transcript (notify in coderd/x/chatd/fork_workflow.go).
  • The editor's expect_id guard protects against deletion or replacement, not against a concurrent edit in another browser, because the UPDATE matches on the unchanged id (UpdateUserSavedWorkflowByName in coderd/database/forkdb/queries/saved_workflows.sql).

After each fix round the checks below were rerun on the new tree.

Checks

Run on branch head e3a0f7b808:

  • make lint/emdash: pass, no em or en dashes.
  • make lint/markdown: pass, 0 errors.
  • make fmt/markdown and pnpm run format-docs: pass, no formatting changes left to apply.
  • pnpm run lint-docs: pass, 0 errors.
  • make lint/docs-html and make lint/docs-manifest: pass.
  • make lint/prose (Vale): advisory, never fails. The changed files introduce no new findings. docs/fork/workflows.md is clean. docs/fork/pstack-adapter.md carries only warnings that exist on main too, and the PR fixes the 8 step-length warnings and one semicolon warning that main has.
  • typos on docs/fork/workflows.md and docs/coder-agents/index.md: pass. docs/fork/pstack-adapter.md keeps one pre-existing hit on main, the dbe in the pinned-skills commit SHA 9dbe879138, which the typos config does not allow and which this PR does not change.
  • A Claude Opus 5.5 factual review found 6 blocking mismatches against the code, including a reversed client-tool collision behavior, a wrong step-cap consequence, two wrong UI labels, and two wrong API path semantics. All were fixed and the re-review returned no blocking findings.

Run on branch head ec588a59d0 and again on a448df3f90 after merging main 58f90095af, with pnpm run format-docs rerun after the merge:

  • make lint/emdash: pass.
  • make lint/markdown: pass, 0 errors.
  • pnpm run format-docs: no changes.
  • pnpm run check-docs: 0 errors.
  • make lint/docs-html and make lint/docs-manifest: pass.
  • make lint/prose (Vale): advisory. A diff of the warning list against a stashed baseline shows no findings from the changed files.
  • typos on the changed files: pass, the one hit is the pre-existing dbe in SHA 9dbe879138 in pstack-adapter.md, which exists on main.

Run on branch head 92cef7925b:

  • make lint/emdash: pass.
  • make lint/markdown: pass, 0 errors.
  • pnpm run format-docs: no changes.
  • pnpm run check-docs: 0 errors.
  • make lint/docs-html and make lint/docs-manifest: pass.
  • typos on the changed files: pass, the one hit is the pre-existing dbe in SHA 9dbe879138 in pstack-adapter.md, which exists on main.
  • make lint/prose (Vale): advisory, compared with a fresh baseline run on the stashed tree. The only findings in the changed files are the 2 pre-existing Coder.AbbreviationFirstUse warnings on docs/fork/pstack-adapter.md for GLM and MCP, which exist on main. No other findings from the changed files, and no new findings compared with the baseline.

Run on branch head e04d895d7d:

  • make lint/emdash: pass.
  • make lint/markdown: pass, 0 errors.
  • pnpm run format-docs: no changes.
  • pnpm run check-docs: 0 errors.
  • make lint/docs-html and make lint/docs-manifest: pass.
  • typos on the changed files: pass, the one hit is the pre-existing dbe in SHA 9dbe879138 in pstack-adapter.md, which exists on main.
  • make lint/prose (Vale): advisory. The only findings in the changed files are the 2 pre-existing Coder.AbbreviationFirstUse warnings on docs/fork/pstack-adapter.md for GLM and MCP, which exist on main. No new findings from the changed files.

Pre-commit hook

The pre-commit hook was disabled for this branch through the worktree opt-out, git config --worktree coder.pre-commit false, because clean main fails make pre-commit in this workspace. That debt is tracked in #407. The hook never bypassed a real docs failure: the light run passed lint/markdown, lint/emdash, and lint/shellcheck on this diff, and failed only on lint/typos findings that exist on clean main, plus lint/actions/actionlint, which cannot build because mise cannot write its cache under /opt/mise. If only the docs files here were staged, the hook would have run just pre-commit-light. That light run passes on this diff's files and fails on clean main for the same pre-existing reasons. With docs-only files staged, the full make pre-commit target would not have run at all.

Merge order

This PR merges after #326. When #326 lands, this PR documents the save action it builds and the run card changes, so the "not built yet" section goes away.

After a push that changes the head, this PR gets a new @codex review request and the threads and receipt are handled on the new head before merge.

Write docs/fork/workflows.md covering who can run workflows, script
writing, builtins, limits, run and await, stop and resume, saved
workflows, the web UI, API routes and evidence.

Add workflow rows to docs/fork/pstack-adapter.md: a Tools row for the
parallel agent pool mapping to run_workflow and await_workflow, an
updated Cursor Automations row and a new Workflows reference section.

Closes #329.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T13:12:45.507819Z e04d895 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3a0f7b808

ℹ️ 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".

Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflows.md Resolved
Split the admin material of the saved workflows section into its own
page, docs/fork/workflow-administration.md, so each page carries one
audience, and link the two pages and docs/coder-agents/index.md.

Fix the P2 inaccuracies the Codex review found, each verified against
the code: the log retention cap of 64 KiB together with the 50 lines,
Resume run only on an interrupted run, script and args shown only on a
run_workflow card, expect_id on DELETE and the share POST too, the
not-found help asking for script, script_path or name, the top-level
schema keyword subset, the step wait of 1 hour starting at the wait
rather than the spawn, and await on a replica that does not own the run
answering the journal state at once.

Point the pstack adapter Evidence at the new path of the workflows doc.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

Head is now a448df3, which carries the fixes for your 3 P1 findings and the 8 P2 findings, each P2 verified against the code before the fix, and the merge of main (#409). All 11 threads are resolved with a reply naming the code line the fix is based on. The admin material moved to a new page docs/fork/workflow-administration.md for the one-audience rule, so that file is new to review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a448df3f90

ℹ️ 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".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/workflow-administration.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Six findings from the Codex review of a448df3, each verified
against the code:

- pstack-adapter: run_workflow accepts args alongside a saved
  workflow name, matching runWorkflowArgs in fork_workflow.go.
- pstack-adapter: describe the supported JSON Schema subset
  exactly: no composition keywords, no additionalProperties:
  false, local non-recursive refs, per checkStepSchema.
- pstack-adapter: state the step wait limit as a 1 hour wait
  deadline and the log cap as 50 lines, 4 KiB per line and
  64 KiB total with the oldest dropped first.
- workflow-administration: share grants are initial defaults
  the owner and Everyone get at share time, and an organization
  admin can change them later.
- workflows: document the 30 day retention of ended runs and
  what deletion means for the API, the UI and resuming.

All docs checks rerun on this tree: lint/emdash, lint/markdown,
format-docs, check-docs, lint/docs-html, lint/docs-manifest,
lint/typos on the changed files, lint/prose unchanged for these
files. See the PR body for details.

Related to #329
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

New head 92cef7925b fixes the 6 P2 threads from the review of a448df3f90. Each thread has a reply with the code evidence, and all are resolved. Please review this head.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92cef7925b

ℹ️ 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".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/workflows.md Resolved
Comment thread docs/fork/workflow-administration.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
One P1 and three P2 findings from the Codex review of 92cef79,
each verified against the code:

- pstack-adapter: replace the semicolon in the workflow guidance
  sentence, which the docs contract bans.
- pstack-adapter: qualify await_workflow on a replica that does
  not own the run, per the known gap in chatd ARCHITECTURE.md.
- pstack-adapter: the end-of-run notice is deleted only when it
  sat queued in a busy chat; an idle chat starts a turn with it
  and it stays in the transcript, per notify in fork_workflow.go.
- workflow-administration: the editor's expect_id guard protects
  against deletion or replacement, not against a concurrent edit
  in another browser, because the UPDATE keeps the row's id.

All docs checks rerun on this tree. See the PR body for details.

Related to #329
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

New head e04d895d7d fixes your 1 P1 and 3 P2 findings from the review of 92cef7925b. Each thread has a reply with the code evidence, and all are resolved. Please review this head.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: e04d895d7d

ℹ️ 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".

@ibetitsmike
ibetitsmike merged commit f4bab4a into main Nov 21, 2026
10 checks passed
@ibetitsmike
ibetitsmike deleted the mike/issue-329-workflows-docs branch November 21, 2026 13:31
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

Merged at head e04d895d7d1a6380544623bbda4f8d20299f7408 as f4bab4a, on main 58f90095afe8a643c85d060665cde2b1642d0150, with the server running that main.

Gates on this exact head:

  1. The head matched the SHA I verified (--match-head-commit).

  2. Every check run passed. fork-ci run 44907223008 passed on this head.

  3. Codex receipt for this head: docs: fork-workflows user docs and pstack adapter rows #408 (comment) ("Didn't find any major issues", Reviewed commit e04d895d7d).

  4. No unresolved review thread. All three Codex rounds (4 P1, 17 P2) were answered and resolved.

  5. 0 commits behind main.

  6. This PR is docs only: 4 files under docs/. I checked every limit the page states against the constants on main 58f9009:

    • 50 steps, 64 KiB script, args and result, 10,000,000 Starlark steps, and 50 log lines at 4 KiB each, in coderd/x/chatd/fork_workflow.go;
    • 256 KiB report in fork_workflow_report.go;
    • 32 phases and 128-byte names in fork_workflow_starlark.go;
    • 600 s default and 780 s maximum wait, and the 1 hour step timeout;
    • 100 saved workflows in the saved_workflows chatdmig node and in coderd/fork_saved_workflows.go;
    • run list default 50, max 100, and 200-byte preview in coderd/fork_workflow_runs.go;
    • 300-byte listed description in coderd/x/chatd/fork_saved_workflows.go;
    • 30-day retention in the workflow_runs_running_index node comment.

    The workstream ran make lint/markdown, lint/emdash, lint-docs, format-docs, the docs-html and manifest checks, and typos on its files. I did not rerun those.

Review notes:

Not exercised: a rendered docs site build.

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.

docs: fork-workflows user docs and pstack adapter rows

1 participant