fix(server): retain bounded runtime diagnostic details - #10087
juliusmarminge wants to merge 3 commits into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This focused fix improves diagnostic visibility while adding up to 2,048 characters to every long runtime error or warning persisted and delivered to clients. At high event counts, that creates material SQLite, HTTP, and WebSocket payload growth, so the retention and transfer tradeoff warrants human confirmation. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Runtime diagnostics can lose their line and column when the durable work-log message is shortened to 180 characters.
Keep that compact message and the existing warning summary. For longer runtime error/warning messages, retain plain-text detail up to 2,048 JavaScript string code units including the truncation marker. Preserve an existing warning detail, banners and session errors unchanged.
Evidence
Before:
After:
Human decision required
The new retention limit increases transfer size. With 500 varied cap-sized diagnostics, the snapshot grows from 244,276 to 1,274,276 JSON bytes, or 73,616 to 784,783 gzip bytes. Highly escaped text reaches about 7 MB decoded JSON. Confirm the 2,048-code-unit tradeoff before merging.
Related to #1084, which stays open. Text beyond the cap can still lose its tail. Explicit warning details keep their existing precedence and are not newly capped, so this is not a universal payload limit. This does not revive the banner changes proposed by ecatuogno1 in #1202.
Prepared by GPT 6 Astra via Codex in T3 Code.
Note
Retain bounded runtime diagnostic details in
runtimeEventToActivitiesmessagefield capped at 180 characters plus a deriveddetailfield capped at 2,048 characters when no explicit detail is supplied.detailfield on long runtime error/warning activities — check any activity readers inapps/server/src/orchestration/Layers/ProviderRuntimeIngestion.tsand downstream transports for unexpected payload growth.Macroscope summarized e67db5c.