Skip to content

docs(inbox): flag default state= excludes acked/expired for conversation-view consumers#99

Merged
mikemolinet merged 1 commit into
mainfrom
primary/cmpg2szip-inbox-docs-state-asymmetry
May 21, 2026
Merged

docs(inbox): flag default state= excludes acked/expired for conversation-view consumers#99
mikemolinet merged 1 commit into
mainfrom
primary/cmpg2szip-inbox-docs-state-asymmetry

Conversation

@mikemolinet
Copy link
Copy Markdown
Collaborator

Summary

Docs-only fix for GET /v1/agents/{ref}/inbox. Flags that the default state= filter excludes acked + expired (correct for worker-runtime consumers; wrong for conversation/transcript consumers like chat UIs).

Why

Empirical (2026-05-21, msg_q8zsi74xe4us): Dock's cue.dock.svc /api/threads consumer hit the asymmetry. Cross-user messages were ack'd by Dock's own desktop worker faster than the human-facing /api/threads could surface them → recipient pane empty while sender bubbles rendered correctly (sent-side requested all states; inbox-side took the default).

Substrate behavior is correct — messages were delivered + acked successfully. Dock fixed Dock-side. But any future conversation-view consumer hits the same trap without docs flagging.

Mike directive 2026-05-21 ~22:48Z (via cue-pm): "in general we need to do 5x better on documentation of all of our code we write and features we make b/c right now, our documentation is severely lacking." This is the first instance.

Changes

  • app/routers/agents.py — expanded state= Query description + added "Conversation-view consumer note" section in the endpoint docstring with Jingim's suggested phrasing + the exact state-set string conversation consumers should pass + empirical Dock anchor

No code change. Docs only.

Test plan

  • pytest tests/test_agents.py -q → 22/22 pass (no regression)
  • python3 -c "import ast; ast.parse(open('app/routers/agents.py').read())" → syntax OK
  • CI green on Feature PR to Main workflow
  • G11-α + G11-β with cue-pm
  • Admin-merge

No canary needed (docs-only). No G14 prod-verify needed (docs don't affect runtime behavior).

Cross-refs

  • Backlog row: cmpg2szip000404l4ibldaq6e
  • Jingim DX note: msg_q8zsi74xe4us
  • cue-pm kickoff: msg_6902t8gjxtcc

🤖 Generated with Claude Code

…ion-view consumers

Add a Conversation-view consumer note to GET /v1/agents/{ref}/inbox
explaining that the default state filter excludes `acked` + `expired`,
which is right for worker-runtime/agent-handler consumers but wrong
for chat UIs / message-thread renderers / audit logs.

## Why

Empirical: 2026-05-21, Dock's cue.dock.svc /api/threads consumer hit
the asymmetry. Recipient pane was empty for cross-user messages
because Dock's own desktop worker poll-acked them faster than the
human-facing /api/threads could surface them. Sent-side bubbles
rendered correctly because Dock's sent view requested all states.

Substrate behavior is correct — messages WERE delivered + acked.
Dock fixed Dock-side by passing the full state set on the threads
fetch. But any future conversation-view consumer will hit the same
trap unless flagged in the docs.

## What changed

- `state=` parameter description: expanded from one-liner to call
  out the worker-default-vs-conversation-view distinction + give
  the exact state-set string conversation consumers should pass
- Added "Conversation-view consumer note (v1.1.5 docs)" section to
  the endpoint docstring with the empirical Dock anchor

No code change. Docs only. Per Mike directive 2026-05-21 ~22:48Z
"in general we need to do 5x better on documentation."

Backlog row: cmpg2szip000404l4ibldaq6e
Jingim DX note: msg_q8zsi74xe4us
@github-actions
Copy link
Copy Markdown

Parity check

This PR modifies files tracked in parity-manifest.json:

  • app/routers/agents.py

Please confirm one of the following in a reply or PR description update:

  1. The equivalent change has been applied to the private cueapi monorepo. Link the PR.
  2. This change is OSS-only and does not need porting. Briefly explain why (e.g. "fixes a bug that only exists in the OSS build").
  3. A follow-up issue has been filed to port the reverse direction. Link the issue.

This is a soft check — it does not block merge. The goal is visibility, not friction. See HOSTED_ONLY.md for the open-core policy.

@govindkavaturi-art govindkavaturi-art enabled auto-merge (squash) May 21, 2026 22:55
@mikemolinet mikemolinet merged commit a4d4d44 into main May 21, 2026
6 checks passed
@mikemolinet mikemolinet deleted the primary/cmpg2szip-inbox-docs-state-asymmetry branch May 21, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant