fix(mcp): preserve transport event deadline values and provenance #437
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #437"
general
weight: 0.35
maurycy
Review follow-up — a3f4c0e
Addressed Maurycy's review: active-only milestones/categories and compact summaries; withdrawn history retained in the full timeline; concrete latest-event/formatter types; opaque reported JSON preserved only at the two event-value paths; final-response tests on both tools; shorter tool description with detailed guidance in the query resource. All five review threads answered and resolved. Remote checks pending; no merge or live customer verification.
Summary
Fixes DEV-13524: preserve public transport-event
value,data_source, andinvalidated_atinstead of discarding them during MCP formatting.For
container.detention_lfd_line.changed, the deadline is the API'svalue, nottimestamp. Pickup LFD remains separate and unchanged. This fixes information loss where an event is reported; it does not establish carrier coverage or promise an empty-return deadline for every container. No t49/backend changes, agent prompt changes, auth changes, or SQL-tool dependencies.Verification
npm run checkpasses (existing lint warnings remain).git diff --checkpasses.<!-- codesmith:footer -->
---
<a href="https://app.blacksmith.sh/Terminal49/codesmith/API/pr/437?autoLogin=true&ref=codesmith_pr_footer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1794701400&installation_model_id=18852&pr_number=437&ref=codesmith_pr_footer&repository=Terminal49%2FAPI&return_to=https%3A%2F%2Fgithub.com%2FTerminal49%2FAPI%2Fpull%2F437&signature=a7cb3d0f842657dc62255f43ce0a89a52ff2c5a310b61ab643422f3f4d927eaa"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup>
<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
<!-- greptile_comment -->
<!-- greptile_summary -->
<h2><a href="https://app.greptile.com/api/retrigger?id=81905899"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/terminal49/github/terminal49/api--09759b76-76b9-443c-8883-3fa461eae503/-/pull/437"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 4/5</h2>
<!-- greptile-risk -->
The PR appears safe to merge, with non-blocking fixes recommended for structured values and the snapshot return type.
<h2><a href="https://app.greptile.com/api/ide/codex?prompt=IMPORTANT%3A%20Work%20in%20the%20repository%20%22terminal49%2Fapi%22%20on%20the%20existing%20branch%20%22fix%2Fmcp-transport-event-values%22.%20Checkout%20that%20branch%20%E2%80%94%20do%20NOT%20create%20a%20new%20branch%20or%20open%20a%20new%20PR.%20Push%20your%20changes%20to%20%22fix%2Fmcp-transport-event-values%22.%0A%0A%23%23%23%20Issue%201%0Apackages%2Fmcp%2Fsrc%2Ftools%2Fget-container-transport-events.ts%3A220%0AStructured%20%60value%60%20objects%20can%20still%20lose%20fields%20in%20actual%20MCP%20responses.%20%60wrapTool%60%20passes%20the%20whole%20result%20through%20%60stripResponseSteering%60%2C%20which%20recursively%20removes%20%60_agent_steering%60%20and%20%60_response_contract%60%2C%20plus%20fields%20such%20as%20%60recommendations%60%20beneath%20any%20%60_metadata%60%20key.%20For%20example%2C%20%60%7B%22_metadata%22%3A%7B%22recommendations%22%3A%5B%22reported%22%5D%7D%7D%60%20becomes%20%60%7B%22_metadata%22%3A%7B%7D%7D%60.%20This%20affects%20both%20the%20timeline%20and%20compact%20snapshot.%0A%0AKeep%20reported%20event%20values%20outside%20this%20cleanup%20and%20add%20a%20test%20through%20the%20registered%20tool%3B%20the%20new%20executor%20tests%20stop%20before%20this%20step.%20Greptile%20automatically%20discovered%20a%20related%20ticket%20stating%20that%20structured%20event%20values%20must%20be%20preserved%2C%20which%20informed%20this%20comment.%0A%0A%23%23%23%20Issue%202%0Apackages%2Fmcp%2Fsrc%2Ftools%2Fget-container.ts%3A388-390%0A%60formatEventsData%60%20now%20returns%20%60value%60%2C%20%60data_source%60%2C%20and%20%60invalidated_at%60%2C%20but%20%60ContainerStatus.events.latest_event%60%20still%20declares%20only%20%60event%60%2C%20%60timestamp%60%2C%20and%20%60location%60.%20Since%20%60executeGetContainer%60%20returns%20%60Promise%3CContainerStatus%3E%60%2C%20TypeScript%20callers%20cannot%20access%20the%20new%20fields%20without%20a%20cast.%0A%0AAdd%20these%20fields%20to%20the%20declared%20return%20type%2C%20using%20%60unknown%60%20for%20arbitrary%20reported%20%60value%60.%0A%0ANote%3A%20If%20this%20suggestion%20doesn't%20match%20your%20team's%20coding%20style%2C%20reply%20to%20this%20and%20let%20me%20know.%20I'll%20remember%20it%20for%20next%20time!%0A%0A---%0A%0AFor%20each%20issue%20above%2C%20determine%20whether%20it%20is%20valid%20and%20should%20be%20fixed.%20If%20so%2C%20fix%20it%20directly.&repo=terminal49%2Fapi&pr=437&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodexDark.svg?v=7"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=7"><img alt="Fix All in Codex" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=7" align="right"></picture></a>Findings</h2>
1. <img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=9" align="top"> Reported fields can disappear <a href="https://github.com/Terminal49/API/pull/437#discussion_r4289562200">▶</a>
2. <img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=9" align="top"> New fields lack types <a href="https://github.com/Terminal49/API/pull/437#discussion_r4289562209">▶</a>
<details><summary>Fix with agent prompt</summary>
`
`</details>
<details open><summary><h3>Summary</h3></summary>
Preserves reported transport-event values, sources, and withdrawal dates in timeline and compact snapshot responses.
</details>
<!-- greptile_confidence_score:4 -->
<sub>Reviews (1) · Last reviewed commit: "fix(mcp): preserve transport event value..." · Reviewed by Greptile</sub>
<!-- /greptile_comment -->