Files
hermes-agent/plugins/teams_pipeline
Teknium 972b398642 fix(teams): claim a durable job once before scheduling its pipeline run
Mechanism: 3d2fc30b3d made the msgraph scheduler accept-then-detach:
create_job_from_notification persists the job and run_job runs as a
background task. Graph's notification `id` is optional; for a batch
carrying the same no-id notification twice, the second call returns the
same job still `received` (run_job persists progress only once it runs),
so two run_job tasks started and the Notion sink created two pages. Main
ran run_notification inline, so the duplicate saw the first job terminal.

Fix: the runtime's scheduler claims the job id in a per-runtime set
before spawning, refuses a job already claimed, and releases the claim
when the task ends (a later retry_scheduled redelivery still runs).

Red on r13-base2: tests/plugins/test_teams_duplicate_job_claim.py (two
run_job calls for one batch).

Review: andrexibiza C23
2026-10-11 19:31:35 -07:00
..
…
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
…