fix(tests): correct test_sanitize_agent_error_stderr_and_exc assertion
Some checks failed
audit-force-merge / audit (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 19s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
Harness Replays / detect-changes (pull_request) Successful in 20s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 16s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
CI / Detect changes (pull_request) Successful in 1m1s
E2E API Smoke Test / detect-changes (pull_request) Successful in 56s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 1m0s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m3s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m1s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 26s
publish-runtime-autobump / pr-validate (pull_request) Successful in 59s
qa-review / approved (pull_request) Failing after 27s
security-review / approved (pull_request) Failing after 25s
gate-check-v3 / gate-check (pull_request) Successful in 38s
sop-tier-check / tier-check (pull_request) Successful in 25s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m14s
Harness Replays / Harness Replays (pull_request) Successful in 10s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 25s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3m24s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 6m14s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 7m19s
CI / Python Lint & Test (pull_request) Successful in 8m10s
CI / Platform (Go) (pull_request) Failing after 13m48s
CI / Canvas (Next.js) (pull_request) Failing after 13m47s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Some checks failed
audit-force-merge / audit (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 19s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Has been skipped
Harness Replays / detect-changes (pull_request) Successful in 20s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 16s
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
CI / Detect changes (pull_request) Successful in 1m1s
E2E API Smoke Test / detect-changes (pull_request) Successful in 56s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 1m0s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m3s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m1s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 26s
publish-runtime-autobump / pr-validate (pull_request) Successful in 59s
qa-review / approved (pull_request) Failing after 27s
security-review / approved (pull_request) Failing after 25s
gate-check-v3 / gate-check (pull_request) Successful in 38s
sop-tier-check / tier-check (pull_request) Successful in 25s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m14s
Harness Replays / Harness Replays (pull_request) Successful in 10s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 25s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3m24s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Failing after 6m14s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 7m19s
CI / Python Lint & Test (pull_request) Successful in 8m10s
CI / Platform (Go) (pull_request) Failing after 13m48s
CI / Canvas (Next.js) (pull_request) Failing after 13m47s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
The test expected the exception class to be hidden when stderr is provided, but the implementation always uses the exc type as the tag. Fix the assertion to match actual (correct) behavior: ValueError is in the tag, stderr is the body. Also add a check that we don't fall back to the generic "workspace logs" form. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
712d71aced
commit
8a740933c5
@ -761,8 +761,9 @@ def test_sanitize_agent_error_stderr_and_exc():
|
||||
"""exception + stderr: exc type is the tag, stderr is the body."""
|
||||
err = ValueError("this should not appear")
|
||||
out = sanitize_agent_error(exc=err, stderr="rate limit exceeded")
|
||||
assert "ValueError" not in out # exc class is overridden by stderr
|
||||
assert "ValueError" in out # exc class is the tag, not overridden
|
||||
assert "rate limit exceeded" in out
|
||||
assert "workspace logs" not in out # stderr form, not the generic form
|
||||
|
||||
|
||||
def test_sanitize_agent_error_stderr_empty_string():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user