Skip to content

test(functional): fix Docker-backed SDK test infra#709

Merged
AbirAbbas merged 1 commit into
mainfrom
santosh/docker-func
Jul 3, 2026
Merged

test(functional): fix Docker-backed SDK test infra#709
AbirAbbas merged 1 commit into
mainfrom
santosh/docker-func

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Jul 2, 2026

Copy link
Copy Markdown
Member

Fixes #713

Summary

Fixes the Docker-backed SDK functional test infrastructure and makes the new tests exercise real end-to-end behavior.

Infrastructure fixes

  • Use the repository root as the Docker build context so deployments/docker/Dockerfile.control-plane can copy control-plane/... paths.
  • Poll the actual control-plane health route at /api/v1/health in Docker healthchecks and wait scripts.
  • Use supported control-plane env vars for postgres mode: AGENTFIELD_STORAGE_MODE=postgres and AGENTFIELD_POSTGRES_URL.
  • Add host.docker.internal host mapping so the containerized control plane can call agents running on the host during functional tests.

SDK functional test fixes

  • Update Python functional tests to use the current SDK API: Agent(..., agentfield_server=...).
  • Pass the Agent instance itself to uvicorn instead of agent.app.
  • Start Python test agents on 0.0.0.0 while probing localhost for readiness.
  • Avoid empty execute payloads rejected by the control plane.
  • Add Go SDK skill registration support and include skills in control-plane node registration.
  • Make Go agent startup bind its listener before registration so callback validation is not racy.
  • Update Go functional execution coverage to actually call /api/v1/execute/test-go-execution.add and assert sum == 5.

Verification

  • docker compose -f test-infra/docker-compose.yml config
  • ./test-infra/scripts/start-env.sh
  • cd sdk/python && /tmp/agentfield-py-functional-venv/bin/pytest --collect-only -m functional tests/functional
  • cd sdk/python && /tmp/agentfield-py-functional-venv/bin/pytest -m functional tests/functional/test_agent_registration.py -q
  • cd sdk/go && go test ./agent
  • cd sdk/go && go test -tags functional -run TestFunctionalExecution -count=1 -v .

@santoshkumarradha santoshkumarradha requested review from a team and AbirAbbas as code owners July 2, 2026 23:09
Comment thread .github/workflows/functional-tests.yml Fixed
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.4 KB +4% 0.31 µs -11%
Go 240 B -14% 0.72 µs -28%

✓ No regressions detected

@github-actions

github-actions Bot commented Jul 2, 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.00% 87.40% ↓ -0.40 pp 🟡
sdk-go 91.90% 92.00% ↓ -0.10 pp 🟢
sdk-python 93.76% 93.73% ↑ +0.03 pp 🟢
sdk-typescript 90.05% 90.42% ↓ -0.37 pp 🟢
web-ui 84.82% 84.79% ↑ +0.03 pp 🟡
aggregate 85.62% 85.75% ↓ -0.13 pp 🟡

✅ Gate passed

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

@github-actions

github-actions Bot commented Jul 2, 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 107 95.00%
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.

@AbirAbbas AbirAbbas merged commit b6f0292 into main Jul 3, 2026
34 checks passed
@AbirAbbas AbirAbbas deleted the santosh/docker-func branch July 3, 2026 19:24
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.

Fix Docker-backed SDK functional test infrastructure

3 participants