Skip to content

Add GitHub API rate limit observability via JSONL artifact logging and OTLP span enrichment#24694

Merged
pelikhan merged 5 commits intomainfrom
copilot/add-github-rate-limit-logging
Apr 5, 2026
Merged

Add GitHub API rate limit observability via JSONL artifact logging and OTLP span enrichment#24694
pelikhan merged 5 commits intomainfrom
copilot/add-github-rate-limit-logging

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

GitHub API rate limits are a silent failure mode in busy repos with no post-run visibility. This adds a github_rate_limits.jsonl log file written during workflow execution and uploaded as part of the job artifact, with rate-limit data also surfaced directly in OTLP conclusion spans.

New helper: github_rate_limit_logger.cjs

Three usage patterns:

Per-call logging (inspect response headers):

logRateLimitFromResponse(response, "issues.listComments");

Point-in-time snapshot (calls the rate limit API):

await fetchAndLogRateLimit(github, "startup");

Automatic wrapping (zero call-site changes required):

const gh = createRateLimitAwareGithub(github);
// Every gh.rest.*.*() call now auto-logs rate limits
await gh.rest.issues.get({ owner, repo, issue_number: 1 });

Each entry written to /tmp/gh-aw/github_rate_limits.jsonl:

{"timestamp":"2026-04-05T08:30:00.000Z","source":"response_headers","operation":"issues.listComments","resource":"core","limit":5000,"remaining":4823,"used":177,"reset":"2026-04-05T09:00:00.000Z"}

Integration via setup_globals.cjs

The github object is automatically wrapped with createRateLimitAwareGithub inside setupGlobals, so every script that uses global.github gets rate-limit logging for all github.rest.*.*() calls without any per-file changes.

  • check_rate_limit.cjs — retains a fetchAndLogRateLimit call at startup for a full multi-resource snapshot via the rate-limit API

OTLP span enrichment

sendJobConclusionSpan in send_otlp_span.cjs now reads the last entry from github_rate_limits.jsonl and includes the following attributes in the OTLP conclusion span payload:

  • gh-aw.github.rate_limit.remaining
  • gh-aw.github.rate_limit.limit
  • gh-aw.github.rate_limit.used
  • gh-aw.github.rate_limit.resource

This makes rate-limit headroom at job conclusion time visible directly in any connected OTLP collector or tracing UI without requiring separate artifact inspection.

Artifact upload

github_rate_limits.jsonl added to both the activation and agent artifact upload paths in the Go compiler (compiler_activation_job.go, compiler_yaml_main_job.go). Uses if-no-files-found: ignore so the upload step is a no-op when no API calls were made.

Constants

  • JS: GITHUB_RATE_LIMITS_JSONL_PATH in constants.cjs
  • Go: GithubRateLimitsFilename in pkg/constants/job_constants.go

Copilot AI and others added 2 commits April 5, 2026 08:52
- Add GITHUB_RATE_LIMITS_JSONL_PATH constant to constants.cjs
- Create github_rate_limit_logger.cjs with three helpers:
  logRateLimitFromResponse, fetchAndLogRateLimit, createRateLimitAwareGithub
- Create github_rate_limit_logger.test.cjs with 15 unit tests
- Integrate rate limit logging into github_api_helpers.cjs and check_rate_limit.cjs
- Add GithubRateLimitsFilename constant to pkg/constants/job_constants.go
- Add github_rate_limits.jsonl to agent and activation artifact upload paths
- Update golden test files to reflect new artifact paths

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0340db5e-d302-4aad-ade8-8820f38672d1

Co-authored-by: pelikhan <[email protected]>
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 5, 2026

@copilot instrument github object in setupGlobals script. Avoid double wrapping.

Wrap the github object with createRateLimitAwareGithub in setupGlobals so
every github.rest.*.*() call across all scripts automatically logs rate
limits. Remove the now-redundant logRateLimitFromResponse calls from
check_rate_limit.cjs and github_api_helpers.cjs.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/29ec0ffe-a05e-4ac3-8c33-de88c2f4c404

Co-authored-by: pelikhan <[email protected]>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 5, 2026

@copilot instrument github object in setupGlobals script. Avoid double wrapping.

Done in commit 3810637. setupGlobals now wraps the github object with createRateLimitAwareGithub before assigning it to global.github, so every github.rest.*.*() call across all scripts automatically logs rate-limit headers without any per-file instrumentation. The redundant logRateLimitFromResponse calls have been removed from check_rate_limit.cjs and github_api_helpers.cjs.

