Skip to content

[deep-report] Consolidate duplicate runtimeImportReference type between pkg/parser and pkg/workflow #64945

Description

@github-actions

Description

pkg/parser/frontmatter_hash.go:572-653 and pkg/workflow/runtime_import_validation.go:38-176 each define a nearly-identical runtimeImportReference struct and an extractRuntimeImportReferences function. The only structural difference is the path field name (path in the parser copy vs importPath in the workflow copy, plus the workflow copy adds startLine/endLine). Both parse the same {{#runtime-import ...}} / {{#import ...}} macro syntax independently.

Expected Impact

Reduces duplicate macro-parsing logic that already has to stay behavior-identical by convention rather than by construction. pkg/workflow already imports pkg/parser, so the workflow package can depend on an exported version of the parser's extractor (adding the line-range fields it needs) instead of maintaining a second regex-based extractor that could silently drift from the parser's behavior.

Suggested Agent

Code Simplifier or a general refactoring agent (Go-only change, no behavior change expected).

Estimated Effort

Medium (1-4 hours) — requires exporting the parser type/function, adding the line-tracking fields the workflow package needs, updating both call sites, and running make test-unit.

Data Source

DeepReport Intelligence Briefing cycle (2026-10-02), surfaced via discussion #64752 (Typist: Go type consistency analysis).

Generated by 🔬 Deep Report · claude · agent · 298.7 AIC · ⌖ 7.67 AIC · ⊞ 7.3K · ◷

  • expires on Oct 3, 2026, 10:53 PM UTC-08:00

Activity

  1. github-actions commented on Oct 4, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-10-04T06:53:07.452Z.

    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