Conversation
- 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]>
…ted JSON formatting Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0340db5e-d302-4aad-ade8-8820f38672d1 Co-authored-by: pelikhan <[email protected]>
|
@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]>
Done in commit |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
|
@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 |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
🎉 Smoke test §23998581852 complete!
Overall: PASS —
|
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Commit pushed:
|
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]>
There was a problem hiding this comment.
💥 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Done in commit
10 new tests were added covering: file absent, empty file, single-entry, multi-entry (picks last), invalid JSON, and integration tests within |
There was a problem hiding this comment.
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.cjsand wrapsglobal.githubto auto-log rate-limit headers for allgithub.rest.*.*()calls. - Uploads
github_rate_limits.jsonlas 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
| 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") |
There was a problem hiding this comment.
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.
| // 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" |
There was a problem hiding this comment.
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.
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]>
GitHub API rate limits are a silent failure mode in busy repos with no post-run visibility. This adds a
github_rate_limits.jsonllog 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.cjsThree usage patterns:
Per-call logging (inspect response headers):
Point-in-time snapshot (calls the rate limit API):
Automatic wrapping (zero call-site changes required):
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.cjsThe
githubobject is automatically wrapped withcreateRateLimitAwareGithubinsidesetupGlobals, so every script that usesglobal.githubgets rate-limit logging for allgithub.rest.*.*()calls without any per-file changes.check_rate_limit.cjs— retains afetchAndLogRateLimitcall at startup for a full multi-resource snapshot via the rate-limit APIOTLP span enrichment
sendJobConclusionSpaninsend_otlp_span.cjsnow reads the last entry fromgithub_rate_limits.jsonland includes the following attributes in the OTLP conclusion span payload:gh-aw.github.rate_limit.remaininggh-aw.github.rate_limit.limitgh-aw.github.rate_limit.usedgh-aw.github.rate_limit.resourceThis 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.jsonladded to both the activation and agent artifact upload paths in the Go compiler (compiler_activation_job.go,compiler_yaml_main_job.go). Usesif-no-files-found: ignoreso the upload step is a no-op when no API calls were made.Constants
GITHUB_RATE_LIMITS_JSONL_PATHinconstants.cjsGithubRateLimitsFilenameinpkg/constants/job_constants.go