test(harness): cover raw result text and failure type serialization - #1043
Conversation
santoshkumarradha
left a comment
There was a problem hiding this comment.
Looks good. These tests clearly pin Result.Text() to the raw result and cover every current failure-type JSON value. The focused tests pass locally. I also ran the broader harness package; its only failure was an unrelated macOS /var versus /private/var temp-path assertion.
Performance
✓ No regressions detected |
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
Summary
Adds table-driven tests for
Result.Text()raw text preservation and JSON serialization/round trips for all sixFailureTypeconstants and the zero value.This PR covers only the claimed
sdk/go/harness/result_test.gosubtask of #404. No production code changes.Type of change
Test plan
Commands run from
sdk/go:gofmt -w harness/result_test.gogo test ./harness -run '^(TestResultTextReturnsRawResult|TestFailureTypeJSONSerialization)$' -count=1 -v— all 11 cases passed.TMPDIR=/private/tmp go test ./harness/... -count=1 -cover— passed; 92.3% package coverage.golangci-lint run --new-from-rev=HEAD~1 ./harness/...— passed.Additional validation:
Full-repository checks were not entirely green on macOS:
./scripts/test-all.shstopped at an existing control-plane test requiring Linux/procprocess-environment access. Remaining component suites were run separately.make lintreported existing Go issues outside this change.TMPDIR=/private/tmpavoids an existing macOS/varversus/private/varpath comparison failure.Test coverage
No production code was removed, and
coverage-baseline.jsonwas not changed. The 92.3% result is local harness package coverage; the repository-wide coverage gate still needs to run in CI.Checklist
Read
CLAUDE.md,AGENTS.md, anddocs/CONTRIBUTING.md. The commit follows conventional-commits style but is not cryptographically signed.AI-assisted implementation, reviewed and tested locally.
Related issues / PRs
Refs #404 — only the
sdk/go/harness/result_test.gosubtask.