diff --git a/.dokimi/scan.toml b/.dokimi/scan.toml new file mode 100644 index 0000000..498e148 --- /dev/null +++ b/.dokimi/scan.toml @@ -0,0 +1,31 @@ +# Names the AGENTS.md files use that live outside this repository. dokimi's repo scan +# lists each one it cannot find as unresolved_ignored, with the reason, and never fails on it. +[[ignore]] +kind = "identifier" +pattern = "mkl_umath" +reason = "sibling package, IntelPython/mkl_umath" + +[[ignore]] +kind = "identifier" +pattern = "mkl_random" +reason = "sibling package, IntelPython/mkl_random" + +[[ignore]] +kind = "identifier" +pattern = "PyBUF_*" +reason = "CPython buffer request flags" + +[[ignore]] +kind = "identifier" +pattern = "PyArray_Resize" +reason = "NumPy C API" + +[[ignore]] +kind = "identifier" +pattern = "array_tobytes" +reason = "NumPy internal C function, named from an ASan report" + +[[ignore]] +kind = "identifier" +pattern = "ImportError" +reason = "Python builtin exception" diff --git a/.github/AGENTS.md b/.github/AGENTS.md index a621290..44b75d8 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -5,7 +5,7 @@ CI/CD workflows, automation, security scanning, and package distribution. ## Workflows The conda workflows build and test the Python versions in the `python:` list of their recipe's `conda_build_config.yaml`; `intel-ci.yml` takes its wheels' versions from the Python classifiers in `pyproject.toml`, and the other build/test workflows list theirs in the workflow file. -- **conda-package-cf.yml** — build/test using only conda-forge channel (Linux/Windows/macOS), set up like `conda-forge/mkl-service-feedstock`: Windows uses `windows-2022` (Visual Studio 2022) +- **conda-package-cf.yml** — build/test using only conda-forge channel (Linux/Windows/macOS), set up like [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock): Windows uses `windows-2022` (Visual Studio 2022) - **build-with-clang.yml** — Linux Clang compiler compatibility validation - **build-with-standard-clang.yml** — standard Clang compiler compatibility validation - **build_pip.yml** — validates editable build @@ -13,6 +13,7 @@ The conda workflows build and test the Python versions in the `python:` list of - **openssf-scorecard.yml** — security posture scanning - **intel-ci.yml** — Intel CI: builds and tests the conda packages of `conda-recipe` and the wheels, for the platforms and Python versions the recipe and `pyproject.toml` declare (`ci/matrix.py`); see `ci/README.md` - **coverity.yml** — weekly Coverity Scan static analysis of the C/Cython extensions (scan.coverity.com) +- **agent-guidance.yml** — checks the commands and paths named in every `AGENTS.md` against the tree with the reusable workflow of dokimi (manifest `dokimi/repo.yaml`), with no model and no secrets; `repo validate` fails the job only on a broken manifest, and the `repo scan` report goes to the job summary without failing it; names from outside this repository that the scan cannot find are declared, each with its reason, in `.dokimi/scan.toml` at the repository root ## Actions - **actions/conda-python-matrix/** — composite action that reads the `python:` list of a recipe's `conda_build_config.yaml` and outputs the build/test matrix. `action.yml` and `conda_python_matrix.py` (standard library only) refer to nothing outside the directory, so it can move unchanged to a shared repository together with `conda-build-test.yml`. The `variants` job references it as `./.github/actions/conda-python-matrix`, which resolves against the caller's checkout; after the move that line must become `$/.github/actions/conda-python-matrix`, which resolves against the repository of the workflow file itself. It is not `$/` already because actionlint 1.7.12, used by pre-commit, rejects that syntax (rhysd/actionlint#711). Run it locally with `python .github/actions/conda-python-matrix/conda_python_matrix.py conda-recipe/conda_build_config.yaml` @@ -28,13 +29,13 @@ The conda workflows build and test the Python versions in the `python:` list of - Artifact naming: `$PACKAGE_NAME $OS Python $VERSION`, where `$VERSION` is `python_tag`: the Python version, with a `t` suffix for free-threaded builds (`3.12`, `3.14`, `3.14t`) - Channels: `conda-forge` - Build jobs run `conda build --no-test`; test jobs run `conda build --test` on the built package on a fresh runner, so CI runs the test section of the recipe, as the feedstock does -- `conda-package-cf.yml` and `conda-recipe/` follow `conda-forge/mkl-service-feedstock`. The feedstock's pins are kept only in `conda-recipe/conda_build_config.yaml` (compiler versions, `mkl_devel`, and Python versions in its `python:` list): when the feedstock is re-rendered with new pins, update them there, and don't restate the numbers in the `AGENTS.md` files +- `conda-package-cf.yml` and `conda-recipe/` follow [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock). The feedstock's pins are kept only in `conda-recipe/conda_build_config.yaml` (compiler versions, `mkl_devel`, and Python versions in its `python:` list): when the feedstock is re-rendered with new pins, update them there, and don't restate the numbers in the `AGENTS.md` files ## Security - OpenSSF Scorecard runs automatically - Coverity Scan runs weekly via `coverity.yml` (project `IntelPython/mkl-service` on scan.coverity.com; needs the `COVERITY_SCAN_TOKEN`/`COVERITY_SCAN_EMAIL` secrets) - CODEOWNERS enforces review policy -- Dependabot monitors dependencies (`.github/dependabot.yml`) +- Dependabot monitors dependencies (`.github/dependabot.yml`). It skips dokimi: bump the `uses:` SHA in `workflows/agent-guidance.yml` by hand ## Platform specifics - **Linux:** RTLD_GLOBAL handling for MKL library loading @@ -42,4 +43,4 @@ The conda workflows build and test the Python versions in the `python:` list of ## Notes - Workflow/job renames are breaking for downstream tooling -- Conda jobs do not cache the conda package directory: the channel downloads were faster than restoring the ~1 GB `actions/cache` entries, which were also evicted before the next run +- Conda jobs do not cache the conda package directory: the channel downloads were faster than restoring the ~1 GB [actions/cache](https://github.com/actions/cache) entries, which were also evicted before the next run diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b404563..5211f0e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,6 +12,10 @@ updates: groups: github-actions: patterns: ["*"] + # dokimi is pinned to a main commit, not a release; the pin is bumped by hand in + # agent-guidance.yml (a reusable workflow is named by its path) + ignore: + - dependency-name: "intel/dokimi/*" - package-ecosystem: "pre-commit" directory: "/" diff --git a/.github/dokimi/repo.yaml b/.github/dokimi/repo.yaml new file mode 100644 index 0000000..b787102 --- /dev/null +++ b/.github/dokimi/repo.yaml @@ -0,0 +1,7 @@ +# Agent guidance files that dokimi (https://github.com/intel/dokimi) checks in CI, +# see .github/workflows/agent-guidance.yml. +schema: repo_manifest.v1 +id: mkl-service +source: {url: https://github.com/IntelPython/mkl-service} +guidance: + globs: ["**/AGENTS.md"] diff --git a/.github/workflows/agent-guidance.yml b/.github/workflows/agent-guidance.yml new file mode 100644 index 0000000..68ff3d8 --- /dev/null +++ b/.github/workflows/agent-guidance.yml @@ -0,0 +1,31 @@ +name: Check agent guidance (dokimi) + +# Checks the commands, paths and targets named in every AGENTS.md against the tree, with +# no model and no secrets. `repo validate` fails the job on a broken manifest; the `repo scan` +# report goes to the job summary and does not fail it. + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + +jobs: + dokimi: + name: dokimi + + permissions: + contents: read # needed to clone the repo + + # The only dokimi pin: with no `dokimi-ref`, the workflow installs the dokimi of its own + # commit. Bump it by hand (Dependabot skips dokimi) + uses: intel/dokimi/.github/workflows/repo-eval.yml@599fcadcd31b0088dfb4dd079ca66cde523fa697 # main, 2026-12-03 + with: + manifest: .github/dokimi/repo.yaml diff --git a/AGENTS.md b/AGENTS.md index 53eeb3d..230a637 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,7 @@ python -m pip install --no-deps --no-build-isolation . - **Python 3.14 ABI selection:** conda jobs must request an explicit ABI, `3.14.* *_cp314` (GIL) or `3.14.* *_cp314t` (free-threaded). Once the recipes stopped constraining `python-gil`, a bare `--python 3.14` was observed to resolve to the free-threaded build, so it must not be relied on. - **Python 3.15 ABI selection:** same as 3.14; conda jobs request `3.15.* *_cp315` (GIL) or `3.15.* *_cp315t` (free-threaded) explicitly. - **Workflows:** `.github/workflows/` - - `conda-package-cf.yml` — conda build/test using only conda-forge channel, set up like `conda-forge/mkl-service-feedstock` + - `conda-package-cf.yml` — conda build/test using only conda-forge channel, set up like [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock) - `intel-ci.yml` — Intel CI: builds and tests the conda packages and the wheels; see `ci/README.md` - `build-with-clang.yml` — Linux Clang compatibility - `build-with-standard-clang.yml` — standard Clang compiler compatibility validation @@ -61,6 +61,7 @@ python -m pip install --no-deps --no-build-isolation . - `pre-commit.yml` — code quality checks - `openssf-scorecard.yml` — security scanning - `coverity.yml` — weekly Coverity Scan static analysis + - `agent-guidance.yml` — checks the claims of every `AGENTS.md` against the tree with dokimi (manifest `.github/dokimi/repo.yaml`); the `repo scan` report goes to the job summary and does not fail the job ## Distribution - **Conda:** `conda-forge` and `https://software.repos.intel.com/python/conda` diff --git a/conda-recipe/AGENTS.md b/conda-recipe/AGENTS.md index 82ada56..1239c87 100644 --- a/conda-recipe/AGENTS.md +++ b/conda-recipe/AGENTS.md @@ -1,6 +1,6 @@ # AGENTS.md — conda-recipe/ -The conda recipe, built against `conda-forge` only and set up like `conda-forge/mkl-service-feedstock`. +The conda recipe, built against `conda-forge` only and set up like [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock). ## Files - **meta.yaml** — package metadata, dependencies, build requirements