fix: port PR #51 Discord fixes to rc (+ Telegram gistUrl follow-up) - #65
Merged
Conversation
Bundles four independent Discord provider fixes from the PR (the title only covered the first): 1. Ignore Discord system messages (thread renames, pin notices, joins) so they no longer reach the agent as user input. src/providers/discord/messageCreate.ts 2. Resolve agent binding from the parent channel when a message arrives in a thread, so threads inherit their channel's agent instead of coming back unbound. src/providers/discord/channelsDb.ts, commands/auto-run.ts 3. Use the gistUrl returned by `maestro-cli gist create` instead of reconstructing the URL locally. src/core/maestro.ts, providers/discord/commands/gist.ts 4. Sort the /agents list output for stable, readable ordering. src/providers/discord/commands/agents.ts Thanks to @scriptease for the contribution. Co-authored-by: Florian Agsteiner <florian.agsteiner@gmail.com>
The cherry-pick of 77245d2 renames GistResult.url to gistUrl. rc has a Telegram provider that main does not, and its /gist handler still read result.url. This does NOT fail typecheck: GistResult carries an [key: string]: unknown index signature, so result.url resolves to unknown instead of erroring. The break is runtime-only — Telegram would have posted 'undefined' as the gist URL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Ports the four fixes from #51 (merged to main as
77245d2) ontorc, where active development actually happens. Without this they'd be silently missing from every rc-channel release.Commits
2b90162— clean cherry-pick of77245d2, no conflicts. rc had only touched these files via theconsole.*→KernelLoggerrefactor on non-overlapping lines, and never touched gist code at all. Attribution to @scriptease preserved.gistUrlfixup — see below.The Telegram issue this surfaced
The cherry-pick renames
GistResult.url→gistUrl. rc has a Telegram provider that main does not, and its/gisthandler readresult.url.This does not fail
tsc—GistResulthas an[key: string]: unknownindex signature, soresult.urlresolves tounknownrather than erroring. I confirmednpx tsc --noEmitpasses clean with the stale field in place. The break would have been runtime-only: Telegram postingundefinedas the gist URL.Worth flagging as a general hazard — that index signature means any future field rename on
GistResultwill pass typecheck and fail in production.Tests
498/498 passing on rc.
Out of scope / follow-ups
commands/agents.tslisting is unsorted, i.e. Fix 4's equivalent is missing there. Pre-existing, not introduced by this port — left alone deliberately.🤖 Generated with Claude Code