v0.26.0 — DM-safe action passthrough + COLONY_HEALTH_HISTORY#10
Merged
Conversation
Fixed: v0.19 dispatch-filter + v0.21 DM_SAFE_ACTIONS interaction was dropping legitimate output from read-only DM-safe actions. Discovered by DM'ing @eliza-gemma with "are you healthy?" on v0.25.0 — her COLONY_HEALTH_REPORT action fired, produced the report, but the dispatch filter dropped the callback output because response.action was a registered Colony action name. v0.19 filter's original intent (drop "I need a postId…" meta text from mutating-action error paths) was correct but too broad: read-only actions produce actual data, and DMing-an-agent-to-ask-it-something is a core v0.21+ use case. Fix: both dispatchPostMention and dispatchDirectMessage now check DM_SAFE_ACTIONS before filtering. Allowlisted actions pass through; mutating-action meta drops unchanged. Added: COLONY_HEALTH_HISTORY rolling-log action. Snapshot companion to v0.25's health-report. Ring capped at 50 entries, populated lazily by service.takeHealthSnapshot() from the health-report handler (no new timer). Output: last N snapshots with timestamp, LLM success rate, pause state, retry queue, digest count. DM-safe. Tests: 1623 / 54 files. 100/100/100 stmt/line/func, 98.08% branch. New file v26-features.test.ts (31 tests) + 4 added to dispatch.test.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Scope
Two changes, both motivated by live-testing v0.25's `COLONY_HEALTH_REPORT` by DM'ing `@eliza-gemma` with "are you healthy?" and observing the report never reach the reply.
1. Fixed: DM_SAFE_ACTIONS output now passes through the action-meta filter
The v0.19 dispatch filter was designed to drop action-meta callbacks (error-path fallbacks like "I need a postId…") so they don't get posted as real Colony content. Correct for mutating actions. Wrong for read-only, data-producing actions like `COLONY_HEALTH_REPORT`, `COLONY_STATUS`, `LIST_COLONY_AGENTS` where the output is the reply content.
The discovery path was clean: eliza's engagement loop on v0.25.0 fired `COLONY_HEALTH_REPORT` correctly (log showed `COLONY_HEALTH_REPORT: produced 4-line report for @eliza-gemma`), but the dispatch callback dropped the output because `response.action` was a registered Colony action name. Her reply to the DM became "Trying again. If the action fails this time, it's likely a plugin-level issue…" — she could tell something was wrong but couldn't surface the actual report.
Fix: both `dispatchPostMention` and `dispatchDirectMessage` now check `DM_SAFE_ACTIONS` before applying the meta filter. Allowlisted actions pass through; mutating-action meta still drops (v0.19 behaviour preserved for everything except the 11 allowlisted actions).
Two new tests on `dispatch.test.ts` pin the fix + guard against regression on the preserved v0.19 behaviour.
2. Added: COLONY_HEALTH_HISTORY action
Rolling-log companion to v0.25's health-report. Snapshot → trend.
Tests
1623 / 54 files. 100% stmt/line/func, 98.08% branch. New file `v26-features.test.ts` (31 tests):
Plus 4 tests added to `dispatch.test.ts` pinning the passthrough behaviour (DM_SAFE_ACTIONS output passes on DM callback + post-mention callback, non-allowlisted meta still drops on both paths).
Deploy
Merge → tag `v0.26.0` → bump eliza-gemma when ready.
🤖 Generated with Claude Code