Skip to content

docs(conventions): harden detector-findings with the rule-id to severity crosswalk #2681

Description

@kyle-sexton

Phase 4 of the boris-routines-adoption plan. Depends on #2680; blocks the first new detector.

Written from what the pilot observed. Must land before the second detector adopts the convention.

What this closes

Acceptance criterion 2 of the plan's Brief: "Every detector emits machine-computed severity, not prose routed through an LLM crosswalk. No crosswalk row exists for a deterministic surface today; that is contract work."

The trap: plugins/review/context/severity.md:7 defines tiers by tests, not examples — "The test decides the tier". CRITICAL is "you can name a concrete input, caller, or subsequent otherwise-correct change that the defect makes produce a wrong result". A bare threshold cannot evaluate that predicate, so a threshold-to-tier table without the test is nominal closure, not real.

Work items

  • Rule-id to severity-tier crosswalk, with the test each mapping asserts. A rule whose tier cannot be argued from the test is not admitted.
  • Rule/threshold vocabulary: every finding names the rule id and the threshold that fired, so severity is auditable without re-reading the code.
  • Bind suppression to docs/conventions/finding-suppression/ — including its derived finding_id — rather than inventing a second suppression surface.
  • Cite REVIEW.md as the consumer-precedence override over severity.md:3; the plugin file is the fallback baseline.
  • Record the gating consequence: a finding is auto-appliable only when single-file, high-confidence, and not architectural-judgment-shaped (fix-pass-mode.md:58). Layering and abstraction detectors are therefore designed to inform a human, not to feed an autonomous apply loop — the contract's intent, not a limitation to engineer around.
  • Decide the shared-emitter question. Emitting a conforming file requires resolving memory_dir with its fallback ladder, computing <branch-slug>, running the self-ignore guard, relativizing paths, escaping cells, and formatting a colon-free UTC timestamp. feat(mutation-testing): persist survivors as a conforming findings file behind a flag #2680 is the second implementation; the detector phase would be the third. Either declare a shared-source cluster in scripts/cross-plugin-source-registry.txt (drift-checked by scripts/check-cross-plugin-source-drift.sh, registered at PLUGIN-PHILOSOPHY.md:479), or record why three implementations are accepted and how drift is caught.

Sanity checks

  • grep -c "finding-suppression" docs/conventions/detector-findings/README.md >= 1 and grep -c "REVIEW.md" .../README.md >= 1.
  • No crosswalk row has an empty test cell — awk -F'|' '/^\| rule-/ { gsub(/ /,"",$4); if ($4=="") exit 1 }' docs/conventions/detector-findings/README.md exits 0, and the count of ^| rule- rows equals the rule count. (A bare grep -c "^| .* | .* |" also matches header and separator rows, so it can never equal the rule count.)
  • scripts/check-cross-plugin-source-drift.sh exits 0, whichever branch of the shared-emitter decision was taken.

Related

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

    needs-triageNot yet classified. Floor until a type and one priority tier are set.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: structuralRefactors, migrations, contract changes; cross-cutting and hard to reverse.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions