Skip to content

fix(event-bus): add diagnostic logging for auth flow in event delivery#2523

Merged
tlgimenes merged 1 commit intomainfrom
worktree-fix-auth-token-bus
Feb 28, 2026
Merged

fix(event-bus): add diagnostic logging for auth flow in event delivery#2523
tlgimenes merged 1 commit intomainfrom
worktree-fix-auth-token-bus

Conversation

@tlgimenes
Copy link
Copy Markdown
Contributor

@tlgimenes tlgimenes commented Feb 28, 2026

Summary

  • Adds 11 targeted [EventBus:Debug] diagnostic logs across the event bus → binding auth chain to diagnose "Streamable HTTP error" failures during async event delivery
  • Logs trace org context, JWT permissions, membership lookups, and downstream token state at each hop — no full secrets are exposed (tokens truncated to 8-20 chars)
  • Covers 6 files: notify.ts, headers.ts, outbound/index.ts, runtime/index.ts, runtime/bindings.ts, context-factory.ts

What to look for in logs

  • orgId: "NONE" anywhere → org context is lost in the chain
  • permissionKeys missing the BigQuery connection ID → JWT permissions don't grant access
  • downstream token expired with no refresh → OAuth token is dead
  • JWT membership SKIPPED → second-hop auth has no role, which may block access

Test plan

  • Deploy and trigger the event bus flow (publish event → subscriber handles → subscriber calls BigQuery binding)
  • Filter logs with grep "EventBus:Debug" and verify the expected log sequence appears
  • Confirm the logs reveal which of the three suspects (orgId, permissions, or OAuth token) causes the failure
  • Remove diagnostic logs after root cause is identified

🤖 Generated with Claude Code


Summary by cubic

Adds focused [EventBus:Debug] logs to the event-bus → bindings auth chain to diagnose "Streamable HTTP error" during async event delivery. Traces org context, permission keys, membership results, token issuance/refresh state, and outbound header keys (tokens truncated; no secrets).

Written for commit 0f1645a. Summary will update on new commits.

Add 11 targeted [EventBus:Debug] logs across the event bus → binding
auth chain to diagnose "Streamable HTTP error" failures during async
event delivery. Logs trace org context, JWT permissions, membership
lookups, and downstream token state without exposing full secrets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 28, 2026

Release Options

Should a new version be published when this PR is merged?

React with an emoji to vote on the release type:

Reaction Type Next Version
👍 Prerelease 2.123.1-alpha.1
🎉 Patch 2.123.1
❤️ Minor 2.124.0
🚀 Major 3.0.0

Current version: 2.123.0

Deployment

  • Deploy to production (triggers ArgoCD sync after Docker image is published)

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@tlgimenes tlgimenes merged commit af81367 into main Feb 28, 2026
8 checks passed
@tlgimenes tlgimenes deleted the worktree-fix-auth-token-bus branch February 28, 2026 00:33
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