Skip to content

Comments

feat(slack): add config validation enhancements#30

Merged
hrygo merged 8 commits intomainfrom
feat/slack-config-validation-v2
Feb 24, 2026
Merged

feat(slack): add config validation enhancements#30
hrygo merged 8 commits intomainfrom
feat/slack-config-validation-v2

Conversation

@hrygo
Copy link
Owner

@hrygo hrygo commented Feb 24, 2026

Fixes #21

Problem

All platforms (Slack, Discord, Telegram, WhatsApp, DingTalk) were using temporary directories instead of the configured working directory.

Root Causes

  1. YAML indentation errors - In slack.yaml, work_dir was defined at root level instead of under engine: key
  2. Missing engine config - Other 4 platforms lacked the entire engine: configuration block
  3. Path resolution bug - expandPath() didn't handle '.' (current directory) case

Changes

Code Fixes

  • chatapps/setup.go: Add '.' expansion to absolute path in expandPath()
  • internal/engine/pool.go: Remove duplicate WorkDir handling code

Config Fixes

  • slack.yaml: Fix missing 'engine:' key for work_dir
  • dingtalk.yaml, discord.yaml, telegram.yaml, whatsapp.yaml: Add engine block with work_dir: .

Testing

  • ✅ All unit tests pass
  • ✅ All platform configs validated
  • ✅ Build successful

Impact

All platforms now correctly resolve work_dir '.' to the current source directory instead of falling back to /tmp/hotplex-chatapps/...


Before: work_dir was ignored, AI executed in temporary directories
After: work_dir is correctly parsed and resolved to absolute paths

黄飞虹 added 8 commits February 25, 2026 02:26
- Add comprehensive v0.11.0 changelog with all P0+P1 fixes
- Document path traversal protection and ACK retry mechanism
- Include test coverage statistics (93.8%+)
- Link to PR #23, Issue #21, and release notes
- Follow Keep a Changelog format
- Add Reaction type to base.RichContent
- Add AddReaction method to Slack adapter
- Integrate reactions into defaultSender
- Add slash command handler at /slack endpoint
- Add SlashCommand type and SetSlashCommandHandler
- Add slack-gap-analysis.md to SSOT sync script
- Fix dead links in chatapps-guide.md
- Remove archived roadmap references
- Update link redirects for VitePress
- Validate bot token format (xoxb-*-*-*)
- Validate app token format (xapp-*-*-*)
- Validate signing secret length and format
- Validate server address format
- chatapps/setup.go: Add '.' expansion to absolute path in expandPath()
- internal/engine/pool.go: Remove duplicate WorkDir handling code
- All platform configs: Add engine.work_dir configuration
  - slack.yaml: Fix missing 'engine:' key for work_dir
  - dingtalk.yaml, discord.yaml, telegram.yaml, whatsapp.yaml: Add engine block

Root cause: YAML indentation errors caused work_dir to be parsed at root
level instead of under engine:, resulting in empty values and fallback
to temporary directories.

All platforms now correctly resolve work_dir '.' to current directory.
@hrygo hrygo force-pushed the feat/slack-config-validation-v2 branch from 8888437 to e3d3b01 Compare February 24, 2026 19:32
@hrygo hrygo merged commit 91621ce into main Feb 24, 2026
7 checks passed
@hrygo hrygo deleted the feat/slack-config-validation-v2 branch February 24, 2026 19:34
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.

Slack 实现与 OpenClaw 差距分析报告 - 功能缺失与改进路线

1 participant