Repository navigation
Persist Discord thread bindings in SQLite - #88866
Conversation
|
Ready to land. Exact head: Local proof:
GitHub proof:
Known gaps:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 007a06a807
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const store = createPluginStateKeyedStore<ThreadBindingRecord>("discord", { | ||
| namespace: THREAD_BINDINGS_NAMESPACE, | ||
| maxEntries: THREAD_BINDINGS_MAX_ENTRIES, | ||
| env: { ...process.env, OPENCLAW_STATE_DIR: stateDir }, | ||
| }); |
There was a problem hiding this comment.
Keep the Discord smoke off the Bun-only SQLite path
In the documented manual path (docs/help/testing.md invokes this script with bun), this polling code now goes through createPluginStateKeyedStore, which opens the OpenClaw state DB via requireNodeSqlite() in src/infra/node-sqlite.ts. Bun 1.2.x does not provide node:sqlite, so each binding poll fails and is swallowed by the wait loop, making the smoke time out even after the bot creates a binding. Please either run this script under Node or use a Bun-compatible way to read the SQLite state.
Useful? React with 👍 / 👎.
* refactor: persist discord thread bindings in sqlite * test: read discord thread bindings from sqlite smoke
* refactor: persist discord thread bindings in sqlite * test: read discord thread bindings from sqlite smoke
Summary
state/discord/thread-bindings.json.Verification
node scripts/run-vitest.mjs extensions/discord/src/monitor/thread-bindings.lifecycle.test.ts extensions/discord/src/monitor/model-picker-preferences.test.ts extensions/discord/src/monitor/model-picker-preferences-migrations.test.ts src/cli/program/config-guard.test.tsnode scripts/run-tsgo.mjs -p extensions/discord/tsconfig.json --incremental --tsBuildInfoFile /tmp/openclaw-discord-thread-bindings.tsbuildinfonode scripts/run-oxlint.mjs extensions/discord/src/monitor/thread-bindings.state.ts extensions/discord/src/monitor/thread-bindings.manager.ts extensions/discord/src/monitor/thread-bindings.lifecycle.test.ts extensions/discord/src/monitor/model-picker-preferences.ts extensions/discord/src/monitor/model-picker-preferences.test.ts extensions/discord/src/monitor/model-picker-preferences-migrations.ts extensions/discord/src/monitor/model-picker-preferences-migrations.test.ts src/cli/program/config-guard.ts src/cli/program/config-guard.test.ts scripts/dev/discord-acp-plain-language-smoke.tsgit diff --check/Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --mode branch --base origin/mainNotes
pnpm lint --threads=8is blocked on existingextensions/microsoft-foundry/provider.tslint findings on latestmain, unrelated to this branch.