test(telegram): cover isolated DM last-route routing#40116
Open
hhy5562877 wants to merge 1 commit intoopenclaw:mainfrom
Open
test(telegram): cover isolated DM last-route routing#40116hhy5562877 wants to merge 1 commit intoopenclaw:mainfrom
hhy5562877 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Contributor
Greptile SummaryThis PR adds regression tests to Key changes:
Confidence Score: 5/5
Last reviewed commit: 8500901 |
8500901 to
23aa31a
Compare
20 tasks
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.
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.