Skip to content

test(go): cover explicit harness provider factory paths - #1073

Merged
santoshkumarradha merged 2 commits into
Agent-Field:mainfrom
aspire488:tests/harness-factory-providers
Sep 26, 2026
Merged

santoshkumarradha merged 2 commits into
Agent-Field:mainfrom
aspire488:tests/harness-factory-providers

Conversation

@aspire488

Copy link
Copy Markdown
Contributor

Summary

Closes #404 (factory-test slice).

  • Adds explicit factory coverage for the Claude Code provider.
  • Adds explicit factory coverage for the OpenCode provider.
  • Keeps the existing default, environment, precedence, blank-value, and unknown-provider coverage.

Scope

This takes only the factory_test.go slice explicitly offered by #404; no production code changes.

Validation

The tests are table-driven and assert the concrete provider type returned by BuildProvider.

@aspire488
aspire488 requested review from a team and AbirAbbas as code owners September 25, 2026 07:56
@CLAassistant

CLAassistant commented Sep 25, 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.

The new cases are useful, but the table currently does not drive the expected type assertion. Please use the expected value from each row so the test fails if a provider is paired with the wrong concrete type.

Comment thread sdk/go/harness/factory_test.go
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Go 167 B -40% 0.35 µs -65% ✓ ✓

✓ No regressions detected

@github-actions

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.90% 87.40% ↑ +0.50 pp 🟡
sdk-go 93.30% 92.00% ↑ +1.30 pp 🟢
sdk-python 94.72% 93.73% ↑ +0.99 pp 🟢
sdk-typescript 91.83% 90.42% ↑ +1.41 pp 🟢
web-ui 84.76% 84.79% ↓ -0.03 pp 🟡
aggregate 85.92% 85.75% ↑ +0.17 pp 🟡

✅ Gate passed

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

@github-actions

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.

Copy link
Copy Markdown
Contributor Author

Thanks — the current head already uses the table-driven expectation via assert.IsType(t, tt.want, provider), so the requested assertion change is addressed. Please re-review the current head (b2584224a7b03db05d1043a362bdfec684f6b1cb).

@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.

Thanks for updating the table to drive the concrete type assertion. The focused factory tests and Go vet pass locally.

@santoshkumarradha
santoshkumarradha dismissed their stale review September 26, 2026 13:20

The contributor addressed this request in b258422; superseded by the approval on the current head.

@santoshkumarradha
santoshkumarradha added this pull request to the merge queue Sep 26, 2026
Merged via the queue into Agent-Field:main with commit 13b4460 Sep 26, 2026
19 checks passed

Copy link
Copy Markdown
Contributor Author

Huge thanks to the AgentField maintainers and reviewers for taking the time to review and merge #1073. 🙏

I really appreciate the feedback around making the factory tests assert the concrete provider types, and the chance to tighten the implementation before it landed.

This was a great contribution experience — clear review feedback, focused validation, and a clean path from issue → implementation → review → merge.

Looking forward to contributing more to AgentField and seeing where the project goes next. 🚀

And to future contributors reading this: keep shipping, keep the changes focused, and make the tests tell the story.

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.

[Go SDK] Add tests for harness providers (claim one file if you want)

3 participants