Skip to content

[Fix] Visual-proof auto-posts to Slack when experimental auto proof is off#242

Merged
mrubens merged 1 commit into
developfrom
fix/gate-visual-proof-auto-post-0qoj5f34coxxr
Jul 12, 2026
Merged

[Fix] Visual-proof auto-posts to Slack when experimental auto proof is off#242
mrubens merged 1 commit into
developfrom
fix/gate-visual-proof-auto-post-0qoj5f34coxxr

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

Related issue

N/A — internal fix identified while investigating unexpected Slack visual-proof auto-posts with the experimental flag off.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

Visual-proof artifact auto-post to Slack/chat is now actually gated by SlackProofAutoPost / ROOMOTE_SLACK_PROOF_AUTO_POST.

Previously, the experimental flag only set the runtime env used for prompt wording, while the worker still auto-posted the first visual-proof upload whenever chat reply context existed. The platform path now short-circuits unless the flag env is enabled.

Slack agent instructions and manage_artifacts MCP descriptions also match that gate:

  • flag on: keep “built-in proof already posted” guidance
  • flag off: tell the agent to share proof via send_chat_reply / imageArtifactIds instead of claiming automatic posting

How it was tested

  • pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/worker exec vitest run src/mcp/roomote-mcp-server/__tests__/upload.test.ts src/mcp/roomote-mcp-server/__tests__/tool-descriptions.test.ts — 36/36 passed
  • pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/cloud-agents exec vitest run src/server/workflows/__tests__/slackAppMention.test.ts -t 'documents' — passed
  • Pre-push lint / typecheck / knip hooks passed on commit

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

@roomote-roomote

roomote-roomote Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

Verified the gate is wired end to end: the worker sets ROOMOTE_SLACK_PROOF_AUTO_POST=true from the SlackProofAutoPost deployment flag, replyToChatWithVisualProof now short-circuits on isVisualProofAutoPostEnabled() before the only auto-post call site (handleUpload), and the prompt/MCP wording is driven by the same deployment flag so the agent guidance matches actual behavior. The added tests cover both the flag-off no-post path and the flag-on paths.

Note (not blocking): the 3 failing tests in slackAppMention.test.ts are pre-existing on develop (deployment PR-action wording assertions unrelated to this change), and this PR adds one new passing test.

Reviewed 8f154d1

@mrubens
mrubens marked this pull request as ready for review July 12, 2026 12:42
@mrubens
mrubens merged commit b1b6ec9 into develop Jul 12, 2026
14 checks passed
@mrubens
mrubens deleted the fix/gate-visual-proof-auto-post-0qoj5f34coxxr branch July 12, 2026 12:43
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