Correct Priority and Fairness design patterns - #5276
Conversation
Codex Review SummaryThis 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. |
📖 Docs PR preview links |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 049f04be53
ℹ️ 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".
06868d2 to
8e72697
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Linked canonical and related guides still contain the inaccurate execution-order and Worker-capacity claims this PR corrects.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Corrects Priority and Fairness patterns to describe Task dispatch rather than Worker-capacity guarantees.
Changes:
- Clarifies dispatch behavior, limitations, and comparisons.
- Replaces duplicated examples with canonical guide links.
- Renames “Priority Task Queues” to “Priority.”
File summaries
| File | Description |
|---|---|
docs/design-patterns/qos-throughput-patterns.mdx |
Updates pattern summaries and terminology. |
docs/design-patterns/priority-task-queues.mdx |
Corrects Priority behavior and simplifies implementation guidance. |
docs/design-patterns/index.mdx |
Updates pattern cards. |
docs/design-patterns/fairness.mdx |
Corrects Fairness semantics, diagrams, and limitations. |
docs/design-patterns/downstream-rate-limiting.mdx |
Corrects related-pattern descriptions. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| The Fairness pattern distributes Task dispatches proportionally across tenants or user groups within a shared Task Queue so that a burst from one caller cannot starve others. Each group has a Fairness key and an optional weight. The Matching Service uses weighted fair dispatch to select the next Task within a Priority level. | ||
|
|
||
| Fairness applies only to Task dispatch. It does not account for Task duration or resource use. |
| The Priority Task Queues pattern assigns a `PriorityKey` to Workflows, Activities, and Child Workflows so that time-sensitive work executes ahead of lower-priority work within a single Task Queue—without requiring separate queues or routing logic. | ||
| The Priority pattern assigns a Priority key to Workflows, Activities, and Child Workflows so that time-sensitive work dispatches ahead of lower-priority work within a single Task Queue, without requiring separate queues or routing logic. | ||
|
|
||
| Priority applies to dispatch. It does not preempt running Tasks or reserve Worker capacity. |
Summary
Why
The pattern pages described execution and Worker-capacity guarantees that the Matching Service does not provide. These changes align the design guidance with the development guide and server behavior while keeping implementation details in the canonical guide.