Skip to content

fix: add global defaultStageTimeoutMs for pipeline stages (#1423)#1606

Merged
OneStepAt4time merged 1 commit intodevelopfrom
fix/1423-pipeline-stage-timeout-v2
Apr 10, 2026
Merged

fix: add global defaultStageTimeoutMs for pipeline stages (#1423)#1606
OneStepAt4time merged 1 commit intodevelopfrom
fix/1423-pipeline-stage-timeout-v2

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Add global default stage timeout for pipeline stages.

Changes

  • src/pipeline.ts: Add parameter to PipelineManager constructor
  • src/config.ts: Add config with env var
  • src/server.ts: Pass to PipelineManager

Behavior

  • means no timeout (backward compatible)
  • Per-stage overrides the global default
  • Timeout is checked BEFORE idle in the poll loop (timeout wins over idle)

Tests

3 new tests added:

  1. Uses global defaultStageTimeoutMs when per-stage timeout is not set
  2. Per-stage timeout overrides global default
  3. Timeout wins over idle when both are true at the same poll check

PR Stats

  • 4 files changed, 119 insertions(+), 11 deletions(-)
  • Well within 500 line diff limit ✅

- Add pipelineStageTimeoutMs config with AEGIS_PIPELINE_STAGE_TIMEOUT_MS env var
- PipelineManager constructor accepts defaultStageTimeoutMs (0 = no timeout)
- Per-stage stageTimeoutMs overrides global default
- Timeout check happens BEFORE idle check (timeout wins over idle)
- Add 3 new tests: global default, per-stage override, timeout wins over idle
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved.

Fixes #1423 — Global default pipeline stage timeout.

Same clean implementation as original #1586, correctly ported to current develop.

Key points:

  • New AEGIS_PIPELINE_STAGE_TIMEOUT_MS env var (default 0 = no timeout, backward compatible)
  • Timeout checked BEFORE idle — correct priority
  • Per-stage stageTimeoutMs overrides global default via nullish coalescing
  • 3 test cases: default timeout, per-stage override, timeout-wins-over-idle
  • parseIntSafe for env var parsing
  • 4 files, 119 lines. CI green.

@OneStepAt4time OneStepAt4time merged commit fb3c51b into develop Apr 10, 2026
11 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/1423-pipeline-stage-timeout-v2 branch April 10, 2026 12:47
OneStepAt4time pushed a commit that referenced this pull request Apr 10, 2026
…1583)

Remove all documentation references to deleted features (PR #1583).

REMOVED FEATURES:
- Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id)
- Model Router config and tiered routing

FILES CHANGED:
- README.md: Remove consensus/model router from features list
- docs/advanced.md: Remove Consensus Review section
- docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event
- docs/architecture.md: Remove consensus.ts and model-router.ts from module overview
- docs/getting-started.md: Update advanced features reference
- docs/enterprise.md: Remove modelRouter from config example
- docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED
- docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list
- docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope
- docs/enterprise/index.md: Remove consensus reliability finding

RESOLVED IN v0.3.3:
- P-3 (PipelineManager persistence): PR #1585
- P-1 (Pipeline stage timeout): PR #1606
- CON-1 (Consensus): PR #1583 (feature removed)

NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.
OneStepAt4time pushed a commit that referenced this pull request Apr 12, 2026
…1583)

Remove all documentation references to deleted features (PR #1583).

REMOVED FEATURES:
- Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id)
- Model Router config and tiered routing

FILES CHANGED:
- README.md: Remove consensus/model router from features list
- docs/advanced.md: Remove Consensus Review section
- docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event
- docs/architecture.md: Remove consensus.ts and model-router.ts from module overview
- docs/getting-started.md: Update advanced features reference
- docs/enterprise.md: Remove modelRouter from config example
- docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED
- docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list
- docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope
- docs/enterprise/index.md: Remove consensus reliability finding

RESOLVED IN v0.3.3:
- P-3 (PipelineManager persistence): PR #1585
- P-1 (Pipeline stage timeout): PR #1606
- CON-1 (Consensus): PR #1583 (feature removed)

NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.
OneStepAt4time added a commit that referenced this pull request Apr 12, 2026
…1583) (#1709)

Remove all documentation references to deleted features (PR #1583).

REMOVED FEATURES:
- Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id)
- Model Router config and tiered routing

FILES CHANGED:
- README.md: Remove consensus/model router from features list
- docs/advanced.md: Remove Consensus Review section
- docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event
- docs/architecture.md: Remove consensus.ts and model-router.ts from module overview
- docs/getting-started.md: Update advanced features reference
- docs/enterprise.md: Remove modelRouter from config example
- docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED
- docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list
- docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope
- docs/enterprise/index.md: Remove consensus reliability finding

RESOLVED IN v0.3.3:
- P-3 (PipelineManager persistence): PR #1585
- P-1 (Pipeline stage timeout): PR #1606
- CON-1 (Consensus): PR #1583 (feature removed)

NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.

Co-authored-by: Argus <argus@openclaw.ai>
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