Skip to content

Commit a6f4d4b

Browse files
committed
docs(copilot): correct CLI syntax and project paths in openspec
Cleanup pass over the openspec change docs that Copilot flagged in review (items 6, 7, 8, 9): - proposal.md, design.md, tasks.md: replace the non-existent '--type github-copilot' flag with the actual positional CLI syntax, 'netclaw provider add <name> github-copilot --auth oauth-device'. ProviderCommand only parses positional <name> <type> args. - tasks.md: redirect every 'src/Netclaw.Providers.Tests/...' reference to 'src/Netclaw.Daemon.Tests/Providers/GitHubCopilot/...' (the Providers.Tests project doesn't exist; the GitHubCopilot tests live under Daemon.Tests). - tasks.md §8: drop the imagined 'netclaw provider probe' subcommand (not implemented in ProviderCommand) and replace 'run-tapes.sh init-wizard ...' with the actual harness entry point './scripts/smoke/run-smoke.sh light'. Reword §8.7 to describe what the add flow actually does (it exercises the probe path internally). Also corrects 'Netclaw.sln' to 'Netclaw.slnx'. - spec.md: ProviderEntry does not carry a name field — it's the dictionary key in the Providers config. Reword the auth-expired scenario to clarify that the name surfacing happens at the caller layer (probe / chat-completion path), not inside CopilotAuthExpiredException. - design.md: rewrite the 'probe' mitigation paragraph to point at the real seam (ProviderDescriptorRegistry.ProbeAsync invoked by the TUI/CLI add flow), since there's no standalone probe subcommand.
1 parent 26afe7e commit a6f4d4b

4 files changed

Lines changed: 26 additions & 18 deletions

File tree

openspec/changes/add-github-copilot-provider/design.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,19 @@ what RFC 8628 §3.4 expects.
162162

163163
- **[Akt-sh as reference implementation]** Akt-sh is a working third-party
164164
app, not an official GitHub integration. Wire protocol details could
165-
change without notice. → **Mitigation:** the probe path exercises both
166-
token exchange and model listing on every `netclaw provider probe` call,
167-
so silent drift surfaces quickly. Failure messages include the offending
168-
endpoint URL so debugging is direct.
165+
change without notice. → **Mitigation:** the probe path
166+
(`ProviderDescriptorRegistry.ProbeAsync`, invoked by the TUI/CLI add
167+
flow) exercises both token exchange and model listing on every probe,
168+
so silent drift surfaces quickly. Failure messages include the
169+
offending endpoint URL so debugging is direct.
169170

170171
## Migration Plan
171172

172173
No data migration required. New provider; no existing configs reference it.
173174
Operators who want to switch to Copilot run `netclaw provider add <name>
174-
--type github-copilot`, which triggers the device flow and persists the
175-
GitHub OAuth token alongside other secrets. Rollback: `netclaw provider
176-
remove <name>` clears the entry.
175+
github-copilot --auth oauth-device`, which triggers the device flow and
176+
persists the GitHub OAuth token alongside other secrets. Rollback:
177+
`netclaw provider remove <name>` clears the entry.
177178

178179
## Open Questions
179180

openspec/changes/add-github-copilot-provider/proposal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ None.
8686
persistence.
8787
- **System skills:** `feeds/skills/.system/files/netclaw-operations/SKILL.md`
8888
should mention the `github-copilot` provider type and the
89-
`netclaw provider add ... --type github-copilot` flow (per the System
89+
`netclaw provider add <name> github-copilot --auth oauth-device` flow (per the System
9090
Skills Sync Rule in CLAUDE.md).
9191
- **Security & operational impact:** the GitHub OAuth token is stored
9292
plaintext in the existing secrets store, same posture as other API keys.

openspec/changes/add-github-copilot-provider/specs/netclaw-model-providers/spec.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ credential on the operator's behalf.
110110
- **WHEN** the system attempts to exchange the OAuth token at
111111
`/copilot_internal/v2/token`
112112
- **AND** the endpoint returns `401 Unauthorized`
113-
- **THEN** the system SHALL raise an authentication-expired error
114-
identifying the provider entry by name
113+
- **THEN** the system SHALL raise an authentication-expired error.
114+
Higher-level callers (the probe path, the chat-completion path) SHALL
115+
include the operator-chosen provider entry name when surfacing the
116+
failure to the operator — the name is held by the caller (it is the
117+
dictionary key in the `Providers` config), not by the
118+
`CopilotAuthExpiredException` itself
115119
- **AND** the remediation message SHALL direct the operator to remove
116120
the entry (`netclaw provider remove <name>`) and re-run the device
117121
flow (`netclaw provider add <name> github-copilot --auth oauth-device`)

openspec/changes/add-github-copilot-provider/tasks.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
any other non-2xx throws an `InvalidOperationException` with the
2727
endpoint URL and status code in the message
2828
- [ ] 2.4 Unit tests in
29-
`src/Netclaw.Providers.Tests/GitHubCopilot/CopilotTokenExchangerTests.cs`:
29+
`src/Netclaw.Daemon.Tests/Providers/GitHubCopilot/CopilotTokenExchangerTests.cs`:
3030
cache hit (no HTTP), cache miss, 2-minute refresh buffer (FakeTimeProvider),
3131
401 → `CopilotAuthExpiredException`, non-401 error → `InvalidOperationException`
3232

@@ -60,7 +60,7 @@
6060
`o3-mini`) using `ModelModality.Text` defaults until Copilot exposes
6161
modality metadata
6262
- [ ] 4.4 Unit tests in
63-
`src/Netclaw.Providers.Tests/GitHubCopilot/GitHubCopilotDescriptorTests.cs`:
63+
`src/Netclaw.Daemon.Tests/Providers/GitHubCopilot/GitHubCopilotDescriptorTests.cs`:
6464
probe success parses + filters, probe falls back on HTTP failure, probe
6565
surfaces auth-expired clearly on 401 from token exchange
6666

@@ -93,21 +93,24 @@
9393
- [ ] 7.1 Edit
9494
`feeds/skills/.system/files/netclaw-operations/SKILL.md` — add the
9595
`github-copilot` provider type to the listing and document the
96-
`netclaw provider add ... --type github-copilot` flow
96+
`netclaw provider add <name> github-copilot --auth oauth-device` flow
9797
- [ ] 7.2 Bump `metadata.version` in the skill's YAML frontmatter (do NOT
9898
run `generate-skill-manifest.sh` locally — CI handles publishing per
9999
CLAUDE.md)
100100

101101
## 8. Quality gates and verification
102102

103-
- [ ] 8.1 `dotnet build Netclaw.sln` clean
104-
- [ ] 8.2 `dotnet test src/Netclaw.Providers.Tests/Netclaw.Providers.Tests.csproj --filter "FullyQualifiedName~GitHubCopilot"` passes
103+
- [ ] 8.1 `dotnet build Netclaw.slnx` clean
104+
- [ ] 8.2 `dotnet test src/Netclaw.Daemon.Tests/Netclaw.Daemon.Tests.csproj --filter "FullyQualifiedName~GitHubCopilot"` passes
105105
- [ ] 8.3 `dotnet test src/Netclaw.Configuration.Tests/Netclaw.Configuration.Tests.csproj --filter "FullyQualifiedName~OAuthDeviceFlow"` passes
106106
- [ ] 8.4 `dotnet slopwatch analyze` — no new violations
107107
- [ ] 8.5 `./scripts/Add-FileHeaders.ps1 -Verify` — all new `.cs` files
108108
carry the Petabridge copyright header
109-
- [ ] 8.6 `./scripts/smoke/run-tapes.sh init-wizard --no-up --keep-stack`
109+
- [ ] 8.6 `./scripts/smoke/run-smoke.sh light`
110110
TUI provider picker shows "GitHub Copilot" without breaking existing tapes
111111
- [ ] 8.7 Manual end-to-end smoke against a real Copilot subscription:
112-
`netclaw provider add copilot-personal --type github-copilot`,
113-
`netclaw provider probe copilot-personal`, and a one-shot chat
112+
`netclaw provider add copilot-personal github-copilot --auth oauth-device`
113+
then re-run the same `provider add` command to confirm the cached
114+
Copilot API token round-trips, plus a one-shot chat through the new
115+
provider entry. (No `netclaw provider probe` subcommand exists today;
116+
the add flow exercises the probe path internally.)

0 commit comments

Comments
 (0)