Skip to content

chore(publish): cover new packages in publish.yml allow-list + fix mcp-workforce build#104

Merged
khaliqgant merged 5 commits into
mainfrom
chore/publish-workflow-cover-new-packages
May 13, 2026
Merged

chore(publish): cover new packages in publish.yml allow-list + fix mcp-workforce build#104
khaliqgant merged 5 commits into
mainfrom
chore/publish-workflow-cover-new-packages

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented May 13, 2026

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 published 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

Current broken state: @agentworkforce/cli@3.0.1 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. Same applies to deploy → runtime and mcp-workforce → runtime + persona-kit.

What this changes

Three commits:

  1. c319d15Resolve target packages allow-list. Adds the 3 missing packages in topological dep order so every workspace:* rewrites to an already-published version at pnpm pack time:
    persona-kit → runtime → workload-router → deploy → mcp-workforce → daytona-runner → cli → agentworkforce
    
  2. 0d90878mcp-workforce memory 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 + runtime VALID_SCOPES Set 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).
  3. c3e478f — release-notes packageOrder sync (addresses CodeRabbit + Devin review comments). The release-notes generator's packageOrder array used for sorting was not updated alongside the allow-list; new packages would have indexOf === -1. Same topological order applied.

personas-core continues to publish via the separate publish-personas.yml workflow — not touched here.

What I did NOT change

  • The lockstep baseline heal script (it iterates over \${{ steps.targets.outputs.packages }} so it automatically picks up the new packages).
  • Version bump / changelog / git-tag / publish loops (same — all iterate over the same allow-list).
  • npm OIDC trusted-publisher configuration — assumed to cover the @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 pass
  • pnpm -F @agentworkforce/mcp-workforce typecheck — clean

Test plan

  • Dry-run the publish workflow against this branch (workflow_dispatch with dry_run: true) and confirm:
    • Lockstep heal pulls all 8 packages to baseline without errors.
    • Version bump emits 8 entries on versions=....
    • pnpm pack produces tarballs whose dependencies have concrete versions for every @agentworkforce/* dep (no leftover workspace:*).
  • After merge, confirm next real release publishes @agentworkforce/runtime, @agentworkforce/deploy, @agentworkforce/mcp-workforce at the umbrella version and the cli's deploy dep resolves correctly on npm i agentworkforce.

🤖 Generated with Claude Code

…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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9517e0b7-17bc-436c-b567-a7bc57e4b92c

📥 Commits

Reviewing files that changed from the base of the PR and between c319d15 and f68e999.

📒 Files selected for processing (8)
  • .github/workflows/publish.yml
  • examples/linear-shipper/agent.ts
  • packages/mcp-workforce/src/server.ts
  • packages/mcp-workforce/src/tools/memory.ts
  • packages/persona-kit/src/__fixtures__/personas/integration-source-deployer.json
  • packages/persona-kit/src/__fixtures__/personas/integration-source-service-account.json
  • packages/persona-kit/src/__fixtures__/personas/integration-source-workspace.json
  • packages/persona-kit/src/emit-schema.test.ts
✅ Files skipped from review due to trivial changes (4)
  • packages/persona-kit/src/fixtures/personas/integration-source-service-account.json
  • packages/persona-kit/src/emit-schema.test.ts
  • packages/mcp-workforce/src/tools/memory.ts
  • packages/persona-kit/src/fixtures/personas/integration-source-workspace.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish.yml

📝 Walkthrough

Walkthrough

The 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.

Changes

Lockstep Package Order

Layer / File(s) Summary
Package resolution & release-notes order
.github/workflows/publish.yml
Publish workflow's "Resolve target packages" output is revised to include runtime, workload-router, deploy, and mcp-workforce in the lockstep publish list and the release-notes packageOrder is updated to match that topological order.

Persona input, fixtures, and memory scope

Layer / File(s) Summary
inputDefault uses inputSpecs for env/default resolution
examples/linear-shipper/agent.ts
inputDefault now reads spec metadata from ctx.persona.inputSpecs, derives env var name from spec, prefers process.env[envName] if present, then ctx.persona.inputs[name], then spec.default.
memory.save scope validation and description
packages/mcp-workforce/src/server.ts, packages/mcp-workforce/src/tools/memory.ts
memory.save allowed scopes are reduced to workspace, user, and global; tool description and VALID_SCOPES set updated accordingly.
Add integration-source fixtures and update schema test
packages/persona-kit/src/__fixtures__/personas/*, packages/persona-kit/src/emit-schema.test.ts
Three integration-source persona fixtures now include skills: [] and onEvent: "./agent.ts" and the emit-schema test's expected fixture list is expanded to include them.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I'm a rabbit in the repo, nibbling code with glee,
Packages line up neatly, a tidy publish sea.
Env vars whisper louder, fixtures hop in place,
Memories get smaller scope — a neat and cleaner space. 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: updating publish.yml allow-list for new packages and fixing mcp-workforce build issues.
Description check ✅ Passed The description is detailed and directly related to the changeset, explaining the problem, solution, and testing approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 chore/publish-workflow-cover-new-packages

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

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

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.

🟡 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)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6e3678f and c319d15.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml

Comment thread .github/workflows/publish.yml
Ricky Schema Cascade and others added 2 commits May 13, 2026 10:45
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>
@khaliqgant khaliqgant changed the title chore(publish): cover runtime + deploy + mcp-workforce in publish.yml allow-list chore(publish): cover new packages in publish.yml allow-list + fix mcp-workforce build May 13, 2026
Ricky Schema Cascade and others added 2 commits May 13, 2026 10:51
`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>
@khaliqgant khaliqgant merged commit 96bf4db into main May 13, 2026
2 checks passed
@khaliqgant khaliqgant deleted the chore/publish-workflow-cover-new-packages branch May 13, 2026 08:59
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