Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

[2026-08-14] merging staging to main

merged#2480CedarCopilot

CedarCopilot wants to merge 0 commits into main from staging

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 14, 2026, 6:54 AM
  2. Live on prod
    Aug 14, 2026, 8:48 AM
  3. Observed 3 days
    Aug 14, 2026, 8:48 AM
  4. Pipelines steady after this deploy
    Aug 14, 2026, 8:48 AM
  5. Merged
    Aug 14, 2026, 8:48 AM
  6. Unobserved

    Live on prod, no production signal yet

    Aug 17, 2026, 8:26 AM

Behaviors Libra is checking

Background jobs behavior from agent-action-queue/subagent-dispatch.ts keeps working in prod.Degradedlow confidence

Strict CloudWatch fallback found 9 recent prod failure log lines for [UpdateExternalCrmWorkflow] Driver update failed (Step updateOpportunityField failed: HTTP 400: [{\), but the same failure had 4 log lines in the comparable pre-deploy baseline. Libra is not blaming this PR.

prod, checked Aug 17, 2026, 8:26 AM
CRM integration behavior from crm/crm-reconcile-deals.ts, crm/deal-metrics.ts, crm/deal-timeline.ts keeps working in prod.Degradedlow confidence

Strict CloudWatch fallback found 9 recent prod failure log lines for [UpdateExternalCrmWorkflow] Driver update failed (Step updateOpportunityField failed: HTTP 400: [{\), but the same failure had 4 log lines in the comparable pre-deploy baseline. Libra is not blaming this PR.

prod, checked Aug 17, 2026, 8:26 AM
AOP context behavior from db/aop-schema.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback saw 1,587 success-shaped log lines matching pipeline, analytics, quota, aop, but no tied operation was present, so Libra is not calling this working.

prod, checked Aug 14, 2026, 4:26 PM
Calendar sync behavior from crm/calendar-events.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 5 recent prod failure log lines for [SCHEDULED] Failed to enrich unenriched calendar event (No valid connection tokens found for user <id>), but the same failure had 16 log lines in the comparable pre-deploy baseline. Libra is not blaming this.

prod, checked Aug 14, 2026, 4:40 PM
Chat workflow behavior from conversation/reconcileDealsWithProviderTool.ts, context-formatting/conversation-context.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback saw 20,912 success-shaped log lines matching email, emails, gmail, mail, inbox, but no tied operation was present, so Libra is not calling this working.

prod, checked Aug 14, 2026, 5:40 PM
Pipeline analytics behavior from scripts/aspire-canon-pipeline.sh, agent-defaults/pipeline-review.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback saw 1,590 success-shaped log lines matching pipeline, analytics, quota, aop, but no tied operation was present, so Libra is not calling this working.

prod, checked Aug 17, 2026, 1:22 AM

Failures attributed to this change

Customer impact is not proven from the retained evidence. 0 hits · 2 users · no retained trace sample.Introducedmedium confidence

unknown

prod, first seen Aug 14, 2026, 2:41 PM
Customer impact is not proven from the retained evidence. 2 hits · no retained affected-user count · no retained trace sample.Introducedmedium confidence

single_user

prod, first seen Aug 14, 2026, 2:41 PM

Libra has verdicts on 0 of 7 tracked behaviors on prod; 7 are still being checked. Libra has 2 low-confidence degraded verdicts it is still confirming. Libra attributed 2 failures to this change at medium confidence and is still confirming them. Libra checks hourly for 3 days after each deploy.

Greptile Summary

This staging merge adds CRM meeting reconciliation improvements, guarded playbook writes, on-demand subagent execution, notification updates, taxonomy/search behavior, supporting tests, operational scripts, and audit artifacts. One guarded-write rollback path can erase a concurrent valid playbook edit.

Confidence Score: 4/5

The guarded-write concurrency failure should be fixed before merging because a failed verification can erase another writer's valid playbook update.

The new rollback restores an unconditional stale snapshot after verification failure even though the main patch operates on live content, allowing overlapping playbook writes to lose committed content.

Files Needing Attention: apps/server/src/services/playbook/guarded-write.ts

Important Files Changed

FilenameOverview
apps/server/src/services/playbook/guarded-write.tsAdds guarded write and rollback behavior, but the rollback can overwrite a concurrent edit using a stale snapshot.
apps/server/src/services/crm/calendar-events.tsAdds time-and-attendee-based calendar matching with user scoping and ambiguity checks.
apps/server/src/services/crm/meeting-events.tsAdds structured extraction of external meeting speakers while excluding known hosts and coworkers.
apps/server/src/services/playbook/run-single-subagent.tsAdds isolated execution of one named playbook subagent through the existing automation runtime.
apps/server/src/trpc/routes/admin-subagent.tsExtends the staff-only administration route with cron execution, delivery suppression, output capture, and optional staff relay.
apps/server/src/services/turbopuffer/field-values-search.tsUpdates field-value filtering and search behavior with accompanying focused tests.

Sequence Diagram

rendering diagram…

Comments Outside Diff (1)

  1. apps/server/src/services/playbook/guarded-write.ts, line 228-237 (link)

    P1 Rollback overwrites concurrent edits

    If two writers patch the same PLAYBOOK.md concurrently and verification fails after the second writer commits, this rollback unconditionally restores the stale pre-write snapshot, deleting the other writer's valid content and metadata.

    Knowledge Base Used: Database Schema

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/server/src/services/playbook/guarded-write.ts
    Line: 228-237
    
    Comment:
    **Rollback overwrites concurrent edits**
    
    If two writers patch the same `PLAYBOOK.md` concurrently and verification fails after the second writer commits, this rollback unconditionally restores the stale pre-write snapshot, deleting the other writer's valid content and metadata.
    
    **Knowledge Base Used:** [Database Schema](https://app.greptile.com/cedar/-/custom-context/knowledge-base/cedarcopilot/cedar-mail/-/docs/database-schema.md)
    
    ---
    
    For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
    
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
  • .claude/skills/data-audit-prep/SKILL.mdno production surface mapped
  • .claude/skills/data-audit/PROCESS-DELTAS.mdno production surface mapped
  • .claude/skills/data-audit/SKILL.mdno production surface mapped
  • .claude/skills/data-audit/resources/playbook-build-runbook.mdno production surface mapped
  • .claude/skills/field-extraction/SKILL.mdno production surface mapped
  • .claude/skills/vocab-extraction/SKILL.mdno production surface mapped
  • .cursor/skills/account-setup-from-transcript/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/cedar-configuration/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/deal-intelligence-analysis/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/playbook-authoring/SKILL.mdno production surface mapped
  • apps/server/.claude/skills/subagent-runner/SKILL.mdno production surface mapped
  • apps/server/scripts/apply-curation.pyno production surface mapped
  • apps/server/scripts/apply-vocab-canon.tsno production surface mapped
  • apps/server/scripts/aspire-canon-pipeline.shno production surface mapped
  • apps/server/scripts/aspire-persona-rollup.tsno production surface mapped
  • apps/server/scripts/aspire-playbook-rendercheck.mjsno production surface mapped
  • apps/server/scripts/aspire-relabel-rows.tsno production surface mapped
  • apps/server/scripts/dump-sample.tsno production surface mapped
  • apps/server/scripts/eval-new-fields.tsno production surface mapped
  • apps/server/scripts/inject-taxonomy-into-playbook.pyno production surface mapped
  • apps/server/scripts/resync-relabeled-tp.tsno production surface mapped
  • apps/server/scripts/run-apply-vocab-canon.mjsno production surface mapped
  • apps/server/scripts/run-aspire-persona-rollup.mjsno production surface mapped
  • apps/server/scripts/run-aspire-relabel-rows.mjsno production surface mapped
  • apps/server/scripts/run-resync-relabeled-tp.mjsno production surface mapped
  • apps/server/scripts/seed-org-taxonomy.tsno production surface mapped
  • apps/server/scripts/taxonomy-eval/extract-workflow.jsno production surface mapped
  • apps/server/scripts/write-agentic.tsno production surface mapped
  • apps/server/scripts/write-judgment.tsno production surface mapped
  • apps/server/src/db/aop-schema.tsno production surface mapped
  • apps/server/src/mastra/tools/conversation/__tests__/reconcileDealsWithProviderTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/conversation/reconcileDealsWithProviderTool.tsno production surface mapped
  • apps/server/src/mastra/tools/event-execution/assignEventToConversationTool.tsno production surface mapped
  • apps/server/src/mastra/tools/notify/__tests__/notifyUserTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/notify/notifyUserTool.tsno production surface mapped
  • apps/server/src/mastra/utils/agent-date-formatting.tsno production surface mapped
  • apps/server/src/mastra/utils/context-formatting/conversation-context.tsno production surface mapped
  • apps/server/src/services/agent-action-queue/__tests__/subagent-dispatch.test.tsno production surface mapped
  • apps/server/src/services/agent-action-queue/subagent-dispatch.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/external-meeting-speakers.test.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/meeting-calendar-backstop.test.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/persist-stage-arc.test.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/person-name-match.test.tsno production surface mapped
  • apps/server/src/services/crm/calendar-events.tsno production surface mapped
  • apps/server/src/services/crm/crm-reconcile-deals.tsno production surface mapped
  • apps/server/src/services/crm/deal-metrics.tsno production surface mapped
  • apps/server/src/services/crm/deal-timeline.tsno production surface mapped
  • apps/server/src/services/crm/meeting-events.tsno production surface mapped
  • apps/server/src/services/crm/stage-inference.tsno production surface mapped
  • apps/server/src/services/crm/taxonomy-extraction-step.tsno production surface mapped
  • apps/server/src/services/crm/utils.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/fathom.tsno production surface mapped
  • apps/server/src/services/integrations/meetings/types.tsno production surface mapped
  • apps/server/src/services/notifications/user-slack-notifier.tsno production surface mapped
  • apps/server/src/services/playbook/__tests__/guarded-write.test.tsno production surface mapped
  • apps/server/src/services/playbook/agent-defaults/pipeline-review.tsno production surface mapped
  • apps/server/src/services/playbook/guarded-write.tsno production surface mapped
  • apps/server/src/services/playbook/run-single-subagent.tsno production surface mapped
  • apps/server/src/services/playbook/write-document-guarded.tsno production surface mapped
  • apps/server/src/services/turbopuffer/__tests__/field-values-search.test.tsno production surface mapped
  • apps/server/src/services/turbopuffer/field-values-search.tsno production surface mapped
  • apps/server/src/subagent-admin/cli.tsno production surface mapped
  • apps/server/src/trpc/routes/admin-subagent.tsno production surface mapped
  • docs/audits/aspire/artifacts/aspire-discovery-questions-EXTERNAL.mdno production surface mapped
  • docs/audits/aspire/artifacts/aspire-discovery-questions-INTERNAL.mdno production surface mapped
  • docs/audits/aspire/artifacts/aspireiq-data-lineage.htmlno production surface mapped
  • docs/audits/aspire/artifacts/aspireiq-sales-playbook.htmlno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-business-themes.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-feedback-themes.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-funnel-per-deal-amount.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-funnel-per-deal.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-pricing-groups.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-prompt-rewrite-output.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-segment-data-README.mdno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-segmentation180-out.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-sel-angles.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-sel-executive.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-sel-objections.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-sel-practitioner.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-sel-program_leader.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-sel-supporting.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-usecase-defs.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspire-usecase-quote-excludes.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspireiq-vocab-canon-2026-08-11-v2.jsonno production surface mapped
  • docs/audits/aspire/artifacts/data/aspireiq-vocab-canon-2026-08-11.jsonno production surface mapped
  • docs/audits/aspire/aspireiq-audit-handoff.mdno production surface mapped
  • docs/audits/aspire/scope/aspire-extraction-targets.mdno production surface mapped
  • docs/audits/aspire/scope/aspire-playbook-subset.mdno production surface mapped
  • docs/audits/aspire/scope/aspireiq-timeline-recovery-plan.mdno production surface mapped
  • docs/audits/aspire/taxonomy/aspire-canon-discovery.mdno production surface mapped
  • docs/audits/pirros/README.mdno production surface mapped
  • docs/audits/pirros/RETRIEVAL.mdno production surface mapped
  • docs/audits/pirros/artifacts/data/analysis.wf.jsno production surface mapped
  • docs/audits/pirros/artifacts/data/analysis_atoms.tsvno production surface mapped
  • docs/audits/pirros/artifacts/data/analysis_set.tsvno production surface mapped
  • docs/audits/pirros/artifacts/data/authoritative_linkage.tsvno production surface mapped
  • docs/audits/pirros/artifacts/data/obj_data.jsonno production surface mapped
  • docs/audits/pirros/artifacts/data/playbook_data.jsonno production surface mapped
  • docs/audits/pirros/artifacts/data/price_data.jsonno production surface mapped
  • docs/audits/pirros/chapters/differentiation.mdno production surface mapped
  • docs/audits/pirros/chapters/discovery.mdno production surface mapped
  • docs/audits/pirros/chapters/feature_resonance.mdno production surface mapped
  • docs/audits/pirros/chapters/icp.mdno production surface mapped
  • docs/audits/pirros/chapters/personas.mdno production surface mapped
  • docs/audits/pirros/chapters/pricing.mdno production surface mapped
  • docs/audits/pirros/chapters/problems.mdno production surface mapped
  • docs/audits/pirros/design/pirros-crm-active-deal-and-ownership.mdno production surface mapped
  • docs/audits/pirros/design/pirros-deal-brief-autofill.mdno production surface mapped
  • docs/audits/pirros/design/pirros-hubspot-field-proposal.mdno production surface mapped
  • docs/audits/pirros/design/pirros-hubspot-field-seed.jsonno production surface mapped
  • docs/audits/pirros/design/pirros-hubspot-fields-SHARED.mdno production surface mapped
  • docs/audits/pirros/design/pirros-phase1-conversation-backfill.mdno production surface mapped
  • docs/audits/pirros/design/pirros-stage-required-fields.mdno production surface mapped
  • docs/audits/pirros/scope/README.mdno production surface mapped
  • docs/audits/pirros/scope/deals-154-by-rep.txtno production surface mapped
  • docs/audits/pirros/scope/deals-267-full.tsvno production surface mapped
  • docs/changelogs/2026-W33.mdno production surface mapped
  • docs/design/on-demand-subagent-cli.mdno production surface mapped