Context
PR #608 implements the hybrid LINE reply/push strategy in gateway/src/main.rs, and the code has been reviewed and accepted. What is still missing is focused gateway-level test coverage for the dispatch behavior.
Why
The current confidence comes primarily from code review plus existing build/test signals, not from automated tests around the new reply-token cache and fallback control flow. This area is correctness-sensitive because it decides when to use the free Reply API, when to fall back to Push API, and when not to fall back to avoid duplicate delivery.
Requested tests
- cache hit: uses LINE Reply API and does not call Push API
- cache miss: falls back to Push API
- expired cached token: falls back to Push API
- Reply API 400 with invalid/expired reply token semantics: falls back to Push API
- Reply API 5xx: does not fall back to Push API to avoid duplicate delivery
- Reply API network/timeout error: does not fall back to Push API to avoid duplicate delivery
Suggested scope
- Extract the LINE dispatch branch into a testable helper if needed
- Keep the tests local to the gateway crate / module
- Prefer explicit assertions about whether Reply or Push was attempted
Related
Context
PR #608 implements the hybrid LINE reply/push strategy in
gateway/src/main.rs, and the code has been reviewed and accepted. What is still missing is focused gateway-level test coverage for the dispatch behavior.Why
The current confidence comes primarily from code review plus existing build/test signals, not from automated tests around the new reply-token cache and fallback control flow. This area is correctness-sensitive because it decides when to use the free Reply API, when to fall back to Push API, and when not to fall back to avoid duplicate delivery.
Requested tests
Suggested scope
Related