Skip to content

Conversation

@solaris007
Copy link
Member

@solaris007 solaris007 commented Nov 19, 2025

Overview

  • Refactors the Lambda entrypoint to support both SQS-triggered and direct Step Functions invocations and ensures the outer HTTP response stays Helix-compatible.
  • Rebuilds the agent framework: generic executor, agent registry, base helpers, and the new brand-profile agent with Azure OpenAI prompts, persistence, and notification metadata.
  • Adds slack-notify handler capable of consuming structured payloads (text/blocks/attachments) and reuses shared Slack utilities.
  • Expands unit/integration coverage (index, agent executor, base, registry, brand-profile agent, slack-notify handler) and adds an opt-in integration test for the brand-profile agent.
  • Documents the new architecture, Azure env requirements, and IT test workflow in README.md; includes PR-ready changelog.

Motivation

  • Support the agent workflow’s direct Lambda invoke path while keeping backwards compatibility for existing SQS tasks.
  • Provide a reusable agent system so new agents can be added without touching the executor, and ship the brand-profile agent as the first implementation.
  • Improve reliability and observability by normalizing Slack notifications and ensuring failures bubble up to the workflow.
  • Maintain 100 % unit coverage to guard the dual-mode entrypoint and agent plumbing.

Testing

  • npm test (full suite) – all unit tests plus optional IT test guard.
  • Manual Step Functions execution (dev) verifying direct invoke path, Slack notifications, and brand-profile persistence logic.

@github-actions
Copy link

This PR will trigger a patch release when merged.

@solaris007 solaris007 self-assigned this Nov 19, 2025
@solaris007 solaris007 added the bug Something isn't working label Nov 19, 2025
@solaris007 solaris007 requested a review from Copilot November 19, 2025 13:55
Copilot finished reviewing on behalf of solaris007 November 19, 2025 13:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the agent executor's Slack notification system by introducing structured notification payloads that support rich formatting with blocks and attachments. The changes enable agents (specifically brand-profile) to return detailed notification content that flows through the agent-executor to the slack-notify handler.

Key Changes

  • Extended slack-notify handler to support nested message payloads with blocks and attachments
  • Added notification normalization in agent-executor to extract and validate notification payloads from persist metadata
  • Enhanced brand-profile agent to return rich Slack blocks with profile highlights and contextual information

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tasks/slack-notify/handler.js Added support for nested message payloads with blocks/attachments, and validation for structured content
src/tasks/agent-executor/handler.js Added normalizeNotifications function to extract and validate notification payloads from persist results
src/agents/brand-profile/index.js Enhanced persist function to generate rich Slack notification blocks with brand profile highlights
test/tasks/slack-notify/slack-notify.test.js Added comprehensive tests for message payload handling, blocks, attachments, and validation
test/tasks/agent-executor/agent-executor.test.js Added tests for notification normalization and filtering of invalid payloads
test/agents/brand-profile/index.test.js Updated tests to verify notification block generation with profile data
.github/copilot-instructions.md New file containing PR review guidelines and instructions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

solaris007 and others added 2 commits November 19, 2025 15:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@solaris007 solaris007 merged commit 382ef79 into main Nov 19, 2025
8 checks passed
@solaris007 solaris007 deleted the fix-agent-executor-slack-notification branch November 19, 2025 14:16
solaris007 pushed a commit that referenced this pull request Nov 19, 2025
## [1.6.3](v1.6.2...v1.6.3) (2025-11-19)

### Bug Fixes

* agent executor slack notification ([#137](#137)) ([382ef79](382ef79))
@solaris007
Copy link
Member Author

🎉 This PR is included in version 1.6.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants