Skip to content

chore: sync workflow templates#679

Open
stranske wants to merge 1 commit intomainfrom
sync/workflows-bcdb675a7251
Open

chore: sync workflow templates#679
stranske wants to merge 1 commit intomainfrom
sync/workflows-bcdb675a7251

Conversation

@stranske
Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • keepalive_orchestrator_gate_runner.js: Orchestrator gate runner for keepalive

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: 42dcbe8341656e395a224af981a22d19feb5f50f
Template hash: bcdb675a7251
Sync branch: sync/workflows-bcdb675a7251
Consumer repo: stranske/Collab-Admin
Manifest: .github/sync-manifest.yml

Automated sync from stranske/Workflows
Template hash: bcdb675a7251

Changes synced from sync-manifest.yml
Copilot AI review requested due to automatic review settings April 30, 2026 03:24
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Apr 30, 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 the keepalive orchestrator “gate runner” script from the upstream workflow templates, expanding its logic around label normalization/self-healing and draft PR handling so the orchestrator can make more informed proceed/skip decisions.

Changes:

  • Adds helper utilities for label normalization, agent inference from branch naming, and checklist checkbox counting.
  • Attempts to self-heal missing keepalive/agent labels when an automation signal is detected.
  • Introduces draft PR disposition logic (auto-mark ready when checklist is complete; otherwise route to humans with labels + a durable comment and pause keepalive).

async function markDraftReadyForReview({ github, pr, core, summary }) {
const nodeId = String(pr?.node_id || '').trim();
if (!nodeId || typeof github.graphql !== 'function') {
summary.addRaw('Draft PR could not be converted automatically: missing GraphQL PR node id.').addEOL();
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The early-return message here is misleading: this branch is taken both when the PR node_id is missing and when github.graphql is unavailable (e.g., when running with a client that doesn't expose GraphQL). Consider updating the summary text to reflect both conditions so operators can diagnose the real cause.

Suggested change
summary.addRaw('Draft PR could not be converted automatically: missing GraphQL PR node id.').addEOL();
summary
.addRaw('Draft PR could not be converted automatically: missing GraphQL PR node id or GitHub GraphQL client support is unavailable.')
.addEOL();

Copilot uses AI. Check for mistakes.
Comment on lines +174 to +182
const body = [
DRAFT_DISPOSITION_MARKER,
'### Draft PR requires human disposition',
'',
`Keepalive found this PR still in draft with ${checkboxCounts.unchecked} unchecked checklist item(s). Draft PRs must not occupy automation capacity silently.`,
'',
`Applied \`${NEEDS_ATTENTION_LABEL}\`, \`${NEEDS_HUMAN_LABEL}\`, and \`${PAUSE_LABEL}\` so this is visible in automation summaries and human queues.`,
'',
'Next human action: finish the unchecked acceptance items and mark the PR ready for review, or close/supersede the PR.',
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The durable routing comment text assumes the draft state is due to unchecked checklist items, but routeDraftToHuman can also be triggered when no markdown checkboxes are present (checked=0, unchecked=0), which would make the message inaccurate. Also, since you apply agents:paused, the comment should explicitly tell humans that keepalive will remain paused until that label is removed (in addition to marking the PR ready/closing it).

Suggested change
const body = [
DRAFT_DISPOSITION_MARKER,
'### Draft PR requires human disposition',
'',
`Keepalive found this PR still in draft with ${checkboxCounts.unchecked} unchecked checklist item(s). Draft PRs must not occupy automation capacity silently.`,
'',
`Applied \`${NEEDS_ATTENTION_LABEL}\`, \`${NEEDS_HUMAN_LABEL}\`, and \`${PAUSE_LABEL}\` so this is visible in automation summaries and human queues.`,
'',
'Next human action: finish the unchecked acceptance items and mark the PR ready for review, or close/supersede the PR.',
const draftDispositionReason =
checkboxCounts.unchecked > 0
? `Keepalive found this PR still in draft with ${checkboxCounts.unchecked} unchecked checklist item(s). Draft PRs must not occupy automation capacity silently.`
: 'Keepalive found this PR still in draft and requiring explicit human disposition. Draft PRs must not occupy automation capacity silently.';
const nextHumanAction =
checkboxCounts.unchecked > 0
? `Next human action: finish the unchecked acceptance items and mark the PR ready for review, or close/supersede the PR. Keepalive will remain paused until \`${PAUSE_LABEL}\` is removed.`
: `Next human action: either mark the PR ready for review when work should resume, or close/supersede the PR. Keepalive will remain paused until \`${PAUSE_LABEL}\` is removed.`;
const body = [
DRAFT_DISPOSITION_MARKER,
'### Draft PR requires human disposition',
'',
draftDispositionReason,
'',
`Applied \`${NEEDS_ATTENTION_LABEL}\`, \`${NEEDS_HUMAN_LABEL}\`, and \`${PAUSE_LABEL}\` so this is visible in automation summaries and human queues.`,
'',
nextHumanAction,

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