Skip to content

chore: sync workflow templates#659

Closed
stranske wants to merge 1 commit into
mainfrom
sync/workflows-20d0e241bca2
Closed

chore: sync workflow templates#659
stranske wants to merge 1 commit into
mainfrom
sync/workflows-20d0e241bca2

Conversation

@stranske
Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • aggregate_agent_metrics.py: Aggregates downloaded weekly agent metrics - required by agents-weekly-metrics.yml
  • source_context.js: Classifies PR workflow source context for issue, local, automation, sync, Dependabot, review follow-up, and direct GitHub work
  • coverage_monitor_summary.js: Machine-readable weekly coverage monitor checkpoint
  • weekly_metrics_artifacts.js: Bounded weekly metrics artifact selection contract
  • agents_pr_meta_keepalive.js: PR metadata handling for keepalive
  • agents_pr_meta_update_body.js: Updates PR body with agent metadata

Files Skipped

  • pr-00-gate.yml: File exists and sync_mode is create_only
  • ci.yml: File exists and sync_mode is create_only
  • dependabot.yml: File exists and sync_mode is create_only
  • llm_slots.json: None

Review Checklist

  • CI passes with updated workflows
  • No repo-specific customizations were overwritten

Source: stranske/Workflows
Source SHA: 8a344d64eb1ca1e2318692e5f4c17c45415c7dcc
Template hash: 20d0e241bca2
Sync branch: sync/workflows-20d0e241bca2
Consumer repo: stranske/Collab-Admin
Manifest: .github/sync-manifest.yml

Automated sync from stranske/Workflows
Template hash: 20d0e241bca2

Changes synced from sync-manifest.yml
Copilot AI review requested due to automatic review settings April 27, 2026 05:23
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Syncs workflow-consumer automation scripts from the central Workflows templates, expanding weekly metrics artifact collection and refining PR workflow-source classification (including explicit “no automation” opt-outs) to make automation behavior more reliable and intentional.

Changes:

  • Adds priority-workflow artifact collection to improve availability of key weekly metrics artifacts under repo-scan caps.
  • Extends workflow source context parsing (labels/body markers/template checkboxes) to track and honor a noAutomation opt-out signal.
  • Hardens metrics/coverage helper scripts (typing improvements, safer file stat handling, more structured artifact selection contract fields).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/aggregate_agent_metrics.py Tightens typing for counters and normalizes missing_priority_families in the artifact selection contract.
.github/scripts/weekly_metrics_artifacts.js Adds priority workflow run scanning to supplement repo-level artifact scans and introduces new selection config knobs.
.github/scripts/source_context.js Adds noAutomation detection and improves PR template checkbox parsing for workflow source context.
.github/scripts/coverage_monitor_summary.js Makes report path validation resilient to stat errors.
.github/scripts/agents_pr_meta_update_body.js Adjusts issue-vs-non-issue body-sync gating and resolves “missing issue” warning comments more robustly.
.github/scripts/agents_pr_meta_keepalive.js Skips keepalive dispatch when PR workflow source context opts out of automation.

Comment on lines +568 to +572
const priorityArtifacts = await collectPriorityWorkflowArtifacts({
github,
owner,
repo,
withRetry,
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

collectRepoArtifacts() now always calls collectPriorityWorkflowArtifacts(), which can add a large number of extra API calls (listWorkflowRuns + listWorkflowRunArtifacts per source) even when the repo-level artifact scan already contains all priority families within the lookback window. Consider short-circuiting this call when the initial artifacts set already satisfies PRIORITY_METRICS_FAMILIES (or only querying the missing families) to reduce rate-limit pressure and runtime.

Copilot uses AI. Check for mistakes.
Comment on lines +1053 to +1056
const explicitIssueNumbers = extractExplicitIssueSyncNumbers(pr);
if (issueNumber && explicitIssueNumbers.has(Number(issueNumber))) {
return null;
}
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

resolveNonIssueWorkflowSourceContextForBodySync() treats an explicit non-issue workflow-source marker as authoritative unless the PR title/body also contains an explicit “Closes/Related/Refs #” reference. This creates an inconsistency with extractIssueNumberFromPull() (used just above), which can resolve the linked issue via <!-- meta:issue:... --> or branch naming; in that case body sync will be skipped even though the PR is issue-backed. Consider treating the meta marker (and/or the already-resolved issueNumber) as an explicit issue reference for this check, or extending extractExplicitIssueSyncNumbers() to recognize <!-- meta:issue:N --> so issue-backed PRs don’t get misclassified as non-issue syncs.

Suggested change
const explicitIssueNumbers = extractExplicitIssueSyncNumbers(pr);
if (issueNumber && explicitIssueNumbers.has(Number(issueNumber))) {
return null;
}
const normalizedIssueNumber = Number(issueNumber);
if (Number.isFinite(normalizedIssueNumber) && normalizedIssueNumber > 0) {
return null;
}
const explicitIssueNumbers = extractExplicitIssueSyncNumbers(pr);
if (explicitIssueNumbers.size > 0) {
return null;
}

Copilot uses AI. Check for mistakes.
}

async function collectPriorityWorkflowArtifacts({
github,
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

collectPriorityWorkflowArtifacts() destructures a github parameter but never uses it (all API calls go through withRetry). Dropping the unused parameter (and corresponding call-site argument) will avoid confusion about which client is actually used.

Suggested change
github,

Copilot uses AI. Check for mistakes.
@stranske
Copy link
Copy Markdown
Owner Author

Closing as stale: newer sync workflow templates PR #672 is open for this repo.

@stranske stranske closed this Apr 29, 2026
@stranske stranske deleted the sync/workflows-20d0e241bca2 branch May 14, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Automated sync from Workflows sync Automated sync from Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants