Skip to content

MCP: contradictory state fields and mixed timestamp formats in results #3598

Closed

Description

@integry

Problem

  1. get_goal returned artifacts:[{number:96,"state":"open","draft":true}] and artifactStats.openPullRequests:1 together with pullRequests:[{number:96,"state":"merged"}] in one response.
  2. list_task_submissions {limit:1, sinceMinutes:10080} returned "state":"queued","submissionState":"queued" while progress.stage was "completed" and the PR was merged.
  3. Timestamps come in three formats, sometimes in one object: list_goals has created_at:"2026-11-02T10:07:28.179Z" next to updated_at:"2026-11-02 10:12:51" (no time zone); get_goal has checkpoint.lastAt:"2026-11-02T10:12:47Z" and progress.checkpoint.lastAt:"2026-11-02 10:12:47"; list_plans, list_todos, list_instance_members use the zone-less SQL form; list_plan_blocked_events.createdAt, get_followup_handoff.updatedAt, list_automation_runs.createdAt, list_automation_definitions.nextRunAt are epoch milliseconds.
  4. list_plans shows pull_request_count:15 with 8 PRs listed and no truncation flag; list_tasks shows agent_alias:null for running tasks whose agent the CLI shows.
  5. list_followup_handoffs is described as "the attempts whose publication is still owed, including holds awaiting an operator" but returns released handoffs with nextAction:"none" going back a month, with no limit or paging.

Expected / acceptance criteria

  • 1, 2: the state fields of one object agree; a merged pull request is not reported as an open artifact, and a submission whose task completed is not queued.
  • 3: every timestamp in an MCP result is ISO 8601 UTC with Z (convert at the MCP presentation boundary; do not change stored values or the REST API). Field names stay as they are.
  • 4: list_plans either lists all pull requests or flags the truncation; agent_alias is filled for running tasks.
  • 5: list_followup_handoffs returns only handoffs that are still held or in recovery by default; add includeReleased (default false), and limit/offset.
  • Tests for each point.

Implementation

Normalize timestamps in one place in the MCP presentation layer (a recursive pass over known timestamp field names or value shapes is acceptable if it is covered by tests). The goal artifact state and submission state come from the services the tools call; fix the derivation, not the display.

Notes

ProPR runs on SQLite only: do not add code or tests for other databases. Do not change REST response shapes.

Activity

  1. propr-dev commented on Nov 17, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3598/claude-opus-5-5-mcp-contradictory-state-f-20261117-0248-lqk
    • Base Branch: 3595-epic-0-9-h9l
    • Worktree: issue-3598-20261117-0248-claude-opus-5-5-lqk

    🔍 Track Task Execution

  2. added a commit that references this issue on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions