Skip to content

fix(server): tolerate immediate notify before first run event - #151

Merged
chrisohearn merged 1 commit into
integration/mcp-events-20261109from
fix/relay-source-history-pruned-20261120
Nov 20, 2026
Merged

chrisohearn merged 1 commit into
integration/mcp-events-20261109from
fix/relay-source-history-pruned-20261120

Conversation

@chrisohearn

Copy link
Copy Markdown
Owner

Summary

  • Bind an accepted queued run when notify arrives before its v2 run event is visible, while anchoring the scan cursor before the first matching run.created or run.updated event when present.
  • Preserve source_history_pruned for terminal runs and when the requested time predates the oldest retained event.
  • Cover immediate queued sends on idle and busy threads, cursor truth, retained-history boundaries, terminal pruning, authorization recheck, and idempotent binding.

This reintroduces only the narrow source-history correction from historical PR #87, which was closed unmerged. It does not carry over that PR's unrelated changes.

Verification

  • pnpm exec vp test run apps/server/src/mcp/McpEvents.test.ts: 59 passed.
  • pnpm exec vp run check:changed origin/integration/mcp-events-20261109: passed (format, lint, knip, GraphQL, typecheck, 61 tests).

Boundaries

No migration, permission expansion, run 411 replay, or live callback probe.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T17:43:56.617861Z d1f78f0 PR opened
🔒 Security Review ✅ Completed 2026-11-20T17:43:56.366095Z d1f78f0 PR opened
ℹ️ 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.

@chrisohearn
chrisohearn merged commit 2665936 into integration/mcp-events-20261109 Nov 20, 2026
18 checks passed
@chrisohearn
chrisohearn deleted the fix/relay-source-history-pruned-20261120 branch November 20, 2026 19:13
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.

2 participants