fix(test): correct test_sanitize_agent_error_stderr_and_exc assertions #836

Closed
fullstack-engineer wants to merge 1 commits from fix/test-sanitize-agent-error-stderr into staging
Member

Fix inverted assertion in test_sanitize_agent_error_stderr_and_exc. The test was asserting "ValueError" not in out, but the implementation correctly uses exc type as the tag (e.g. Agent error (ValueError): rate limit exceeded). The comment even said "exc type is the tag" — the assertion was simply inverted.

Also added assertion that the exc body is NOT in the output, verifying the body comes from stderr as intended.

🤖 Generated with Claude Code

Fix inverted assertion in `test_sanitize_agent_error_stderr_and_exc`. The test was asserting `"ValueError" not in out`, but the implementation correctly uses exc type as the tag (e.g. `Agent error (ValueError): rate limit exceeded`). The comment even said "exc type is the tag" — the assertion was simply inverted. Also added assertion that the exc body is NOT in the output, verifying the body comes from stderr as intended. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fullstack-engineer added 1 commit 2026-05-13 12:09:29 +00:00
fix(test): correct test_sanitize_agent_error_stderr_and_exc assertions
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
sop-checklist-gate / gate (pull_request) Successful in 14s
CI / Detect changes (pull_request) Successful in 32s
sop-tier-check / tier-check (pull_request) Successful in 14s
audit-force-merge / audit (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Successful in 8s
CI / Canvas (Next.js) (pull_request) Successful in 11s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 8m25s
CI / all-required (pull_request) Successful in 6s
e02e8055da
The test was asserting `"ValueError" not in out`, but the implementation
correctly uses exc type as the tag (e.g. "Agent error (ValueError): ...").
The comment even said "exc type is the tag" — the assertion was inverted.

Also added assertion that the exc body ("this should not appear") is NOT
in the output, verifying the body comes from stderr as intended.
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
sop-checklist-gate / gate (pull_request) Successful in 14s
CI / Detect changes (pull_request) Successful in 32s
sop-tier-check / tier-check (pull_request) Successful in 14s
audit-force-merge / audit (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Successful in 8s
CI / Canvas (Next.js) (pull_request) Successful in 11s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 8m25s
CI / all-required (pull_request) Successful in 6s
Required
Details
sop-checklist / all-items-acked (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#836