feat(logs): accept per-request stream timeout #13
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 428 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.363
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #13"
general
weight: 0.35
Sridhar1030
Log-follow requests accept optional
timeout_secondsto control one SSE connection's lifetime. The effective timeout is the smaller of the request and the configured deployment maximum, which defaults to 300 seconds. Omitting the parameter uses that maximum. Expiry sendsstream_expired, closes the SDK iterator, and leaves training running so clients can reconnect.The parameter accepts ASCII integers from 1 to 2147483647 without signs, leading zeros, whitespace, or decimal points. Invalid values return 400 for both follow and snapshot requests; valid values do not affect snapshots. The OpenAPI contract, generated handlers, and user documentation describe this behavior.
The E2E checks now measure one- and three-second stream lifetimes, validate the complete final SSE error, require prompt connection closure, and reconnect for nonempty logs. They confirm the job remains RUNNING after each expiry and that a subsequent snapshot succeeds. Total request deadlines catch stalled headers and quiet or continuously active streams. Measurements are saved in lifecycle evidence. These checks require a real workload supplied with
--job-fileand--check-stream.Validation:
make checkpassed: 831 unit tests, lint, formatting, and type checks. CI passed for dc2d722, including generated API and Helm checks.artifacts/e2e/pr13-timeout-20261110T103327Z/.Coverage limits: the live deployment predates the deployment-cap fix. Optional
--log-stream-max-seconds Ntests omitted and above-limit requests against an explicitly configured maximum; its harness regressions pass, but live verification still requires a current image and a short configured limit. The live run did not verify checkpoints or additional algorithm lifecycles. API and gateway CA trust were verified; the separate Kubernetes observer inherited disabled TLS verification from the existing kubeconfig.Requested merge order: #13, then #14, then #15.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Log-following requests can set a connection timeout in seconds. The timeout defaults to the configured maximum of 300 seconds and cannot exceed the deployment’s configured limit.
When a follow stream expires, it closes with a
stream_expiredevent. A valid timeout does not affect snapshot requests.Bug Fixes
Invalid timeout values return a 400 error for both follow and snapshot requests.
Documentation
* Updated guidance explains timeout limits, accepted values, and stream expiry.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->