Skip to content

Emit infer deprecation warnings during include frontmatter processing#33780

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/deep-report-emitting-deprecation-warning
Closed

Emit infer deprecation warnings during include frontmatter processing#33780
Copilot wants to merge 3 commits into
mainfrom
copilot/deep-report-emitting-deprecation-warning

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

infer is marked deprecated in the workflow schema, but included-file frontmatter accepted it without any compiler signal. This change adds an explicit warning path so users see migration guidance to disable-model-invocation when infer is present.

  • Deprecation signaling in parser include flow

    • Updated pkg/parser/include_processor.go to emit console.FormatWarningMessage(...) when included frontmatter contains infer.
    • Warning text points directly to the replacement field: disable-model-invocation.
  • Targeted regression coverage

    • Extended pkg/parser/frontmatter_includes_test.go with a focused test that captures stderr and asserts the warning fires for infer.
    • Kept existing behavior unchanged for included files that do not use infer.
if _, hasInfer := result.Frontmatter["infer"]; hasInfer {
	fmt.Fprintln(os.Stderr, console.FormatWarningMessage(
		fmt.Sprintf("Frontmatter field 'infer' in %s is deprecated. Use 'disable-model-invocation' instead.", filePath),
	))
}

Copilot AI and others added 2 commits May 21, 2026 15:26
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Emit deprecation warning when frontmatter uses infer field Emit infer deprecation warnings during include frontmatter processing May 21, 2026
Copilot AI requested a review from gh-aw-bot May 21, 2026 15:32
@pelikhan pelikhan closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] Emit deprecation warning when frontmatter uses infer field

3 participants