Repository navigation
fix: support explicit active-memory chat types - #66285
Conversation
Greptile SummaryThis PR adds Confidence Score: 5/5This PR is safe to merge — changes are strictly additive, scoped to a single extension package, and well-covered by targeted tests. All changes are in the active-memory extension. The schema, TypeScript types, normalization filter, and session-key detector are all updated consistently. The positive test cases cover both the schema validation path and the runtime execution path. No logic regressions or P1 issues were found. No files require special attention. Reviews (1): Last reviewed commit: "fix: support explicit active-memory chat..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88aff48335
ℹ️ 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".
| if (sessionKey.includes(":channel:")) { | ||
| return "channel"; | ||
| } | ||
| if (sessionKey.includes(":explicit:")) { | ||
| return "explicit"; |
There was a problem hiding this comment.
Parse explicit sessions before other chat-type markers
resolveChatType scans sessionKey with broad includes checks, and :channel: is checked before :explicit:. Because explicit session ids are passed through verbatim in src/agents/command/session.ts (buildExplicitSessionIdSessionKey just appends sessionId.trim()), an explicit key like agent:main:explicit:foo:channel:bar is misclassified as channel instead of explicit. In that case, allowedChatTypes: ["explicit"] will incorrectly block active memory for a valid explicit session id containing :channel:/:group:/:direct: segments.
Useful? React with 👍 / 👎.
|
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Keep this PR open. Current main still rejects and strips the Best possible solution: Keep this PR open as the active implementation candidate for linked bug #65775. Add or confirm the public Active Memory docs coverage for What I checked:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 12aaef9035ea. |
88aff48 to
c51b4dc
Compare
Signed-off-by: Lidang-Jiang <[email protected]>
c51b4dc to
c5b0e80
Compare
|
Merged in 6d539db after representative verification with the active-memory config/runtime tests, targeted formatting, and diff checks. I also resolved the stale-base overlap with the newly landed chat-id filters, added the Unreleased changelog entry, and kept explicit session keys classified before opaque session-id tokens can shadow the chat type. |
|
This looks like it is blocking unrelated PRs in CI. After this landed, I hit this from another PR that does not touch |
|
@Ziy1-Tan Thanks for flagging this. I checked current The cleanup landed after this PR via The remaining #73563 failures I see are separate: a |
Verified: - pnpm install --frozen-lockfile - pnpm test extensions/active-memory/config.test.ts extensions/active-memory/index.test.ts - pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/active-memory/index.ts extensions/active-memory/index.test.ts extensions/active-memory/config.test.ts extensions/active-memory/openclaw.plugin.json - git diff --check Co-authored-by: Lidang-Jiang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
Verified: - pnpm install --frozen-lockfile - pnpm test extensions/active-memory/config.test.ts extensions/active-memory/index.test.ts - pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/active-memory/index.ts extensions/active-memory/index.test.ts extensions/active-memory/config.test.ts extensions/active-memory/openclaw.plugin.json - git diff --check Co-authored-by: Lidang-Jiang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
Verified: - pnpm install --frozen-lockfile - pnpm test extensions/active-memory/config.test.ts extensions/active-memory/index.test.ts - pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/active-memory/index.ts extensions/active-memory/index.test.ts extensions/active-memory/config.test.ts extensions/active-memory/openclaw.plugin.json - git diff --check Co-authored-by: Lidang-Jiang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
Verified: - pnpm install --frozen-lockfile - pnpm test extensions/active-memory/config.test.ts extensions/active-memory/index.test.ts - pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/active-memory/index.ts extensions/active-memory/index.test.ts extensions/active-memory/config.test.ts extensions/active-memory/openclaw.plugin.json - git diff --check Co-authored-by: Lidang-Jiang <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
Summary
allowedChatTypesto accept"explicit"in the active-memory plugin schema and runtime config normalizationagent:...:explicit:...sessions as an explicit chat type during gatingCloses #65775.
AI Assistance
Before
After
Test plan
allowedChatTypes: ["direct", "explicit"]