Conversation
Automated sync from stranske/Workflows Template hash: 3e5a27aaceee Changes synced from sync-manifest.yml
There was a problem hiding this comment.
Pull request overview
Syncs workflow-template helper scripts from stranske/Workflows into this consumer repo, focusing on weekly metrics artifact selection and PR workflow source-context handling to better support automation/sync workflows.
Changes:
- Hardened metrics/coverage contracts: safer handling of
missing_priority_familiesand more defensive filesystem checks. - Expanded weekly metrics artifact collection to include “priority producer” workflow runs (bounded by a new per-source run cap).
- Improved PR workflow source-context parsing, including a distinct “no automation” signal that disables keepalive/body automation flows.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/aggregate_agent_metrics.py | Sanitizes missing_priority_families in the artifact selection contract to avoid unintended list coercions. |
| .github/scripts/weekly_metrics_artifacts.js | Adds priority-workflow artifact collection, new config option priority_workflow_runs_per_source, and deduping helpers. |
| .github/scripts/source_context.js | Adds “no automation” detection via labels/markers/template parsing and propagates noAutomation in resolved context. |
| .github/scripts/coverage_monitor_summary.js | Wraps fs.statSync in a try/catch to avoid failing on transient filesystem errors. |
| .github/scripts/agents_pr_meta_update_body.js | Adjusts non-issue source-context gating for body sync and resolves/updates workflow-source repair comments. |
| .github/scripts/agents_pr_meta_keepalive.js | Skips keepalive dispatch when source-context opts out of automation (noAutomation). |
| const priorityArtifacts = await collectPriorityWorkflowArtifacts({ | ||
| github, | ||
| owner, | ||
| repo, | ||
| withRetry, | ||
| options, | ||
| }); | ||
| return dedupeArtifacts([...artifacts, ...priorityArtifacts]); |
There was a problem hiding this comment.
collectRepoArtifacts always calls collectPriorityWorkflowArtifacts, even when the repo-level artifact scan already contains all priority families. This adds a potentially large number of extra GitHub API calls (listWorkflowRuns + listWorkflowRunArtifacts) on every run and can slow the workflow / increase rate-limit pressure. Consider short-circuiting: first check whether the repo-level artifacts already satisfy the needed priority families within the cutoff, and only then call the priority workflow scan (or only scan for the families that are still missing).
| try { | ||
| const comments = await github.paginate(github.rest.issues.listComments, { | ||
| owner, | ||
| repo, | ||
| issue_number: pr.number, | ||
| }); | ||
| await resolveSourceContextRepairComment({ | ||
| github, | ||
| owner, | ||
| repo, | ||
| prNumber: pr.number, | ||
| comments, | ||
| sourceContext, | ||
| core, | ||
| }); | ||
| } catch (error) { | ||
| core.warning(`Failed to resolve workflow source repair comment: ${error.message}`); | ||
| } |
There was a problem hiding this comment.
When issueNumber is present, the workflow comments are fetched twice: once here to resolve the workflow-source repair comment, and later again via fetchIssueComments(...) for connector checkbox parsing. This duplicates API calls and increases runtime/rate-limit risk. Consider reusing the later issueComments result for both purposes (e.g., move repair-comment resolution to after fetchIssueComments, or pass the already-fetched comments through).
Sync Summary
Files Updated
Files Skipped
Review Checklist
Source: stranske/Workflows
Source SHA:
559c76326138b8e3fc9720d212747bbe2556ea3fTemplate hash:
3e5a27aaceeeSync branch:
sync/workflows-3e5a27aaceeeConsumer repo:
stranske/TemplateManifest:
.github/sync-manifest.yml