Conversation
Automated sync from stranske/Workflows Template hash: 9d62510f22c9 Changes synced from sync-manifest.yml
🤖 Keepalive Loop StatusPR #5124 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
Keepalive Work Log (click to expand)
|
There was a problem hiding this comment.
Pull request overview
Syncs workflow templates from stranske/Workflows by expanding the weekly metrics workflow to include bot-comment App-auth coverage checks and updating artifact selection logic to recognize the new coverage artifact families.
Changes:
- Add a bot-comment auth coverage preflight step to
agents-weekly-metrics, upload its reports, and enforce both coverage hard-block exit statuses at the end. - Extend weekly metrics artifact selection to recognize patterned bot-comment auth coverage artifact names.
- Introduce a new helper script to aggregate bot-comment auth coverage JSON inputs into a summary + optional hard-block signal.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/agents-weekly-metrics.yml | Adds Node setup, runs bot-comment auth coverage preflight, uploads new reports, and honors both hard-block exit statuses. |
| .github/scripts/weekly_metrics_artifacts.js | Recognizes new patterned artifact families and prioritizes them for selection. |
| .github/scripts/bot_comment_auth_coverage.js | New script to scan downloaded artifacts for auth coverage records, summarize status, and emit a markdown/JSON report. |
| function main() { | ||
| const options = parseArgs(); | ||
| const files = collectJsonFiles(options.dir); | ||
| const readResult = readJsonRecords(files); | ||
| const report = summarizeBotCommentAuthCoverage(readResult.records, { | ||
| parse_errors: readResult.parse_errors, | ||
| read_errors: readResult.read_errors, | ||
| parsed_json_file_count: readResult.parsed_json_file_count, | ||
| non_auth_record_count: readResult.non_auth_record_count, | ||
| input_files: files, | ||
| input_file_count: readResult.file_count, | ||
| artifact_selection_report: readArtifactSelectionReport(options.artifact_selection_report), | ||
| enforcement_mode: options.enforcement_mode, | ||
| hard_block_approved: options.hard_block_approved, | ||
| }); | ||
| const markdownSummary = formatBotCommentAuthCoverageMarkdown(report); | ||
| fs.writeFileSync(options.output, `${JSON.stringify(report, null, 2)}\n`); | ||
| fs.writeFileSync(options.markdown, markdownSummary); | ||
| process.stdout.write(markdownSummary); | ||
| return report.status === 'fail' ? 1 : 0; | ||
| } | ||
|
|
||
| if (require.main === module) { | ||
| process.exitCode = main(); | ||
| } |
There was a problem hiding this comment.
This new workflow helper script isn’t covered by unit tests. Given it drives workflow hard-block behavior and parses env/JSON inputs, please add minimal tests under .github/scripts/tests (e.g., for normalizePolicy(), isPotentialAuthCoverageFile()/collectJsonFiles() filtering, and summarizeBotCommentAuthCoverage() status transitions) to prevent future workflow template syncs from breaking enforcement logic.
| function artifactFamily(name) { | ||
| const cleaned = cleanString(name); | ||
| if (EXACT_METRICS_ARTIFACTS.has(cleaned)) return cleaned; | ||
| const patterned = PATTERNED_METRICS_ARTIFACTS.find((candidate) => | ||
| candidate.pattern.test(cleaned) | ||
| ); | ||
| if (patterned) return patterned.family; | ||
| const prefix = PREFIXED_METRICS_ARTIFACTS.find((candidate) => cleaned.startsWith(candidate)); | ||
| return prefix ? prefix.replace(/-$/, '') : ''; |
There was a problem hiding this comment.
New artifact-family parsing logic (PATTERNED_METRICS_ARTIFACTS / updated artifactFamily) is not covered by unit tests. Since this selector controls which artifacts get downloaded, a small regression can silently drop bot-comment auth coverage artifacts; please add a lightweight test that asserts the new wrapper/reusable artifact names map to the expected family and that non-matching names remain unaffected (per .github/scripts/README.md test expectations).
Sync Summary
Files Updated
Files Skipped
Review Checklist
Source: stranske/Workflows
Manifest:
.github/sync-manifest.yml