Skip to content

Commit 1fc5c05

Browse files
anandgupta42claude
andcommitted
test: plan layer safety e2e tests (68 tests)
Comprehensive user-perspective tests for the plan refinement changes: ## Phrase Classification (42 tests) - 14 approval cases ("looks good", "proceed", "lgtm", etc.) - 12 rejection cases ("no", "stop", "reject", etc.) - 8 pure refinement cases (feedback without approval/rejection signals) - 8 tricky edge cases: - "yes, but change X" → refine (qualifier overrides approval) - "no, I mean yes" → reject (rejection takes priority) - "I know this looks good" → approve ("know" ≠ "no" via word boundary) - Unicode input, multiline, special characters, empty string ## Non-Plan Agent Safety (3 tests) - Plan variables initialized before loop - Refinement block guarded by `agent.name === "plan"` - Plan file detection guarded by agent check ## Session Agent Name Fix (2 tests) - `sessionAgentName` set before early break conditions - `agent_outcome` telemetry uses `sessionAgentName` ## Revision Cap (4 tests) - Cap enforced at >= 5 - Synthetic message communicates limit to LLM - Telemetry emits "cap_reached" - Synthetic message doesn't persist to DB ## Adversarial (4 tests) - 70k char input doesn't crash - Unicode, special chars, multiline handled ## Import Safety (2 tests) - post-connect-suggestions is self-contained (no heavy imports) - Progressive suggestion dedup works correctly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7384fe2 commit 1fc5c05

1 file changed

Lines changed: 453 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)