Skip to content

test(harness): cover raw result text and failure type serialization - #1043

Merged
santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
FriendlyPasser:test/harness-result-404
Sep 7, 2026
Merged

test(harness): cover raw result text and failure type serialization#1043
santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
FriendlyPasser:test/harness-result-404

Conversation

@FriendlyPasser

@FriendlyPasser FriendlyPasser commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds table-driven tests for Result.Text() raw text preservation and JSON serialization/round trips for all six FailureType constants and the zero value.

This PR covers only the claimed sdk/go/harness/result_test.go subtask of #404. No production code changes.

Type of change

  • Tests only

Test plan

Commands run from sdk/go:

  • gofmt -w harness/result_test.go
  • go 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:

  • Python SDK: 2364 passed, 4 skipped.
  • TypeScript SDK: 970 passed.
  • Web UI: 700 passed; build passed.
  • Python lint passed.

Full-repository checks were not entirely green on macOS:

  • ./scripts/test-all.sh stopped at an existing control-plane test requiring Linux /proc process-environment access. Remaining component suites were run separately.
  • make lint reported existing Go issues outside this change.
  • An existing harness cancellation test failed during a concurrent run; the full harness suite passed on a separate rerun.
  • TMPDIR=/private/tmp avoids an existing macOS /var versus /private/var path comparison failure.

Test coverage

  • I ran tests for the surface(s) I changed locally.
  • New code paths are covered by tests in this PR (no bare additions). This PR adds tests only.
  • The coverage gate check is green in CI before requesting review.

No production code was removed, and coverage-baseline.json was not changed. The 92.3% result is local harness package coverage; the repository-wide coverage gate still needs to run in CI.

Checklist

  • I have read CONTRIBUTING.md (if present) and docs/DEVELOPMENT.md.
  • Commits are signed and follow conventional-commits style.
  • I have linked any related issues.

Read CLAUDE.md, AGENTS.md, and docs/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.go subtask.

@FriendlyPasser
FriendlyPasser requested review from a team and AbirAbbas as code owners September 7, 2026 07:55
@CLAassistant

CLAassistant commented Sep 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Go 170 B -39% 0.39 µs -61%

✓ No regressions detected

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 87.80% 87.40% ↑ +0.40 pp 🟡
sdk-go 93.10% 92.00% ↑ +1.10 pp 🟢
sdk-python 94.72% 93.73% ↑ +0.99 pp 🟢
sdk-typescript 91.72% 90.42% ↑ +1.30 pp 🟢
web-ui 84.77% 84.79% ↓ -0.02 pp 🟡
aggregate 85.89% 85.75% ↑ +0.14 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@santoshkumarradha
santoshkumarradha added this pull request to the merge queue Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 ➖ no changes
sdk-go 0 ➖ no changes
sdk-python 0 ➖ no changes
sdk-typescript 0 ➖ no changes
web-ui 0 ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

Merged via the queue into Agent-Field:main with commit 0916748 Sep 7, 2026
39 checks passed
@FriendlyPasser
FriendlyPasser deleted the test/harness-result-404 branch September 7, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants