Skip to content

Doctor v2: surface inventory, injectable probes, JSON contract, verdict-matrix fixtures - #529

Draft
aarontrowbridge wants to merge 3 commits into
mainfrom
525-doctor-v2
Draft

Doctor v2: surface inventory, injectable probes, JSON contract, verdict-matrix fixtures#529
aarontrowbridge wants to merge 3 commits into
mainfrom
525-doctor-v2

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Closes #525.

The fleet-dev-tools keystone (spec-20260823-094507, D1): six surface records with four-verdict staleness logic — every judgment by version string or content digest, never mtime. Injectable roots + running-binary stub make the 25-test verdict matrix fully hermetic (fake binaries, pinned dates, real git fixtures with local remotes). The committed JSON Schema (minItems 6) + canonical round-trip is the machine contract the panel (#527) and watchdog consume. Doctor v1's studio-binding checks untouched; the report gains a surfaces section.

Typecheck clean; the amico-run suite is 1146 passed with 2 failures proven pre-existing at base e308a45 (both read real machine state — verified in a detached base worktree; details in the notes). Zero new dependencies.

Part of #524.

…ll tracer (#525)

surfaces.ts: server-binary, extension, vendored-binary, staged-skills,
agent-cards-global, agent-cards-staging probes over an injectable
SurfaceContext. Verdicts by version string or content digest only — never
mtime; version-sorted 'newest' selection; probes degrade individually.
Hermetic current-world fixture: fake binaries print pinned far-future build
dates, git fixtures carry pinned commit dates, remotes are local bare repos.
…ells (#525)

server-binary's three stale mechanisms as separate fixtures (version-stale,
running≠frozen, server-down); per-surface stale cells; tampered-sidecar
integrity-failure; unknown ×6 (dead-remote stubs, missing-local-source);
degradation proof — every source dead still yields six records.
…ing (#525)

- schemas/doctor-report.schema.json: the committed machine contract
  (surfaces minItems 6; required surface/version/verdict/evidence), itself
  in canonical form; doctor_schema.ts validates against it (zero new deps,
  the vault-card minimal-engine pattern).
- doctor.ts: doctorReport(argv) parses --json + the seven injectable
  flags; composes v1's binding diagnosis with the surface inventory; v1's
  rendered/exit contract preserved verbatim (report GAINS a surfaces
  section; --json emits canonical JSON, surfaces only).
- amico.ts: the doctor case passes argv and prints json when present.
- Fixture world extracted to test/helpers.ts (shared by the unit + CLI
  suites); platform dir derived from the live platform (runner-portable);
  hermetic discoverRunning default (a forgotten stub reads server-down,
  never the real machine's process).
- CLI end-to-end: amico doctor --json through the built bundle emits the
  canonical contract; human output keeps the v1 table + surfaces section.
- test/fixtures/surfaces/README.md: the authorship-split record
  (implementer cells here; reviewer adversarial variants listed).
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a86e186a-1029-424a-b851-80a4ecd046ba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doctor v2: surface inventory, injectable probes, JSON contract, verdict-matrix fixtures

1 participant