Skip to content

[schema-coverage] elasticstack_kibana_agentbuilder_agent #4627

Description

@github-actions

Entity

  • Name: elasticstack_kibana_agentbuilder_agent
  • Type: data source
  • Implementation directory: internal/kibana/agentbuilderagent/
    • Schema: internal/kibana/agentbuilderagent/data_source_schema.go
    • Acceptance tests: internal/kibana/agentbuilderagent/acc_test.go

Attributes with no coverage

  • None — every top-level and nested-tool attribute is exercised by at least one TestAccDataSource... test.

Attributes with poor coverage

  • tools[].type (Computed, string; valid values esql, index_search, workflow, mcp per the tool schema)
    • Observed: Data-source tests only ever populate tools with esql and workflow type tools (TestAccDataSourceKibanaAgentBuilderAgentWithDependencies, TestAccDataSourceKibanaAgentBuilderAgentWorkflowTool).
    • Gaps: index_search and mcp tool types are never surfaced through this data source's tools list.
    • Suggested improvement: Extend TestAccDataSourceKibanaAgentBuilderAgentWithDependencies (or add a new test) with an index_search-type tool attached to the agent, asserting tools.N.type == "index_search".
  • tools[].readonly (Computed, bool)
    • Observed: Only ever asserted as "false" (acc_test.go:267,459,277).
    • Gaps: readonly = true is never exercised.
    • Suggested improvement: Attach a read-only tool fixture and assert tools.N.readonly == "true".
  • skill_ids via the data source (Computed, set of string; requires Elastic Stack 9.4.0+)
    • Observed: TestAccDataSourceKibanaAgentBuilderAgentSkillIds only asserts a single-element set (acc_test.go:423-424).
    • Gaps: No empty/absent skill_ids case is verified through the data source read path (the empty case is only verified on the backing resource in TestAccResourceAgentBuilderAgentSkillIds's update step, not re-read via the data source).
    • Suggested improvement: Add a data-source read step against an agent with no skill_ids configured and assert resource.TestCheckNoResourceAttr(dataSourceID, "skill_ids") (or "skill_ids.#" == "0", whichever the implementation actually returns).
  • avatar_color / avatar_symbol via the data source (Computed, string)
    • Observed: Asserted with exact values only in TestAccDataSourceKibanaAgentBuilderAgent's second step (read_space, acc_test.go:188-189); the first step (base read) doesn't assert them at all, and no data-source read exercises the "no avatar configured" (empty string) case — that's only covered on the resource directly in TestAccResourceAgentBuilderAgentAvatar.
    • Gaps: No empty/unset-avatar case through the data source read path.
    • Suggested improvement: Add avatar assertions (both set and empty cases) to the base TestAccDataSourceKibanaAgentBuilderAgent test steps.

Prioritized top 5 gaps

  1. tools[].typeindex_search and mcp tool types never surfaced via this data source.
  2. tools[].readonly — only false ever asserted.
  3. skill_ids — empty/absent case never verified via the data source read path.
  4. avatar_color / avatar_symbol — empty/unset case never verified via the data source read path.
  5. labels — the base read step doesn't assert labels at all (only read_space does), so there's no coverage of the empty-labels case via the data source.

Suggested acceptance-test additions

  • Add an index_search-type tool to the WithDependencies fixture and assert its type/readonly (using a read-only-capable tool if one exists, to also cover gap 2).
  • Add a data-source read step for an agent with no skill_ids configured, asserting the attribute is absent/empty.
  • Add avatar assertions (set and empty) to TestAccDataSourceKibanaAgentBuilderAgent's base read step.
  • Add a labels.# assertion (including an empty-labels fixture) to the base read step.

Generated by Schema Coverage Rotation · sonnet50 · 132 AIC · ⌖ 15.7 AIC · ⊞ 6.6K ·

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions