Skip to content

chore: sync workflow templates - #342

Closed
stranske wants to merge 1 commit into
mainfrom
sync/workflows-76ebdcce08bb
Closed

chore: sync workflow templates#342
stranske wants to merge 1 commit into
mainfrom
sync/workflows-76ebdcce08bb

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
  • 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: 070765783f4b6e6598f86787bcb556d788335077
Template hash: 76ebdcce08bb
Sync branch: sync/workflows-76ebdcce08bb
Consumer repo: stranske/Pension-Data
Manifest: .github/sync-manifest.yml

Automated sync from stranske/Workflows
Template hash: 76ebdcce08bb

Changes synced from sync-manifest.yml
Copilot AI review requested due to automatic review settings April 27, 2026 06:38
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Apr 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Syncs workflow template scripts from stranske/Workflows into this repo, updating weekly metrics aggregation/selection and PR source-context + metadata automation behaviors.

Changes:

  • Add stronger typing for Counter usage in weekly agent-metrics aggregation.
  • Refine weekly metrics artifact selection (non-negative priority-run config, per-source family satisfaction, early returns).
  • Update PR source-context detection and PR metadata automation behaviors (no-automation handling, issue linking heuristics, comment/body sync logic).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/aggregate_agent_metrics.py Adds explicit Counter[str] typing for clearer metrics aggregation.
.github/scripts/weekly_metrics_artifacts.js Improves artifact selection contract (non-negative parsing, priority selection behavior, early exits).
.github/scripts/source_context.js Tweaks no-automation checkbox detection and parsing scope.
.github/scripts/agents_pr_meta_update_body.js Refines source-context resolved messaging, adds issue-reference extraction, updates body sync & no-automation behavior.
.github/scripts/agents_pr_meta_keepalive.js Skips keepalive earlier when automation is opted out via source context.

]);

const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b|\bhuman[- ]only\b/i;
const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b/i;

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

This change drops support for the previously-matched human-only / human only opt-out phrasing. If any existing PR templates/bodies (or older PRs) still use that wording, noAutomation will stop being detected. To preserve backwards compatibility, consider re-adding the \bhuman[- ]only\b alternative (or supporting both phrases) rather than narrowing the regex to only do not automate.

Suggested change
const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b/i;
const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b|\bhuman[- ]only\b/i;

Copilot uses AI. Check for mistakes.
Comment on lines +1058 to +1059
const explicitIssueNumbers = extractExplicitIssueSyncNumbers(pr);
if (issueNumber && explicitIssueNumbers.has(Number(issueNumber))) {

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

This introduces a behavior where issueNumber can be present (e.g., inferred from the branch name via extractIssueNumberFromPull) but the function still returns an explicit non-issue source context unless that issue number is also referenced in title/body. That can cause a conflict: resolvePrSourceContext() will treat the PR as issue-backed (source type GITHUB_ISSUE), while body-sync logic opts into the explicit non-issue context and may skip the issue-backed updates. A concrete fix is to keep the previous invariant (if issueNumber is non-null, return null here), or expand extractExplicitIssueSyncNumbers/the check to include the same sources used by extractIssueNumberFromPull (notably the branch ref) so inferred issue numbers don’t accidentally bypass body-sync.

Suggested change
const explicitIssueNumbers = extractExplicitIssueSyncNumbers(pr);
if (issueNumber && explicitIssueNumbers.has(Number(issueNumber))) {
if (issueNumber != null) {

Copilot uses AI. Check for mistakes.
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