Skip to content

Honor Workforce workflow writer tier routing#73

Merged
khaliqgant merged 2 commits into
mainfrom
codex/workforce-persona-router-tier
May 8, 2026
Merged

Honor Workforce workflow writer tier routing#73
khaliqgant merged 2 commits into
mainfrom
codex/workforce-persona-router-tier

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

Summary

  • stop forcing Workforce workflow authoring to the best tier so router defaults can choose the faster best-value persona
  • avoid passing installRoot into metadata-only selection, while preserving runnable Claude installRoot handling
  • add regression coverage for router-selected writer tier and selection options

Tests

  • npm test -- --run src/product/generation/workforce-persona-writer.test.ts
  • npm run typecheck

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 00e21c6c-1e30-48a0-ab26-9f932079750c

📥 Commits

Reviewing files that changed from the base of the PR and between 18a313f and 89f3047.

📒 Files selected for processing (2)
  • src/product/generation/workforce-persona-writer.test.ts
  • src/product/generation/workforce-persona-writer.ts

📝 Walkthrough

Walkthrough

Removes the exported default tier constant and changes tier resolution to include tier only when callers explicitly provide it; replaces selection option helpers with metadata- and runnable-specific constructors, updates selection-module and retry callsites, and expands tests to assert option flows and retry behavior.

Changes

Workforce Persona Tier Default Handling

Layer / File(s) Summary
Contract / Export Change
src/product/generation/workforce-persona-writer.ts
DEFAULT_WORKFORCE_PERSONA_TIER constant is removed and no longer exported.
Options Helper
src/product/generation/workforce-persona-writer.ts
Replaces selectionOptions(...) with metadataSelectionOptions(...); personaResolverOptions no longer supplies a fallback tier and includes tier only when options.tier is explicitly provided.
Selection callsites
src/product/generation/workforce-persona-writer.ts
Calls to selectionModule.module.usePersona(...) for metadata-resolution now pass metadataSelectionOptions(options); runnable fallback paths use runnableSelectionFallbackOptions(options). Retry-without-installRoot reloads the module and uses metadata options.
Tests / Coverage
src/product/generation/workforce-persona-writer.test.ts
Routing test updated to assert captured usePersona options (undefined); new test confirms Workforce router selects default writer tier when callers omit tier (resolver receives {}); runnable fallback tests capture options ({ tier: 'best', installRoot: ... }) and add retry test asserting two resolver calls and warning on retry without installRoot.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • AgentWorkforce/ricky#54: Modifies persona resolver tier handling in the same file—the retrieved PR adds attempt-based tier escalation and related types, while this PR removes default tier auto-fallback and the exported constant.

Poem

🐰 I hopped through code to prune a default,
Now explicit tiers stand proud and tall.
Router whispers choices, tests record the dance,
Retry once, then try again—no fall.
Tiny paws applaud the careful call.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: honoring Workforce workflow writer tier routing instead of forcing best tier.
Description check ✅ Passed The description clearly relates to the changeset, explaining the rationale (stop forcing best tier), implementation details (avoiding installRoot in metadata), and test coverage additions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/workforce-persona-router-tier

Comment @coderabbitai help to get the list of available commands and usage tips.

@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: 18a313fa4e

ℹ️ 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 src/product/generation/workforce-persona-writer.ts

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@khaliqgant khaliqgant merged commit 82abd39 into main May 8, 2026
1 check was pending
@khaliqgant khaliqgant deleted the codex/workforce-persona-router-tier branch May 8, 2026 14:02
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.

1 participant