Copilot AI requested a review from pelikhan April 5, 2026 09:18
@pelikhan pelikhan added the smoke label Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions bot removed the smoke label Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 5, 2026

@copilot the otel helper that create the span message should read the last message in the rate limiting file and include the rate limiting level in the otel payload

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq 4.52.5
curl 8.5.0
gh 2.89.0
node 20.20.2
python3 3.12.3
go 1.24.13
java 10.0.201
dotnet 10.0.201

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test · ● 159.2K ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

🎉 Smoke test §23998581852 complete!

Test Result
GitHub MCP
MCP Scripts GH CLI
Serena MCP
Playwright ⚠️
Web Fetch
File Writing + Bash
Discussion Interaction
Build gh-aw
Discussion Creation
Workflow Dispatch
PR Review

Overall: PASS@pelikhan @Copilot

📰 BREAKING: Report filed by Smoke Copilot · ● 1.1M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Smoke test review on PR #24694: The rate-limit observability additions look solid. The new github_rate_limit_logger.cjs file is well-structured with three usage patterns (response headers, point-in-time snapshot, and automatic wrapping). Artifact upload uses if-no-files-found: ignore which is correct. Minor: JSDoc could cross-reference the constants file.

📰 BREAKING: Report filed by Smoke Copilot · ● 1.1M

* Path to the GitHub API rate-limit log file.
* Each entry records the x-ratelimit-* headers (or rate-limit API snapshot)
* at the time of a GitHub REST API call, enabling post-run rate-limit analysis.
* @type {string}
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.

The new GITHUB_RATE_LIMITS_JSONL_PATH constant is well-documented with a clear JSDoc comment. This follows the existing pattern in the file nicely.

@@ -0,0 +1,218 @@
// @ts-check
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.

Nice addition! The new github_rate_limit_logger.cjs provides three flexible usage patterns for rate-limit observability. Consider adding a note in the JSDoc about the file path being controlled by GITHUB_RATE_LIMITS_JSONL_PATH from constants.cjs for discoverability.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Commit pushed: d80914b

Generated by Changeset Generator

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Smoke Test Run 23998581834 — PARTIAL

Core tests #1–12: ✅✅✅✅✅❌✅✅✅✅✅✅
PR review tests #13–19: ✅✅✅⚠️✅✅⚠️

#6 Tavily: rate limited (429)
⚠️ #16 No review threads to resolve
⚠️ #19 No safe test PR to close

💥 [THE END] — Illustrated by Smoke Claude · ● 174.5K ·

Read the last entry from github_rate_limits.jsonl in sendJobConclusionSpan
and include gh-aw.github.rate_limit.{remaining,limit,used,resource} as span
attributes so rate-limit headroom is visible in the OTLP trace.

Also add readLastRateLimitEntry helper + 10 new tests (101 total pass).

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/cd4d7dff-3509-4d45-bd42-1c49839e6e49

Co-authored-by: pelikhan <[email protected]>
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude · ● 174.5K

path: |
/tmp/gh-aw/aw_info.json
/tmp/gh-aw/aw-prompts/prompt.txt
/tmp/gh-aw/github_rate_limits.jsonl
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.

Good addition — including github_rate_limits.jsonl in the activation artifact ensures rate limit data is captured for the setup phase. Consider verifying the file is always present before upload to avoid silent failures.

/tmp/gh-aw/agent_usage.json
/tmp/gh-aw/agent-stdio.log
/tmp/gh-aw/agent/
/tmp/gh-aw/github_rate_limits.jsonl
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.

Including the rate limits JSONL in the agent artifact upload is consistent with the activation step. The if-no-files-found: ignore on the surrounding block means this won't fail if not generated — good defensive practice.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 5, 2026

@copilot the otel helper that create the span message should read the last message in the rate limiting file and include the rate limiting level in the otel payload

Done in commit bb7b5d7. sendJobConclusionSpan in send_otlp_span.cjs now calls readLastRateLimitEntry() (which reads the last line of github_rate_limits.jsonl) and adds the following attributes to the OTLP span payload when the file is present:

  • gh-aw.github.rate_limit.remaining
  • gh-aw.github.rate_limit.limit
  • gh-aw.github.rate_limit.used
  • gh-aw.github.rate_limit.resource

10 new tests were added covering: file absent, empty file, single-entry, multi-entry (picks last), invalid JSON, and integration tests within sendJobConclusionSpan.

Copilot AI changed the title Add GitHub API rate limit observability via JSONL artifact logging Add GitHub API rate limit observability via JSONL artifact logging and OTLP span enrichment Apr 5, 2026
@pelikhan pelikhan marked this pull request as ready for review April 5, 2026 09:32
Copilot AI review requested due to automatic review settings April 5, 2026 09:32
@pelikhan pelikhan merged commit 9a772b8 into main Apr 5, 2026
51 checks passed
@pelikhan pelikhan deleted the copilot/add-github-rate-limit-logging branch April 5, 2026 09:32
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

Adds end-to-end GitHub API rate-limit observability by logging rate-limit snapshots/headers to a JSONL file during workflow execution, uploading it with job artifacts, and enriching OTLP job-conclusion spans with the latest rate-limit values.

Changes:

  • Introduces github_rate_limit_logger.cjs and wraps global.github to auto-log rate-limit headers for all github.rest.*.*() calls.
  • Uploads github_rate_limits.jsonl as part of activation and agent/unified artifacts across generated workflows.
  • Enriches OTLP conclusion spans with the most recent rate-limit entry read from github_rate_limits.jsonl (with test coverage).
Show a summary per file
File Description
actions/setup/js/github_rate_limit_logger.cjs Adds JSONL logging helpers + a Proxy wrapper for github.rest calls to capture rate-limit headers/snapshots.
actions/setup/js/github_rate_limit_logger.test.cjs Adds unit tests for header logging, rate-limit API snapshot logging, and REST proxy wrapping behavior.
actions/setup/js/setup_globals.cjs Wraps global.github with the rate-limit-aware proxy so all scripts get automatic logging.
actions/setup/js/check_rate_limit.cjs Adds a startup fetchAndLogRateLimit snapshot for baseline observability during rate-limit checks.
actions/setup/js/constants.cjs Defines GITHUB_RATE_LIMITS_JSONL_PATH for shared path usage.
actions/setup/js/send_otlp_span.cjs Reads the last JSONL rate-limit entry and adds it as OTLP conclusion-span attributes.
actions/setup/js/send_otlp_span.test.cjs Adds tests for readLastRateLimitEntry and conclusion-span rate-limit enrichment behavior.
pkg/constants/job_constants.go Adds a Go constant for the rate-limit JSONL filename (used by workflow compilers).
pkg/workflow/compiler_activation_job.go Uploads github_rate_limits.jsonl with the activation artifact.
pkg/workflow/compiler_yaml_main_job.go Includes github_rate_limits.jsonl in the unified agent artifact upload.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden Updates golden workflow output to include github_rate_limits.jsonl in artifacts.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Updates golden workflow output to include github_rate_limits.jsonl in artifacts.
pkg/agentdrain/data/default_weights.json Reformats JSON (no functional change).
.changeset/patch-github-rate-limit-observability.md Adds a patch changeset entry describing the new observability behavior.
.github/workflows/ace-editor.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/agent-performance-analyzer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/agent-persona-explorer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/agentic-observability-kit.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/ai-moderator.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/archie.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/artifacts-summary.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/audit-workflows.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/auto-triage-issues.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/blog-auditor.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/bot-detection.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/brave.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/breaking-change-checker.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/changeset.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/ci-coach.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/ci-doctor.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/claude-code-user-docs-review.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/cli-consistency-checker.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/cli-version-checker.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/cloclo.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/code-scanning-fixer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/code-simplifier.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/codex-github-remote-mcp-test.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/commit-changes-analyzer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/constraint-solving-potd.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/contribution-check.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-agent-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-cli-deep-research.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-pr-merged-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-session-insights.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-token-audit.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/copilot-token-optimizer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/craft.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-architecture-diagram.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-assign-issue-to-user.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-choice-test.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-cli-performance.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-cli-tools-tester.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-code-metrics.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-community-attribution.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-compiler-quality.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-doc-healer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-doc-updater.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-fact.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-file-diet.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-firewall-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-function-namer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-integrity-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-issues-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-malicious-code-scan.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-mcp-concurrency-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-multi-device-docs-tester.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-news.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-observability-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-otel-instrumentation-advisor.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-performance-summary.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-regulatory.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-rendering-scripts-verifier.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-repo-chronicle.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-safe-output-integrator.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-safe-output-optimizer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-safe-outputs-conformance.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-secrets-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-security-red-team.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-semgrep-scan.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-syntax-error-quality.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-team-evolution-insights.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-team-status.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-testify-uber-super-expert.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/daily-workflow-updater.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/dead-code-remover.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/deep-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/delight.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/dependabot-burner.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/dependabot-go-checker.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/dev-hawk.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/dev.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/developer-docs-consolidator.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/dictation-prompt.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/discussion-task-miner.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/docs-noob-tester.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/draft-pr-cleanup.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/duplicate-code-detector.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/example-permissions-warning.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/example-workflow-analyzer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/firewall-escape.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/firewall.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/functional-pragmatist.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/github-mcp-structural-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/github-mcp-tools-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/github-remote-mcp-auth-test.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/glossary-maintainer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/go-fan.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/go-logger.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/go-pattern-detector.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/gpclean.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/grumpy-reviewer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/hourly-ci-cleaner.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/instructions-janitor.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/issue-arborist.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/issue-monster.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/issue-triage-agent.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/jsweep.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/layout-spec-maintainer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/lockfile-stats.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/mcp-inspector.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/mergefest.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/metrics-collector.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/notion-issue-summary.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/org-health-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/pdf-summary.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/plan.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/poem-bot.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/portfolio-analyst.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/pr-nitpick-reviewer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/pr-triage-agent.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/prompt-clustering-analysis.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/python-data-charts.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/q.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/refiner.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/release.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/repo-audit-analyzer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/repo-tree-map.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/repository-quality-improver.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/research.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/safe-output-health.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/schema-consistency-checker.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/schema-feature-coverage.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/scout.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/security-compliance.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/security-review.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/semantic-function-refactor.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/sergo.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/slide-deck-maintainer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-agent-all-merged.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-agent-all-none.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-agent-public-approved.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-agent-public-none.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-agent-scoped-approved.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-call-workflow.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-claude.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-codex.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-copilot-arm.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-copilot.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-create-cross-repo-pr.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-gemini.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-multi-pr.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-project.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-service-ports.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-temporary-id.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-test-tools.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-update-cross-repo-pr.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-workflow-call-with-inputs.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/smoke-workflow-call.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/stale-repo-identifier.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/static-analysis-report.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/step-name-alignment.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/sub-issue-closer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/super-linter.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/technical-doc-writer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/terminal-stylist.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/test-create-pr-error-handling.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/test-dispatcher.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/test-project-url-default.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/test-workflow.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/tidy.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/typist.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/ubuntu-image-analyzer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/unbloat-docs.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/update-astro.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/video-analyzer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/weekly-blog-post-writer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/weekly-editors-health-check.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/weekly-issue-summary.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/weekly-safe-outputs-spec-review.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/workflow-generator.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/workflow-health-manager.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/workflow-normalizer.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.
.github/workflows/workflow-skill-extractor.lock.yml Regenerates locked workflow to upload github_rate_limits.jsonl in artifacts.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 195/195 changed files
  • Comments generated: 2

