Skip to content

[deep-report] Normalize observabilityImportEndpoint.Headers to a typed field instead of any #64766

Closed as not planned

Description

@github-actions

Description

pkg/parser/import_observability.go:16-19 defines observabilityImportEndpoint.Headers as any, because the original YAML/JSON otlp.headers field accepts either a bare string or a map[string]string. The comment says normalization is deferred to the workflow package, so every downstream consumer in workflow has to re-check the type at use time instead of the parser normalizing once at the parse boundary.

type observabilityImportEndpoint struct {
    URL     string `json:"url"`
    Headers any    `json:"headers,omitempty"`
}

Expected Impact

Normalizing both accepted input forms (string or map) into a single map[string]string inside pkg/parser removes a type-safety gap: Headers becomes concretely typed, and every workflow-package consumer is freed from re-implementing the same type-switch/normalization logic. Small clarity and maintainability win, no behavior change for valid input.

Suggested Agent

New Agent (small, scoped Go refactor) or a general-purpose coding agent.

Estimated Effort

Quick (< 1 hour)

Data Source

Typist: Go type consistency analysis, 2026-10-01 (discussion #64752), Finding 2 under "Untyped Usages".

Generated by 🔬 Deep Report · claude · agent · 151.2 AIC · ⌖ 7.63 AIC · ⊞ 7.3K · ◷

  • expires on Oct 3, 2026, 4:47 AM UTC-08:00

Activity

  1. github-actions commented on Oct 3, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-10-03T12:47:28.710Z.

    Closed by Workflow

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