fix(slack-gateway): keep channel replies top-level#156
Conversation
Review PromptPlease review this pull request and provide feedback on:
Be constructive and helpful in your feedback. Specific rules for this codebase: General rules
PII in Logs - HIGH PRIORITYFlag any code that logs user PII (Personally Identifiable Information). This is a critical security and compliance issue. Check for and reject:
Require instead:
Example violations to flag: logger.info(f"User {user.email} logged in") # BAD
logging.warning(f"Failed for {body.email}") # BAD
print(f"Contact sent: {data}") # BAD if data contains email
discord_message += f"Email: {user.email}" # BADCorrect patterns: logger.info(f"User auth_id={user.auth_id} logged in") # GOOD
logger.warning("Failed login", {"auth_id": user.auth_id}) # GOODi18n rules
|
Review PromptPlease review this pull request and provide feedback on:
Be constructive and helpful in your feedback. Specific rules for this codebase: General rules
PII in Logs - HIGH PRIORITYFlag any code that logs user PII (Personally Identifiable Information). This is a critical security and compliance issue. Check for and reject:
Require instead:
Example violations to flag: logger.info(f"User {user.email} logged in") # BAD
logging.warning(f"Failed for {body.email}") # BAD
print(f"Contact sent: {data}") # BAD if data contains email
discord_message += f"Email: {user.email}" # BADCorrect patterns: logger.info(f"User auth_id={user.auth_id} logged in") # GOOD
logger.warning("Failed login", {"auth_id": user.auth_id}) # GOODi18n rules
|
|
Final validation on the latest head:
What changed in the final follow-ups:
Residual risk I am consciously leaving for a follow-up:
Merge-ready for the requested bar. |
👍 GitRank PR AnalysisScore: 20 points
Eligibility Checks
Impact SummaryThis PR changes the Slack gateway to keep channel mention replies at the top level instead of forcing them into threads, matching Zenobot-style behavior. It introduces conversation aliasing to track when bot replies create new message timestamps that should map back to the original conversation. The changes include comprehensive test coverage for alias persistence, legacy conversation reuse, and conflict detection. Analysis DetailsComponent Classification: This PR affects the Slack gateway integration and channel conversation service, which don't map to specific components in the provided table. Classified as OTHER since it involves cross-cutting changes to gateway behavior and conversation routing logic. Severity Justification: Classified as P2 (Medium) because this fixes a functional behavior issue where Slack channel replies were incorrectly threaded by default instead of appearing top-level. While this impacts user experience and conversation visibility, it has a workaround (users can still see threaded replies) and doesn't cause data loss or service outage. Eligibility Notes: Issue: True - PR fixes reported behavior where channel replies were incorrectly threaded. Fix Implementation: True - code changes align with the stated goal of keeping channel replies top-level and adding alias tracking. PR Linked: True - detailed description with TL;DR, summary, and test plan. Tests: True - adds 312 lines of tests in channel_conversations_test.go and 235 lines in gateway_test.go. Tests Required: True - this is a business logic change affecting conversation routing and persistence, requiring comprehensive test coverage for alias handling, conflict detection, and legacy compatibility. Analyzed by GitRank 🤖 |
TL;DR
This makes the shared Slack gateway reply like Zenobot in external channels by keeping normal channel mentions at the top level instead of forcing them into Slack threads. Threaded Slack conversations still keep replying in-thread when Slack already gives us a thread context.
Summary
thread_ts=message.tsReview focus
Test plan
cd integrations/slack-gateway && go test ./...cd api && go test ./...