Skip to content

Extract staged routine execution into RoutinePipeline#167

Merged
alganet merged 1 commit intomasterfrom
routine-pipeline
Mar 17, 2026
Merged

Extract staged routine execution into RoutinePipeline#167
alganet merged 1 commit intomasterfrom
routine-pipeline

Conversation

@alganet
Copy link
Member

@alganet alganet commented Mar 17, 2026

Formalize the when/by/through lifecycle behind a dedicated pipeline so routine orchestration no longer lives in scattered route and context methods.

Changes:

  • add RoutinePipeline to own:
    • when-stage route gating
    • by-stage pre-handler routine execution
    • through-stage post-handler transformation
  • make DispatchEngine use RoutinePipeline for match-time routine checks
  • make DispatchContext use the pipeline for pre/post route execution
  • remove routine-stage orchestration from DispatchContext
  • remove AbstractRoute::matchRoutines() now that when-stage execution is owned by the pipeline
  • keep forwarding, response short-circuiting, and through-transform behavior intact under the new staged abstraction

Verification:

  • composer qa
  • changed executable lines verified at 100% coverage

Formalize the when/by/through lifecycle behind a dedicated pipeline so
routine orchestration no longer lives in scattered route and context
methods.

Changes:
- add RoutinePipeline to own:
  - when-stage route gating
  - by-stage pre-handler routine execution
  - through-stage post-handler transformation
- make DispatchEngine use RoutinePipeline for match-time routine checks
- make DispatchContext use the pipeline for pre/post route execution
- remove routine-stage orchestration from DispatchContext
- remove AbstractRoute::matchRoutines() now that when-stage execution is
  owned by the pipeline
- keep forwarding, response short-circuiting, and through-transform
  behavior intact under the new staged abstraction

Verification:
- composer qa
- changed executable lines verified at 100% coverage
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.88%. Comparing base (baa45eb) to head (c340a3d).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #167      +/-   ##
============================================
- Coverage     96.89%   96.88%   -0.01%     
- Complexity      450      452       +2     
============================================
  Files            28       29       +1     
  Lines          1096     1093       -3     
============================================
- Hits           1062     1059       -3     
  Misses           34       34              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alganet alganet marked this pull request as ready for review March 17, 2026 23:12
@alganet alganet merged commit 4d64319 into master Mar 17, 2026
6 checks passed
@alganet alganet deleted the routine-pipeline branch March 17, 2026 23:17
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