Skip to content

Commit c2c5f45

Browse files
A.R.claude
andcommitted
docs(smoke): codex-cli loopback template + capability evidence index
Adds two evidence-tracking documents under docs/smoke-evidence/. Both are templates / tracking sheets — neither claims any smoke run has actually passed. Operators fill them in as smoke gets executed. - 2026-04-28-codex-cli-toml-loopback-template.md (163 lines): Codex-CLI-specific TOML bearer-env-headers smoke template. Mirrors the exact shape buildTomlMcpBlock emits for Codex CLI (HTTP transport with bearer_token_env_var = PERPLEXITY_MCP_BEARER and the [mcp_servers.<name>.env_http_headers] sub-table). Has separate sign-off sections for Linux / macOS 14+ / Windows 11; each contains 7 functional checks plus a bearer-rotation check. Every checkbox starts unchecked; every <name>/<date>/<port> is a placeholder. - INDEX.md (126 lines): tracking sheet listing every IDE in IDE_METADATA × httpBearerLoopback claim × current evidence state. Today: 11 IDEs claim httpBearerLoopback: true but all are "Backed N" because the existing 2026-04-24 evidence doc tested "an" IDE on Win11 only (extrapolation). Pending matrix is ~9 cells, ~3-7h operator time. Methodology note codifies the "Backed Y" requirements: named IDE + signed OS section + all transport boxes checked. Both files live under docs/ which is gitignored (.gitignore:66) and were force-added (git add -f) per the post-public-repo workflow that keeps .gitignore unchanged but allows narrow per-file inclusion. The audit found that codexCli's existing evidence reference points at the 2026-04-24 doc which only shows JSON headers.Authorization shape and pre-dates commit 895b04d that introduced the TOML bearer_token_env_var indirection. A follow-up (NOT in this commit) should update packages/shared/src/constants.ts to point codexCli.capabilities.evidence.httpBearerLoopback at the new template doc, or downgrade the claim to false until the new template is signed off. Validation: - npm run typecheck / build / test:coverage: all green at commit 0a003f3 (the prior commit on this branch); these new files add no source / test surface. NO smoke claimed as passed. NO source files modified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0a003f3 commit c2c5f45

2 files changed

Lines changed: 289 additions & 0 deletions

