Skip to content

[deep-report] Consolidate duplicate runtimeImportReference macro parsers #66134

Description

@github-actions

Description

The {{#runtime-import}} / {{#import}} markdown macro grammar is parsed independently in two packages: pkg/parser/frontmatter_hash.go:572 and pkg/workflow/runtime_import_validation.go:38 each declare their own near-identical runtimeImportReference struct (same 3-field shape, only the path field name differs), their own extraction function, and their own near-identical regex (runtimeImportReferenceRe vs runtimeImportMacroRe). The two implementations can silently drift apart if one is updated without the other.

Fix

Extract the shared struct, regex, and extraction function into one location (e.g. pkg/parser), and have pkg/workflow import it instead of maintaining a second copy.

Expected Impact

One implementation of the macro grammar instead of two that can drift apart — removes a latent source of inconsistent macro-parsing behavior between the two packages.

Suggested Agent

General coding agent — mechanical consolidation with existing test coverage in both packages to confirm behavior is preserved.

Estimated Effort

Quick (2-4 hours)

Data Source

DeepReport Intelligence Briefing (2026-10-06, incremental cycle) — sourced from Typist: Go Type Consistency Analysis discussion #66107, live-verified against current pkg/parser/frontmatter_hash.go:572 and pkg/workflow/runtime_import_validation.go:38.

Generated by 🔬 Deep Report · claude · agent · 207.7 AIC · ⌖ 7.97 AIC · ⊞ 7.1K · ◷

  • expires on Oct 8, 2026, 4:50 AM UTC-08:00

Activity

  1. github-actions commented on Oct 8, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-10-08T12:50:39.352Z.

    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