Skip to content

test(sdk): restore 100% OO SDK function coverage - #845

Merged
tode-rl merged 1 commit into
mainfrom
test/oo-sdk-function-coverage
Sep 25, 2026
Merged

tode-rl merged 1 commit into
mainfrom
test/oo-sdk-function-coverage

Conversation

@tode-rl

@tode-rl tode-rl commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Description

SDK Smoke Tests & Coverage Check fails on every PR that touches the object-oriented SDK. Its 100% function-coverage gate is at 97.92%. The gap came in with #780 (agent API calls) and #819 (eviction monitor), which merged with the check failing because it isn't required.

These six functions had no coverage:

Function Covered by
AgentOps.listPublic / Agent.listPublic new list public agents smoke test (live API)
AgentOps.getDevboxCounts new get devbox counts smoke test (live API)
AgentOps.delete / Agent.delete new delete agent smoke test: creates an agent, deletes it, and asserts getInfo() then rejects
eviction monitor reconnect backoff (src/sdk/eviction.ts:93) new hermetic onEvict reconnects after the stream ends cleanly test: the first fake stream ends empty, and the second delivers the eviction after the backoff

Only tests are added. This takes the coverage-related tests from #826, which was closed without merging. It leaves out #826's EvictionMonitor generation/backoff changes and its workflow tweak, because those change behavior rather than coverage.

Testing

  • Unit tests added
  • Integration tests added
  • Smoke Tests added/updated
  • Tested locally

Ran yarn test:objects-coverage against the dev API (api.runloop.pro):

  • before (next at 7f3561d, now the same tests as main): 250 passed, Functions: 97.92% (283/289), coverage threshold not met
  • this branch (on main): 254 passed, Functions: 100% (289/289), exit 0

./scripts/lint (eslint + tsc) passes.

Checklist

  • PR title follows Conventional Commits format (feat: or feat(scope):)
  • Documentation updated (if needed)
  • Breaking changes documented (if applicable)

🤖 Generated with Claude Code

Add smoke tests for agent listPublic, getDevboxCounts, and delete, and for
the eviction monitor's reconnect after a clean stream end.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ Object Smoke Tests & Coverage Report

Test Results

✅ All smoke tests passed

Coverage Results

Metric Coverage Required Status
Functions 100% 100% ✅
Lines 90.47% - ℹ️
Branches 67.98% - ℹ️
Statements 89.33% - ℹ️

Coverage Requirement: 100% function coverage (all public methods must be called in smoke tests)

✅ All tests passed and all object methods are covered!

View detailed coverage report
File Functions Lines Branches
src/sdk.ts ✅ 100% 87.27% 71.87%
src/sdk/agent.ts ✅ 100% 100% 100%
src/sdk/axon.ts ✅ 100% 93.75% 100%
src/sdk/blueprint.ts ✅ 100% 100% 80%
src/sdk/devbox.ts ✅ 100% 92.17% 94.28%
src/sdk/eviction.ts ✅ 100% 91.66% 55.55%
src/sdk/execution-result.ts ✅ 100% 92.68% 70.83%
src/sdk/execution.ts ✅ 100% 93.1% 80%
src/sdk/gateway-config.ts ✅ 100% 100% 100%
src/sdk/mcp-config.ts ✅ 100% 100% 100%
src/sdk/network-policy.ts ✅ 100% 100% 100%
src/sdk/scenario-builder.ts ✅ 100% 98.46% 80.7%
src/sdk/scenario-run.ts ✅ 100% 92.1% 50%
src/sdk/scenario.ts ✅ 100% 100% 100%
src/sdk/scorer.ts ✅ 100% 100% 100%
src/sdk/secret.ts ✅ 100% 100% 100%
src/sdk/snapshot.ts ✅ 100% 100% 100%
src/sdk/storage-object.ts ✅ 100% 80% 48.93%

📋 View workflow run

@tode-rl
tode-rl requested a review from jrvb-rl September 25, 2026 01:09
@tode-rl
tode-rl marked this pull request as ready for review September 25, 2026 01:09
@tode-rl
tode-rl merged commit 484b051 into main Sep 25, 2026
9 checks passed
@tode-rl
tode-rl deleted the test/oo-sdk-function-coverage branch September 25, 2026 16:44
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.

1 participant