chore: revive portfolio analyst workflow#39450
Conversation
There was a problem hiding this comment.
Pull request overview
Reintroduces the “Workflow Portfolio Analyst” agentic workflow to produce a weekly, discussion-based portfolio report mapping AI Credit (AIC) spend per workflow using OpenTelemetry-backed telemetry (Sentry/Grafana), including charts and 30-day trend analysis.
Changes:
- Added a new portfolio analyst workflow spec (
.md) describing dataset construction, chart generation, asset upload, and discussion publishing. - Added the corresponding compiled workflow lock file (
.lock.yml) to run the workflow on a weekly schedule and via manual dispatch.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/portfolio-analyst.md | New portfolio analyst workflow spec/prompt defining telemetry queries, aggregation rules, chart requirements, and discussion format/guardrails. |
| .github/workflows/portfolio-analyst.lock.yml | Generated compiled workflow implementing the schedule/dispatch triggers, environment setup, MCP gateway, and safe-outputs publishing. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/2 changed files
- Comments generated: 3
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
✅ smoke-ci: safeoutputs CLI comment + comment-memory run (27573992522)
|
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment.
|
Revives the
portfolio-analystscheduled workflow that turns 30 days of OpenTelemetry AIC telemetry into a portfolio-style spend map and publishes it as a weekly GitHub Discussion.What
Adds
.github/workflows/portfolio-analyst.md— a weekly agentic workflow (tracker-id: portfolio-analyst) that:[portfolio] Workflow AIC Portfolio - YYYY-MM-DDGitHub Discussion in theauditscategory with executive summary, spend table, trend analysis, heavy hitters, rapid risers, and optimization recommendationsWhy
Without a regular spend view, high-AIC or reliability-degraded workflows go unnoticed until they become expensive. This workflow closes that gap by delivering a structured weekly portfolio analysis directly into Discussions, making cost trends and reliability problems visible to the whole team without manual querying.
How
Schedule:
cron: "0 16 * * 1"(every Monday 16:00 UTC) +workflow_dispatchfor on-demand runs.Engine:
claudewithstrict: true.MCP imports:
shared/mcp/sentry.md— primary span/trace sourceshared/mcp/grafana.md— Grafana Tempo trace sourceshared/python-dataviz.md— chart generation environmentshared/trends.md— delta/trend computation helpersNetwork:
defaults+python(for seaborn/matplotlib chart rendering).Phases:
upload_assetsafe-output (max 5, image types only).create-discussionsafe-output withtitle-prefix: "[portfolio] ",close-older-discussions: true,expires: 7d.Permissions:
contents: read,actions: read,issues: read,pull-requests: read— no write permissions beyond safe-outputs.Timeout: 30 minutes.
Verification
make recompilepasses and the generated.lock.ymlis committed alongside the source.mdmake agent-report-progresspasses (lint + compile checks)workflow_dispatchand confirmed the Discussion is created under theauditscategory with the[portfolio]title prefixworkflow_dispatchrun closes the previous Discussion and opens a new one (verifyingclose-older-discussions: true)Checklist
.github/workflows/.lock.ymlcommittedghDiscussion/asset calls in prompt)tracker-idset (portfolio-analyst)30minutes)contents: write)Notes on the commit log: Three of the four commits are
Potential fix for pull request finding— these are authoring-time housekeeping commits (iterative debugging of PR linkage) and carry no user-facing significance; they are omitted from the description above.