Skip to content

Commit 8298105

Browse files
docs: update layout specification for 2026-04-13 (#25994)
1 parent 9908bc5 commit 8298105

1 file changed

Lines changed: 71 additions & 22 deletions

File tree

scratchpad/layout.md

Lines changed: 71 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# GitHub Actions Workflow Layout Specification
22

33
> Auto-generated specification documenting patterns used in compiled `.lock.yml` files.
4-
> Last updated: 2026-04-06
4+
> Last updated: 2026-04-13
55
66
## Overview
77

88
This document catalogs all file paths, folder names, artifact names, and other patterns used across our compiled GitHub Actions workflows (`.lock.yml` files). It serves as a comprehensive reference for developers working with the gh-aw codebase.
99

1010
**Statistics:**
11-
- **Lock files analyzed**: 181
11+
- **Lock files analyzed**: 187
1212
- **Unique GitHub Actions**: 25
13-
- **Artifact patterns**: 25
13+
- **Artifact patterns**: 27
1414
- **Job name patterns**: 30
15-
- **File path references**: 43
15+
- **File path references**: 47
1616

1717
## GitHub Actions
1818

@@ -21,26 +21,26 @@ Common GitHub Actions used across compiled workflows:
2121
| Action | Version (SHA) | Description | Context |
2222
|--------|---------------|-------------|---------|
2323
| `actions/checkout` | `de0fac2e...` | Checks out repository code | Used in almost all workflows for accessing repo content |
24-
| `actions/upload-artifact` | `bbbca2dd...` | Uploads build artifacts | Used for agent outputs, patches, prompts, logs, and safe-output data |
24+
| `actions/upload-artifact` | `043fb46d...` | Uploads build artifacts | Used for agent outputs, patches, prompts, logs, and safe-output data |
2525
| `actions/download-artifact` | `3e5f45b2...` | Downloads artifacts from previous jobs | Used in safe-output jobs and conclusion jobs |
2626
| `actions/setup-node` | `53b83947...` | Sets up Node.js environment | Used in workflows requiring npm/node |
2727
| `actions/setup-python` | `a309ff8b...` | Sets up Python environment | Used for Python-based workflows and scripts |
2828
| `actions/setup-go` | `4a360112...` | Sets up Go environment | Used for Go-based builds and tests |
2929
| `actions/setup-java` | `be666c2f...` | Sets up Java environment | Used for Java-based workflows |
3030
| `actions/setup-dotnet` | `c2fa09f4...` | Sets up .NET environment | Used for .NET-based workflows |
31-
| `actions/github-script` | `ed597411...` | Runs GitHub API scripts | Used for GitHub API interactions and workflow logic |
31+
| `actions/github-script` | `373c709c...` | Runs GitHub API scripts | Used for GitHub API interactions and workflow logic |
3232
| `actions/cache` | `66822842...` | Caches dependencies | Used for caching npm, pip, go modules |
3333
| `actions/cache/restore` | `66822842...` | Restores cached dependencies | Explicit cache restore action |
3434
| `actions/cache/save` | `66822842...` | Saves dependencies to cache | Explicit cache save action |
3535
| `docker/setup-buildx-action` | `4d04d5d9...` | Sets up Docker Buildx | Used for multi-platform Docker builds |
36-
| `docker/build-push-action` | `d08e5c35...` | Builds and pushes Docker images | Used in release workflows |
36+
| `docker/build-push-action` | `bcafcacb...` | Builds and pushes Docker images | Used in release workflows |
3737
| `docker/login-action` | `4907a6dd...` | Logs in to Docker registry | Used before pushing Docker images |
3838
| `docker/metadata-action` | `030e8812...` | Extracts Docker metadata | Used for tagging Docker images |
3939
| `astral-sh/setup-uv` | `cec20831...`, `eac588ad...` | Sets up uv package manager | Used for Python package management |
4040
| `anchore/sbom-action` | `e22c3899...` | Generates SBOM | Used for security and compliance |
4141
| `super-linter/super-linter` | `9e863354...` | Runs super-linter | Used for code quality checks |
4242
| `github/codeql-action/upload-sarif` | `0e9f5595...` | Uploads SARIF to GitHub Code Scanning | Used for security scanning results from threat detection |
43-
| `github/stale-repos` | `25946246...` | Manages stale repositories | Used for repository maintenance |
43+
| `github/stale-repos` | `5f2e18fc...` | Manages stale repositories | Used for repository maintenance |
4444
| `microsoft/apm-action` | `a190b0b1...` | Collects APM bundle data | Used for performance monitoring and APM artifact creation |
4545
| `./actions/setup` | N/A (local) | Custom setup action | Copies JavaScript and shell scripts to `/tmp/gh-aw/actions` |
4646
| `actions-ecosystem/action-add-labels` | `c96b68fe...` | Adds labels to issues/PRs | Used in safe-output jobs for label management |
@@ -57,8 +57,9 @@ Artifacts uploaded/downloaded between workflow jobs:
5757
| `agent-output` | Agent job (legacy) | Safe-output jobs | Legacy name for agent output; superseded by unified `agent` artifact |
5858
| `detection` | Detection job | Conclusion job | Detection analysis output (threat logs, analysis results) |
5959
| `safe-output` | Safe-output jobs | Conclusion job | Safe output results (PR creation, commenting, etc.) |
60-
| `safe-output-items` | Safe-output jobs | Conclusion job | Individual safe output item payloads (JSONL format) |
60+
| `safe-outputs-items` | Safe-output jobs | Conclusion job | Individual safe output item payloads (JSONL format) |
6161
| `safe-outputs-assets` | Safe-output jobs | Conclusion job | Assets generated by safe-output tools |
62+
| `safe-outputs-upload-artifacts` | Safe-output jobs | N/A | Staged upload artifacts from safe-output handlers |
6263
| `cache-memory` | Agent job, update_cache_memory job | Next workflow run | Persistent data across workflow runs |
6364
| `cache-memory-focus-areas` | Agent job | Next workflow run | Focused cache data for specific areas |
6465
| `cache-memory-repo-audits` | Agent job | Next workflow run | Repository audit cache data |
@@ -159,6 +160,13 @@ Common file paths referenced in workflow files:
159160
| `${{ runner.temp }}/gh-aw/safe-jobs/` | Directory | Safe job definitions | Safe output job definitions and handlers |
160161
| `${{ runner.temp }}/gh-aw/gh-aw` | File | gh-aw binary | The gh-aw CLI binary copied for use in safe-output jobs |
161162
| `${{ runner.temp }}/gh-aw/safeoutputs/` | Directory | Safe outputs runtime | Safe outputs MCP server, config, and output files |
163+
| `/tmp/gh-aw/otel.jsonl` | File | OpenTelemetry spans log | OTLP span mirror written by `send_otlp_span.cjs` |
164+
| `/tmp/gh-aw/github_rate_limits.jsonl` | File | GitHub rate limits log | Per-call rate-limit headers captured from GitHub API calls |
165+
| `/tmp/gh-aw/temporary-id-map.json` | File | Temporary ID map | Maps temporary IDs (e.g., `aw_abc123`) to GitHub resource references |
166+
| `/tmp/gh-aw/apm-bundle` | Directory | APM bundle | Application Performance Monitoring bundle data |
167+
| `/tmp/gh-aw/proxy-logs/` | Directory | Proxy logs | Logs from network proxy (AWF/DIFC proxy) |
168+
| `/tmp/gh-aw/threat-detection/detection.log` | File | Detection log | Threat detection analysis log |
169+
| `/tmp/gh-aw/sarif/` | Directory | SARIF download path | Where `upload_code_scanning_sarif` job downloads the SARIF artifact |
162170
| `${{ env.GH_AW_AGENT_OUTPUT }}` | Environment var | Agent output path | Dynamic path to agent output file |
163171
| `${{ env.GH_AW_SAFE_OUTPUTS }}` | Environment var | Safe outputs path | Dynamic path to safe outputs directory |
164172

@@ -183,11 +191,20 @@ const AgentOutputArtifactName = "agent-output"
183191
const AgentArtifactName = "agent"
184192
const DetectionArtifactName = "detection"
185193
const ActivationArtifactName = "activation"
186-
const APMArtifactName = "apm"
187-
const SafeOutputItemsArtifactName = "safe-output-items"
194+
const SafeOutputItemsArtifactName = "safe-outputs-items"
195+
const SarifArtifactName = "code-scanning-sarif"
196+
const FirewallAuditArtifactName = "firewall-audit-logs" // Legacy
197+
const LegacyDetectionArtifactName = "threat-detection.log" // Legacy
188198
const AgentOutputFilename = "agent_output.json"
189199
const SafeOutputsFilename = "safeoutputs.jsonl"
200+
const TokenUsageFilename = "agent_usage.json"
201+
const GithubRateLimitsFilename = "github_rate_limits.jsonl"
202+
const OtelJsonlFilename = "otel.jsonl"
203+
const TemporaryIdMapFilename = "temporary-id-map.json"
204+
const SarifFileName = "code-scanning-alert.sarif"
205+
const SarifArtifactDownloadPath = "/tmp/gh-aw/sarif/"
190206
const ArtifactPrefixOutputName = "artifact_prefix"
207+
const SafeOutputsUploadArtifactStagingArtifactName = "safe-outputs-upload-artifacts"
191208
````
192209

193210
### Job Names
@@ -205,17 +222,24 @@ const CheckStopTimeStepID StepID = "check_stop_time"
205222
const CheckSkipIfMatchStepID StepID = "check_skip_if_match"
206223
const CheckSkipIfNoMatchStepID StepID = "check_skip_if_no_match"
207224
const CheckCommandPositionStepID StepID = "check_command_position"
225+
const RemoveTriggerLabelStepID StepID = "remove_trigger_label"
226+
const GetTriggerLabelStepID StepID = "get_trigger_label"
208227
const CheckRateLimitStepID StepID = "check_rate_limit"
209228
const CheckSkipRolesStepID StepID = "check_skip_roles"
210229
const CheckSkipBotsStepID StepID = "check_skip_bots"
230+
const CheckSkipIfCheckFailingStepID StepID = "check_skip_if_check_failing"
231+
const PreActivationAppTokenStepID StepID = "pre-activation-app-token"
232+
const ParseMCPGatewayStepID StepID = "parse-mcp-gateway"
211233
````
212234

213235
### Directory Paths
214236
````go
215237
const GhAwRootDir = "${{ runner.temp }}/gh-aw"
216238
const GhAwRootDirShell = "${RUNNER_TEMP}/gh-aw"
217239
const AWFProxyLogsDir = "/tmp/gh-aw/sandbox/firewall/logs"
240+
const AWFAuditDir = "/tmp/gh-aw/sandbox/firewall/audit"
218241
const DefaultMCPGatewayPayloadDir = "/tmp/gh-aw/mcp-payloads"
242+
const SarifArtifactDownloadPath = "/tmp/gh-aw/sarif/"
219243
````
220244

221245
### MCP Server IDs
@@ -226,12 +250,15 @@ const AgenticWorkflowsMCPServerID MCPServerID = "agenticworkflows"
226250
````
227251
### Default Versions
228252
````go
253+
const DefaultCopilotVersion Version = "1.0.21"
254+
const DefaultClaudeCodeVersion Version = "2.1.98"
255+
const DefaultCodexVersion Version = "0.118.0"
256+
const DefaultGeminiVersion Version = "0.37.1"
229257
const DefaultGitHubMCPServerVersion Version = "v0.32.0"
230-
const DefaultFirewallVersion Version = "v0.25.13"
231-
const DefaultMCPGatewayVersion Version = "v0.2.14"
258+
const DefaultFirewallVersion Version = "v0.25.18"
259+
const DefaultMCPGatewayVersion Version = "v0.2.17"
232260
const DefaultPlaywrightMCPVersion Version = "0.0.70"
233-
const DefaultQmdVersion Version = "2.0.1"
234-
const DefaultGitHubScriptVersion Version = "v8"
261+
const DefaultGitHubScriptVersion Version = "v9"
235262
const DefaultPlaywrightBrowserVersion Version = "v1.59.1"
236263
const DefaultMCPSDKVersion Version = "1.24.0"
237264
const DefaultBunVersion Version = "1.1"
@@ -244,6 +271,10 @@ const DefaultJavaVersion Version = "21"
244271
const DefaultElixirVersion Version = "1.17"
245272
const DefaultHaskellVersion Version = "9.10"
246273
const DefaultDenoVersion Version = "2.x"
274+
// Minimum version guards
275+
const AWFExcludeEnvMinVersion Version = "v0.25.3"
276+
const AWFCliProxyMinVersion Version = "v0.25.17"
277+
const CopilotNoAskUserMinVersion Version = "1.0.19"
247278
````
248279

249280
### Container Images
@@ -294,7 +325,9 @@ MCPScriptsFeatureFlag FeatureFlag = "mcp-scripts"
294325
MCPGatewayFeatureFlag FeatureFlag = "mcp-gateway"
295326
DisableXPIAPromptFeatureFlag FeatureFlag = "disable-xpia-prompt"
296327
CopilotRequestsFeatureFlag FeatureFlag = "copilot-requests"
297-
DIFCProxyFeatureFlag FeatureFlag = "difc-proxy"
328+
DIFCProxyFeatureFlag FeatureFlag = "difc-proxy" // Deprecated: use tools.github.integrity-proxy
329+
CliProxyFeatureFlag FeatureFlag = "cli-proxy"
330+
CopilotIntegrationIDFeatureFlag FeatureFlag = "copilot-integration-id"
298331
````
299332

300333
### Engine Names
@@ -351,6 +384,9 @@ GitHub Actions runner images used across compiled workflows:
351384
/tmp/gh-aw/
352385
├── agent/ # Agent workspace
353386
├── agent-stdio.log # Agent logs
387+
├── agent_output.json # Agent output JSON
388+
├── agent_usage.json # Token usage JSON
389+
├── apm-bundle/ # APM bundle data
354390
├── aw-prompts/ # Prompt storage
355391
│ └── prompt.txt
356392
├── aw.patch # Git patch
@@ -359,22 +395,35 @@ GitHub Actions runner images used across compiled workflows:
359395
├── cache-memory-chroma/ # Vector DB cache
360396
├── cache-memory-focus-areas/ # Focus areas cache
361397
├── cache-memory-repo-audits/ # Audit cache
398+
├── github_rate_limits.jsonl # GitHub API rate limit log
362399
├── mcp-config/logs/ # MCP config logs
363400
├── mcp-logs/ # MCP server logs
364401
├── mcp-payloads/ # MCP gateway payloads
402+
├── mcp-scripts/logs/ # MCP scripts logs
403+
├── otel.jsonl # OpenTelemetry span mirror
404+
├── proxy-logs/ # Network proxy logs
365405
├── python/ # Python scripts/data
366406
│ ├── *.py
367407
│ ├── charts/*.png
368408
│ └── data/*
409+
├── redacted-urls.log # Redacted URL log
369410
├── repo-memory/ # Repository memory
370411
│ ├── campaigns/
371412
│ └── default/
372413
├── safe-inputs/logs/ # Safe input logs
414+
├── safe-output-items.jsonl # Safe output items manifest
415+
├── safeoutputs.jsonl # Raw safe outputs NDJSON
373416
├── safeoutputs/ # Safe output data
374417
│ └── assets/
375-
└── sandbox/ # Sandbox execution
376-
├── agent/logs/
377-
└── firewall/logs/
418+
├── sandbox/ # Sandbox execution
419+
│ ├── agent/logs/
420+
│ └── firewall/
421+
│ ├── audit/
422+
│ └── logs/
423+
├── sarif/ # SARIF download path
424+
├── temporary-id-map.json # Temporary ID map
425+
└── threat-detection/
426+
└── detection.log # Threat detection log
378427
````
379428

380429
### GitHub Workflow Directory Structure
@@ -419,9 +468,9 @@ This specification is automatically maintained by the **Layout Specification Mai
419468
4. Updates this document with findings
420469
5. Creates a PR with the changes
421470

422-
**Last extraction run**: 2026-04-06
423-
**Lock files analyzed**: 181
424-
**Patterns documented**: 240+
471+
**Last extraction run**: 2026-04-13
472+
**Lock files analyzed**: 187
473+
**Patterns documented**: 250+
425474

426475
---
427476

0 commit comments

Comments
 (0)