Skip to content

fix(mcp): define LFD and arrival windows the way the dashboard does - #401

Open
alosec wants to merge 4 commits into
mainfrom
feat/mcp-date-window-definitions
Open

alosec wants to merge 4 commits into
mainfrom
feat/mcp-date-window-definitions

Conversation

@alosec

@alosec alosec commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Targets main. Originally stacked on #404, which closed unmerged; its dashboard definitions reached main separately, so this is now the single commit rebased onto main.

Why

customer-v2 lfd-next-3-days ("Which containers have a last free day in the next 3 days?") answered 93 against a reference of 14. On Sodor staging:

Query (actively tracked) Total
pickup_lfd today → +3 days, no status filter (what the agent did) 93
same, current_status=available,not_available,grounded 14 (reference)
past-due LFD at terminal (pickup_lfd <today) 694
arrival today → +10 days 34 (reference)

The query-guidance resource also contradicted #398's definitions: it described "discharged but not picked up" as pod_discharged_at @exists + picked_up_at @not_exists, and demurrage risk as LFD bounds instead of the Containers at Risk set.

What

  • list_containers description: next-N-day LFD = still at the terminal + pickup_lfd [">=today", "<=N.days.from_now"]; past-due is separate; arrivals use arrival with the same bounds; "next N days" includes today and day N; today is the API server's UTC date (relative and absolute dates differ after midnight UTC: 11 vs 14 when I checked), so the agent states the dates it used.
  • terminal49://docs/mcp-query-guidance: same definitions; drops the contradicting recipes.
  • New guidance test pins the definitions.

Tests

MCP 445 passed on current main (2 new). vp run check and vp run build pass.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Aligns MCP query guidance with the dashboard definitions.

  • Container status and demurrage guidance matches the dashboard.
  • LFD and arrival windows use clear date bounds and scope.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "chore: restore main's Postman collection" · Reviewed by Greptile

@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api Ready Ready Preview Oct 19, 2026 5:26am UTC

Request Review

customer-v2 "LFD in the next 3 days" answered 93 against a reference of
14: without a status filter the window includes containers already
picked up or still on the water. The list_containers description and the
query guidance now define next-N-day LFDs as containers still at the
terminal (available, not_available, grounded) with pickup_lfd from today
through N.days.from_now, keep past-due LFDs separate, and say today is
the API server's UTC date. The guidance also drops recipes that
contradicted the dashboard definitions (discharged-not-picked-up by
milestones, demurrage risk by LFD bounds). Checked on Sodor staging:
the status-limited window gives the reference 14; arrivals in 10 days
give 34.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dodeja
dodeja force-pushed the feat/mcp-date-window-definitions branch from 3067c42 to 1bca2ee Compare October 17, 2026 06:48
@dodeja
dodeja changed the base branch from feat/mcp-tracked-default to main October 17, 2026 06:49
The force-push that rebased this branch onto main made the Postman
workflow compare against the old stacked base, which saw openapi.json
changes and regenerated the collection. That regeneration only reshuffled
generated IDs and example values. This branch does not change the spec,
so it keeps main's collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dodeja

dodeja commented Oct 17, 2026

Copy link
Copy Markdown
Member

Rebased the single commit onto main (signed, now 1bca2ee) and retargeted the base from feat/mcp-tracked-default (dead since #404 closed) to main. The net diff against main is the original three files. The contradicting discharged-not-picked-up recipe (pod_discharged_at @exists + picked_up_at @not_exists) stays removed, and the new guidance test asserts it is absent.

The force-push made the Postman workflow compare against the old base, so github-actions[bot] pushed b99d26d, which only reshuffled generated IDs and examples. c22b8a7 restores main's collection, so the PR does not touch it.

When merging: b99d26d's message contains [skip ci]. A squash merge copies it into the squash message, which would skip CI, Postman and release-please on main. Delete that line from the squash message before confirming.

Local on the rebased branch: vp run check, vp run build, MCP tests (445 passed, 2 new), MCP filter-schema drift (clean), eval:check and MCP lint all pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T05:28:08.000291Z 1271bc6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the risk-shadow:medium Shadow-only risk signal: medium label Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Shadow risk calibration

Signal Result Authority
Path classifier risk:high Deterministic advisory policy
heuristic fallback risk-shadow:medium Shadow only

Calibration result: disagreement (high vs medium).

Shadow risk never blocks or enables merge. Keep it in observation mode until roughly 50 pull requests have human-reviewed labels, then calibrate before considering any policy use.

@github-actions github-actions Bot added the risk:unknown Advisory evidence unavailable or changed; no merge permission label Oct 19, 2026
@github-actions github-actions Bot added risk:high Advisory path risk; current-head human review needed risk:unknown Advisory evidence unavailable or changed; no merge permission and removed risk:unknown Advisory evidence unavailable or changed; no merge permission risk:high Advisory path risk; current-head human review needed labels Oct 19, 2026
@github-actions github-actions Bot added risk:unknown Advisory evidence unavailable or changed; no merge permission risk:high Advisory path risk; current-head human review needed and removed risk:high Advisory path risk; current-head human review needed risk:unknown Advisory evidence unavailable or changed; no merge permission labels Oct 19, 2026

This branch was successfully deployed

1 active deployment
Preview — 1271bc68 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high Advisory path risk; current-head human review needed risk-shadow:medium Shadow-only risk signal: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants