Skip to content

Add workflow telemetry state contracts - #1838

Merged
stranske merged 4 commits into
mainfrom
codex/workflow-telemetry-contracts
Apr 25, 2026
Merged

stranske merged 4 commits into
mainfrom
codex/workflow-telemetry-contracts

Conversation

@stranske

@stranske stranske commented Apr 25, 2026

Copy link
Copy Markdown
Owner

Source: Issue #1836

Automated Status Summary

Scope

Sync/Dependabot Campaign Queue

Remote discovery found more review-thread work than fits in a full GitHub issue body. The marker below retains the compact machine-readable queue for the local watcher.

Context for Agent

Related Issues/PRs

Tasks

  • Updated: 2026-04-25T17:52:40.783Z
  • Repos checked: 11/11
  • Open sync PRs: 77
  • Open Dependabot PRs: 0
  • Active review threads queued: 130
  • Items needing local Codex: 59

Acceptance criteria

  • Acceptance criteria section missing from source issue.

Head SHA: d579872
Latest Runs: ✅ success — Gate
Required: gate: ✅ success

Workflow / Job Result Logs
Gate ✅ success View run
Health 40 Sweep ✅ success View run
Health 44 Gate Branch Protection ✅ success View run
Health 45 Agents Guard ✅ success View run
Health 50 Security Scan ✅ success View run
Health 72 Template Sync ✅ success View run
Health 73 Template Completeness ✅ success View run
Health 74 Template Drift ✅ success View run
Maint 52 Validate Workflows ✅ success View run
PR 11 - Minimal invariant CI ✅ success View run
Selftest CI ✅ success View run
Validate Sync Manifest ✅ success View run

Copilot AI review requested due to automatic review settings April 25, 2026 17:37
@stranske
stranske had a problem deploying to agent-high-privilege April 25, 2026 17:37 — with GitHub Actions Error
@stranske stranske added codex automated Automatically created issue observability System monitoring and telemetry reliability Synthesized from ChatGPT import for reliability labels Apr 25, 2026
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

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

@stranske-keepalive

stranske-keepalive Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: bec1518
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 93.12%
Baseline 85.00%
Delta +8.12%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
src/cli_parser.py 81.8% 4
src/percentile_calculator.py 95.0% 1
src/aggregator.py 95.0% 2
src/__init__.py 100.0% 0
src/ndjson_parser.py 100.0% 0

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

Sync/Dependabot Campaign Queue

Remote discovery found more review-thread work than fits in a full GitHub issue body. The marker below retains the compact machine-readable queue for the local watcher.

Context for Agent

Related Issues/PRs

Tasks

  • Updated: 2026-04-25T16:43:20.208Z
  • Repos checked: 11/11
  • Open sync PRs: 65
  • Open Dependabot PRs: 0
  • Active review threads queued: 112
  • Items needing local Codex: 50

Acceptance criteria

  • Acceptance criteria section missing from source issue.

@agents-workflows-bot

agents-workflows-bot Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #1838 | 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 3m elapsed (8%, 42m 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 17:38:39 Codex wait (missing-agent-label-transient) skipped 0 0/7 cancelled
0 2026-04-25 17:39:20 Codex wait (missing-agent-label-transient) skipped 0 0/7 cancelled
0 2026-04-25 17:39:54 Codex wait (missing-agent-label-transient) skipped 0 0/7 cancelled
0 2026-04-25 17:41:43 Codex wait (missing-agent-label-transient) skipped 0 0/7 cancelled
0 2026-04-25 17:44:36 Codex wait (missing-agent-label-transient) skipped 0 0/7 success
0 2026-04-25 17:49:37 Codex wait (missing-agent-label-transient) skipped 0 0/7 success
0 2026-04-25 17:56:58 Codex wait (missing-agent-label-transient) skipped 0 0/7 success

