Conversation
… ≥95% Co-authored-by: dgenio <12731907+dgenio@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Close stale scaffold issues and improve test coverage
test: close coverage gaps in summarize.py, http.py, and transform.py
Mar 14, 2026
There was a problem hiding this comment.
Pull request overview
Closes test coverage gaps in key data-path components (firewall summarization/transform paths and HTTP driver method/error branches) and removes a small piece of unused firewall code.
Changes:
- Added targeted Firewall tests to cover raw-mode budget warnings, table-mode edge inputs,
_cap_factsbudget-break behavior, andsummarize()edge cases. - Added HTTPDriver tests for POST/PUT/DELETE/PATCH dispatch paths and
httpx.RequestError→DriverErrorwrapping. - Removed an unused helper (
_truncate_str) fromfirewall/transform.py.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_firewall.py | Adds tests for summarize/transform edge cases and budget boundary behavior to raise coverage. |
| tests/test_drivers.py | Adds HTTPDriver tests to cover non-GET method branches and request error handling. |
| src/agent_kernel/firewall/transform.py | Removes dead code (_truncate_str) that is unused in the codebase. |
You can also share your feedback on Copilot code review. Take the survey.
added 4 commits
March 14, 2026 20:41
…ues-and-fill-coverage-gaps # Conflicts: # CHANGELOG.md
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.
Three data-path modules were below the 95% coverage target:
firewall/summarize.py(76%),drivers/http.py(82%), andfirewall/transform.py(91%). This adds targeted tests to bring all three to 100% and removes one dead-code function.firewall/summarize.py(76% → 100%)Previously untested dispatch paths and branch conditions:
summarize()with plain lists, non-list/dict/str scalars, and strings >500 chars (truncation suffix)_summarize_list_of_dicts: categorical distribution output, skipping non-string field values,max_factsbreak in both numeric-stats and categorical loops_summarize_dict: list values, tuple/other values (repr fallback),max_factsbreakdrivers/http.py(82% → 100%)All non-GET HTTP method branches and the connection-error handler were uncovered:
client.request()) dispatch pathshttpx.RequestError→DriverErrorwrappingfirewall/transform.py(91% → 100%)_cap_factsbudget-break path exercised via the publicFirewallinterfaceDead code removal
_truncate_strintransform.pywas defined but never called. Removed per the project's no-dead-code rule.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.