Skip to content

Catch "Workflow code ... deterministic" in Temporal.DeterminismScope - #5585

Merged
Duncanma merged 3 commits into
mainfrom
duncan/determinism-scope-workflow-code
Oct 29, 2026
Merged

Duncanma merged 3 commits into
mainfrom
duncan/determinism-scope-workflow-code

Conversation

@Duncanma

@Duncanma Duncanma commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

PRs #5279 and #5281 moved determinism wording from "Workflow code" to "Workflow Definition", but Temporal.DeterminismScope only caught "Workflow(s) is/must be deterministic", "deterministic Workflow(s)", and "Workflow determinism". It missed the "Workflow code" phrasing the sweep removed, so Vale stayed clean on new text like it (seen in #5551).

  • vale/styles/Temporal/DeterminismScope.yml: add RE2 tokens (no lookaround) for:

    • "Workflow code is/are/was/were/be/must be/must remain/must stay/needs to be/should be/remains/stays (non-)deterministic", including an aside or parenthetical after "Workflow code" ("Workflow code--unlike Activity code--must be deterministic")
    • "(non-)deterministic Workflow code"
    • "keep(s/ing) Workflow code (execution) deterministic"
    • "deterministic constraints/requirements of/on/for (the) Workflow code"

    Still level: suggestion and advisory (Temporal.DeterminismScope = NO in .vale-ci.ini), so CI is unaffected. The existing Workflow(s) token also gains "be", "must remain", "must stay", and "stays".

  • AGENTS.md: add the determinism-scope subsection the rule message points to, with a Correct/Incorrect pair and a link to /workflow-definition.

Checks

On a sample file the tokens flag each phrasing above. They don't flag "Spans are created from Workflow code", "Don't do I/O in Workflow code", "Workflow code can call Activities", or "The Workflow Definition must remain deterministic".

Run alone over docs/ on current main, the rule reports 29 hits, all on "Workflow code" phrasings (the old tokens have none). #5586 fixes all of them, after which the rule reports 0.

Vale only checks prose, so a few phrasings inside JSX or indented code (for example the description: strings in design-patterns/index.mdx) aren't flagged. #5586 fixes those by hand.

Add tokens for 'Workflow code is/must be/should be deterministic' and
'deterministic Workflow code', and add the determinism-scope guidance the
rule message points to under the AGENTS.md style guide.
@Duncanma
Duncanma requested a review from a team as a code owner October 26, 2026 18:46
Copilot AI balanced review requested due to automatic review settings October 26, 2026 18:46
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
temporal-documentation Ready Ready Preview Oct 29, 2026 3:58pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

This PR does not change any pages in /docs. If you make updates, links to the modified pages will appear here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Neither changed file is under docs/, so the repository’s automated-review scope excludes this PR and human review is required.

No open issues 🎉

What changed in this PR

This PR extends the advisory determinism wording rule to catch “Workflow code” claims and documents “Workflow Definition” as the preferred term.

Changes:

  • Adds two Vale patterns for determinism claims involving “Workflow code,” without changing CI enforcement.
  • Adds contributor guidance with correct and incorrect examples.
  • Leaves existing documentation instances to the follow-up tracked in #5284.
File Description
vale/​styles/​Temporal/​DeterminismScope.yml Adds patterns for “Workflow code” determinism claims.
AGENTS.md Explains determinism terminology and links to the advisory rule.

Review effort: Balanced

Add 'must remain/stay', 'keep(s/ing) Workflow code deterministic', an aside
or parenthetical between 'Workflow code' and the verb, and 'deterministic
constraints of the Workflow code'.
@Duncanma
Duncanma merged commit 7d3375d into main Oct 29, 2026
12 checks passed
@Duncanma
Duncanma deleted the duncan/determinism-scope-workflow-code branch October 29, 2026 16:10

This branch was successfully deployed

1 active deployment
Preview — be424978 Deployed Oct 29, 2026 by vercel[bot]
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.

3 participants