chore: sync actions from gh-aw@v0.80.0#155
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Syncs the setup/ action runtime from github/gh-aw@v0.80.0, updating guardrails, safe-outputs behavior, and several supporting JS utilities used by the action’s workflow jobs.
Changes:
- Add daily AI Credits (AIC) usage caching + artifact-based fallback restore to reduce repeated artifact downloads and handle branch-scoped cache misses.
- Expand safe-outputs schema/handlers (wildcard-target parameter requirements, discussions permission messaging, report-only failure types) and improve guardrail/failure issue contexts.
- Refactor and harden various helpers (Projects v2 field updates, git bundle prerequisite fetching, lockdown error templating, invocation context resolution).
Show a summary per file
| File | Description |
|---|---|
| setup/setup.sh | Copies safe-outputs tool schema to both runtime filenames (safe_outputs_tools.json + tools.json). |
| setup/md/tool_denials_exceeded_context.md | Adds “Last 5 tool calls” section to tool-denials guardrail context. |
| setup/md/optimize_token_consumption_context.md | New template to guide token/cost optimization when guardrails trigger. |
| setup/md/cache_memory_miss.md | Clarifies cache-miss warning to only show after a successful restore matched a key. |
| setup/md/agent_failure_issue.md | Injects token-optimization context into agent failure issue template. |
| setup/js/write_daily_aic_usage_cache.cjs | New conclusion-job helper that writes/prunes per-workflow AIC JSONL cache. |
| setup/js/vitest.integration.config.mjs | Extends integration test include list (currently references missing test files). |
| setup/js/vitest.artifact-integration.config.mjs | New artifact live-API vitest config (currently references a missing test file). |
| setup/js/validate_lockdown_requirements.cjs | Switches to template-based lockdown error messages; consolidates failure path. |
| setup/js/validate_lockdown_requirements_templates.cjs | New message templates for lockdown/strict/public-event errors. |
| setup/js/update_project.cjs | Refactors Projects v2 updates (dedupe by content ID; extracted field-update logic). |
| setup/js/update_handler_factory.cjs | Simplifies config logging assembly for update handlers. |
| setup/js/set_issue_field.cjs | Removes unused GraphQL fragment for IssueField base type. |
| setup/js/send_otlp_span.cjs | Adds percent-decoding support to OTEL resource attribute parsing. |
| setup/js/safe_outputs_tools.json | Adds wildcard-target requirements metadata + updates tool descriptions. |
| setup/js/safe_outputs_handlers.cjs | Enforces wildcard-target explicit parameter requirements based on schema metadata. |
| setup/js/safe_output_helpers.cjs | Uses resolved invocation context (event/payload) for safer target resolution. |
| setup/js/safe_output_handler_manager.cjs | Treats upload_artifact failures as report-only; improves warning message detail. |
| setup/js/restore_aic_usage_cache_fallback.cjs | New activation-job fallback: download recent aic-usage-cache artifact on true cache miss. |
| setup/js/remove_labels.cjs | Uses invocation context payload for deriving target item number (needs error handling). |
| setup/js/push_to_pull_request_branch.cjs | Raises default max patch size and centralizes positive-int parsing. |
| setup/js/package.json | Updates JS deps and adds artifact integration test script (currently points at missing tests). |
| setup/js/harness_retry_guard.cjs | Adds non-retryable guard for “goal already active” condition. |
| setup/js/handle_agent_failure.cjs | Improves cache-miss detection logic and adds token-optimization + tool-call context sections. |
| setup/js/git_helpers.cjs | Changes bundle prerequisite strategy to fetch-by-SHA + bounded deepen fallback. |
| setup/js/generate_safe_outputs_tools.cjs | Adjusts add_comment tool description based on discussions enablement. |
| setup/js/extract_inline_sub_agents.cjs | Preserves inline sub-agent frontmatter keys without filtering. |
| setup/js/Dockerfile.safe-outputs-mcp | New Dockerfile for local safe-outputs MCP runtime (Node LTS Alpine + git). |
| setup/js/dispatch_workflow.cjs | Improves error message guidance for cross-repo dispatch allowlisting key name. |
| setup/js/detect_agent_errors.cjs | Detects Copilot/CAPI quota exhaustion and exposes it as a distinct signal/output. |
| setup/js/create_pull_request.cjs | Raises default patch size, adds positive-int parsing, and tightens config parsing. |
| setup/js/create_forecast_issue.cjs | Expands forecast reporting to include low/p50/high/stdev monthly Monte Carlo stats. |
| setup/js/copilot_harness.cjs | Stops retries when Copilot quota exhaustion is detected. |
| setup/js/codex_harness.cjs | Stops retries when “goal already active” guard triggers. |
| setup/js/check_daily_aic_workflow_guardrail.cjs | Adds cache loading to avoid artifact downloads; changes skip behavior for command/manual runs. |
| setup/js/artifact_client.cjs | Updates artifact Twirp request/response field naming to support newer client behavior. |
| setup/js/add_labels.cjs | Uses invocation context payload for deriving target item number (needs error handling). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 37/37 changed files
- Comments generated: 6
Comment on lines
63
to
67
| /** | ||
| * Event types that indicate a user-initiated slash command trigger. | ||
| * When aw_context.event_type is one of these, the workflow was triggered by a user | ||
| * typing a slash command in a comment, and the daily guardrail should not be skipped. | ||
| */ |
Comment on lines
5
to
8
| environment: "node", | ||
| globals: true, | ||
| include: ["frontmatter_hash_github_api.test.cjs"], | ||
| include: ["frontmatter_hash_github_api.test.cjs", "set_issue_field_api_query.integration.test.cjs"], | ||
| testTimeout: 30000, |
Comment on lines
+5
to
+9
| environment: "node", | ||
| globals: true, | ||
| include: ["artifact_client_live_api.test.cjs"], | ||
| // Allow enough time for real network I/O against GitHub's artifact storage. | ||
| testTimeout: 120000, |
Comment on lines
26
to
29
| "test:js": "vitest run", | ||
| "test:js-integration-live-api": "vitest run --config vitest.integration.config.mjs --no-file-parallelism", | ||
| "test:js-integration-artifact": "vitest run --config vitest.artifact-integration.config.mjs --no-file-parallelism", | ||
| "test:js-watch": "vitest", |
Comment on lines
79
to
84
| // Accept common aliases: issue_number, pr_number, and pull_number are normalised to item_number | ||
| const targetResult = resolveSafeOutputIssueTarget({ message, resolvedTemporaryIds, repoParts, handlerType: HANDLER_TYPE }); | ||
| if (!targetResult.success) return targetResult; | ||
| const itemNumber = targetResult.number ?? context.payload?.issue?.number ?? context.payload?.pull_request?.number; | ||
| const effectiveContext = resolveInvocationContext(context); | ||
| const itemNumber = targetResult.number ?? effectiveContext.eventPayload?.issue?.number ?? effectiveContext.eventPayload?.pull_request?.number; | ||
|
|
Comment on lines
69
to
75
| // Determine target issue/PR number | ||
| // Accept common aliases: issue_number, pr_number, and pull_number are normalised to item_number | ||
| const targetResult = resolveSafeOutputIssueTarget({ message, resolvedTemporaryIds, repoParts, handlerType: HANDLER_TYPE }); | ||
| if (!targetResult.success) return targetResult; | ||
| const itemNumber = targetResult.number ?? context.payload?.issue?.number ?? context.payload?.pull_request?.number; | ||
| const effectiveContext = resolveInvocationContext(context); | ||
| const itemNumber = targetResult.number ?? effectiveContext.eventPayload?.issue?.number ?? effectiveContext.eventPayload?.pull_request?.number; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated sync of actions from gh-aw at
v0.80.0.