Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .agents/skills/docs-changelog/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Use this skill when code changes may affect user-visible documentation, examples
- user-facing behavior changes without matching docs updates;
- public APIs change without docstring or reference-doc updates;
- a significant user-facing change is missing a `CHANGELOG.md` entry under `## [Unreleased]`;
- a new or modified changelog entry is missing its change-type emoji, bold scope, summary, author attribution, or PR URL;
- examples or README usage snippets no longer match the actual API.

## Docstrings
Expand All @@ -35,6 +36,18 @@ Use this skill when code changes may affect user-visible documentation, examples

- Significant user-facing changes should update `CHANGELOG.md` under `## [Unreleased]`.
- Use the existing Keep a Changelog section headings already present in the repo: `Added`, `Removed`, `Changed`, `Deprecated`, `Fixed`.
- Release-preparation PRs may move entries into a versioned section; regular PRs use `Unreleased`.
- Check the entry format, not only its presence. Changelog format is a release requirement, not a style nit to skip because linters run.
- Require a change-type emoji (for example, `🐞` for a bug fix), bold scope, user-facing summary, author attribution, and the actual PR URL:

```markdown
- 🐞 **data**: Describe the user-facing fix by @github-user in https://github.com/open-edge-platform/anomalib/pull/1234
```

- Verify attribution and PR references against PR metadata; do not invent them. Grouped entries may credit multiple authors and PRs.
- The example uses placeholders; replace `@github-user` and PR number `1234` with the actual metadata.
- Keep neighboring bullets contiguous without an extra blank line. Review added or modified entries without demanding unrelated historical rewrites.
- Flag missing fields with a corrected example even when the implementation and tests are correct. PR title emoji rules are separate from changelog entry rules.
- Purely internal changes may not need a changelog entry, but reviewers should call out missing entries for behavior, API, docs, or user workflow changes.

## Repo-grounded review anchors
Expand All @@ -56,4 +69,5 @@ Use this skill when code changes may affect user-visible documentation, examples
- Check docstrings for public APIs.
- Check README, docs, and examples for user-facing changes.
- Check `CHANGELOG.md` for significant changes.
- Check new or modified entries for the correct heading, emoji, bold scope, summary, author attribution, and PR URL.
- Check that docs match the current API and workflow.
2 changes: 1 addition & 1 deletion .github/actions/docker-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
type: all

- name: Set up Docker engine
uses: docker/setup-docker-action@2bf61fb9464cc67f0cbdeabed6aa0380accd1c70 # v5.5.0
uses: docker/setup-docker-action@7ec28a010822b4626af4874f9448a4b05ac6f3e5 # v5.6.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/pytest/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ runs:
steps:
# Set up Python with pip caching
- name: Set up Python environment
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: ${{ inputs.python-version }}
cache: ${{ inputs.enable-cache == 'true' && 'pip' || '' }}
cache-dependency-path: ${{ inputs.enable-cache == 'true' && 'pyproject.toml' || '' }}

- name: Set up uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3

# Install FFmpeg system libraries required by torchcodec at import time.
# The cpu/cuda torchcodec wheels dynamically link libavutil/libavcodec from
Expand Down Expand Up @@ -225,7 +225,7 @@ runs:

- name: Upload test results
if: always() && steps.test-execution.outcome == 'failure'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: pytest-results-${{ inputs.test-type }}
path: pytest_output.log
Expand Down
17 changes: 17 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ For `application/`, note that Anomalib Studio has some separate tooling and conf

Prioritize **correctness and architectural fit** over style. Do not comment on formatting or import ordering unless they create a functional problem. Ruff, pydocstyle, and pre-commit handle style enforcement automatically.

Exception: changelog structure and entry format are release requirements. Review them explicitly; linters do not verify scope, attribution, or PR references.

For detailed topic-specific policy, consult the `.agents/skills/` files referenced in each section below.

### Review Tone
Expand Down Expand Up @@ -117,8 +119,23 @@ For detailed topic-specific policy, consult the `.agents/skills/` files referenc
- Has a docstring with a vague or inaccurate summary line.
- Leaves arguments, returns, or intentionally raised exceptions undocumented.
- Makes a significant user-facing change without a `CHANGELOG.md` entry under `## [Unreleased]`.
- Adds or edits a changelog entry without the required format below; checking only that an entry exists is insufficient.
- Updates APIs, CLI behavior, or config structure without updating the nearest documentation surface (README, `docs/source/markdown/`, model README, examples).

**Changelog format:**