File tree

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Codex CLI TOML bearer-env http-loopback — smoke evidence (TEMPLATE)
2+
3+
> Status: **TEMPLATE — UNFILLED.** No checkbox below has been verified. Operator
4+
> must edit this file in-place when actually running the smoke. Do NOT cite this
5+
> file as evidence until at least one OS section is signed off.
6+
7+
## Why this addendum exists
8+
9+
The 2026-04-24 evidence doc (`2026-04-24-http-loopback-static-bearer.md`)
10+
records the JSON-shaped `headers.Authorization: "Bearer <token>"` http-loopback
11+
shape used by Cursor, Claude Desktop, Claude Code, Cline, Windsurf, Windsurf
12+
Next, Amp, Roo Code, Continue.dev, and Zed. It does **not** cover Codex CLI:
13+
14+
- Codex CLI consumes `~/.codex/config.toml`, not `mcp.json`.
15+
- Codex CLI does not accept a literal bearer in `[mcp_servers.<name>]`. Bearer
16+
must be referenced indirectly via `bearer_token_env_var` and the actual value
17+
set in `[mcp_servers.<name>.env_http_headers]`.
18+
- The shape was added in commit `895b04d` (2026-04-26),
19+
*after* the 2026-04-24 doc was written — so referencing the older doc as
20+
evidence for `codexCli.httpBearerLoopback` is structurally wrong.
21+
22+
This template captures the per-OS smoke needed to back the Codex CLI claim.
23+
24+
## Front-matter
25+
26+
- **Date:** 2026-04-XX (operator fills)
27+
- **Operator:** <name>
28+
- **Platform:** <Linux distro / macOS version / Windows version>
29+
- **Codex CLI version:** <version, e.g. output of `codex --version`>
30+
- **Extension version:** <e.g. perplexity-vscode-0.8.10.vsix>
31+
- **Daemon port:** <port from `~/.perplexity-mcp/daemon.lock`>
32+
33+
## Setup performed
34+
35+
1. Install the VSIX from a clean profile (or note the prior state).
36+
2. Open VS Code with the extension installed at the version above.
37+
3. Open the dashboard, enable the daemon, note the port and the active bearer.
38+
4. From the command palette, run **"Perplexity: Configure for All"** (or the
39+
per-IDE action for `codexCli` from the IDEs tab with transport
40+
`http-loopback`).
41+
5. Verify it writes `~/.codex/config.toml` (Windows: `%USERPROFILE%/.codex/config.toml`)
42+
with the HTTP-transport TOML shape shown below.
43+
6. Restart Codex CLI; verify `Perplexity` appears in its MCP server list with
44+
`enabled = true` and reports as authenticated (no `Auth: Unsupported` for
45+
the loopback bearer path — that warning is a known cosmetic display for the
46+
stdio launcher and is documented in `linux/perplexity-codex-mcp-setup-issue.md`).
47+
7. List MCP tools — confirm `perplexity_search`, `perplexity_doctor`,
48+
`perplexity_models`, `perplexity_research`, `perplexity_compute` appear.
49+
50+
## Expected TOML on disk
51+
52+
The auto-config writer (`buildTomlMcpBlock` in
53+
`packages/extension/src/auto-config/index.ts`) emits the following exact shape
54+
when given an `http-loopback` server config (an object with a `url` key and
55+
`headers.Authorization = "Bearer <token>"`). The env var name is derived as
56+
`<SERVERNAME>_MCP_BEARER` with non-alphanumerics collapsed to `_`. For server
57+
name `Perplexity` this yields `PERPLEXITY_MCP_BEARER`.
58+
59+
```toml
60+
[mcp_servers.Perplexity]
61+
url = "http://127.0.0.1:<daemon-port>/mcp"
62+
bearer_token_env_var = "PERPLEXITY_MCP_BEARER"
63+
enabled = true
64+
65+
[mcp_servers.Perplexity.env_http_headers]
66+
PERPLEXITY_MCP_BEARER = "<daemon-static-bearer>"
67+
```
68+
69+
Notes:
70+
- No `command`/`args` keys appear when `url` is set — that branch is exclusive.
71+
- No `[mcp_servers.Perplexity.env]` block is written for the loopback transport.
72+
(`env` is reserved for the stdio-launcher transport, where things like
73+
`PERPLEXITY_HEADLESS_ONLY` belong.)
74+
- The bearer is a literal value in `env_http_headers`. Codex CLI reads it at
75+
spawn time; rotating the bearer requires the file to be re-written and Codex
76+
to re-spawn the MCP child (see "Bearer rotation check" below).
77+
78+
Operator: paste the actual TOML written on disk here for the run, and confirm
79+
it matches the shape above.
80+
81+
```toml
82+
<paste actual ~/.codex/config.toml [mcp_servers.Perplexity] block here>
83+
```
84+
85+
## Smoke checks — Linux (Ubuntu 22.04 / Fedora 40 / Arch — pick one)
86+
87+
Distro tested: <fill>
88+
89+
- [ ] `~/.codex/config.toml` contains the exact `[mcp_servers.Perplexity]` shape above
90+
- [ ] Codex CLI lists Perplexity MCP server as `enabled`
91+
- [ ] `perplexity_doctor` returns OK; `vault` check `pass`
92+
- [ ] `perplexity_search` returns results with citations
93+
- [ ] `perplexity_models` returns the right tier (Pro/Max)
94+
- [ ] `perplexity_research` with a simple prompt returns a research result
95+
- [ ] `perplexity_compute` with a file-producing prompt; verify file appears in `~/.perplexity-mcp/downloads/<slug>/`
96+
97+
### Bearer rotation check (Linux)
98+
99+
- [ ] After running the extension command "Rotate bearer", confirm the
100+
`env_http_headers` block in `~/.codex/config.toml` updates AND Codex CLI's
101+
next call still authenticates without manual restart of Codex itself
102+
(or, document the restart requirement here if one is needed).
103+
104+
### Sign-off (Linux)
105+
106+
- [ ] All boxes above are checked (no extrapolation)
107+
- Operator signature: <name> <date>
108+
109+
## Smoke checks — macOS 14+
110+
111+
- [ ] `~/.codex/config.toml` contains the exact `[mcp_servers.Perplexity]` shape above
112+
- [ ] Codex CLI lists Perplexity MCP server as `enabled`
113+
- [ ] `perplexity_doctor` returns OK; `vault` check `pass`
114+
- [ ] `perplexity_search` returns results with citations
115+
- [ ] `perplexity_models` returns the right tier (Pro/Max)
116+
- [ ] `perplexity_research` with a simple prompt returns a research result
117+
- [ ] `perplexity_compute` with a file-producing prompt; verify file appears in `~/.perplexity-mcp/downloads/<slug>/`
118+
119+
### Bearer rotation check (macOS)
120+
121+
- [ ] After "Rotate bearer", `env_http_headers` updates AND Codex's next call still authenticates
122+
123+
### Sign-off (macOS)
124+
125+
- [ ] All boxes above are checked (no extrapolation)
126+
- Operator signature: <name> <date>
127+
128+
## Smoke checks — Windows 11
129+
130+
- [ ] `%USERPROFILE%/.codex/config.toml` contains the exact `[mcp_servers.Perplexity]` shape above
131+
- [ ] Codex CLI lists Perplexity MCP server as `enabled`
132+
- [ ] `perplexity_doctor` returns OK; `vault` check `pass`
133+
- [ ] `perplexity_search` returns results with citations
134+
- [ ] `perplexity_models` returns the right tier (Pro/Max)
135+
- [ ] `perplexity_research` with a simple prompt returns a research result
136+
- [ ] `perplexity_compute` with a file-producing prompt; verify file appears in `%USERPROFILE%/.perplexity-mcp/downloads/<slug>/`
137+
138+
### Bearer rotation check (Windows)
139+
140+
- [ ] After "Rotate bearer", `env_http_headers` updates AND Codex's next call still authenticates
141+
142+
### Sign-off (Windows)
143+
144+
- [ ] All boxes above are checked (no extrapolation)
145+
- Operator signature: <name> <date>
146+
147+
## What was NOT tested by this addendum
148+
149+
- The stdio-launcher transport for Codex CLI (the `command`/`args` shape with
150+
`[mcp_servers.Perplexity.env]`) — that is the Linux setup-issue subject of
151+
`linux/perplexity-codex-mcp-setup-issue.md` and needs its own evidence doc
152+
if/when the headless-vault path is signed off.
153+
- `httpOAuthLoopback` for Codex CLI — not yet wired in `IDE_METADATA`.
154+
- `httpOAuthTunnel` for Codex CLI — not yet wired in `IDE_METADATA`.
155+
156+
## Replay (operator quick-reference)
157+
158+
1. Install the VSIX.
159+
2. Dashboard → enable daemon → note port.
160+
3. IDEs tab → Codex CLI → transport `http-loopback` → Generate.
161+
4. Inspect `~/.codex/config.toml` → confirm shape matches "Expected TOML on disk".
162+
5. Restart Codex CLI → list MCP tools → run smoke checks above.
163+
6. Rotate bearer from the dashboard → confirm config updates → re-run a tool call.

