Skip to content

Remove redundant python-dataviz imports from daily reporting workflows#41158

Merged
pelikhan merged 3 commits into
mainfrom
copilot/remove-redundant-python-dataviz-imports
Jun 24, 2026
Merged

Remove redundant python-dataviz imports from daily reporting workflows#41158
pelikhan merged 3 commits into
mainfrom
copilot/remove-redundant-python-dataviz-imports

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The ambient-context optimizer flagged duplicated prompt surface in two workflows: shared/python-dataviz.md was imported both directly and transitively through shared/trends.md. This trims that duplicate context from the affected workflows and updates the compiled lockfiles accordingly.

  • Problem

    • daily-issues-report and portfolio-analyst each pulled shared/python-dataviz.md twice:
      • directly from their own imports:
      • indirectly via shared/trends.md
    • That duplication inflated first-request prompt size without adding capability.
  • Change

    • Removed the direct shared/python-dataviz.md import from:
      • .github/workflows/daily-issues-report.md
      • .github/workflows/portfolio-analyst.md
    • Kept shared/trends.md as the single source of the dataviz dependency.
  • Compiled output

    • Recompiled the affected workflows so the generated .lock.yml files no longer embed the duplicate runtime import path.
    • Resulting lockfile changes are limited to:
      • .github/workflows/daily-issues-report.lock.yml
      • .github/workflows/portfolio-analyst.lock.yml
  • Import shape

    # before
    imports:
      - shared/python-dataviz.md
      - shared/trends.md
    
    # after
    imports:
      - shared/trends.md
  • Effect

    • Reduces ambient prompt size for both workflows while preserving behavior, since shared/trends.md already brings in shared/python-dataviz.md transitively.

Copilot AI and others added 2 commits June 24, 2026 04:19
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove redundant python-dataviz imports from daily workflows Remove redundant python-dataviz imports from daily reporting workflows Jun 24, 2026
Copilot AI requested a review from pelikhan June 24, 2026 04:25
@pelikhan pelikhan marked this pull request as ready for review June 24, 2026 04:29
Copilot AI review requested due to automatic review settings June 24, 2026 04:29
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #41158 does not have the 'implementation' label and has 0 new lines of code in business logic directories (4 files changed, all shell/python skill scripts removing redundant imports).

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. PR #41158 only modifies workflow files (.github/workflows/daily-issues-report.lock.yml, .github/workflows/daily-issues-report.md, .github/workflows/portfolio-analyst.lock.yml, .github/workflows/portfolio-analyst.md). Test Quality Sentinel skipped.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request reduces duplicated ambient prompt context in two agentic workflows by removing a redundant direct import of shared/python-dataviz.md where it is already brought in transitively via shared/trends.md, and re-generates the compiled lockfiles to reflect the new import graph.

Changes:

  • Removed the direct shared/python-dataviz.md import from portfolio-analyst and daily-issues-report workflow markdown.
  • Kept shared/trends.md as the single source for the dataviz dependency (confirmed shared/trends.md imports shared/python-dataviz.md).
  • Recompiled the affected workflows so each lockfile includes only a single runtime-import of shared/python-dataviz.md.
Show a summary per file
File Description
.github/workflows/portfolio-analyst.md Removes the redundant direct shared/python-dataviz.md import, relying on shared/trends.md for the transitive dependency.
.github/workflows/portfolio-analyst.lock.yml Updates compiled prompt/runtime import list to remove the duplicate dataviz import (now present once, transitively).
.github/workflows/daily-issues-report.md Removes the redundant direct shared/python-dataviz.md import while keeping trend + NLP imports.
.github/workflows/daily-issues-report.lock.yml Updates compiled prompt/runtime import list to remove the duplicate dataviz import (now present once, transitively).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 0

@github-actions github-actions Bot mentioned this pull request Jun 24, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /zoom-out and /grill-with-docs — commenting with three observations, no blockers.

📋 Key Themes & Highlights

Key Themes

  • Silent python-nlp.md reordering: moving it from before trends.md to after is arguably correct but is an undocumented side effect — worth a sentence in the PR description
  • python-dataviz.md positioned after reporting.md in the compiled prompt for daily-issues-report: unusual ordering that is probably fine at runtime (LLMs read full context) but worth a verify pass on the next scheduled run
  • Prompt-size framing: the lockfile diff reveals a net reordering of the single python-dataviz.md runtime-import entry rather than a removal, suggesting the compiler was already deduplicating — the benefit of this change is source-level DRY, not a token reduction

Positive Highlights

  • trends.md confirmed to import python-dataviz.md — the transitive dependency assumption is sound
  • portfolio-analyst.md change is minimal and precisely matches the stated goal
  • ✅ Both lockfiles recompiled cleanly with updated metadata hashes
  • ✅ Step reordering in daily-issues-report.lock.yml is safe — both venv-creation steps use if [ ! -d /tmp/gh-aw/agent/venv ] guards

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 76.7 AIC · ⌖ 9.7 AIC · ⊞ 6.5K

Comment thread .github/workflows/daily-issues-report.md
Comment thread .github/workflows/daily-issues-report.lock.yml
{{#runtime-import .github/workflows/shared/mcp/grafana.md}}
{{#runtime-import .github/workflows/shared/python-dataviz.md}}
{{#runtime-import .github/workflows/shared/trends.md}}
{{#runtime-import .github/workflows/shared/python-dataviz.md}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/grill-with-docs] The lockfile diff shows python-dataviz.md moved from before trends.md to after it — a net reordering, not a net removal. Before this PR the lockfile already contained exactly one {{#runtime-import .github/workflows/shared/python-dataviz.md}} entry (the compiler deduplicates transitive imports at compile time).

💡 Implication for the PR description

The PR description states that the duplicate import "inflated first-request prompt size". If the compiler was already deduplicating, the prompt size was not inflated at runtime — the source declaration was simply redundant. The benefit of this change is source-level DRY and clarity (removing a misleading explicit import), which is still a valid reason to merge, but the token-reduction framing may overstate the impact.

Consider updating the PR description to note: "The compiler already deduplicates transitive imports, so runtime prompt size is unchanged; this change removes the misleading direct import declaration from the source workflow."

@pelikhan pelikhan merged commit 5373e08 into main Jun 24, 2026
72 of 83 checks passed
@pelikhan pelikhan deleted the copilot/remove-redundant-python-dataviz-imports branch June 24, 2026 05:01
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.

3 participants