- Place regular PR entries under `## [Unreleased]` and the appropriate existing heading: `Added`, `Removed`, `Changed`, `Deprecated`, or `Fixed`. Release-preparation PRs may move entries into a versioned section.
- Require a change-type emoji (for example, `🐞` for a bug fix), bold scope, user-facing summary, author attribution, and the actual PR URL:

```markdown
- 🐞 **data**: Describe the user-facing fix by @github-user in https://github.com/open-edge-platform/anomalib/pull/1234
```

- Verify author and PR reference against PR metadata; do not invent them. Grouped entries may credit multiple authors and PRs.
- The example uses placeholders; replace `@github-user` and PR number `1234` with the actual metadata.
- Review added or modified entries, not unrelated historical formatting. Keep neighboring bullets contiguous without an extra blank line.
- Flag missing fields with a concrete corrected entry even when code and tests are otherwise correct. Optional emojis in PR titles do not make changelog emojis optional.

**Docstring structure (required order):**

1. Short description
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_reusable-artifact-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ jobs:
artifact-name: ${{ steps.set-artifact-name.outputs.name }}
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: ${{ inputs.python-version }}
# Cache poisoning mitigation: fork PRs blocked, same-repo PRs allowed; event+branch isolation
Expand All @@ -114,7 +114,7 @@ jobs:
- name: Set artifact name
id: set-artifact-name
run: echo "name=dist-$(date +%s)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: ${{ steps.set-artifact-name.outputs.name }}
path: dist/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_reusable-code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
contents: read # Required to checkout the repository
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -75,4 +75,4 @@ jobs:
fetch-depth: 0
lfs: true
persist-credentials: false
- uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0
- uses: j178/prek-action@44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d # v3.1.0
10 changes: 5 additions & 5 deletions .github/workflows/_reusable-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
contents: read
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -69,7 +69,7 @@ jobs:

# Install the latest Docker, since the version available by default on the runners may be outdated
- name: Set up Docker
uses: docker/setup-docker-action@2bf61fb9464cc67f0cbdeabed6aa0380accd1c70 # v5.5.0
uses: docker/setup-docker-action@7ec28a010822b4626af4874f9448a4b05ac6f3e5 # v5.6.0

- name: Set up Docker Compose
uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a # v2.4.0
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:

- name: Upload image sizes
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: image-sizes-${{ matrix.device }}
path: application/docker/image-sizes/${{ matrix.device }}.md
Expand All @@ -190,12 +190,12 @@ jobs:
continue-on-error: true
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

- name: Download all image size artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: image-sizes-*
merge-multiple: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_reusable-pr-title-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
contents: read # Required to checkout the repository
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -71,7 +71,7 @@ jobs:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: ${{ inputs.python-version }}
cache: pip
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/_reusable-security-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
security-events: write # needed by nested workflows to upload results
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -112,7 +112,7 @@ jobs:
security-events: write # needed by nested workflows to upload results
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -136,7 +136,7 @@ jobs:
security-events: write # needed by nested workflows to upload results
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -163,7 +163,7 @@ jobs:
security-events: write # needed by nested workflows to upload results
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -189,7 +189,7 @@ jobs:
ai-device: [xpu]
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
artifact_name: zapfull

- name: Run Schemathesis Scan
uses: schemathesis/action@806cace2053cbbac93188e1281ff7da415643160 # v3
uses: schemathesis/action@b0cacf86f25caaa79ac110cc2077afd70fdd67ff # v3
continue-on-error: true
with:
schema: "http://localhost:8000/api/openapi.json"
Expand All @@ -271,7 +271,7 @@ jobs:
--report-junit-path schemathesis-report/junit.xml

- name: Upload Schemathesis report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
name: schemathesis-report-${{ matrix.ai-device }}
Expand Down Expand Up @@ -304,7 +304,7 @@ jobs:
fi

- name: Upload container logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
if: always()
with:
name: container-logs
Expand All @@ -328,7 +328,7 @@ jobs:
ai-device: [cpu, cuda, xpu]
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -355,7 +355,7 @@ jobs:
has_findings: ${{ steps.check-results.outputs.has_findings }}
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_reusable-test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
steps:
- name: Harden the runner (audit all outbound calls)
if: "!contains(inputs.runner, 'self-hosted')"
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_reusable-version-bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
version-changed: ${{ steps.bump.outputs.version_changed }}
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand All @@ -117,7 +117,7 @@ jobs:
persist-credentials: true

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: ${{ inputs.python-version }}
cache: pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_reusable-version-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
is_prerelease: ${{ steps.check-prerelease.outputs.is_prerelease }}
steps:
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit

Expand Down
Loading
Loading