Skip to content

fix: require visible chat output before callback delivery#20704

Closed
seven332 wants to merge 26 commits into
mainfrom
fix/issue-20643-chat-output-delivery
Closed

fix: require visible chat output before callback delivery#20704
seven332 wants to merge 26 commits into
mainfrom
fix/issue-20643-chat-output-delivery

Conversation

@seven332

@seven332 seven332 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared completed chat output resolver that reads DB materialized output first and falls back to watermark-gated Axiom output events.
  • Route Slack, Teams, Telegram, and AgentPhone completion callbacks through the resolver so transient output invisibility fails the callback instead of posting a misleading fallback or footer-only response.
  • Keep confirmed-empty completions explicit and add route-level regression coverage for delayed Slack output visibility and non-Slack completion paths.

Closes #20643

Verification

  • pnpm -F api exec vitest run src/signals/routes/__tests__/internal-callbacks-teams.test.ts
  • pnpm -F api exec vitest run src/signals/routes/__tests__/internal-callbacks-telegram.test.ts
  • pnpm -F api exec vitest run src/signals/routes/__tests__/agentphone.bdd.test.ts
  • pnpm -F api exec vitest run src/signals/routes/__tests__/integrations.bdd.test.ts -t "waits for Slack completed output|delivers Slack org callbacks"
  • pnpm -F api exec vitest run src/signals/routes/__tests__/integrations.bdd.test.ts -t "runs Slack mentions|starts a new Slack session"
  • pnpm -F api lint
  • pnpm -F api check-types
  • pnpm knip --cache
  • pre-commit turbo run check-types --concurrency=1

@github-project-automation github-project-automation Bot moved this to Backlog in VM0 Kanban Jul 8, 2026
@github-actions github-actions Bot temporarily deployed to app/preview/fix/issue-20643-chat-output-delivery July 8, 2026 11:19 Destroyed
@github-actions github-actions Bot temporarily deployed to api/preview/fix/issue-20643-chat-output-delivery July 8, 2026 11:20 Destroyed
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4375 1 4374 11
View the top 1 failed test(s) by shortest run time
apps/api/src/signals/routes/__tests__/test-slack-dispatch-probe.test.ts > POST /api/test/slack-dispatch-probe > routes preview Slack Web API calls to API mock routes
Stack Traces | 0.349s run time
AssertionError: expected "vi.fn()" to be called with arguments: [ Any<String>, { …(4) } ]

Received:

  1st vi.fn() call:

  [
-   Any<String>,
+   "xoxb-e2e-test-bot-token",
    {
      "headers": {
        "x-vercel-protection-bypass": "preview-secret",
        "x-vm0-test-endpoint-bypass": "preview-secret",
      },
      "retryConfig": {
        "retries": 1,
      },
      "slackApiUrl": "https://pr-13948-api.vm6..../api/test/slack-mock/",
-     "timeout": 5000,
+     "timeout": 15000,
    },
  ]


Number of calls: 1

 ❯ .../routes/__tests__/test-slack-dispatch-probe.test.ts:434:23

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

API preview: https://pr-20704-api.vm6.ai

@github-actions github-actions Bot temporarily deployed to app/preview/fix/issue-20643-chat-output-delivery July 8, 2026 11:33 Destroyed
@github-actions github-actions Bot temporarily deployed to api/preview/fix/issue-20643-chat-output-delivery July 8, 2026 11:33 Destroyed
@github-actions github-actions Bot temporarily deployed to app/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:11 Destroyed
@github-actions github-actions Bot temporarily deployed to api/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:12 Destroyed
@github-actions github-actions Bot temporarily deployed to app/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:18 Destroyed
@github-actions github-actions Bot temporarily deployed to api/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:19 Destroyed
@github-actions github-actions Bot temporarily deployed to app/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:30 Destroyed
@github-actions github-actions Bot temporarily deployed to api/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:31 Destroyed
Comment on lines +428 to +431
let lastResult: CompletedChatOutputResolution = {
kind: "not_visible_yet",
reason: "axiom_no_output",
};
@github-actions github-actions Bot temporarily deployed to app/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:42 Destroyed
@github-actions github-actions Bot temporarily deployed to api/preview/fix/issue-20643-chat-output-delivery July 8, 2026 13:43 Destroyed
@github-actions github-actions Bot temporarily deployed to app/preview/fix/issue-20643-chat-output-delivery July 8, 2026 14:21 Destroyed
@github-actions github-actions Bot temporarily deployed to api/preview/fix/issue-20643-chat-output-delivery July 8, 2026 14:23 Destroyed
@seven332 seven332 force-pushed the fix/issue-20643-chat-output-delivery branch from d2f2d9b to 26298d0 Compare July 9, 2026 05:20
@seven332

seven332 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Closing per maintainer decision; this approach will not be pursued.

@seven332 seven332 closed this Jul 9, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in VM0 Kanban Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: Zero agent reply content not delivered to Slack thread (content generated but nothing posted)

1 participant