Skip to content

chore: sync workflow templates - #844

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

stranske wants to merge 1 commit into
mainfrom
sync/workflows-a8050131ada4

Conversation

@stranske

Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • agents-weekly-metrics.yml: Weekly metrics - aggregates auto-pilot, keepalive, autofix and verifier metrics into summary reports
  • bot_comment_auth_coverage.js: Warning-only bot-comment App auth coverage preflight
  • weekly_metrics_artifacts.js: Bounded weekly metrics artifact selection contract

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
Manifest: .github/sync-manifest.yml

Automated sync from stranske/Workflows
Template hash: a8050131ada4

Changes synced from sync-manifest.yml
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Apr 25, 2026
Copilot AI review requested due to automatic review settings April 25, 2026 17:57
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

⚠️ Action Required: Unable to determine source issue for PR #844. The PR title, branch name, or body must contain the issue number (e.g. #123, branch: issue-123, or the hidden marker ).

@agents-workflows-bot

agents-workflows-bot Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #844 | Agent: Codex | Iteration 0/5

Current State

Metric Value
Iteration progress [----------] 0/5
Action wait (missing-agent-label)
Disposition skipped (transient)
Gate success
Tasks 0/7 complete
Timeout 45 min (default)
Timeout usage 5m elapsed (12%, 40m remaining)
Keepalive ❌ disabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | resource |
| Suggested recovery | Confirm the referenced resource exists (repo, PR, branch, workflow, or file). |

@agents-workflows-bot

agents-workflows-bot Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor
Keepalive Work Log (click to expand)
# Time (UTC) Agent Action Result Files Tasks Progress Commit Gate
0 2026-04-25 18:00:18 Codex wait (missing-agent-label-transient) skipped 0 0/7 cancelled
0 2026-04-25 18:01:59 Codex wait (missing-agent-label-transient) skipped 0 0/7 cancelled
0 2026-04-25 18:02:43 Codex wait (missing-agent-label-transient) skipped 0 0/7 success

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 templates to extend the weekly metrics aggregation pipeline with a new “bot-comment App auth coverage” preflight and artifact selection support, aligning this repo’s automation reporting with the upstream Workflows template set.

Changes:

  • Add a bot-comment auth coverage preflight step to the weekly metrics workflow and include its outputs in uploaded artifacts.
  • Extend weekly artifact selection to recognize new bot-comment auth coverage artifact families.
  • Introduce a new .github/scripts/bot_comment_auth_coverage.js script to scan downloaded artifacts and generate JSON + Markdown summaries.

Reviewed changes

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

File Description
.github/workflows/agents-weekly-metrics.yml Runs the new bot-comment auth coverage preflight and enforces coverage hard-block outcomes.
.github/scripts/weekly_metrics_artifacts.js Adds bot-comment auth coverage artifact prefixes/families for bounded selection.
.github/scripts/bot_comment_auth_coverage.js New preflight summarizer generating auth coverage JSON/Markdown from selected artifacts.