Comment on lines 515 to 520
steps = append(steps, " path: |\n")
steps = append(steps, " /tmp/gh-aw/aw_info.json\n")
steps = append(steps, " /tmp/gh-aw/aw-prompts/prompt.txt\n")
steps = append(steps, " /tmp/gh-aw/"+constants.GithubRateLimitsFilename+"\n")
steps = append(steps, " if-no-files-found: ignore\n")
steps = append(steps, " retention-days: 1\n")
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

if-no-files-found: ignore applies to the whole upload step, which can silently skip uploading the required activation files (aw_info.json, prompt.txt) as well as the optional github_rate_limits.jsonl. Consider keeping the activation artifact upload strict (default/warn) for required files and adding a second, separate upload-artifact step for the rate-limit log with if-no-files-found: ignore so missing core activation files remain visible.

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +99
// GithubRateLimitsFilename is the filename of the GitHub API rate-limit log written to /tmp/gh-aw/.
// Each line is a JSON object recording the x-ratelimit-* headers (or rate-limit API snapshot)
// captured during github.rest API calls, enabling post-run analysis of rate-limit consumption.
const GithubRateLimitsFilename = "github_rate_limits.jsonl"
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Exported identifier uses Github instead of the Go initialism GitHub. For consistency with existing constants like DefaultGitHubLockdown (pkg/constants/constants.go) and to match Go naming conventions, rename GithubRateLimitsFilename to GitHubRateLimitsFilename and update references.

Copilot uses AI. Check for mistakes.
github-actions bot added a commit that referenced this pull request Apr 5, 2026
Documents PR #24694 feature: JSONL artifact logging and OTLP span
enrichment for GitHub API rate-limit visibility. Creates new spec file
and adds MCP Integration subsection to dev.md.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants