This repository was archived by the owner on Feb 21, 2026. It is now read-only.
Merged
Conversation
Add Discord bot (PeytonOmni) as a secondary channel alongside WhatsApp. Refactor index.ts for multi-channel routing, move CLAUDE.md files to gitignored runtime files with tracked .template seeds. - Add discord.js dependency and DiscordChannel implementation - Multi-channel routing in processGroupMessages, scheduler, and IPC - Remove hardcoded assistant name prefix from IPC (use formatOutbound) - Expand getAvailableGroups to include dc: and tg: JIDs - Seed CLAUDE.md for Discord groups on registration - Move groups/*/CLAUDE.md to .template, update .gitignore - Update /setup skill to copy templates on first run Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
Peyton-Spencer
pushed a commit
that referenced
this pull request
Feb 14, 2026
Implements three critical stability fixes identified in the audit:
1. **Unhandled Promise Rejection Handler (CRITICAL)**
- Add process.on('unhandledRejection') to prevent crashes
- Logs rejections instead of exiting to maintain service uptime
- Prevents complete service outage from uncaught promise errors
2. **WhatsApp Event Listener Memory Leak (CRITICAL)**
- Store event handlers and remove them before reconnection
- Prevents exponential handler accumulation on reconnects
- Fixes memory leak leading to eventual OOM crashes
3. **Group Folder Path Traversal (MEDIUM)**
- Validate folder names with regex (alphanumeric + _ -)
- Verify resolved paths stay within groups directory
- Prevents malicious group registration from writing to arbitrary paths
Impact:
- Prevents process crashes from unhandled rejections
- Fixes production memory leak in WhatsApp channel
- Hardens security against path traversal attacks
Related:
- Audit report: nanoclaw-stability-audit-2026-02-14.md
- Issues #1, #4, #16 from stability audit
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Peyton-Spencer
added a commit
that referenced
this pull request
Feb 14, 2026
* fix: stability quick wins from 2026-02-14 audit
Implements three critical stability fixes identified in the audit:
1. **Unhandled Promise Rejection Handler (CRITICAL)**
- Add process.on('unhandledRejection') to prevent crashes
- Logs rejections instead of exiting to maintain service uptime
- Prevents complete service outage from uncaught promise errors
2. **WhatsApp Event Listener Memory Leak (CRITICAL)**
- Store event handlers and remove them before reconnection
- Prevents exponential handler accumulation on reconnects
- Fixes memory leak leading to eventual OOM crashes
3. **Group Folder Path Traversal (MEDIUM)**
- Validate folder names with regex (alphanumeric + _ -)
- Verify resolved paths stay within groups directory
- Prevents malicious group registration from writing to arbitrary paths
Impact:
- Prevents process crashes from unhandled rejections
- Fixes production memory leak in WhatsApp channel
- Hardens security against path traversal attacks
Related:
- Audit report: nanoclaw-stability-audit-2026-02-14.md
- Issues #1, #4, #16 from stability audit
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: add transaction support to deleteTask and SQL injection safety comment
Database improvements from stability audit:
1. **Transaction Support for deleteTask (MEDIUM)**
- Wrap DELETE operations in explicit transaction
- Ensures both child and parent deletions succeed atomically
- Prevents partial deletion leaving orphaned task_run_logs
2. **SQL Injection Safety Documentation (HIGH)**
- Add security comment to updateTask explaining safety assumptions
- Document that field names are hardcoded (not user-controlled)
- Warn future maintainers about SQL injection risks if logic changes
Impact:
- Prevents database corruption from partial task deletions
- Documents security assumptions for future code reviewers
- Hardens codebase against accidental SQL injection introduction
Related:
- Audit report: nanoclaw-stability-audit-2026-02-14.md
- Issues #3, #12 from stability audit
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: NanoClaw Agent <nanoclaw@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
6 tasks
Peyton-Spencer
added a commit
that referenced
this pull request
Feb 16, 2026
…crashes Adopted from upstream PR qwibitai#243 by pottertech (Skip Potter): qwibitai#243 Fixes issue qwibitai#221 - Unhandled promise rejections crash the entire process Changes: 1. Add module-level unhandledRejection handler (prevents process crashes) 2. Add module-level uncaughtException handler (graceful shutdown) 3. Move error handler registration from main() to module level 4. Wrap streaming output callback in try/catch (prevents rejection propagation) 5. Connect shutdown function for error handlers to call Impact: - Prevents process crashes from unhandled rejections - Enables graceful shutdown on uncaught exceptions - Improves error recovery in streaming callbacks - Maintains service availability during agent errors Overlap with our Stability Audit (2026-02-14): - Our audit identified this as Issue #1 (CRITICAL) - Upstream PR qwibitai#243 provides production-tested implementation - This PR supersedes local fixes from audit Risk: LOW - Defensive programming only - No behavior changes to core logic - Proven in upstream testing Co-authored-by: Skip Potter <skippotter@Skips-MacBook-Air.local> Co-authored-by: Brodie Foxworth <brodie.foxworth@pottersquill.com>
4 tasks
Peyton-Spencer
added a commit
that referenced
this pull request
Feb 16, 2026
…crashes (#107) Adopted from upstream PR qwibitai#243 by pottertech (Skip Potter): qwibitai#243 Fixes issue qwibitai#221 - Unhandled promise rejections crash the entire process Changes: 1. Add module-level unhandledRejection handler (prevents process crashes) 2. Add module-level uncaughtException handler (graceful shutdown) 3. Move error handler registration from main() to module level 4. Wrap streaming output callback in try/catch (prevents rejection propagation) 5. Connect shutdown function for error handlers to call Impact: - Prevents process crashes from unhandled rejections - Enables graceful shutdown on uncaught exceptions - Improves error recovery in streaming callbacks - Maintains service availability during agent errors Overlap with our Stability Audit (2026-02-14): - Our audit identified this as Issue #1 (CRITICAL) - Upstream PR qwibitai#243 provides production-tested implementation - This PR supersedes local fixes from audit Risk: LOW - Defensive programming only - No behavior changes to core logic - Proven in upstream testing Co-authored-by: Skip Potter <skippotter@Skips-MacBook-Air.local> Co-authored-by: Brodie Foxworth <brodie.foxworth@pottersquill.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
index.tsfor multi-channel routing —processGroupMessages, scheduler, and IPC all usefindChannel()+formatOutbound()instead of hardcoded WhatsApp calls${ASSISTANT_NAME}:prefix from IPC; formatting now handled byformatOutbound()per-channelgetAvailableGroups()to includedc:andtg:prefixed JIDsCLAUDE.mdwith secondary-channel instructions when Discord groups are registeredgroups/*/CLAUDE.mdto gitignored runtime files with tracked.templateseeds (repo no longer dirty after agent edits its memory)/setupskill to copy templates on first runTest plan
bun run typecheckpassesbun run dev— bot comes online in Discord and WhatsApp still connects🤖 Generated with Claude Code