test(shared): cover the LLDB policy wrappers' own members - cpp 36%->100%, rust 71%->100% - #418
Merged
Merged
Conversation
…100%, rust 71%->100% adapter-policy-cpp.ts read 35.7% lines / 0% branches not because its behavior was untested but because the file is a thin composition wrapper: 15 members are bare references into lldb-policy-shared.ts (94% lines, 100% functions), so the 234-line cpp test's assertions were credited to the shared file. Only 14 statements belong to the wrapper itself, so the 7 one-line members no test called dragged the percentage down; rust, structurally identical, sat at 70.6% for the same reason. - adapter-policy-cpp.test.ts: call the 7 uncalled members (child-session throw, isChildReadyEvent, getLocalScopeName, resolveExecutablePath both arms, getDebuggerConfiguration, requiresCommandQueueing, shouldQueueCommand) plus one getAdapterSpawnConfig call omitting platform/arch so the default-arg branches fire -> 100% on all metrics - adapter-policy-rust.test.ts: same treatment for rust's 5 missed members -> 100% on all metrics - resolve-exception-filters.test.ts: add cpp to the guardrail matrix (uncaught: [], all: ['cpp_throw'], default 'uncaught') - it was the only policy with an exception-filter table missing from the deliberate-change guardrail Test-only; no source changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Why
adapter-policy-cpp.tssat at 35.7% lines / 0% branches on the coverage leaderboard while every other policy read 70-100%. Investigation showed the number is mostly a measurement artifact of the file's structure, not missing behavioral tests:lldb-policy-shared.ts(94% lines, 100% functions). Its 234-line unit test exercises stop-reason normalization, stack filtering, variable extraction, state tracking, and spawn config heavily - but istanbul credits all of that to the shared file.platform/archargs left the default-arg branches at 0/4.Changes (test-only, no source changes)
adapter-policy-cpp.test.ts: call the 7 uncalled members (buildChildStartArgsthrow,isChildReadyEvent,getLocalScopeName,resolveExecutablePathboth arms,getDebuggerConfiguration,requiresCommandQueueing,shouldQueueCommand) plus onegetAdapterSpawnConfigcall omittingplatform/archso the default-arg branches fire.adapter-policy-rust.test.ts: same treatment for rust's 5 missed members (isChildReadyEvent,getLocalScopeName,getDapAdapterConfiguration,getDebuggerConfiguration,requiresCommandQueueing).resolve-exception-filters.test.ts: add cpp to the guardrail matrix (uncaught: [],all: ['cpp_throw'], default'uncaught'). Cpp was the only policy with an exception-filter table missing from the test whose stated purpose is that filter-table changes must be deliberate - a real consistency gap surfaced by the investigation.Coverage result (verified locally, istanbul)
adapter-policy-cpp.tsadapter-policy-rust.tsFull unit suite: 214 files / 3844 tests passing; pre-push lint + build + unit + integration all green.
🤖 Generated with Claude Code