docs/smoke-evidence/INDEX.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Smoke-evidence index
2+
3+
## Purpose
4+
5+
This index tracks which (IDE × transport × OS) combinations have *signed*
6+
smoke evidence under `docs/smoke-evidence/`. An entry is "Backed Y" only when
7+
an evidence file (a) explicitly names the IDE, (b) has its OS section signed
8+
off, and (c) has every checkbox for the relevant transport checked. Empty
9+
entries, generic templates, and extrapolations from a single-IDE, single-OS
10+
run do **not** count. If a row is "Backed N", the corresponding capability
11+
claim in `packages/shared/src/constants.ts` is currently asserted without
12+
matching primary evidence — the parent should treat this as a gap to close
13+
before the public-repo cut, not as a green-light to ship.
14+
15+
## Capability claims with evidence (current state, 2026-04-28)
16+
17+
Source of claims: `packages/shared/src/constants.ts` (`IDE_METADATA`).
18+
Evidence files cited in that file: `2026-04-24-http-loopback-static-bearer.md`
19+
(JSON shape, Win11 only) and the new
20+
`2026-04-28-codex-cli-toml-loopback-template.md` (Codex TOML shape, all OSes
21+
unfilled).
22+
23+
| IDE | configFormat | httpBearerLoopback claim | Evidence file currently referenced | Backed Y/N | OS coverage (signed) |
24+
|---|---|---|---|---|---|
25+
| cursor | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only, and the Win11 doc does not name this IDE specifically |
26+
| windsurf | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
27+
| windsurfNext | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
28+
| claudeDesktop | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
29+
| claudeCode | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
30+
| cline | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
31+
| amp | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
32+
| rooCode | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
33+
| codexCli | toml | true | 2026-04-24-http-loopback-static-bearer.md (WRONG SHAPE — that doc only shows JSON `headers.Authorization`) | N (wrong-shape reference) | None — the TOML `bearer_token_env_var` indirection is not covered by the cited doc |
34+
| continueDev | yaml | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated; YAML config shape not shown in the doc either) | Win11 only; IDE not named |
35+
| zed | json | true | 2026-04-24-http-loopback-static-bearer.md | N (extrapolated) | Win11 only; IDE not named |
36+
| copilot | ui-only | false | n/a | Y (claim is `false`, no evidence required) | n/a |
37+
| geminiCli | json | false | n/a | Y (claim is `false`, no evidence required) | n/a |
38+
| aider | yaml | false | n/a | Y (claim is `false`, no evidence required) | n/a |
39+
| augment | json | false | n/a | Y (claim is `false`, no evidence required) | n/a |
40+
41+
`httpOAuthLoopback` and `httpOAuthTunnel` are `false` for every IDE in
42+
`IDE_METADATA` and therefore require no evidence today. If either is flipped
43+
to `true` for any IDE, a new dated evidence doc must be added and a new row
44+
appended to this index.
45+
46+
## Pending evidence work
47+
48+
Estimates from the prior audit: ~15 minutes per IDE-specific shape verification
49+
(when batched into a single VS Code session and a single Codex/Cursor/etc.
50+
restart), ~30 minutes per OS for a full sweep across all bearer-loopback IDEs
51+
(setup, install, run, sign off).
52+
53+
### Codex CLI TOML bearer-env (new shape, dedicated template)
54+
55+
Template doc: `docs/smoke-evidence/2026-04-28-codex-cli-toml-loopback-template.md`
56+
57+
- [ ] codexCli × Linux — ~15 min, fills the Linux section
58+
- [ ] codexCli × macOS 14+ — ~15 min, fills the macOS section
59+
- [ ] codexCli × Windows 11 — ~15 min, fills the Windows section
60+
61+
### JSON `headers.Authorization` bearer-loopback (existing shape)
62+
63+
Existing doc: `docs/smoke-evidence/2026-04-24-http-loopback-static-bearer.md`
64+
(currently Win11 only, no per-IDE naming). To convert "extrapolated" to
65+
"Backed Y", either (a) extend that doc with explicit per-IDE sub-sections and
66+
sign-offs per OS, or (b) create one new dated doc per OS that enumerates each
67+
IDE name with a checkbox and sign-off line.
68+
69+
Per-OS sweeps (each ~30 min if batched, covers 9 IDEs: cursor, windsurf,
70+
windsurfNext, claudeDesktop, claudeCode, cline, amp, rooCode, zed):
71+
72+
- [ ] JSON sweep × Linux
73+
- [ ] JSON sweep × macOS 14+
74+
- [ ] JSON sweep × Windows 11 (the existing 2026-04-24 doc partially covers this but does not enumerate per-IDE sign-offs)
75+
76+
### YAML bearer-loopback (Continue.dev — separate shape)
77+
78+
The 2026-04-24 doc does not show the YAML shape. Continue.dev consumes a
79+
different config format and needs its own dedicated evidence doc per OS.
80+
81+
- [ ] continueDev × Linux — ~15 min (new doc required first)
82+
- [ ] continueDev × macOS 14+ — ~15 min
83+
- [ ] continueDev × Windows 11 — ~15 min
84+
85+
### Existing template files awaiting fill
86+
87+
These pre-existing files in `docs/smoke-evidence/` are unfilled v0.8.6
88+
release-smoke templates. They are not transport-specific; they are
89+
release-gate checklists. Filling them is part of the release process
90+
(`docs/release-process.md`), not part of the per-IDE evidence backfill above:
91+
92+
- `2026-04-XX-v0.8.6-win11.md`
93+
- `2026-04-XX-v0.8.6-macos14.md`
94+
- `2026-04-XX-v0.8.6-ubuntu22.md`
95+
96+
### Total operator time to fully back the matrix
97+
98+
Lower bound assuming all batched: ~3 hours (3 OSes × 1 hour: one Codex run +
99+
one JSON sweep + one Continue.dev run per OS, with some setup overlap).
100+
Upper bound, treating each cell as independent: 9 IDE-specific runs ×
101+
3 OSes × 15 min = ~7 hours.
102+
103+
## Methodology note
104+
105+
A capability claim is "Backed Y" in this index only when **all three** are true:
106+
107+
1. An evidence doc exists at the path referenced from `IDE_METADATA`.
108+
2. That doc explicitly names the IDE (so a reader can verify the claim
109+
without inference). A doc that says "every JSON IDE" is generic; it does
110+
not back any specific IDE row.
111+
3. The OS section relevant to the operator's platform is fully checked and
112+
signed off (operator name + date). An empty checkbox or a placeholder
113+
`<name>` does not count.
114+
115+
Generic claims, extrapolations, and template-only files do **not** count as
116+
backing. Treat them as "we believe this works, but we have not actually
117+
verified it for this combination."
118+
119+
## Maintenance
120+
121+
When you add a new evidence doc or sign off on a section:
122+
123+
1. Update the row in the table above (Backed Y, list the OS).
124+
2. Move the corresponding line out of "Pending evidence work".
125+
3. If you flip a capability from `false` to `true` in
126+
`packages/shared/src/constants.ts`, add the row here in the same commit.

0 commit comments

Comments
 (0)