@stranske
stranske temporarily deployed to agent-high-privilege April 25, 2026 17:41 — with GitHub Actions Inactive

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 93b2264035

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +173 to +175
BOT_COMMENT_AUTH_REQUIRED_ORGANIC_EVENTS: ${{ vars.BOT_COMMENT_AUTH_REQUIRED_ORGANIC_EVENTS || 'pull_request,workflow_run' }}
BOT_COMMENT_AUTH_ORGANIC_COMPONENTS: ${{ vars.BOT_COMMENT_AUTH_ORGANIC_COMPONENTS || 'agents-bot-comment-handler-wrapper,reusable-bot-comment-handler' }}
BOT_COMMENT_AUTH_ORGANIC_EXPECTED_MODE: ${{ vars.BOT_COMMENT_AUTH_ORGANIC_EXPECTED_MODE || 'client-id' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Propagate organic evidence defaults to synced workflow

These new organic-evidence defaults are only added in the repository-local workflow, but consumer sync does not use this file as the source for workflow updates. In maint-68-sync-consumer-repos.yml the workflows section copies from templates/consumer-repo/..., and templates/consumer-repo/.github/workflows/agents-weekly-metrics.yml still lacks these env vars, so synced consumer repos will keep required_organic_events unset and the new telemetry contract stays effectively disabled there. Mirror these env defaults into the template workflow (or the actual sync source) to avoid cross-repo behavior drift.

Useful? React with 👍 / 👎.

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

Adds new “telemetry state contracts” to make weekly metrics and the sync/dependabot campaign output more machine-readable and diagnosable, while keeping enforcement warning-only by default.

Changes:

  • Extends bot-comment auth coverage reporting to include “organic evidence” requirements (per event/component) and surfaces blockers in the weekly metrics preflight.
  • Persists sync/dependabot campaign state + a compact markdown run summary as artifacts on every run.
  • Adds a validation contract to detect drift between retained campaign queue items and the stats derived from them.

Reviewed changes

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

Show a summary per file
File Description
.github/scripts/bot_comment_auth_coverage.js Adds organic evidence parsing/summarization, integrates it into blockers, and exposes it in JSON/MD output.
templates/consumer-repo/.github/scripts/bot_comment_auth_coverage.js Intended to mirror the bot-comment auth coverage updates for consumer templates.
.github/workflows/agents-weekly-metrics.yml Wires new organic evidence env vars into the weekly metrics preflight run.
.github/workflows/maint-82-sync-dependabot-campaign.yml Writes campaign state + summary files and uploads them as artifacts (always).
.github/scripts/sync_dependabot_campaign.js Adds validation + markdown run summary generation, and stores validation in campaign state.
.github/scripts/__tests__/sync_dependabot_campaign.test.js Adds unit tests for the new validation and markdown artifact summary.
.github/scripts/__tests__/bot-comment-auth-coverage.test.js Adds tests ensuring missing/fulfilled organic evidence is reflected in status + blockers.

Comment on lines +144 to +149
const eventCounts = {};
const latestByComponentEvent = {};

for (const record of records) {
if (!record.component || !record.event_name) continue;
eventCounts[record.component] ||= {};
Comment on lines +115 to +131
function parseCsvList(value) {
if (Array.isArray(value)) {
return value.map(cleanString).filter(Boolean);
}
return cleanString(value)
.split(',')
.map(cleanString)
.filter(Boolean);
}

function summarizeOrganicEvidence(records = [], options = {}) {
const requiredEvents = parseCsvList(
options.required_organic_events ??
options.requiredOrganicEvents ??
process.env.BOT_COMMENT_AUTH_REQUIRED_ORGANIC_EVENTS
);
const requiredComponents = parseCsvList(
Comment on lines +128 to +137
- name: Upload campaign state
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: sync-dependabot-campaign-state-${{ github.run_id }}
path: |
sync-dependabot-campaign-state.json
sync-dependabot-campaign-summary.md
if-no-files-found: warn
retention-days: 30
Comment on lines +176 to +184
return {
schema: 'workflows-bot-comment-auth-organic-evidence/v1',
required_events: requiredEvents,
required_components: components,
expected_mode: expectedMode === 'unknown' ? '' : expectedMode,
event_counts: eventCounts,
blockers,
status: blockers.length > 0 ? 'warning' : 'pass',
};
@stranske
stranske temporarily deployed to agent-high-privilege April 25, 2026 17:46 — with GitHub Actions Inactive
@stranske
stranske force-pushed the codex/workflow-telemetry-contracts branch from eb611e2 to d579872 Compare April 25, 2026 17:53
@stranske
stranske temporarily deployed to agent-high-privilege April 25, 2026 17:53 — with GitHub Actions Inactive
@stranske
stranske merged commit d245888 into main Apr 25, 2026
60 checks passed
@stranske
stranske deleted the codex/workflow-telemetry-contracts branch April 25, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Automatically created issue codex observability System monitoring and telemetry reliability Synthesized from ChatGPT import for reliability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants