Skip to content

feat(compat): report Semgrep import migration readiness #581

Description

@Darkroom4364

Problem

An adopter importing a Semgrep rule pack has no deterministic inventory of which source rules Foxguard can preserve, which it can load only with a known reduction, and which it safely skips. Existing parity work measures selected behavior but does not provide a migration decision report for an arbitrary imported pack.

Scope

Run an imported Semgrep pack through the production compatibility loader and emit a versioned human-readable and JSON readiness report. Emit one record per source rule with source ID, language, disposition (exact, degraded, or skipped), and a stable reason code. exact means the importer recorded no unsupported construct or semantic reduction; it is not a claim of empirical finding parity.

Non-goals

Do not add unsupported operators merely to improve the report, rerun Semgrep, or replace the existing parity suites.

Acceptance criteria

  • Every source rule, including invalid or unsupported input, receives exactly one disposition rather than disappearing silently.
  • exact, degraded, and skipped have documented, testable definitions; degraded/skipped entries carry stable machine-readable reason codes.
  • The JSON schema is versioned and the terminal summary aggregates totals by language and reason.
  • Fixtures containing one rule of each disposition verify the report is derived from the production importer and remains deterministic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrule-compatibilitySemgrep/OpenGrep compatibility and rule loadingtestTest coverage, fixtures, and validation harnesses

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions