fix(workflow): preserve complete tool results #355
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 256 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.332
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #355"
general
weight: 0.35
yuluo-yx
I acknowledge this contribution to ARGI. <h3>Describe what this PR does / why we need it</h3> Preserve empty, composite, JSON, binary and metadata-bearing successful tool results instead of truncating them to the first text or producing null step outputs; retain ordinary single-text string compatibility. <h3>Does this pull request fix one issue?</h3> <!--If that, add "Fixes #xxxx" below in the next line. For example, Fixes #15. Otherwise, add "NONE" --> Fixes #281. <h3>Describe how you did it</h3> Project complete results into ordered, path-addressable maps/lists and move successful result validation, projection and publication outside invocation retries so result-handling failures cannot replay an already successful tool effect; keep invocation failures and error ToolResult retries. Document downstream paths, migration and runtime boundaries. <h3>Describe how to verify it</h3> The unchanged reviewed implementation passes <code>mvn -B -pl :argi-workflow-core -am clean test</code>: 142 tests, zero failures/errors/skips and zero Checkstyle violations; the same 12-case regression suite produces 2 failures and 7 errors on the baseline. Four independent offline probes pass, covering following-tool mappings, failed-stage retry, cancellation between attempts and parallel outputs. Pinned Java formatting, full <code>make lint</code>, full <code>make licenses-check</code> (1043 valid, 634 ignored, zero invalid) and diff whitespace checks pass. <h3>Special notes for reviews</h3> A metadata-bearing single-text result intentionally becomes structured; consumers selecting its text should use <code>content.0.text</code>. JSON text is preserved rather than parsed; binary argument serialization follows the configured ObjectMapper. The composite representation is proposed for maintainer review. Whole-repository tests, real providers and end-to-end multimodal adapters were not run; failed invocations may already have external effects, so this is not an exactly-once guarantee. AI-assisted implementation and independent local review.