Skip to content

ci(dylint): run resolving custom lints on ordinary PRs #363

Closed

Description

@zackees

Context

kernal-api has two custom Dylints: kernal_api_boundary (the facade/backend API rule) and kernal_api_platform_boundary (host-platform source rule). .github/workflows/ci.yml's dylints job already does substantial resolving work in full mode: Linux and macOS host passes plus both Windows targets from Linux. That is the right coverage shape for the full gate.

The ordinary PR path is different. ci/ci_mode.py selects minimal for an unlabeled PR, while the dylints job runs only when needs.linux.outputs.mode == 'full'. Minimal mode runs the platform-boundary lint's source-scan unit test, but not the workspace Dylint passes or the facade-boundary lint. A backend type leak or platform-selected finding can therefore pass the ordinary PR gate and appear only when a ci-full label/manual full run is used. The documented local Dylint command in AGENTS.md is explicit rather than part of an ordinary local lint entry point.

Soldr PR #3392's cross-target Clippy does not run these custom Dylints; forge-ci/soldr#3422 tracks that separate upstream lint behavior.

Proposal

Make a real workspace Dylint pass for both lint libraries part of normal PR validation. Retain the proven Linux/macOS and Windows-target coverage of full mode, and choose a routine PR shape that proves each supported OS selection before merge. The existing source scanner can remain as an early, cheap guard, but it does not replace the resolving facade/target Dylint passes. Provide a clear local command covering the same checks or document the minimal local prerequisite set.

Acceptance criteria

  • RED: add focused violations for (a) kernal_api_boundary and (b) each Linux-, Windows-, and macOS-selected branch of the platform/facade policy; demonstrate the current unlabeled PR path passes where the full Dylint matrix fails.
  • GREEN: an unlabeled ordinary PR runs real workspace Dylint for both libraries and each supported OS selection, with a nonzero required aggregate if any selected pass fails or is skipped.
  • Keep the current full-mode target coverage and its feature/--all-targets breadth; tests assert the mode wiring and target list so an ordinary PR cannot silently regress to source-scan-only coverage.
  • Document and verify the local invocation using the pinned 6.0.3/nightly-2026-05-28 stack; a representative custom-lint violation exits nonzero.

Decisions

  • P2: The gap lets a policy violation reach the full or release gate, while the existing full mode offers a known validation route.
  • Repo ownership: kernal-api owns the PR gate and local command. Soldr #3422 is related but cannot make skipped CI jobs run.

Related issues

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