Skip to content

codev doctor/update: warn on PR-producing protocol overrides missing a 'pr' gate (post-#927 silent-breakage guardrail) #943

Closed

Description

@waleedkadous

Problem

#927 made Needs Attention surface PRs via the universal pr gate: a PR-producing protocol whose PR-creating phase lacks a pr gate no longer surfaces its PRs (by design — the universal contract). But an adopter with a customized local protocol override (tier-2 codev/protocols/<name>/protocol.json) that lacks a pr gate will silently lose PR surfacing on update — with no warning. codev update deliberately preserves user-modified files (update.ts keeps customizations as local overrides), so it neither fixes nor flags the override.

This is not hypothetical: an adopter's gateless bugfix override caused all its bugfixes to vanish from Needs Attention after the #927 behavior shipped. The breakage was silent.

Desired behavior

A check in codev doctor (and surfaced at the end of codev update) that:

  • resolves each PR-producing protocol through the 4-tier resolver (local overrides included),
  • flags any whose PR-creating phase lacks a pr gate, and
  • warns loudly with the fix, e.g.:

    ⚠ Protocol bugfix (local override at codev/protocols/bugfix/protocol.json) has no pr gate on its PR-creating phase. Its PRs will not surface in Needs Attention (Codev ≥ 3.1.5). Add "gate": "pr" to that phase, or remove the override to use the stock pr-gated protocol.

This enforces #927's universal contract at doctor/update time — turning a silent breakage into an actionable migration prompt.

Design notes (prescribed — no architectural decision needed)

  • PR-producing protocol = one whose phase graph includes a PR-creating phase (heuristic: a phase with a create_pr step, or a phase carrying a pr gate in the stock skeleton). Bundled set: bugfix, air, spir, aspir, pir. (experiment/maintain are not PR-producing — skip them.)
  • Inspect the resolved protocol (tier 1/2 override wins), not just the skeleton.
  • codev doctor: emit as a non-fatal warning (exit code unchanged). codev update: print the same warning after the update summary.
  • Do not auto-modify the user's override (consistent with update's preserve-customizations behavior) — warn + instruct only.
  • One warning per offending protocol; clean (no output) when all PR-producing protocols are correctly gated.

Out of scope

Activity

  1. added 2 commits that reference this issue on May 30, 2026
  2. added a commit that references this issue on May 30, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions