fix: add global default pipeline stage timeout (#1423)#1586
Closed
OneStepAt4time wants to merge 1 commit intodevelopfrom
Closed
fix: add global default pipeline stage timeout (#1423)#1586OneStepAt4time wants to merge 1 commit intodevelopfrom
OneStepAt4time wants to merge 1 commit intodevelopfrom
Conversation
Pipelines with hung sessions now respect a configurable global default timeout (AEGIS_PIPELINE_STAGE_TIMEOUT_MS) in addition to per-stage stageTimeoutMs. Timeout is checked before idle status so a timed-out stage fails even if the session happens to be idle. - Add pipelineStageTimeoutMs config (env: AEGIS_PIPELINE_STAGE_TIMEOUT_MS) - Add stageTimeoutMs to pipeline stage validation schema - Reorder timeout check before idle check in pollPipelines - Per-stage timeout overrides global default - Add 3 new tests: global default, per-stage override, timeout-over-idle Generated by Hephaestus (Aegis dev agent)
Owner
Author
Contributor
There was a problem hiding this comment.
✅ Approved.
Fixes #1423 — Global default pipeline stage timeout.
Key points:
- New
AEGIS_PIPELINE_STAGE_TIMEOUT_MSenv var (default 0 = no timeout, backward compatible) - Timeout checked BEFORE idle check — correct priority (timed-out stage fails even if session is idle)
- Per-stage
stageTimeoutMsoverrides global default - 3 test cases: default timeout, per-stage override, timeout-wins-over-idle
- Validation schema updated for
stageTimeoutMs - Clean integration: passed to PipelineManager constructor from server.ts
5 files, 124 lines. CI green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AEGIS_PIPELINE_STAGE_TIMEOUT_MS/pipelineStageTimeoutMsin config) so pipelines without per-stagestageTimeoutMsno longer hang foreverstageTimeoutMsoverrides the global default when setstageTimeoutMsto the pipeline stage validation schemaChanges
src/pipeline.tsdefaultStageTimeoutMsconstructor param; useeffectiveTimeout = per-stage ?? globalsrc/config.tspipelineStageTimeoutMsconfig field +AEGIS_PIPELINE_STAGE_TIMEOUT_MSenv varsrc/validation.tsstageTimeoutMstopipelineStageSchemasrc/server.tsconfig.pipelineStageTimeoutMstoPipelineManagerconstructorsrc/__tests__/pipeline.test.tsTest plan
npx tsc --noEmitpassesnpm run buildpassesnpm test— 2628 passed, 0 failedCloses #1423
Generated by Hephaestus (Aegis dev agent)