Skip to content

checkpoint-removed guard silently disabled when no base registry is available #4

Description

@lyubomir-bozhinov

Severity: Medium (the guard protecting the registry is conditional)

Problem

The checkpoint-removed semantic guard — which detects a commit that removes a checkpoint from the registry — only works under two conditions (detect, SemanticKind::CheckpointRemoved):

  1. base_checkpoint_names is Some(...) — if the caller cannot/does not supply the base registry (no base ref, shallow clone, first commit), it returns vec![] and the guard is silently off.
  2. A changed file path ends with checkpoints.yaml — removal achieved by other means (changing which registry file is included, or editing the global baseline outside the repo) is not detected.

Why it matters

This is the gate that protects the gate. A silent no-op when the base is unavailable means an author (or an automated flow without a base ref) can strip checkpoints undetected — the highest-leverage bypass, since removing a checkpoint disables all its future firing.

Proposed fix

When the base registry cannot be resolved, fail loud (surface a warning / distinct exit signal) rather than silently disabling the guard; broaden detection to any registry mutation path, not just files literally ending in checkpoints.yaml.

Acceptance criteria

  • Inability to resolve the base registry is surfaced, not silently treated as "nothing removed".
  • Removing a checkpoint is detected across the supported registry-inclusion mechanisms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions