Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

MCP coverage: field/CRM-mapping/webhook admin capabilities (buckets 1-3)

merged#2731CedarCopilot

CedarCopilot wants to merge 8 commits into staging from feat/mcp-coverage-buckets-1-3

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Sep 8, 2026, 1:58 PM
  2. Sep 8, 2026, 7:25 PM
  3. Merged
    Sep 8, 2026, 7:36 PM
  4. Live on prod
    Sep 8, 2026, 7:36 PM
  5. Observed 2 days
    Sep 8, 2026, 7:36 PM
  6. Pipelines steady after this deploy
    Sep 8, 2026, 7:36 PM
  7. Unobserved

    Live on prod, no production signal yet

    Sep 11, 2026, 7:23 AM

Behaviors Libra is checking

Removing an option from an unmapped custom field reports affected stored values without changing data until the caller chooses remap-to or keep-legacy, while options with no stored values are removed immediately.Inconclusivelow confidence

Verification reached its budget before a verdict.

prod, checked Sep 11, 2026, 12:10 AM
Creating a custom select or list field can seed its options in the same config-write call, assigning missing enum ordering automatically.Inconclusivelow confidence

Unable to complete verification: the available telemetry query results only matched unrelated PostHog `/flags/` spans, and no concrete `config-write:create-field` production execution or success result was identified. Verdict: inconclusive.

prod, checked Sep 11, 2026, 12:11 AM
Updating a field with `ownerAgentId:null` clears its agent owner, while omitting `ownerAgentId` preserves the existing owner.Inconclusivelow confidence

Unable to complete verification: telemetry returned no production spans matching config-write since the deploy, so there is no positive runtime evidence for either the explicit-null or omitted-owner behavior.

prod, checked Sep 11, 2026, 12:22 AM
Creating a field with `sourceFromCrm` can inspect a live CRM picklist, populate the field, and create the CRM mapping in one operation.Inconclusivelow confidence

Verification reached its 120s wall-clock budget before a tied verdict. Libra is keeping this intent verifying until the next check.

prod, checked Sep 11, 2026, 12:24 AM
Organization members can set, replace, or clear entry and exit criteria for a specific playbook stage by stage ID through a guarded organization playbook write.Inconclusivelow confidence

Verification reached its 130s outer budget before the verifier returned. Libra is keeping this intent verifying until the next check.

prod, checked Sep 11, 2026, 1:23 AM
The connection-settings read operation exposes fetch-unowned-deals, stage-required-fields, deal-sync filters, Salesforce custom-object configuration, and Slack external-DM sync state for agent verification.Inconclusivelow confidence

Unable to verify: no matching `read-connection-settings` spans were found in production telemetry after the deployment, so there is no positive runtime evidence of successful execution or payload exposure.

prod, checked Sep 11, 2026, 1:24 AM

Libra has verdicts on 0 of 18 tracked behaviors on prod; 18 are still being checked. Libra checks hourly for 3 days after each deploy.

Summary

Closes buckets 1-3 of the MCP coverage roadmap , 10 independent streams, each a logical commit group, cherry-picked onto one branch so they can be reviewed one at a time. Two items (create-field + CRM-picklist sourcing, connection-settings ergonomics) were the stated top priority; two others are the confirmed root-cause fixes for a real customer incident (Adapt Insurance / Karim, webhook testing).

Every stream was tested by calling its tool's execute() directly against a real Cedar account (the Cedar MCP connector is unreachable from this dev environment) , real creates, real psql before/after, real cleanup, not just green tool-call returns. /refresh-agent-knowledge was run against cedar-configuration wherever a stream touched agent-facing tool schemas/triggers.

Commits, in review order

  1. create-field cluster (b2-1, b2-15, b2-4, b2-3, b2-16) , manual options, one-step CRM-picklist sourcing + auto-link (sourceFromCrm), ownerAgentId, remove-field-option resolution step, set-stage-criteria action.
  2. connection-settings cluster (b2-6, b2-7, b2-8, b2-11, b2-5) , stageRequiredFields (with ergonomic per-stage set/remove, not just whole-object replace), dealSyncFilter, customObjectConfig, fetchUnownedDeals, autoSyncExternalDms, notification-channel settings, CRM mapping type fields , read+write parity throughout.
  3. delete-field org-scope safety (b2-2) , the live-mapping check now runs at org scope too, not just user scope.
  4. playbook webhook list/test (b2-9) , manage_playbook_webhook gains op:list/op:test. Direct fix for the Adapt Insurance incident (no customer-facing way to test-fire a webhook-triggered agent).
  5. write-document sources (b2-10) , sourceUrl and generic upload, alongside the existing Gmail-attachment source.
  6. canvas CRUD (b2-12) , ui-config gains create/update/delete-canvas, wrapping the existing tRPC logic.
  7. test-run webhook + targetUserId (b2-13) , the other Adapt Insurance fix. New subagent_execution:user (SELF_OR_ORG_ADMIN) authorize() policy row.
  8. guarded-write first-time revert (b2-14) , a first-time PLAYBOOK.md that fails verification is now deleted, matching the existing revert-on-edit-failure behavior.
  9. run-sql ALLOWED_TABLES extension (b3-1) , admin read access to documents/agent_operating_procedures/agent_executions, same tenant-scoping rigor as every existing entry.
  10. doc fixes (b1-1, b1-2, b1-3) , two real bugs in account-setup-from-transcript (dead SQL, a manual step that's already a one-call action), plus webhook added to choosing-a-trigger.md's decision ladder.
  11. consolidation fix , 5 pre-existing test-run-subagent.test.ts tests broke when combined (not visible in any single stream's isolated testing): they assumed authorize() was called at most once; the targetUserId refactor made it always call once up front for self/target resolution. Fixed the test mocks, no production code changed.

Test plan

  • Scoped typecheck (pnpm --filter @zero/server run types) clean on the full consolidated branch
  • All touched test suites green together: configTool (130), field-deletion-safety, canvas-crud, guarded-write (37), sql-guard (+7 new), test-run-subagent (19, fixed), debugTool, full account-config directory (144), full auth directory (355)
  • Every stream's individual live-account test evidence is in its commit message
  • /refresh-agent-knowledge run wherever a stream touched agent-facing schemas , all clean or fixed

šŸ¤– Generated with Claude Code

https://claude.ai/code/session_01F4mjBtjYZyxnVvLQpehDSb

Greptile Summary

This PR substantially expands MCP administration coverage for fields, connection settings, webhooks, documents, canvases, SQL access, and playbook testing. Changes since the previous review refine several of those features:

  • Adds deletion for disabled we
Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • .claude/skills/account-setup-from-transcript/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/cedar-configuration/choosing-a-trigger.mdno production surface mapped
  • apps/server/.claude/skills/cedar-configuration/fields-and-values.mdno production surface mapped
  • apps/server/.claude/skills/cedar-configuration/playbook-anatomy.mdno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/mutating-actions-are-administrable.test.tsno production surface mapped
  • apps/server/src/mastra/skills/account-config/tools/applyConfigChangeTool.tsno production surface mapped
  • apps/server/src/mastra/skills/account-config/tools/readConnectionSettingsTool.tsno production surface mapped
  • apps/server/src/mastra/tools/config/__tests__/configTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/config/config-write-tool.tsno production surface mapped
  • apps/server/src/mastra/tools/debug/__tests__/debugTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/debug/debugTool.tsno production surface mapped
  • apps/server/src/mastra/tools/document/writeDocumentTool.tsno production surface mapped
  • apps/server/src/mastra/tools/run-sql-query/__tests__/sql-guard.test.tsno production surface mapped
  • apps/server/src/mastra/tools/ui-config/uiConfigTool.tsno production surface mapped
  • apps/server/src/services/agent-workspace/agent-read.tsno production surface mapped
  • apps/server/src/services/aop/__tests__/field-deletion-safety.test.tsno production surface mapped
  • apps/server/src/services/aop/__tests__/org-custom-fields.test.tsno production surface mapped
  • apps/server/src/services/aop/__tests__/user-aops.test.tsno production surface mapped
  • apps/server/src/services/aop/custom-field-management.tsno production surface mapped
  • apps/server/src/services/aop/field-deletion-safety.tsno production surface mapped
  • apps/server/src/services/aop/org-custom-fields.tsno production surface mapped
  • apps/server/src/services/aop/user-aops.tsno production surface mapped
  • apps/server/src/services/auth/authorize.tsno production surface mapped
  • apps/server/src/services/canvas/canvas-crud.test.tsno production surface mapped
  • apps/server/src/services/canvas/canvas-crud.tsno production surface mapped
  • apps/server/src/services/crm-sql/sql-guard.tsno production surface mapped
  • apps/server/src/services/integrations/__tests__/connection-config.test.tsno production surface mapped
  • apps/server/src/services/integrations/connection-config.tsno production surface mapped
  • apps/server/src/services/playbook/__tests__/guarded-write.test.tsno production surface mapped
  • apps/server/src/services/playbook/__tests__/test-run-subagent.test.tsno production surface mapped
  • apps/server/src/services/playbook/guarded-write.tsno production surface mapped
  • apps/server/src/services/playbook/playbook-webhook-registration.tsno production surface mapped
  • apps/server/src/services/playbook/test-run-subagent.tsno production surface mapped
  • apps/server/src/services/users/user-settings.tsno production surface mapped
  • apps/server/src/trpc/routes/aop.tsno production surface mapped
  • apps/server/src/trpc/routes/canvas.tsno production surface mapped