Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

[2026-09-19] merging staging to main

merged#2830CedarCopilot

CedarCopilot wants to merge 1 commit into main from staging

Not deployedTimeline and evidence
  1. Opened
    Sep 19, 2026, 6:18 PM
  2. Sep 19, 2026, 6:22 PM
  3. Merged
    Sep 19, 2026, 6:40 PM
  4. Live on staging, live on prod, observed
    Pending
  5. Not deployed

    Not deployed

    Pending

Libra has no production signal for this change yet because it has not deployed. Libra checks hourly for 3 days after each deploy.

RetriggerConfidence Score: 3/5

Not safe to merge until the broken collateral tool guidance, unsupported authentication dependency resolution, and repository-required assertion cleanup are addressed.

Findings

  1. P1 Migrate loaded document guidance
  2. P1 Resolve Better Auth peer
  3. P2 Remove non-null assertion
Fix with agent prompt
### Issue 1
apps/server/src/mastra/mcp/external/server.ts:124-125
The external MCP surface now registers `document-read` and `document-write`, but the dynamically loaded collateral HTML skill still directs agents to call `document (read)` and `document (write)`. That tool name is no longer registered, so collateral generation that follows this guidance fails with a tool-not-found error. Update the loaded skill resources to use the split tool IDs and their current input contracts.

### Issue 2
pnpm-lock.yaml:15924-15934
This lockfile resolves `@better-auth/core@1.6.33` with `jose@6.0.11`, although Better Auth requires `jose` version `^6.1.0`. A fresh strict dependency resolution rejects this combination, leaving the application on an unsupported authentication dependency graph. Upgrade the direct Jose dependency to a compatible version and regenerate the affected lockfile entries.

### Issue 3
apps/server/src/lib/__tests__/auth-initial-sync.test.ts:44
`let resolveCheck!` uses a non-null assertion to bypass definite-assignment checking. This violates the repository directive requiring runtime-safe narrowing rather than assertions. Initialize the deferred resolver safely, or guard that it was assigned before calling it. This repository requirement must be satisfied before merging.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Do not merge yet. The external MCP document-tool split leaves dynamically loaded collateral guidance pointing at a removed tool name, so affected collateral workflows fail. The lockfile also resolves Better Auth with a Jose version outside its required peer range. The test contains a repository-prohibited non-null assertion that must be removed before merging.

Reviews (1) · Last reviewed commit: "Merge pull request #2828 from CedarCopil..."

Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • apps/mail/app/(auth)/login/login-client.tsxno production surface mapped
  • apps/server/.claude/skills/collateral/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/documents/SKILL.mdno production surface mapped
  • apps/server/src/lib/BUGREPORT-oauth-callback-getthreadcount-timeout.mdno production surface mapped
  • apps/server/src/lib/__tests__/auth-initial-sync.test.tsno production surface mapped
  • apps/server/src/lib/auth-initial-sync.tsno production surface mapped
  • apps/server/src/lib/auth.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/flat-args.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/mutating-actions-are-administrable.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/no-bare-user-id-inputs.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/scope-map.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/server.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/tool-description-length.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/tool-hints-match-behavior.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/__tests__/tool-inputschema-size.test.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/cedar-staff-debug-tool.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/deprecated-record-shims.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/load-brain-skills-tool.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/load-skill-tool.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/scope-map.tsno production surface mapped
  • apps/server/src/mastra/mcp/external/server.tsno production surface mapped
  • apps/server/src/mastra/tools/__tests__/master-surface.test.tsno production surface mapped
  • apps/server/src/mastra/tools/config/config-read-tool.tsno production surface mapped
  • apps/server/src/mastra/tools/conversation/conversationTool.tsno production surface mapped
  • apps/server/src/mastra/tools/debug/debugTool.tsno production surface mapped
  • apps/server/src/mastra/tools/document/__tests__/documentTool.delete.integration.test.tsno production surface mapped
  • apps/server/src/mastra/tools/document/__tests__/documentTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/document/__tests__/shareDocumentTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/document/boardTool.tsno production surface mapped
  • apps/server/src/mastra/tools/document/documentTool.schemas.tsno production surface mapped
  • apps/server/src/mastra/tools/document/documentTool.tsno production surface mapped
  • apps/server/src/mastra/tools/document/shareDocumentTool.tsno production surface mapped
  • apps/server/src/mastra/tools/document/tableTool.tsno production surface mapped
  • apps/server/src/mastra/tools/draft-comms/draftCommsTool.tsno production surface mapped
  • apps/server/src/mastra/tools/family-tool-names.tsno production surface mapped
  • apps/server/src/mastra/tools/mail/mailTool.tsno production surface mapped
  • apps/server/src/mastra/tools/run-sql-query/runSQLTool.tsno production surface mapped
  • apps/server/src/mastra/utils/__tests__/approval.test.tsno production surface mapped
  • apps/server/src/mastra/utils/approval-policy.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/harness/subagents.tsno production surface mapped
  • apps/server/src/services/access/__tests__/no-model-grants.test.tsno production surface mapped
  • apps/server/src/services/auth/__tests__/target-user-id-reaches-the-authority.test.tsno production surface mapped
  • apps/server/src/services/mail/threads/__tests__/get.test.tsno production surface mapped
  • apps/server/src/services/mail/threads/get.tsno production surface mapped
  • package.jsonno production surface mapped
  • patches/@armature-tech__mcp-analytics@0.6.36.patchno production surface mapped
  • pnpm-lock.yamlno production surface mapped