Skip to content

[test] Add tests for server.callBackendPrompt - #14958

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
test/prompt-call-coverage-37223824d2eab408
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
test/prompt-call-coverage-37223824d2eab408

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Test Coverage Improvement: callBackendPrompt

  • Package: internal/server
  • Function: callBackendPrompt
  • Previous coverage: 79.5%
  • New coverage: 82.2%
  • Complexity: High (DIFC pipeline phases, many error branches)

Why this function?

It's the most complex function with remaining gaps among the under-tested ones (most other low-coverage functions are trivial or test helpers).

Tests added

  • Unlabeled response passthrough
  • Collection with all-allowed items
  • Collection with null messages (unexpected type error)
  • Backend rejecting malformed messages
  • Unlabeled response with denied DIFC evaluation (filter mode)
  • Per-server ToolTimeout override
  • Backend JSON-RPC error propagation

Test execution

go test ./internal/server -run TestCallBackendPrompt passes; go vet clean.


Generated by Test Coverage Improver

Warning

Firewall blocked 4 domains

The following domains were blocked by the firewall during workflow execution:

  • example.com
  • nonexistent.local
  • slow.example.com
  • thishostdoesnotexist12345.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"
    - "nonexistent.local"
    - "slow.example.com"
    - "thishostdoesnotexist12345.com"

See Network Configuration for more information.

Generated by Test Coverage Improver · copilot · auto · 42.5 AIC · ⊞ 10.7K · ◷

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants