Skip to content

afx consistency check: reconcile registry vs git worktrees vs live processes (the independent observation that catches both under- and over-reporting) #1714

Description

@amrmelsayed

Why

Three independently-reported defect instances this week share one species: a tool rendering unknown or partial state as a determinate result.

Because the errors have opposite signs, no consumer can fix this by calibrating how much it trusts the registry: trusting it less worsens the over-report case, trusting it more worsens the under-report case. Only an independent observation of the substrate resolves the family.

Ask

An afx doctor-style (or codev doctor section, whichever home fits) consistency check that reconciles three independent sources and reports every disagreement:

  1. Registry (global.db: builders, architects, terminal_sessions),
  2. Git substrate (git worktree list + .builders/ directory entries + local/remote builder branches),
  3. Live processes (pid liveness with start-time guard against reuse; optionally shellper socket reachability).

Output: one row per disagreement with a classification and the remedy, e.g.

Read-only by default; remedies offered as printed commands or an explicit --fix for the provably-safe subset only (row-level corrections, never git worktree remove).

Non-goal

This complements, not replaces, the per-command fixes in #1712/#1713: those make the writers honest; this makes drift detectable regardless of which writer lied.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/towerArea: Tower server / agent farm CLI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions