Skip to content

doctor detects stale installs and runtime mismatches #110

@Ram9199

Description

@Ram9199

Source: founder dogfood UX report. Guiding principle: a permission tool must clearly identify which copy of itself is guarding the user.

Problem

agent-sudo doctor (agent_sudo/doctor.py::run_doctor) ran six green OK checks while a stale v0.5.5 snapshot was guarding the user. It never noticed the running code was behind the source, nor that the running install differed from the configured workspace/source. doctor is the first thing a confused user runs; it stayed silent on the one thing that mattered.

Proposed

Add DoctorChecks that WARN on:

  1. Stale snapshot — running version < newest install detected by inventory.
  2. Editable source drift — running as editable, but the imported package path doesn't match the configured/expected source.
  3. Runtime != expected source — the configured workspace / client config points at a different install than the one actually running.

Each WARN names the running copy and the expected one, and points to agent-sudo inventory for the full picture.

Reuses

  • Self-identity primitive (running version + install type + source path).
  • agent_sudo/inventory.py::build_inventory classification (STALE / VERSION DRIFT) — call it, don't reimplement.
  • agent_sudo/context.py for configured workspace/source.

Acceptance

  • New non-required WARN checks (never break doctor_exit_code for normal dev setups, but surface clearly).
  • Tests for stale, drift, and mismatch scenarios.
  • Docs updated.

Effort: M · Risk: Low–Medium.

Metadata

Metadata

Assignees

No one assigned

    Labels

    developer-experienceContributor and developer experiencedogfoodFounder dogfood UX feedbackenhancementNew feature or requestself-identityMake the running install identify itself

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions