Repository navigation
Conversation
There was a problem hiding this comment.
Caution
A flag shared by two extensions can expose a credential marked secret in the agent report. The CLI must reject ambiguous flag declarations before it collects evidence.
Approach: Declaring Evidence Sources on extensions and collecting them in the shared Doctor Run is the right split, but the CLI needs one owner per flag and must preserve the original argument values.
Reviewed changes across the extension API, CLI, Doctor Run, and report outputs.
- Extension API and CLI: Reviewed source declarations, config-based discovery, dynamic flag parsing, and source input construction.
- Doctor Run: Reviewed registration, validation and collection order, Runtime Evidence, and evidence gaps.
- Reports and docs: Reviewed JSON source summaries, agent rerun arguments, redaction, and the extension guide and tests.
pnpm build passed. The focused suites passed 204 tests, including all 9 new tests. The one failure in tests/core/origin-reports.test.ts also reproduced on the base commit.
gpt-6.2-sol(high) | 𝕏
e98dd64 to
9f9c226
Compare
An Evidence Source reads Runtime Evidence from outside the source tree only when the run gets an input for it. It declares its CLI flags as data, so the CLI reads --<source>-<option> after --config loads and still rejects flags no source declares. Reports list what each source read and repeat its flags in the rerun command with secrets redacted.
9f9c226 to
d4d1728
Compare
commit: |
There was a problem hiding this comment.
Important
A Doctor Run with --config now invokes configured extension loaders twice, even when no Evidence Source flags are passed.
Reviewed changes in 60022d3 since d4d1728.
- Isolated source flags from CAC parsing, rejected declaration collisions, and preserved dash-prefixed values in rerun arguments.
- Moved source validation ahead of Runtime Evidence contributors and awaited asynchronous validators before collection.
pnpm build and all 250 focused tests passed. A separate built CLI check reproduced the loader regression.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
✅ No new issues found; no P0 or P1 findings remain.
Reviewed changes in 09ab59d since the prior review at 60022d3.
- Reused resolved extensions for flag discovery and execution, so configured loaders run once per Doctor Run.
- Kept watch reruns fresh by using the prepared invocation for the first run and reloading configuration on subsequent runs.
- Added regression coverage for configured loaders with and without Evidence Source flags.
pnpm build passed, and all 409 focused tests passed. I also verified with the built CLI that each loader runs once and that --watch picks up a config edit on the next run.
gpt-6.2-sol(high) | 𝕏

Step 2 of the evidence sources design. It's stacked on #444.
A Doctor Extension can now declare
sources. An Evidence Source reads Runtime Evidence from outside the source tree, such as what a deployed server answers. Doctor reads a source only when the run passes it an input. With no input,collectnever runs and no request goes out.--<source>-<option>. The options are data on the extension, notsetupregistrations, so Doctor knows the flags without running extension code. The run command parses in two phases. cac now allows unknown options. After--configloads, Doctor matches the remaining flags against every loaded source and rejects the rest with cac's ownUnknown option `--x`message. It also enforcesrequires, single values, and missing values.DoctorRunOptions.sourcesholds inputs keyed by source name and stays out of config files. Doctor runs everyvalidatebefore it collects any source, so a bad input fails before a request. Evidence is stored underproject.runtimeEvidence[name]. Gaps getsource: nameand make the reportincomplete.fetchcomes from the run (DoctorRunOptions.fetch).runtimeEvidence[name].result.evidenceSourceslists name, label, targets, and the rerun args. The JSON report addssources. The agent rerun commands repeat the source flags, withsecretvalues shown as<redacted>.9.extending.md, and the Evidence Source term inCONTEXT.md.MCP still uses its own
--mcp-*path in this PR. The next PR moves it onto this API and removes the MCP-specific code from core.Tests
tests/core/evidence-sources.test.ts, with a fixture source, covers:sources--configextension, including repeatable flagsThe CLI, agent rerun, extension catalog, Doctor process, MCP, and origin suites pass locally (212 tests).
tsc --noEmitreports no errors insrc/ortests/. I didn't run the fullpnpm readylocally because the shared build queue was backed up, so CI'srelease:checkis the full run.🤖 Generated with Claude Code