Skip to content

MCP test_policy: surface attribution status when tests exist but none match naming convention #234

Description

@sonupreetam

When tests execute successfully but none follow the {family}_{id}_test naming convention, the test_policy MCP response omits the perRequirement field entirely. This makes it indistinguishable from:

  1. The feature not existing (older complypack version)
  2. Attribution failing silently (error swallowed at tools.go:344)

An LLM consuming this response has no signal that attribution was attempted and found nothing, so it cannot suggest renaming test packages to follow the convention.

Suggested options:

  • Include "perRequirement": {} (empty but present) when attribution was attempted but no tests matched
  • Add an "unmappedTests": N field showing how many test packages could not be attributed
  • Include unmapped test package names so the consumer can suggest convention-compliant renames

Context: Found during E2E verification of PR #226. The feature works correctly — this is about improving observability for LLM-assisted workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestllm_assistedIssue triaged or authored with LLM assistance

    Type

    No type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions