Skip to content

fix(dockerfile): emit appToken for slack in baked openclaw.json - #2146

Merged
ericksoa merged 1 commit into
mainfrom
fix/2031-slack-app-token
Apr 21, 2026
Merged

fix(dockerfile): emit appToken for slack in baked openclaw.json#2146
ericksoa merged 1 commit into
mainfrom
fix/2031-slack-app-token

Conversation

@laitingsheng

@laitingsheng laitingsheng commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

The Python block that bakes channels config from
NEMOCLAW_MESSAGING_CHANNELS_B64 only writes botToken for slack. Without appToken the Slack provider cannot initialise Socket Mode and the gateway crash-loops with invalid_auth from @slack/web-api before the dashboard comes up.

Add a conditional appToken spread mirroring the existing per-channel pattern (telegram proxy/groupPolicy, discord dmPolicy). Token value is the same openshell:resolve:env: placeholder convention used for botToken, so the placeholder resolution path is unchanged.

Partially addresses #2031, #2085. The baked config now contains appToken, but resolving the openshell:resolve:env:SLACK_APP_TOKEN placeholder requires NVIDIA/OpenShell#894 to be fixed: Slack's SDK validates the xapp- token prefix in-process before any network call, so the L7 proxy never gets a chance to substitute the placeholder.

Summary

Related Issue

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

AI Disclosure

  • AI-assisted — tool: Claude Code

Signed-off-by: Tinson Lai tinsonl@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Updated Slack channel authentication configuration to properly handle account credentials.

The Python block that bakes channels config from
NEMOCLAW_MESSAGING_CHANNELS_B64 only writes botToken for slack. Without
appToken the Slack provider cannot initialise Socket Mode and the
gateway crash-loops with invalid_auth from @slack/web-api before the
dashboard comes up.

Add a conditional appToken spread mirroring the existing per-channel
pattern (telegram proxy/groupPolicy, discord dmPolicy). Token value is
the same openshell:resolve:env: placeholder convention used for
botToken, so the placeholder resolution path is unchanged.

Partially addresses #2031, #2085. The baked config now contains
appToken, but resolving the openshell:resolve:env:SLACK_APP_TOKEN
placeholder requires NVIDIA/OpenShell#894 to be fixed: Slack's SDK
validates the xapp- token prefix in-process before any network call,
so the L7 proxy never gets a chance to substitute the placeholder.

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2d194e7a-4344-4d57-a490-8891089172ef

📥 Commits

Reviewing files that changed from the base of the PR and between 8bfd4e9 and 8ae6ab2.

📒 Files selected for processing (1)
  • Dockerfile

📝 Walkthrough

Walkthrough

The Dockerfile's build-time configuration generation for messaging channels is updated to include an additional appToken field for Slack channel account credentials. The token now resolves to SLACK_APP_TOKEN environment variable. Telegram and Discord configurations remain unchanged.

Changes

Cohort / File(s) Summary
Dockerfile - Slack Channel Config
Dockerfile
Updated Slack channel authentication configuration to add appToken field with openshell:resolve:env:SLACK_APP_TOKEN mapping during build-time Python config generation for messaging credentials.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A token for Slack, shiny and new,
The app whispers secrets through channels so true,
One line changed, one line erased,
Config builds faster, with grace and with taste! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding appToken field for Slack in the baked openclaw.json configuration file generated by the Dockerfile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/2031-slack-app-token

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericksoa ericksoa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve. Correct fix — mirrors the existing per-channel spread pattern. Partial until OpenShell#894 resolves the xapp- prefix validation.

@ericksoa
ericksoa merged commit bd82e1f into main Apr 21, 2026
13 checks passed
@cv cv added the v0.0.22 label Apr 21, 2026
@miyoungc miyoungc mentioned this pull request Apr 22, 2026
13 tasks
miyoungc added a commit that referenced this pull request Apr 22, 2026
## Summary

Bumps the published doc version to `0.0.22` and documents the
user-visible CLI behavior changes to `nemoclaw <name> connect` that
landed since v0.0.21. Drafted via the `nemoclaw-contributor-update-docs`
skill against commits in `v0.0.21..origin/main`, filtered through
`docs/.docs-skip`.

## Changes

- **`docs/project.json`** and **`docs/versions1.json`**: bump the
published version from `0.0.20` to `0.0.22`; insert a `0.0.21` entry
into the version list so the history stays contiguous.
- **`docs/reference/commands.md`** → `nemoclaw <name> connect`: document
two new behaviors.
- Readiness poll with `NEMOCLAW_CONNECT_TIMEOUT` (integer seconds;
default `120`) that replaces the silent hang when the sandbox is not yet
`Ready` — right after onboarding, while the 2.4 GB image is still
pulling (#466).
- Post-connect hint is now agent-aware, names the correct TUI command
for the sandbox's agent, and tells you to use `/exit` to leave the chat
before `exit` returns you to the host shell (#2080).

Feature PRs that shipped their own docs in the same commit are
intentionally not re-documented here:

- `channels list/add/remove` (#2139) — command reference and the
"`openclaw channels` blocked inside the sandbox" troubleshooting entry
landed with the feature.
- `nemoclaw gc` (#2176) — documented as part of the destroy/rebuild
image cleanup PR.

Skipped per `docs/.docs-skip`:

- `e6bad533 fix(shields): verify config lock and fail hard on re-lock
failure (#2066)` — matched `skip-features: src/lib/shields.ts`.

Other commits in the range (#2141 OpenShell version bump, #1819 plugin
banner live inference probe, #2085 / #2146 Slack Socket Mode fixes,
#2110 axios proxy fix, #1818 NIM curl timeouts, #1824 onboard gateway
bootstrap recovery, and assorted CI / test / install plumbing) are
internal behavior refinements with no doc-relevant surface change.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [x] Doc only (includes code sample changes)

## Verification

- [x] `npx prek run --all-files` passes for the modified files via the
pre-commit hook, including `Regenerate agent skills from docs` (source ↔
generated parity confirmed)
- [ ] `npm test` passes — skipped; the one pre-existing
`test/cli.test.ts > unknown command exits 1` failure on `origin/main` is
unrelated to these markdown/JSON-only changes
- [ ] Tests added or updated for new or changed behavior — n/a, doc-only
- [x] No secrets, API keys, or credentials committed
- [x] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only) — not run
locally
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— n/a, no new pages

## AI Disclosure

- [x] AI-assisted — tool: Claude Code

---
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* `connect` now displays the sandbox phase while waiting for readiness
and honors a configurable timeout via NEMOCLAW_CONNECT_TIMEOUT (default
120s).
* TTY hints are agent-aware and instruct using `/exit` before returning
to the host shell.

* **Documentation**
  * Command docs updated to describe polling, timeout, and TTY guidance.
* Project/docs metadata updated for versions 0.0.21 and 0.0.22 (package
version bumped to 0.0.22).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
@cv
cv deleted the fix/2031-slack-app-token branch June 28, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants