Skip to content

Commit 3b332fd

Browse files
committed
chore(deadcode): remove stale copilot doctor probes
1 parent 7dd01d1 commit 3b332fd

7 files changed

Lines changed: 8 additions & 580 deletions

File tree

‎docs/concepts/agent-runtimes.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ canonical subscription `github-copilot` provider and is **never** selected by
230230
The harness claims its provider, runtime, CLI session key, and auth profile
231231
prefix in `extensions/copilot/doctor-contract-api.ts`, which
232232
`openclaw doctor` auto-loads. For configuration, auth, transcript mirroring,
233-
compaction, the doctor probe surface, and the broader PI vs Codex vs Copilot
234-
SDK decision, see [GitHub Copilot agent runtime](/plugins/copilot).
233+
compaction, the declarative doctor contract, and the broader PI vs Codex vs
234+
Copilot SDK decision, see [GitHub Copilot agent runtime](/plugins/copilot).
235235

236236
## Compatibility contract
237237

‎docs/plugins/copilot.md‎

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,12 @@ For the broader model/provider/runtime split, start with
3333
- A GitHub Copilot subscription that can drive the Copilot CLI (or a
3434
`gitHubToken` env / auth-profile entry for headless / cron runs).
3535
- A writable `copilotHome` directory. The harness defaults to
36-
`~/.openclaw/agents/<agentId>/copilot` for full per-agent isolation. The
37-
platform default (`%APPDATA%\copilot` on Windows, `$XDG_CONFIG_HOME/copilot`
38-
or `~/.config/copilot` elsewhere) is used as the doctor probe fallback when
39-
no explicit home is set.
36+
`<agentDir>/copilot` when OpenClaw provides an agent directory, otherwise
37+
`~/.openclaw/agents/<agentId>/copilot` for full per-agent isolation.
4038

4139
`openclaw doctor` runs the plugin
42-
[doctor contract](#doctor-and-probes) for the extension; failures there are
43-
the canonical way to confirm the environment is ready before opting an agent
44-
in.
40+
[doctor contract](#doctor) for declarative session-state ownership and future
41+
compatibility migrations. It does not run Copilot CLI environment probes.
4542

4643
## Plugin install
4744

@@ -153,10 +150,6 @@ the same directory), or `~/.openclaw/agents/<agentId>/copilot` otherwise.
153150
Override with `copilotHome: <path>` on the attempt input when you need a
154151
custom location (for example, a shared mount for migration).
155152

156-
`probeCopilotAuthShape` (see [Doctor and probes](#doctor-and-probes)) is the
157-
pure shape check that validates which of the modes above will be used.
158-
It does not perform a live SDK handshake.
159-
160153
## Configuration surface
161154

162155
The harness reads its config from per-attempt input
@@ -239,7 +232,7 @@ asserted in
239232
[`extensions/copilot/harness.test.ts`](https://github.com/openclaw/openclaw/blob/main/extensions/copilot/harness.test.ts)
240233
under `describe("runSideQuestion")`.
241234

242-
## Doctor and probes
235+
## Doctor
243236

244237
`extensions/copilot/doctor-contract-api.ts` is auto-loaded by
245238
`src/plugins/doctor-contract-registry.ts`. It contributes:
@@ -251,18 +244,6 @@ under `describe("runSideQuestion")`.
251244
runtime `copilot`; CLI session key `copilot`; auth profile
252245
prefix `github-copilot:`.
253246

254-
`extensions/copilot/src/doctor-probes.ts` exports three imperative probes
255-
that hosts (including `openclaw doctor`) can call to verify the environment:
256-
257-
| Probe | What it checks | Reasons it can fail |
258-
| -------------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
259-
| `probeCopilotCliVersion` | `copilot --version` exits 0 with a non-empty version string | `non-zero-exit`, `empty-version`, `spawn-failed`, `spawn-error`, `probe-timeout` |
260-
| `probeCopilotHomeWritable` | `mkdir -p copilotHome` + write + rm a marker file | `copilothome-not-writable` (with the underlying fs error in `details.rawError`) |
261-
| `probeCopilotAuthShape` | At least one of `useLoggedInUser`, `gitHubToken`, or `profileId`+`profileVersion` | `no-auth-source` |
262-
263-
Each probe accepts a DI seam (`spawnFn`, `fsApi`) so tests do not spawn the
264-
real Copilot CLI or touch the host fs.
265-
266247
## Limitations
267248

268249
- The harness only claims the canonical `github-copilot` provider at MVP.

‎extensions/copilot/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on a model or provider entry; `auto` never picks it. PI remains the default
1616
embedded runtime.
1717

1818
See [GitHub Copilot agent runtime](../../docs/plugins/copilot.md) for
19-
configuration, doctor probes, transcript mirroring, compaction, side
19+
configuration, the doctor contract, transcript mirroring, compaction, side
2020
questions, replay, and the supported-surface contract.
2121
See [qa/copilot-capabilities.md](../../qa/copilot-capabilities.md)
2222
for the SDK capability inventory the harness is pinned to.

‎extensions/copilot/doctor-contract-api.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@
1111
* fields exist for copilot yet; the array is empty by design
1212
* and normalizeCompatibilityConfig is a structural no-op so
1313
* future retirements have a stable in-tree home.
14-
*
15-
* The deeper runtime probes (copilot CLI version, copilot auth,
16-
* copilotHome writability) live in {@link ./src/doctor-probes.ts}
17-
* because they have side effects (subprocess spawn, fs touch) and
18-
* need to be invoked imperatively, not declaratively, from the
19-
* doctor command. They are exported separately so callers can opt
20-
* in. Auto-discovery of doctor-contract-api.ts at the plugin root
21-
* keeps this file purely declarative.
2214
*/
2315

2416
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";

‎extensions/copilot/src/doctor-probes.test.ts‎

Lines changed: 0 additions & 284 deletions
This file was deleted.

0 commit comments

Comments
 (0)