Repository navigation
test(sdk): restore 100% OO SDK function coverage - #845
Merged
Merged
Conversation
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>
✅ Object Smoke Tests & Coverage ReportTest Results✅ All smoke tests passed Coverage Results
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
SDK Smoke Tests & Coverage Checkfails 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:
AgentOps.listPublic/Agent.listPubliclist public agentssmoke test (live API)AgentOps.getDevboxCountsget devbox countssmoke test (live API)AgentOps.delete/Agent.deletedelete agentsmoke test: creates an agent, deletes it, and assertsgetInfo()then rejectssrc/sdk/eviction.ts:93)onEvict reconnects after the stream ends cleanlytest: the first fake stream ends empty, and the second delivers the eviction after the backoffOnly tests are added. This takes the coverage-related tests from #826, which was closed without merging. It leaves out #826's
EvictionMonitorgeneration/backoff changes and its workflow tweak, because those change behavior rather than coverage.Testing
Ran
yarn test:objects-coverageagainst the dev API (api.runloop.pro):nextat7f3561d, now the same tests asmain): 250 passed,Functions: 97.92% (283/289), coverage threshold not metmain): 254 passed,Functions: 100% (289/289), exit 0./scripts/lint(eslint + tsc) passes.Checklist
feat:orfeat(scope):)🤖 Generated with Claude Code