test(telegram): cover isolated DM last-route routing#40116
test(telegram): cover isolated DM last-route routing#40116hhy5562877 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR adds regression tests to Key changes:
Confidence Score: 5/5
Last reviewed commit: 8500901 |
8500901 to
23aa31a
Compare
|
Closing this as implemented after Codex review. Current What I checked:
So I’m closing this as already implemented rather than keeping a duplicate issue open. Review notes: reviewed against bfa6708c03f2; fix evidence: commit bfa6708c03f2. |
Summary
session.dmScope: "per-channel-peer"need regression coverage to ensurelastRoutewrites stay scoped to the isolated direct session instead ofagent:main:main.per-channel-peerDM routing, DM topic thread IDs, and group-message no-op behavior; also cleaned up existing detect-secrets false positives and a provider-config test typing issue that otherwise kept this PR red in CI.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
session.dmScope: "per-channel-peer"Steps
dmScope.session.dmScope: "per-channel-peer".recordInboundSession(...).updateLastRoute.sessionKey.Expected
dmScope:updateLastRoute.sessionKey === agent:main:maindmScope:updateLastRoute.sessionKey === agent:main:telegram:direct:<senderId>pnpm checkno longer fails onsrc/agents/models-config.merge.test.tsActual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
updateLastRoutebehavior for default main-session scope, isolatedper-channel-peerscope, DM topic thread IDs, and group-message no-op path.src/telegram/bot-message-context.dm-topic-threadid.test.ts,src/routing/resolve-route.test.ts,src/agents/tools/web-search.test.ts,src/infra/git-commit.test.ts,src/agents/models-config.merge.test.ts.42) rather than chat id (1234) in the session key.Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
23aa31a74.src/telegram/bot-message-context.dm-topic-threadid.test.ts,src/agents/models-config.merge.test.ts,src/agents/tools/web-search.ts,src/agents/tools/web-search.test.ts,src/infra/git-commit.test.ts,docs/perplexity.md,docs/tools/web.md,test-fixtures/talk-config-contract.jsonlastRouteto the isolated direct session, or PRcheck/secretsfailing on the known false-positive set.Risks and Mitigations
apiKeySourcetoauthSource.