chore(publish): cover new packages in publish.yml allow-list + fix mcp-workforce build#104
Conversation
…llow-list The publish.yml allow-list was last updated when the workspace had 5 packages (persona-kit, workload-router, cli, daytona-runner, agentworkforce). The deploy-v1 cascade shipped 3 more under @agentworkforce/* that the existing cli already depends on: - @agentworkforce/runtime (consumed by deploy, mcp-workforce) - @agentworkforce/deploy (consumed by cli) - @agentworkforce/mcp-workforce (consumed by harness CLIs via MCP) cli@3.0.1 already declares `@agentworkforce/deploy@0.0.0` as a runtime dep, but deploy was never published — the 0.0.0 on npm is a placeholder, so `npm i agentworkforce` today pulls a stub for `workforce deploy`. The same applies to deploy/mcp-workforce's runtime dep. This change preserves lockstep umbrella semantics and orders the publish in topological order (runtime before deploy/mcp-workforce, deploy before cli, cli before agentworkforce). personas-core stays on publish-personas.yml as before — not added here. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR updates the publish workflow package lockstep ordering and release-notes ordering, changes persona input resolution to prefer specs/env vars, adds integration-source persona fixtures (with onEvent and skills), adjusts schema test expectations, and narrows mcp-workforce memory.save valid scopes to workspace/user/global. ChangesLockstep Package Order
Persona input, fixtures, and memory scope
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🟡 packageOrder array in release notes not updated with new packages, causing incorrect sort order
The packageOrder array at line 698 still lists only the old set of packages (persona-kit, workload-router, cli, daytona-runner, agentworkforce) and is missing the three new packages added by this PR: runtime, deploy, and mcp-workforce. Since Array.prototype.indexOf() returns -1 for missing elements, all three new packages will sort before every known package (including persona-kit), producing an incorrect ordering in the GitHub Release notes body. The intended topological order from publish.yml:88-98 is not reflected here.
(Refers to line 698)
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish.yml:
- Around line 88-99: The publish workflow's packages list (the echo
"packages=persona-kit runtime workload-router deploy mcp-workforce
daytona-runner cli agentworkforce" line) was expanded but the release-notes
packageOrder array (packageOrder) still omits runtime, deploy, and
mcp-workforce; update the packageOrder definition to include those three
packages in the same relative order as the packages string so they don't get
index -1 and the release notes sort as intended.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1672b784-2b72-4ff0-b1e1-1852b2515d84
📒 Files selected for processing (1)
.github/workflows/publish.yml
mcp-workforce was landed in #91 against an older `PersonaMemoryScope` shape (`session | user | workspace | org | object`). #94 then tightened the type to `workspace | user | global`. Both PRs passed CI independently, but main is now broken at build time because the zod enum in `server.ts` and the runtime `VALID_SCOPES` Set in `tools/memory.ts` still reference the removed literals. Aligning both call sites to the canonical persona-kit shape: - `MEMORY_SCOPE_ENUM` → z.enum(['workspace', 'user', 'global']) - `VALID_SCOPES` → new Set(['workspace', 'user', 'global']) - memory.save tool description updated to match The default scope stays `workspace`. Callers that previously passed `'session'`/`'org'`/`'object'` will now get a validation error from the zod schema before the runtime check — preferable to silently mapping them to a different scope. Verified: `pnpm -F @agentworkforce/mcp-workforce typecheck` + `build` + `test` (23/23) all pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CodeRabbit + Devin both flagged that the `packageOrder` array used to
sort release-note entries was not updated alongside the publish
allow-list, so `runtime` / `deploy` / `mcp-workforce` would have
`indexOf === -1` and sort first (or in an arbitrary order depending on
the sort impl).
Mirror the topological order from "Resolve target packages":
persona-kit → runtime → workload-router → deploy → mcp-workforce
→ daytona-runner → cli → agentworkforce
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
`ctx.persona.inputs` is `Record<string, string>` (resolved values) on WorkforcePersonaContext; the raw `PersonaInputSpec` with `.env` and `.default` lives at `ctx.persona.inputSpecs`. The earlier env-var- precedence patch on PR #93 read .env / .default off `.inputs`, which only worked while the type was loose. The post-cascade readonly tightening exposed the bug at typecheck time and broke the examples typecheck job. Also fold the runtime-resolved value into the fallback chain so we prefer env > resolved > spec.default — matching `resolvePersonaInputs`. Verified: `pnpm run typecheck` + `pnpm run typecheck:examples` both clean after rebuilding @agentworkforce/deploy dist. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
`emit-schema.test` failed on main because PR #97 (IntegrationConfig.source discriminator) added three new fixtures but they were missing two schema-required fields (`onEvent` for cloud personas, `skills`) and the test's hardcoded expected-filename list wasn't updated. Three small fixes: 1. `emit-schema.test.ts`: add the three new fixture names to the expected-filenames deepEqual. 2. `integration-source-{deployer,workspace,service-account}.json`: add `"onEvent": "./agent.ts"` and `"skills": []` to each, matching the pattern used in `full.json` / `cron-only.json`. The fixtures still exercise their intended IntegrationSource shapes (no-source default-inject, explicit `workspace`, explicit `workspace_service_account`) — only the cross-cutting required-for-cloud fields were added. Verified: `pnpm -F @agentworkforce/persona-kit test` → 162/162 pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Why
The publish.yml allow-list was last updated when the workspace had 5 packages (
persona-kit,workload-router,cli,daytona-runner,agentworkforce). Tonight's deploy-v1 cascade shipped 3 more under@agentworkforce/*that the publishedclialready depends on:@agentworkforce/runtime— consumed bydeploy,mcp-workforce@agentworkforce/deploy— consumed bycli@agentworkforce/mcp-workforce— consumed by harness CLIs via MCPCurrent broken state:
@agentworkforce/cli@3.0.1declares@agentworkforce/deploy@0.0.0as a runtime dep, butdeploywas never published (the0.0.0on npm is a placeholder). Sonpm i agentworkforcetoday pulls a stub forworkforce deploy. Same applies todeploy → runtimeandmcp-workforce → runtime + persona-kit.What this changes
Three commits:
c319d15—Resolve target packagesallow-list. Adds the 3 missing packages in topological dep order so everyworkspace:*rewrites to an already-published version atpnpm packtime:0d90878—mcp-workforcememory scope fix. Building mcp-workforce on main fails because feat(mcp-workforce): MCP server bridging harnesses to workforce primitives #91 (mcp-workforce) and feat(persona-kit): JSON Schema export + fixture personas + lint codes #94 (PersonaMemoryScope narrowing) merged in an order that left mcp-workforce referencing removed literals ('session','org','object'). Aligns the zod enum + runtimeVALID_SCOPESSet to the canonical'workspace' | 'user' | 'global'. This commit was originally fix(mcp-workforce): align memory scope enum with narrowed PersonaMemoryScope #105 (now closed as superseded).c3e478f— release-notespackageOrdersync (addresses CodeRabbit + Devin review comments). The release-notes generator'spackageOrderarray used for sorting was not updated alongside the allow-list; new packages would haveindexOf === -1. Same topological order applied.personas-corecontinues to publish via the separatepublish-personas.ymlworkflow — not touched here.What I did NOT change
\${{ steps.targets.outputs.packages }}so it automatically picks up the new packages).@agentworkforce/*scope already; if it's per-package, the platform team needs to add the 3 new packages before the next publish run.Verified locally
pnpm -F @agentworkforce/mcp-workforce build— clean (was failing on main; this PR fixes it)pnpm -F @agentworkforce/mcp-workforce test— 23/23 passpnpm -F @agentworkforce/mcp-workforce typecheck— cleanTest plan
workflow_dispatchwithdry_run: true) and confirm:versions=....pnpm packproduces tarballs whosedependencieshave concrete versions for every@agentworkforce/*dep (no leftoverworkspace:*).@agentworkforce/runtime,@agentworkforce/deploy,@agentworkforce/mcp-workforceat the umbrella version and the cli's deploy dep resolves correctly onnpm i agentworkforce.🤖 Generated with Claude Code