Skip to content

Add FIFO Scenario scheduling - #2376

Open
Roman Lutz (romanlutz) wants to merge 10 commits into
mainfrom
copilot/romanlutz-scenario-pr-05-queue-upstream
Open

Roman Lutz (romanlutz) wants to merge 10 commits into
mainfrom
copilot/romanlutz-scenario-pr-05-queue-upstream

Conversation

@romanlutz

@romanlutz Roman Lutz (romanlutz) commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds process-local single-active FIFO scheduling, stable queue positions, queued cancellation, race-safe handoff, overload evidence, and lightweight startup reconciliation. Reconciliation only owns scheduler-managed local runs and is non-destructive for shared backends.

What this layer adds

  • One active Scenario run per backend process with stable FIFO ordering.
  • Queue position, enqueue time, queued cancellation, and race-safe handoff.
  • Scheduler provenance retained through Scenario metadata construction.
  • Lightweight startup reconciliation scoped to scheduler-managed local runs.
  • Structured target overload evidence without pretending to provide adaptive throttling.

Preview

Single-active FIFO Scenario queue

Stack

This is 5 of 7 in native GitHub Stack #2390 and depends on #2375.

Layer Scope Pull request
1 Progress foundation #2372
2 Catalog and launch #2373
3 Live progress #2374
4 Run history #2375
5 FIFO scheduling (this PR) #2376
6 Configuration sizing #2377
7 Result details #2378

See the full implementation, screenshots, walkthrough, validation, and operational notes.

Validation

  • Backend: 15,212 passed, 120 skipped.
  • Frontend: 68/68 suites, 1,286/1,286 tests; lint, TypeScript, and production build passed.
  • Mock E2E, retries disabled: 91 passed, 0 failed, 0 skipped.
  • Seeded E2E, retries disabled: 62 passed, 0 failed, 0 skipped.
  • All configured pre-commit hooks passed; distinguished-engineer review approved the final stack.

Operational boundary

Scheduling and locks are process-local. Multi-worker or multi-replica deployments need durable coordination and leases; that is intentionally deferred and documented in the gist.

Comment thread pyrit/backend/services/scenario_run_service.py
Comment thread pyrit/backend/services/scenario_run_service.py
@romanlutz
Roman Lutz (romanlutz) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 478db50 to 6a2a2f4 Compare August 21, 2026 05:06
@romanlutz
Roman Lutz (romanlutz) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 6a2a2f4 to 8fbaae8 Compare August 21, 2026 08:01
@romanlutz
Roman Lutz (romanlutz) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 8fbaae8 to 3fbaefa Compare August 25, 2026 01:53
@romanlutz
Roman Lutz (romanlutz) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 3fbaefa to 06f7ccb Compare August 25, 2026 03:45
@romanlutz
Roman Lutz (romanlutz) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 06f7ccb to e13c986 Compare August 25, 2026 06:24
@richlundeen
Richard Lundeen (richlundeen) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from e13c986 to 299f8ac Compare August 31, 2026 17:09
@richlundeen
Richard Lundeen (richlundeen) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 299f8ac to df79dc4 Compare August 31, 2026 18:12
@richlundeen
Richard Lundeen (richlundeen) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from df79dc4 to 4bcd369 Compare September 1, 2026 21:18
@richlundeen
Richard Lundeen (richlundeen) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 4bcd369 to 1e53bef Compare September 1, 2026 21:34
@behnam-o
Behnam (behnam-o) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 1e53bef to 1ad0b66 Compare September 2, 2026 17:43
@behnam-o
Behnam (behnam-o) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 1ad0b66 to 6196b8a Compare September 2, 2026 18:07
@behnam-o
Behnam (behnam-o) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 6196b8a to 03bfa94 Compare September 2, 2026 19:15
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
Copilot AI and others added 3 commits September 3, 2026 13:23
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@richlundeen
Richard Lundeen (richlundeen) force-pushed the copilot/romanlutz-scenario-pr-05-queue-upstream branch from 03bfa94 to f36d604 Compare September 3, 2026 20:25
Base automatically changed from copilot/romanlutz-scenario-pr-04-history-upstream to main September 4, 2026 20:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
Comment thread tests/unit/backend/test_scenario_run_service.py Fixed
Roman Lutz (romanlutz) added a commit that referenced this pull request Sep 12, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
@romanlutz
Roman Lutz (romanlutz) marked this pull request as ready for review September 14, 2026 17:54
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d02c2d5-b499-4f78-a04d-03bffa750817
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.

2 participants