Skip to content

check: scope to changed files (--files / --base diff) #1

Description

@Connorrmcd6

Why

surf check currently evaluates every anchor in every hub. The --base flag only feeds the advisory old_code/magnitude enrichment (surf-cli/src/check.rs) — it does not limit what's checked. On large repos / big PRs that's wasteful, and the proposal explicitly notes scoping is "what a base ref buys you" (§9.1).

What

Two scoping modes for check:

  • --files <glob/paths> — only evaluate claims whose anchored file(s) match.
  • --base <ref> diff scoping — only evaluate claims whose anchored files changed vs the merge base (shallow fetch, not fetch-depth: 0).

Acceptance

  • surf check --base origin/main evaluates only claims touching files changed since the merge base.
  • surf check --files "surf-core/**" evaluates only matching claims.
  • Full check remains the default with no flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxDeveloper experience / CLI ergonomicsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions