fix(cron): preserve LINE delivery target casing#82141
Closed
afurm wants to merge 1 commit into
Closed
Conversation
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(cron): preserve LINE delivery target casing This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
5 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
linegroup/user IDs could lose their required uppercase recipient prefix before push delivery.userId,groupId, orroomIdas thetorecipient; lowercased IDs are rejected by the LINE API, which matches the silent delivery failures reported in [Bug]: [core] LINE delivery-recovery sends wrong recipient (lowercased / session-key prefix kept), causing silent push failures #81628.U/C/Rrecipient prefixes when the canonical session key has already been lowercased.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
Crecipient prefix preserved instead of sending the lowercased session-key fragment.pnpm install, using the actualcreateCronToolimplementation and a captured Gateway RPC call.{ "gatewayMethod": "cron.add", "inferredDelivery": { "mode": "announce", "to": "C0123456789abcdef0123456789abcdef", "channel": "line" } }cron.addwithdelivery.toset toC0123456789abcdef0123456789abcdef, preserving the case-sensitive LINE recipient prefix that LINE expects for group push delivery.tovalues and LINE API 400 responses for lowercase recipients.Root Cause (if applicable)
delivery.to. LINE recipient IDs are case-sensitive, so a session key such asagent:main:line:group:c...could produce an invalid lowercasec...push target.U/C/RIDs or prefixed LINE targets.tovalue for push messages.Regression Test Plan (if applicable)
src/agents/tools/cron-tool.test.tsU/C/Rrecipient prefixes and stripsline:*:target prefixes before populating inferred delivery.User-visible / Behavior Changes
Long-running LINE cron/agent-turn announcements inferred from a LINE session key now target the case-correct LINE recipient ID instead of an invalid lowercase recipient.
Diagram (if applicable)
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
createCronToolwithagentSessionKey="agent:main:line:group:c0123456789abcdef0123456789abcdef"and no explicit delivery target.cron.addGateway params produced by the tool.delivery.to.Expected
delivery.tokeeps LINE's uppercase recipient prefix, e.g.C0123456789abcdef0123456789abcdef.Actual
cron.addparams contain the uppercaseC...LINE target.Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
delivery.towith uppercaseC.delivery.towith uppercaseU.line:group:C...peer fragments are stripped before inferred delivery.check:changed --base upstream/mainpasses for the touched core/core-test lanes.pnpm buildcompletes successfully.Validation commands run locally:
Results:
Review Conversations
Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoRisks and Mitigations
channel === "line".