Skip to content

fix(pipeline-run): back off failed-submit recovery lookups#19

Merged
Volv-G merged 1 commit into
masterfrom
piforge/failed-submit-recovery-backoff
Jul 6, 2026
Merged

fix(pipeline-run): back off failed-submit recovery lookups#19
Volv-G merged 1 commit into
masterfrom
piforge/failed-submit-recovery-backoff

Conversation

@Volv-G

@Volv-G Volv-G commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix failed-submit recovery so a logical pipeline run is not submitted twice when pipeline_runs_create() creates the run server-side but raises before returning a run_id.

The scheduler retry path preserves a stable tangle-cli/submission-id annotation and can recover a previously-created run by looking it up before retrying. The old lookup window was too short, so delayed run registration could be missed and the retry would submit the same logical run again.

This changes recovery polling to an explicit exponential backoff schedule:

  • wait 0.5s, lookup
  • wait 1.0s, lookup
  • wait 2.0s, lookup
  • then stop and allow the existing retry flow to continue

If exactly one matching run is found, it is adopted. If multiple matches are found, recovery raises AmbiguousPipelineRunRecoveryError and refuses to submit a duplicate.

Real-world trigger: tangle-llm-cg-priority-large-scale-scrape-pipeline-vwlmq.

Tests

  • uv run ruff check packages/tangle-cli/src/tangle_cli/pipeline_run_manager.py tests/test_pipeline_runs_cli.py
  • uv run pytest tests/test_pipeline_runs_cli.py -q

Assisted-By: devx/8480f2ea-e082-4ce7-83b5-2b75a9e3161c
@Volv-G
Volv-G requested a review from Ark-kun as a code owner July 6, 2026 23:04
@Volv-G
Volv-G merged commit a350523 into master Jul 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant