Skip to content

refactor(slack-bot): make app.py a thin composition root - #2596

Open
kevkantes wants to merge 3 commits into
mainfrom
prebuild/refactor/slack-composition-root
Open

refactor(slack-bot): make app.py a thin composition root#2596
kevkantes wants to merge 3 commits into
mainfrom
prebuild/refactor/slack-composition-root

Conversation

@kevkantes

Copy link
Copy Markdown
Collaborator

Description

Refactors the Slack bot entry point into a thin composition root while preserving existing Slack-visible behavior.

  • Moves runtime construction and startup checks into a dedicated bootstrap module.
  • Extracts authorization, conversation, channel routing, personal routing, and action handlers behind narrow dependency views.
  • Separates AG-UI event interpretation from Slack formatting and delivery.
  • Documents the request path and module ownership.
  • Adds import-safety, registration-boundary, bootstrap, routing, and AG-UI characterization tests.

Closes #2422

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Temporary Helm Charts (Optional)

For chart changes, you can test temporary versions before merging:

  • Base repo contributors: Create a branch starting with prebuild/ for automatic prebuilds
  • Fork contributors: Ask a maintainer to add the helm-prerelease label
  • Temporary charts are published to ghcr.io/caipe-io/charts with PR-specific versions
  • Cleanup happens automatically when the PR closes or label is removed

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@github-actions github-actions Bot added the dev Normal PR to main; uses dev prerelease versioning label Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

ℹ️ Branch is behind main (advisory, non-blocking)

Commit: 35ff09b2

This branch does not yet contain the latest main. This does not fail the version-bump check — version files are bumped once the branch is updated, and GitHub branch protection still requires the branch to be up to date before merge. Use the Update branch button on this PR, or run:

git fetch origin main
git checkout prebuild/refactor/slack-composition-root
git merge FETCH_HEAD
git push

This is a prebuild/* branch, so Helm prebuild publishing will still run so you can test the chart changes while the branch is being updated.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No proprietary content detected. This PR is clear for review!

@caipe-io-ci-release

caipe-io-ci-release Bot commented Aug 26, 2026

Copy link
Copy Markdown
Prebuild Artifacts for `35ff09b` (archived)

Prebuild Artifacts for 35ff09b

Branch: prebuild/refactor/slack-composition-root
Commit: 35ff09b

Docker Images

Artifact Image Tag Status CI
caipe-slack-bot ghcr.io/caipe-io/caipe-slack-bot refactor-slack-composition-root-2 Published CI
Docker pull commands
docker pull ghcr.io/caipe-io/caipe-slack-bot:refactor-slack-composition-root-2

Helm Charts

Chart Registry Version Status CI
ai-platform-engineering ghcr.io/caipe-io/charts 1.0.0-dev.6-refactor-slack-composition-root-1 Published CI
rag-stack ghcr.io/caipe-io/charts 1.0.0-dev.6-refactor-slack-composition-root-1 Published CI
Helm install commands
helm upgrade --install ai-platform oci://ghcr.io/caipe-io/charts/ai-platform-engineering --version 1.0.0-dev.6-refactor-slack-composition-root-1
helm upgrade --install rag oci://ghcr.io/caipe-io/charts/rag-stack --version 1.0.0-dev.6-refactor-slack-composition-root-1

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

Comment thread ai_platform_engineering/integrations/slack_bot/personal_routing.py Fixed
Comment thread ai_platform_engineering/integrations/slack_bot/authorization.py Fixed
Comment thread ai_platform_engineering/integrations/slack_bot/routing.py Fixed
Comment thread ai_platform_engineering/integrations/slack_bot/routing.py Fixed
Comment thread ai_platform_engineering/integrations/slack_bot/routing.py Fixed
@kevkantes
kevkantes force-pushed the prebuild/refactor/slack-composition-root branch from 35ff09b to 24ef317 Compare August 26, 2026 18:58
@caipe-io-ci-release

caipe-io-ci-release Bot commented Aug 26, 2026

Copy link
Copy Markdown
Prebuild Artifacts for `24ef317` (archived)

Prebuild Artifacts for 24ef317

Branch: prebuild/refactor/slack-composition-root
Commit: 24ef317

Docker Images

Artifact Image Tag Status CI
caipe-slack-bot ghcr.io/caipe-io/caipe-slack-bot refactor-slack-composition-root-3 Published CI
Docker pull commands
docker pull ghcr.io/caipe-io/caipe-slack-bot:refactor-slack-composition-root-3

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

@caipe-io-ci-release

caipe-io-ci-release Bot commented Aug 26, 2026

Copy link
Copy Markdown
Prebuild Artifacts for `acb9316` (archived)

Prebuild Artifacts for acb9316

Branch: prebuild/refactor/slack-composition-root
Commit: acb9316

Docker Images

Artifact Image Tag Status CI
caipe-slack-bot ghcr.io/caipe-io/caipe-slack-bot refactor-slack-composition-root-3 Published CI
Docker pull commands
docker pull ghcr.io/caipe-io/caipe-slack-bot:refactor-slack-composition-root-3

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

@caipe-io-ci-release

caipe-io-ci-release Bot commented Aug 26, 2026

Copy link
Copy Markdown
Prebuild Artifacts for `0a8d66f` (archived)

Prebuild Artifacts for 0a8d66f

Branch: prebuild/refactor/slack-composition-root
Commit: 0a8d66f

Docker Images

Artifact Image Tag Status CI
caipe-slack-bot ghcr.io/caipe-io/caipe-slack-bot refactor-slack-composition-root-4 Published CI
Docker pull commands
docker pull ghcr.io/caipe-io/caipe-slack-bot:refactor-slack-composition-root-4

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

@kevkantes
kevkantes marked this pull request as ready for review August 26, 2026 19:33
@kevkantes
kevkantes requested review from a team as code owners August 26, 2026 19:33
Signed-off-by: kevkantes <kkantesa@cisco.com>
Signed-off-by: kevkantes <kkantesa@cisco.com>
@kevkantes
kevkantes force-pushed the prebuild/refactor/slack-composition-root branch from 0a8d66f to 4096ae9 Compare August 27, 2026 19:49
@caipe-io-ci-release

caipe-io-ci-release Bot commented Aug 27, 2026

Copy link
Copy Markdown
Prebuild Artifacts for `4096ae9` (archived)

Prebuild Artifacts for 4096ae9

Branch: prebuild/refactor/slack-composition-root
Commit: 4096ae9

Docker Images

Artifact Image Tag Status CI
caipe-slack-bot ghcr.io/caipe-io/caipe-slack-bot refactor-slack-composition-root-4 Published CI
Docker pull commands
docker pull ghcr.io/caipe-io/caipe-slack-bot:refactor-slack-composition-root-4

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

@caipe-io-ci-release

Copy link
Copy Markdown

Prebuild Artifacts for 4d3d24b

Branch: prebuild/refactor/slack-composition-root
Commit: 4d3d24b

Docker Images

Artifact Image Tag Status CI
caipe-slack-bot ghcr.io/caipe-io/caipe-slack-bot refactor-slack-composition-root-4 Published CI
Docker pull commands
docker pull ghcr.io/caipe-io/caipe-slack-bot:refactor-slack-composition-root-4

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

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

Labels

dev Normal PR to main; uses dev prerelease versioning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(slack-bot): make app.py a thin composition root

1 participant