← Back to PRs

#17289: test(line): add DM policy matrix coverage for open/allowlist/pairing/disabled

by davidahmann open 2026-02-15 16:13 View on GitHub →
stale size: S
## Problem LINE DM policy behavior lacked matrix-style coverage across `open`, `allowlist`, `pairing`, and `disabled` paths. ## What changed - Added targeted DM policy matrix tests to `/Users/davidahmann/Projects/agent-ecosystem/openclaw/src/line/bot-handlers.test.ts`. - Covered deterministic allow/block behavior for: - `disabled` - `open` - `allowlist` (allowed + blocked senders) - `pairing` (blocked + pairing request path) ## Validation - `pnpm test src/line/bot-handlers.test.ts` (pass) Fixes #17285 <!-- greptile_comment --> <h3>Greptile Summary</h3> Added comprehensive matrix-style test coverage for LINE direct message policy enforcement across all four policy modes (`disabled`, `open`, `allowlist`, `pairing`). - Verified `disabled` policy blocks all DMs and prevents message processing - Confirmed `open` policy allows all DMs through - Validated `allowlist` policy correctly discriminates between allowed and blocked senders - Ensured `pairing` policy blocks messages but triggers pairing request flow Tests follow existing patterns in the file with proper mocking, clear event structures, and deterministic assertions. The coverage addresses the gap identified in issue #17285. <h3>Confidence Score: 5/5</h3> - Safe to merge with no issues found - Pure test addition that follows established patterns, provides valuable coverage for DM policy enforcement logic, and validates all four policy modes deterministically. No changes to production code, proper mocking structure, and clear assertions. - No files require special attention <sub>Last reviewed commit: bf1146e</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs