Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(jev-gate): never gate a significant event on a participant execution

merged#2916CedarCopilot

CedarCopilot wants to merge 3 commits into staging from fix/jev-gate-skip-participant-significant

Customer behavior verdict

Libra exercised 1 changed behavior; none regressed.

  • Owner executions remain subject to Jev for significant emails: Libra could not tell on this PR.
  • Insignificant participant emails remain subject to Jev: Libra could not tell on this PR.
  • Significant participant emails proceed without Jev gating: Libra could not tell on this PR.
  • An unresolved primary event does not bypass the participant gate: Held on this PR; the scenario fails when this is broken on purpose.

What Libra verified

  • An unresolved primary event does not bypass the participant gate

    Libra ran this behavior against the change and confirmed the check detects when it breaks.

    Technical evidence
    • a participant email with an unresolved significant primary event still lets Jev decide whether the gate skips the run
    • a participant email with an unresolved significant primary event continues when Jev says not to skip

    Changed code: pre-execution-setup.ts.

Live on prod, watching, 2 days leftTimeline and evidence
  1. Opened
    Sep 23, 2026, 9:25 AM
  2. Sep 23, 2026, 10:44 AM
  3. Merged
    Sep 23, 2026, 11:12 AM
  4. Live on prod
    Sep 23, 2026, 11:12 AM
  5. Observed 2 hours
    Sep 23, 2026, 11:12 AM
  6. Watching

    Live on prod, watching, 2 days left

    Sep 23, 2026, 11:12 AM
  7. Pipelines steady after this deploy
    Sep 23, 2026, 11:12 AM

Behaviors Libra is checking

Participant executions for significant inbound or outbound events bypass the Jev action gate and proceed to the orchestrator instead of being skipped by Jev.Not checked
prod
The system records when it bypasses Jev because a participant execution is handling a significant event.Not checked
prod

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

What was wrong

On staging, both runs on conversation d9d365b6 (an intro email and the participant's own outbound email) were skipped by the Jev action gate and recorded as "No-op AOP", although the AOP is Deals (is_no_op = false). CloudWatch jev-action-gate.evaluated: run 72507dcf noul 0.29 and run f9ba7147 noul 0.25, both skip: true, is_participant_execution: true, is_significant: true. The strategic overview and next steps never refreshed.

What changed

runJevActionGateCheck returns early (orchestrator runs) for a participant execution whose triggering event is significant, inbound or outbound. Logs jev-action-gate.bypassed. Anything that might change the shared deal has to register, and the gate's state has no deal context to judge that. isSignificant already filters machine noise (calendar invites, notifications, bulk mail), so Jev now only judges insignificant events on participant executions. Trade-off: a human "Sounds good" now runs the full orchestrator.

How to verify

Send an email on a shared deal as a participant. The run should have no "No-op AOP" output, a jev-action-gate.bypassed log line in the worker log group, and strategist/next-steps tool calls in agent_tool_calls.

šŸ¤– Generated with Claude Code

Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • apps/server/src/mastra/workflows/event-execution/__tests__/jev-action-gate-fallback.test.tsno production surface mapped
  • apps/server/src/mastra/workflows/event-execution/pre-execution-setup.tsno production surface mapped