Comment on lines +137 to +186
function summarizeOrganicEvidence(records = [], options = {}) {
const requiredEvents = parseCsvList(
options.required_organic_events ??
options.requiredOrganicEvents ??
process.env.BOT_COMMENT_AUTH_REQUIRED_ORGANIC_EVENTS
);
const requiredComponents = parseCsvList(
options.organic_components ??
options.organicComponents ??
process.env.BOT_COMMENT_AUTH_ORGANIC_COMPONENTS
);
const expectedMode = normalizeAuthMode(
options.organic_expected_mode ??
options.organicExpectedMode ??
process.env.BOT_COMMENT_AUTH_ORGANIC_EXPECTED_MODE
);
const components = requiredComponents.length > 0
? requiredComponents
: Object.keys(COMPONENT_POLICIES);
const eventCounts = Object.create(null);
const latestByComponentEvent = Object.create(null);

for (const record of records) {
if (!record.component || !record.event_name) continue;
eventCounts[record.component] ||= {};
eventCounts[record.component][record.event_name] =
(eventCounts[record.component][record.event_name] || 0) + 1;
const key = `${record.component}:${record.event_name}`;
const existing = latestByComponentEvent[key];
if (!existing || compareRecords(record, existing) < 0) {
latestByComponentEvent[key] = record;
}
}

const blockers = [];
for (const component of components) {
for (const eventName of requiredEvents) {
const latest = latestByComponentEvent[`${component}:${eventName}`];
if (!latest) {
blockers.push(`missing-organic-${component}-${eventName}`);
continue;
}
if (latest.fallback_warning_active || latest.auth_mode === 'legacy-app-id') {
blockers.push(`legacy-organic-${component}-${eventName}`);
}
if (expectedMode !== 'unknown' && latest.auth_mode !== expectedMode) {
blockers.push(`expected-${expectedMode}-organic-${component}-${eventName}`);
}
}
}

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

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

summarizeOrganicEvidence() generates a missing-organic-* blocker for every required component/event pair even when there are zero auth records. Since summarizeBotCommentAuthCoverage() can still classify that scenario as coverage_status='no-data', the markdown ends up showing a long blocker list alongside a no-data status, which is confusing. Consider short-circuiting organic evidence to status 'no-data' (and no per-event blockers) when auth_record_count is 0, or only emitting missing-organic blockers once there is at least some organic evidence to evaluate.

Copilot uses AI. Check for mistakes.
terminal_status="${TERMINAL_DISPOSITION_COVERAGE_EXIT_STATUS:-0}"
bot_comment_auth_status="${BOT_COMMENT_AUTH_COVERAGE_EXIT_STATUS:-0}"
if [ "${terminal_status}" != "0" ] || [ "${bot_comment_auth_status}" != "0" ]; then
exit 1

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

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

The final "Honor coverage hard-blocks" step exits with a generic 1 when either preflight fails, which loses the original exit code and doesn't indicate which check triggered the failure. Consider printing the two exit statuses (or a short message) before exiting, and/or exiting with the failing check's status to make debugging easier in job logs.

Suggested change
exit 1
echo "Coverage hard-block triggered."
if [ "${terminal_status}" != "0" ]; then
echo "Review-thread terminal coverage preflight failed with exit status ${terminal_status}."
fi
if [ "${bot_comment_auth_status}" != "0" ]; then
echo "Bot-comment auth coverage preflight failed with exit status ${bot_comment_auth_status}."
fi
if [ "${terminal_status}" != "0" ]; then
exit "${terminal_status}"
fi
exit "${bot_comment_auth_status}"

Copilot uses AI. Check for mistakes.
Comment on lines +483 to +493
for (const file of files) {
try {
const parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
if (isAuthCoverageRecord(parsed)) {
records.push({ ...parsed, source_path: file });
}
} catch (_error) {
parseErrors += 1;
}
}
return { records, parse_errors: parseErrors, file_count: files.length };

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

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

readJsonRecords() silently ignores JSON files that parse successfully but don't match AUTH_SCHEMA. That makes it hard to distinguish a true "no data" week from a schema/producer mismatch, and it can cause the report to show parse_errors=0 and input_file_count>0 while auth_record_count=0. Consider tracking a separate non_auth_record_count (or treating unexpected-schema JSON as a parse/validation error) and using it to set coverage_status to warning, similar to how terminal_disposition_coverage.js reports non-terminal records.

Suggested change
for (const file of files) {
try {
const parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
if (isAuthCoverageRecord(parsed)) {
records.push({ ...parsed, source_path: file });
}
} catch (_error) {
parseErrors += 1;
}
}
return { records, parse_errors: parseErrors, file_count: files.length };
let nonAuthRecordCount = 0;
for (const file of files) {
try {
const parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
if (isAuthCoverageRecord(parsed)) {
records.push({ ...parsed, source_path: file });
} else {
nonAuthRecordCount += 1;
parseErrors += 1;
}
} catch (_error) {
parseErrors += 1;
}
}
return {
records,
parse_errors: parseErrors,
non_auth_record_count: nonAuthRecordCount,
file_count: files.length,
};

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