✨ feat: create new topic every 4 hours#13570
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ONLY-yours - This PR adds scheduled topic creation in the bot/AgentBridge service. Please take a look. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## canary #13570 +/- ##
==========================================
- Coverage 66.58% 66.57% -0.01%
==========================================
Files 1999 1999
Lines 165905 165928 +23
Branches 16083 19942 +3859
==========================================
+ Hits 110470 110474 +4
- Misses 55311 55330 +19
Partials 124 124
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd959a089a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| await thread.setState({ ...threadState, topicId: undefined }); | ||
| return this.handleMention(thread, message, opts); |
There was a problem hiding this comment.
Check active-thread lock before resetting stale topic state
This stale-topic branch executes before the activeThreads short-circuit, so a second message arriving while another execution is still running can clear topicId and then immediately no-op in handleMention (because the thread is active). In that case the message is dropped but state stays cleared, and the next user message starts a fresh topic even if the in-flight execution just updated the existing topic. Please short-circuit on active threads before mutating thread state in the stale-topic path.
Useful? React with 👍 / 👎.
| const topicModel = new TopicModel(this.db, this.userId); | ||
| const existingTopic = await topicModel.findById(topicId); |
There was a problem hiding this comment.
Handle topic lookup failures in subscribed-message flow
The new stale-topic lookup runs outside the existing try/catch, so transient DB errors from findById now reject handleSubscribedMessage before the user-facing error path runs. That means subscribed messages can fail silently (no Agent Execution Failed post) and bubble an exception to the router callback. Wrap this lookup in the guarded section (or add a local catch) to preserve previous failure handling behavior.
Useful? React with 👍 / 👎.
💻 Change Type
🔗 Related Issue
🔀 Description of Change
🧪 How to Test
📸 Screenshots / Videos
📝 Additional Information