Skip to content

Commit 2e1ad0a

Browse files
fix(07d): reduce cognitive load by extracting billing paths to side quest (#2667)
1 parent 5a2edb9 commit 2e1ad0a

2 files changed

Lines changed: 101 additions & 120 deletions

File tree

workshop/07d-confirm-model-access.md

Lines changed: 17 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -6,157 +6,54 @@
66

77
This step has two entry points:
88

9-
- **Arriving from the step 07 access check (error recovery):** You have completed [Install the gh-aw CLI Extension](06-install-gh-aw.md) and pushed `.github/skills/agentic-workflows/`. Workflow files do not need to exist yet — fix model access first, then return to [Write Your First Agentic Workflow](07-your-first-workflow.md) to continue.
9+
- **Arriving from step 07 (error recovery):** Workflow files do not need to exist yet — fix model access first, then return to [Write Your First Agentic Workflow](07-your-first-workflow.md).
1010
- **Arriving as the next step after step 07 (normal flow):** `daily-report-status.md` and `daily-report-status.lock.yml` are committed to your practice repository.
1111

1212
## :dart: What You'll Do
1313

14-
You'll verify Copilot model access with a quick test that uses the `agentic-workflows` skill, then choose the [billing](https://github.github.com/gh-aw/reference/billing/) and [authentication](https://github.github.com/gh-aw/reference/auth/) method for the first workflow, configure it, and confirm the source and lock files agree before you continue to [Step 8](08-run-your-workflow.md).
14+
You'll run a one-sentence test prompt, confirm Copilot is reachable, choose your [billing](https://github.github.com/gh-aw/reference/billing/) path, and configure the workflow before continuing to [Step 8](08-run-your-workflow.md).
1515

16-
## Verify model access with a test prompt
16+
## Verify model access
1717

18-
Before configuring billing, confirm Copilot is reachable from this repository.
19-
Catching an access problem here saves debugging time in the billing steps and in Step 8.
20-
21-
1. In the terminal that is already open in your Codespace, run:
18+
1. In the terminal already open in your Codespace, run:
2219

2320
```bash
2421
gh copilot
2522
```
2623

27-
1. Send the following prompt in Copilot CLI:
24+
1. Send this prompt:
2825

2926
```prompt
3027
/agentic-workflows what trigger does a scheduled workflow use?
3128
```
3229

33-
1. Confirm you receive a reply. Any response means the model and skill are accessible.
34-
2. If you see an error, check [github.com/settings/copilot](https://github.com/settings/copilot) to confirm Copilot is enabled on your account, then return here.
30+
1. Any reply confirms the model and skill are accessible. Continue to **Choose a billing path**.
3531

3632
> [!IMPORTANT]
37-
> Do not continue if you received an error instead of a response. Fix the access issue now — model-access errors will cause Step 8 to fail and are much harder to diagnose mid-run. Check [github.com/settings/copilot](https://github.com/settings/copilot) first, then see [Side Quest: Configure GitHub Copilot for Agentic Workflows](side-quest-06-03-copilot-token.md) if the problem persists.
38-
39-
## Pre-flight troubleshooting decision tree
40-
41-
Use this quick check before you choose a billing path:
33+
> If you see an error instead of a reply, check [github.com/settings/copilot](https://github.com/settings/copilot) to confirm Copilot is enabled. If the problem persists, see [Side Quest: Configure GitHub Copilot for Agentic Workflows](side-quest-06-03-copilot-token.md), then return here.
4234
43-
- **You receive a normal reply in Copilot CLI**
44-
- If you arrived here from the step 07 access check (before creating workflow files), return to [Write Your First Agentic Workflow](07-your-first-workflow.md) and continue from where you left off.
45-
- Otherwise, continue to **Choose one Copilot billing path**.
46-
- **You receive an access or entitlement error**
47-
- Confirm Copilot is enabled for your account at [github.com/settings/copilot](https://github.com/settings/copilot).
48-
- If your repository is in an organization, ask your org admin to confirm your Copilot seat and policy access.
49-
- Retry the same one-sentence prompt in Copilot CLI.
50-
- **You still cannot get a reply after account checks**
51-
- Pause here and complete [Side Quest: Configure GitHub Copilot for Agentic Workflows](side-quest-06-03-copilot-token.md), then return to this step.
35+
If you arrived from the step 07 access check and the test prompt succeeded, return to [Write Your First Agentic Workflow](07-your-first-workflow.md) now.
5236

5337
<picture>
5438
<source media="(prefers-color-scheme: dark)" srcset="images/07d-preflight-troubleshoot-dark.svg">
5539
<source media="(prefers-color-scheme: light)" srcset="images/07d-preflight-troubleshoot-light.svg">
5640
<img alt="Pre-flight troubleshooting decision tree: send a test prompt, then follow YES or NO branches to either continue the workshop or fix model access" src="images/07d-preflight-troubleshoot-light.svg">
5741
</picture>
5842

59-
## Confirm the workflow engine
60-
61-
Open `.github/workflows/daily-report-status.md`. The Step 7 workflow has no `engine:` line, so it uses GitHub Copilot.
62-
63-
Claude and Codex are optional [engines](https://github.github.com/gh-aw/reference/engines/) introduced in later side quests. You do not need an Anthropic or OpenAI API key for this first run.
64-
65-
If you are working in Claude Code or OpenAI Codex, keep this first workflow on Copilot and switch later if you want:
66-
67-
- **Claude Code:** use [Side Quest: Configure an Anthropic API Key](side-quest-11-06-anthropic-key.md).
68-
- **OpenAI Codex:** use [Side Quest: Configure an OpenAI API Key](side-quest-11-07-openai-key.md).
69-
70-
## Choose one Copilot billing path
71-
72-
Choose exactly one method. The diagram below shows both paths and the key configuration difference between them.
73-
74-
<details>
75-
<summary><b>Plain-language billing summary</b></summary>
76-
77-
- **Choose organization centralized billing** when the repository's organization already pays for Copilot in GitHub Actions. Keep `copilot-requests: write`. Do not add a `COPILOT_GITHUB_TOKEN` secret.
78-
- **Choose personal billing** when this is your personal repository, or when the organization does not pay for Copilot in GitHub Actions. Remove `copilot-requests: write`, then add a `COPILOT_GITHUB_TOKEN` secret in the repository's **Settings****Secrets and variables****Actions** page.
79-
- **If you are not sure which path applies, ask one question:** "Is centralized Copilot billing for GitHub Actions enabled for this repository?" If the answer is "no" or "I don't know," follow the personal billing path until an admin confirms otherwise.
80-
81-
</details>
82-
83-
<picture>
84-
<source media="(prefers-color-scheme: dark)" srcset="images/07d-billing-path-decision-dark.svg">
85-
<source media="(prefers-color-scheme: light)" srcset="images/07d-billing-path-decision-light.svg">
86-
<img alt="Decision flow for choosing Copilot billing path: organization centralized billing or personal billing" src="images/07d-billing-path-decision-light.svg">
87-
</picture>
88-
89-
### Billing quick-reference
90-
91-
Use this table first, then follow the detailed steps for your selected path below.
92-
93-
| If this is true | Choose this path | Key setting |
94-
|---|---|---|
95-
| Your organization provides centralized Copilot billing for Actions | **Organization with centralized Copilot billing** | Keep `copilot-requests: write`; no `COPILOT_GITHUB_TOKEN` secret |
96-
| You are in a personal repo, or your org does not provide centralized billing | **Personal billing** | Remove `copilot-requests: write`; configure `COPILOT_GITHUB_TOKEN` |
97-
98-
### Organization with centralized Copilot billing
99-
100-
Use this path when the organization that owns the repository has centralized Copilot billing enabled for Actions.
101-
102-
1. Ask your organization administrator to confirm centralized billing is enabled.
103-
2. Open `daily-report-status.md` and confirm the `permissions:` block includes `copilot-requests: write`:
104-
105-
```markdown .github/workflows/daily-report-status.md
106-
---
107-
permissions:
108-
contents: read
109-
copilot-requests: write
110-
---
111-
```
112-
113-
This line is already present in the workflow template. Do not remove it.
114-
3. No repository secret is needed for this path.
115-
4. Recompile and commit the lock file from your terminal so it reflects the confirmed configuration:
116-
117-
```bash
118-
gh aw compile
119-
git add .
120-
git commit -m "chore: confirm lock file is current" && git push
121-
```
122-
123-
The workflow uses the organization subscription. If you see `401 Unauthorized` in the run log, see [Method 1: Copilot Requests Permission](side-quest-06-03a-copilot-requests-permission.md) for troubleshooting.
124-
125-
### Personal billing
126-
127-
Use this path for a personal repository, or when the owning organization does not provide centralized Copilot billing.
128-
129-
> [!IMPORTANT]
130-
> When `copilot-requests: write` is present, the workflow ignores `COPILOT_GITHUB_TOKEN` for inference. Remove the permission before you set up the secret, then recompile.
131-
132-
1. Remove `copilot-requests: write` from `daily-report-status.md`.
133-
2. Generate a fine-grained PAT with **Copilot requests: Read-only** in [github.com/settings/tokens](https://github.com/settings/tokens).
134-
3. In your repository, open **Settings****Secrets and variables****Actions**.
135-
4. Add a new repository secret named `COPILOT_GITHUB_TOKEN` and paste the PAT value.
136-
5. Recompile and commit `daily-report-status.lock.yml`.
137-
138-
For the full browser walkthrough, see [Method 2 (UI-only): `COPILOT_GITHUB_TOKEN`](side-quest-06-03c-copilot-github-token-ui-only.md). If you prefer terminal setup, use [Method 2: `COPILOT_GITHUB_TOKEN` secret](side-quest-06-03b-copilot-github-token.md).
139-
140-
## Check the final configuration
43+
## Choose a billing path
14144

142-
Open `daily-report-status.md` and confirm it matches the method you selected:
45+
> [!NOTE]
46+
> For golden-ticket workshops, billing is pre-provisioned by your org. Use the **Organization centralized billing** path unless your instructor says otherwise.
14347
144-
| Billing path | `copilot-requests: write` | Required secret |
145-
|---|---|---|
146-
| Organization centralized billing | Present | None |
147-
| Personal billing | Removed | `COPILOT_GITHUB_TOKEN` |
48+
Follow the full setup steps in [Side Quest: Copilot Billing Paths](side-quest-07d-billing-paths.md), then return here once your workflow file and lock file are committed.
14849

149-
## Checkpoint
50+
## :white_check_mark: Checkpoint
15051

151-
- [ ] I opened Copilot CLI in the terminal and sent a test prompt
152-
- [ ] I received a response from the model and the `agentic-workflows` skill
52+
- [ ] I sent the test prompt in Copilot CLI and received a reply
15353
- [ ] I confirmed no access errors appeared
154-
- [ ] I confirmed the first workflow uses GitHub Copilot
155-
- [ ] I used the agent + `agentic-workflows` guidance to improve workflow design decisions
156-
- [ ] I chose organization centralized billing or personal billing
157-
- [ ] I completed all configuration steps for my chosen billing path (inline above — no side-quest visit required)
158-
- [ ] My source and compiled lock file use the selected method
159-
- [ ] Both workflow files are committed to `main`
54+
- [ ] I chose a billing path and completed all configuration steps
55+
- [ ] My source file and compiled lock file reflect the chosen method
56+
- [ ] Both files are committed to `main`
16057
- [ ] I am ready for [Run and Watch Your Workflow](08-run-your-workflow.md)
16158

16259
<!-- journey: all -->
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Side Quest: Copilot Billing Paths
2+
3+
Choose exactly one billing path for your first workflow, configure it, and commit the updated lock file.
4+
5+
## Quick reference
6+
7+
| Situation | Path | Key setting |
8+
|---|---|---|
9+
| Organization provides centralized Copilot billing for Actions | **Organization centralized billing** | Keep `copilot-requests: write`; no secret needed |
10+
| Personal repo, or org does not provide centralized billing | **Personal billing** | Remove `copilot-requests: write`; add `COPILOT_GITHUB_TOKEN` secret |
11+
12+
If you are not sure which applies, ask: "Is centralized Copilot billing for GitHub Actions enabled for this repository?" If the answer is "no" or "I don't know," follow **Personal billing**.
13+
14+
<picture>
15+
<source media="(prefers-color-scheme: dark)" srcset="images/07d-billing-path-decision-dark.svg">
16+
<source media="(prefers-color-scheme: light)" srcset="images/07d-billing-path-decision-light.svg">
17+
<img alt="Decision flow for choosing Copilot billing path: organization centralized billing or personal billing" src="images/07d-billing-path-decision-light.svg">
18+
</picture>
19+
20+
## Path A: Organization centralized billing
21+
22+
Use this path when the organization that owns the repository has centralized Copilot billing enabled for GitHub Actions.
23+
24+
1. Ask your org admin to confirm centralized billing is enabled.
25+
2. Open `daily-report-status.md` and confirm the `permissions:` block includes `copilot-requests: write`:
26+
27+
```markdown
28+
---
29+
permissions:
30+
contents: read
31+
copilot-requests: write
32+
---
33+
```
34+
35+
This line is already present in the Step 7 template. Do not remove it.
36+
37+
1. No repository secret is needed.
38+
1. Recompile and commit:
39+
40+
```bash
41+
gh aw compile
42+
git add .
43+
git commit -m "chore: confirm lock file is current" && git push
44+
```
45+
46+
If you see `401 Unauthorized` in the run log, see [Method 1: Copilot Requests Permission](side-quest-06-03a-copilot-requests-permission.md).
47+
48+
## Path B: Personal billing
49+
50+
Use this path for a personal repository, or when the owning organization does not provide centralized Copilot billing.
51+
52+
> [!IMPORTANT]
53+
> When `copilot-requests: write` is present, the workflow ignores `COPILOT_GITHUB_TOKEN`. Remove that permission line before adding the secret.
54+
55+
1. Open `daily-report-status.md` and remove `copilot-requests: write`.
56+
2. Generate a fine-grained PAT with **Copilot requests: Read-only** at [github.com/settings/tokens](https://github.com/settings/tokens).
57+
3. In your repository go to **Settings****Secrets and variables****Actions**.
58+
4. Add a repository secret named `COPILOT_GITHUB_TOKEN` and paste the PAT.
59+
5. Recompile and commit:
60+
61+
```bash
62+
gh aw compile
63+
git add .
64+
git commit -m "chore: configure personal billing path" && git push
65+
```
66+
67+
For a browser-only walkthrough, see [Method 2 (UI-only): COPILOT_GITHUB_TOKEN](side-quest-06-03c-copilot-github-token-ui-only.md). For terminal setup, see [Method 2: COPILOT_GITHUB_TOKEN secret](side-quest-06-03b-copilot-github-token.md).
68+
69+
## Confirm engine
70+
71+
Open `daily-report-status.md` and verify there is no `engine:` line. The workflow defaults to GitHub Copilot — no Anthropic or OpenAI key is needed for this first run.
72+
73+
To switch engines later, see:
74+
- [Side Quest: Configure an Anthropic API Key](side-quest-11-06-anthropic-key.md)
75+
- [Side Quest: Configure an OpenAI API Key](side-quest-11-07-openai-key.md)
76+
77+
## :white_check_mark: Checkpoint
78+
79+
- [ ] I chose a billing path and completed all configuration steps
80+
- [ ] `daily-report-status.md` reflects the chosen method
81+
- [ ] `daily-report-status.lock.yml` is recompiled and committed to `main`
82+
- [ ] I am ready to return to [Confirm Model Access](07d-confirm-model-access.md)
83+
84+
**Return to:** [Confirm Model Access](07d-confirm-model-access.md)

0 commit comments

Comments
 (0)