Harden aw-portfolio-yield finalization and add Sentry OTel fallback#33739
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request hardens aw-portfolio-yield postcompute finalization against malformed/untrusted recommendation payloads, and updates the workflow prompt/imports so telemetry validation can fall back to Sentry when Grafana is unavailable.
Changes:
- Make postcompute tolerant of malformed agent recommendations by ignoring unknown workflows and conflicting multi-bucket assignments (recording notes instead of failing).
- Extend recommendation seed parsing to support entries that provide
pathslists (in addition to singlepathvalues). - Add regression tests for the new resilience behavior and update the
aw-portfolio-yieldworkflow to import Sentry MCP + document the fallback.
Show a summary per file
| File | Description |
|---|---|
| scripts/aw_yield_postcompute.py | Makes recommendation normalization resilient (unknown/conflicting entries become notes) and supports seed entries with paths. |
| tests/test_aw_yield_postcompute.py | Adds regression tests for ignoring unknown/conflicting recommendations and for seed paths list handling. |
| .github/workflows/aw-portfolio-yield.md | Imports shared/mcp/sentry.md and documents Sentry trace validation fallback when Grafana lookup is unavailable. |
| .github/workflows/workflow-health-manager.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/workflow-generator.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/video-analyzer.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/test-workflow.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/test-quality-sentinel.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/test-project-url-default.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/test-dispatcher.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/super-linter.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/slide-deck-maintainer.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/security-review.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/security-compliance.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/repo-tree-map.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/refiner.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/q.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/pr-description-caveman.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/poem-bot.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/plan.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/pdf-summary.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/metrics-collector.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/mergefest.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/lint-monster.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/jsweep.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/gpclean.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/example-permissions-warning.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/dev.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/dev-hawk.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/daily-team-status.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/craft.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/contribution-check.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/code-simplifier.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/ci-coach.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/brave.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/bot-detection.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/archie.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
| .github/workflows/ace-editor.lock.yml | Updates embedded awf-config model alias map (adds antigravity and newer Gemini aliases where applicable). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 121/236 changed files
- Comments generated: 0
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR #33739 does not have the 'implementation' label and has 0 new lines of code in default business logic directories (threshold: 100). |
|
🧪 Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel skipped. This PR only contains changes to workflow lock files (.lock.yml) and one workflow markdown file (.github/workflows/aw-portfolio-yield.md), with no test coverage changes. |
|
✅ PR Code Quality Reviewer completed the code quality review. |
|
🧠 Matt Pocock Skills Reviewer failed during the skills-based review. |
|
🧠 Matt Pocock Skills Reviewer failed during the skills-based review. |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR #33739 does not have the 'implementation' label and has 0 new lines of code in business logic directories (threshold: 100). |
|
🧪 Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel analysis skipped. |
There was a problem hiding this comment.
Code Review Summary
This PR successfully addresses the root cause of aw-portfolio-yield agent job failures by making postcompute resilient to malformed agent recommendations. The changes demonstrate good defensive programming practices.
What was done well:
- ✅ Error recovery strategy: failures downgraded to warnings with clear notes
- ✅ Comprehensive test coverage for edge cases (unknown workflows, conflicting recommendations,
pathslists) - ✅ Consistent pattern applied across both seed and agent recommendation handling
- ✅ Telemetry fallback added (Sentry) when Grafana is unavailable
Minor suggestion:
One non-blocking observation about explicit None handling in the recommendation_buckets function to improve code clarity.
Approving as the changes are correct and well-tested.
🔎 Code quality review by PR Code Quality Reviewer · ● 905.9K
|
✅ PR Code Quality Reviewer completed the code quality review. Code review complete: PR code quality looks good with only one minor defensive programming suggestion already noted in existing review comments |
|
@copilot Address all review comments from github-actions. |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Addressed the actionable github-actions review feedback in commit |
|
@copilot Resolve merge conflicts |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Resolved by merging |
The
agentjob inaw-portfolio-yieldwas failing during postcompute when agent-produced recommendation payloads contained malformed or non-canonical entries. This update makes postcompute resilient to untrusted recommendation shapes and ensures telemetry validation can continue via Sentry when Grafana is unavailable.Postcompute resilience (root-cause fix)
scripts/aw_yield_postcompute.pynow tolerates bad recommendation payloads instead of failing the job:pathorpathsTelemetry backend usage
.github/workflows/aw-portfolio-yield.mdnow importsshared/mcp/sentry.mdin addition to Grafana/OTLP components.Regression coverage
tests/test_aw_yield_postcompute.pyfor:pathslists