Skip to content

Commit 613b8ce

Browse files
docs(artifacts): document experiment artifact and set (#29649)
The `experiment` artifact (`constants.ExperimentArtifactName = "experiment"`) was missing from the Artifacts reference page. Add it to: - Quick Reference table (with constant, type, and description) - Artifact Sets table (`--artifacts experiment`) - New `## experiment` section with contents, CLI usage, and cross-reference Also include `experiment` in the multi-file artifact list in the Naming Compatibility prose. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c77959b commit 613b8ce

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

docs/src/content/docs/reference/artifacts.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ GitHub Agentic Workflows upload several artifacts during workflow execution. Thi
1919
| `agent-output` | `constants.AgentOutputArtifactName` | Legacy/back-compat | Historical standalone agent output artifact (`agent_output.json`); in current compiled workflows this content is included in the unified `agent` artifact instead |
2020
| `aw-info` || Single-file | Engine configuration (`aw_info.json`) |
2121
| `prompt` || Single-file | Generated prompt (`prompt.txt`) |
22+
| `experiment` | `constants.ExperimentArtifactName` | Multi-file | A/B experiment state (`state.json`) uploaded by the activation job when experiments are declared in the frontmatter |
2223
| `safe-outputs-items` | `constants.SafeOutputItemsArtifactName` | Single-file | Safe output items manifest |
2324
| `code-scanning-sarif` | `constants.SarifArtifactName` | Single-file | SARIF file for code scanning results |
2425

@@ -34,6 +35,7 @@ The `gh aw logs` and `gh aw audit` commands support `--artifacts` to download on
3435
| `firewall` | `firewall-audit-logs` | Network policy and firewall audit data |
3536
| `mcp` | `firewall-audit-logs` | MCP gateway traffic logs |
3637
| `detection` | `detection` | Threat detection output |
38+
| `experiment` | `experiment` | A/B experiment state (only present when experiments are declared) |
3739
| `github-api` | `activation`, `agent` | GitHub API rate limit logs |
3840

3941
```bash
@@ -141,6 +143,33 @@ The `detection` artifact contains threat detection output.
141143

142144
Legacy name: `threat-detection.log` (still supported for backward compatibility).
143145

146+
## `experiment`
147+
148+
The `experiment` artifact is uploaded by the **activation job** only when the workflow frontmatter declares one or more `experiments` entries. It is not present on runs without experiments.
149+
150+
### Contents
151+
152+
- `state.json` — Cumulative per-variant invocation counters used to balance A/B assignments across runs
153+
154+
### Accessing experiment data
155+
156+
```bash
157+
# Download the experiment artifact for a specific run
158+
gh aw audit <run-id> --artifacts experiment
159+
160+
# Display the A/B experiment section in the audit report
161+
gh aw audit <run-id>
162+
```
163+
164+
The `🧪 A/B Experiments` section of the audit report shows the variant chosen for the run and the cumulative counts:
165+
166+
```
167+
🧪 A/B Experiments
168+
• style = concise (cumulative: concise:5, detailed:4)
169+
```
170+
171+
See [A/B Experiments](/gh-aw/guides/experiments/) for how to declare experiments in workflow frontmatter.
172+
144173
## Naming Compatibility
145174

146175
Artifact names changed between upload-artifact v4 and v5. The `gh aw logs` and `gh aw audit` commands handle both naming schemes transparently:
@@ -153,7 +182,7 @@ Artifact names changed between upload-artifact v4 and v5. The `gh aw logs` and `
153182
| `prompt.txt` | `prompt` | `prompt.txt` |
154183
| `threat-detection.log` | `detection` | `detection.log` |
155184

156-
Single-file artifacts are automatically flattened to root level regardless of their artifact directory name. Multi-file artifacts (`firewall-audit-logs`, `agent`, `activation`) retain their directory structure.
185+
Single-file artifacts are automatically flattened to root level regardless of their artifact directory name. Multi-file artifacts (`firewall-audit-logs`, `agent`, `activation`, `experiment`) retain their directory structure.
157186

158187
## Workflow Call Prefixes
159188

0 commit comments

Comments
 (0)