perf(runtime-host): bound fragmented frame copy and scan work #5356
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 264 lines diff across 3 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.334
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #5356"
general
weight: 0.35
seekskyworld
Summary
The Runtime Host receive path grows its input buffer geometrically and searches only newly received bytes for the next delimiter. Fragmented frames no longer repeatedly copy and scan the entire prefix. The scan cursor records the actual searched extent, and buffer offsets are reset explicitly on reallocation.
Input ownership, frame/queue limits, UTF-8 validation, backpressure and EOF behavior are preserved. Refs #5038 for measurement context; this does not implement its page-encoding work.
Fixes #5355
Verification
AI use
Tool(s) and scope: OpenAI Codex investigated the issue and review feedback, authored the changes and tests, and ran validation. This is an automated PR update. Commits include Signed-off-by and Generated-by trailers; final review and merge remain human decisions.
Checklist
Does this PR entail a change in behavior?