From a4703f5b893987fbf3736767d4f501e5c6ea8ab7 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 29 Oct 2026 12:08:15 -0600 Subject: [PATCH 1/2] docs: add AI policy; update setup-python, codeql actions Add AI policy. The summary is that contributions which include a significant amount of code written or generated by AI should include an attribution in a code comment and in the git commit message/PR body. Also include some recent updates to python related github actions. Signed-off-by: Rich Megginson --- .coderabbit.yaml | 14 ++++++++++++++ .github/pull_request_template.md | 2 ++ .github/workflows/actions.lock | 22 +++++++++++----------- .github/workflows/ansible-lint.yml | 2 +- .github/workflows/ansible-test.yml | 2 +- .github/workflows/codeql.yml | 6 +++--- .github/workflows/python-unit-test.yml | 2 +- contributing.md | 20 ++++++++++++++++++++ 8 files changed, 53 insertions(+), 17 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index b41be0c7..1450c684 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -98,6 +98,20 @@ reviews: Assisted-by: Fish 4.3 using model Swim 6.2 ``` + - mode: "warning" + name: "AI Agent Attribution + instructions: | + If the added code was substantially generated by AI, the generated code should contain a + comment in-line or at the top of the file after the SPDX line (if any). The attribution + comment should look like this: + ``` + # Assisted by using model(s) [, ] + ``` + The git commit message/PR body should also contain an attribution line like the following: + ``` + Assisted-by: using model(s) [, ] + ``` + path_instructions: # ======================================== # Ansible Tasks - Core role logic diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index dabc3e7f..946daffd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,4 +4,6 @@ Reason: Result: +Assisted-by: + Issue Tracker Tickets (Jira or BZ if any): diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index dad12685..5c3ad593 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -5,14 +5,14 @@ version: 'v0.0.3' workflows: '.github/workflows/ansible-lint.yml': - 'actions/checkout@v7.0.1' - - 'actions/setup-python@v7.0.0' + - 'actions/setup-python@v7.1.0' - 'linux-system-roles/.github@main' '.github/workflows/ansible-managed-var-comment.yml': - 'actions/checkout@v7.0.1' - 'linux-system-roles/.github@main' '.github/workflows/ansible-test.yml': - 'actions/checkout@v7.0.1' - - 'actions/setup-python@v7.0.0' + - 'actions/setup-python@v7.1.0' - 'linux-system-roles/.github@main' '.github/workflows/build_docs.yml': - 'actions/checkout@v7.0.1' @@ -26,7 +26,7 @@ workflows: '.github/workflows/citest.yml': [] '.github/workflows/codeql.yml': - 'actions/checkout@v7.0.1' - - 'github/codeql-action@v4.39.0' + - 'github/codeql-action@v4.39.1' - 'linux-system-roles/.github@main' '.github/workflows/codespell.yml': - 'actions/checkout@v7.0.1' @@ -42,7 +42,7 @@ workflows: - 'actions/checkout@v7.0.1' '.github/workflows/python-unit-test.yml': - 'actions/checkout@v7.0.1' - - 'actions/setup-python@v7.0.0' + - 'actions/setup-python@v7.1.0' - 'codecov/codecov-action@v7.1.1' - 'linux-system-roles/.github@main' '.github/workflows/qemu-kvm-integration-tests.yml': @@ -77,9 +77,9 @@ dependencies: commit: 'sha1-ed597411d8f924073f98dfc5c65a23a2325f34cd' owner_id: 44036562 repo_id: 205262760 - 'actions/setup-python@v7.0.0': - ref: 'v7.0.0' - commit: 'sha1-5fda3b95a4ea91299a34e894583c3862153e4b97' + 'actions/setup-python@v7.1.0': + ref: 'v7.1.0' + commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0' owner_id: 44036562 repo_id: 192625525 'actions/upload-artifact@v7.0.2': @@ -99,14 +99,14 @@ dependencies: commit: 'sha1-e3258cca84ce02b0bb36a3d41f2c18f719a0cc1a' owner_id: 39140587 repo_id: 263411323 - 'github/codeql-action@v4.39.0': - ref: 'v4.39.0' - commit: 'sha1-6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee' + 'github/codeql-action@v4.39.1': + ref: 'v4.39.1' + commit: 'sha1-9b3254085494b55a0f7c4c2b3d2d52cc712ce370' owner_id: 9919 repo_id: 259445878 'linux-system-roles/.github@main': ref: 'main' - commit: 'sha1-391ce4abac68b563afd81c3c0fb889df826cc6e6' + commit: 'sha1-038468a64a784796a0202d5c9c714f27ec2cc2c4' owner_id: 28014670 repo_id: 320092621 'sclorg/testing-farm-as-github-action@v4.3.1': diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index ceccc674..59ab3819 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -71,7 +71,7 @@ jobs: pip3 install "git+https://github.com/linux-system-roles/tox-lsr@bfd11b23a1ed56388ea7ab8263d30e3172553a7c" - name: Set up Python - uses: actions/setup-python@v7.0.0 + uses: actions/setup-python@v7.1.0 with: python-version: ${{ matrix.versions.python }} diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index f6c99069..1bb62467 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -74,7 +74,7 @@ jobs: pip3 install "git+https://github.com/linux-system-roles/tox-lsr@bfd11b23a1ed56388ea7ab8263d30e3172553a7c" - name: Set up Python - uses: actions/setup-python@v7.0.0 + uses: actions/setup-python@v7.1.0 with: python-version: ${{ matrix.versions.python }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ee97dca2..63366548 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -67,16 +67,16 @@ jobs: ref: ${{ steps.head_sha_context.outputs.head_sha || github.sha }} - name: Initialize CodeQL - uses: github/codeql-action/init@v4.39.0 + uses: github/codeql-action/init@v4.39.1 with: languages: ${{ matrix.language }} queries: +security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@v4.39.0 + uses: github/codeql-action/autobuild@v4.39.1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4.39.0 + uses: github/codeql-action/analyze@v4.39.1 with: category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/python-unit-test.yml b/.github/workflows/python-unit-test.yml index 416e7b62..93dd9bd1 100644 --- a/.github/workflows/python-unit-test.yml +++ b/.github/workflows/python-unit-test.yml @@ -77,7 +77,7 @@ jobs: - name: Set up Python 3 if: ${{ matrix.pyver_os.ver != '2.7' }} - uses: actions/setup-python@v7.0.0 + uses: actions/setup-python@v7.1.0 with: python-version: ${{ matrix.pyver_os.ver }} diff --git a/contributing.md b/contributing.md index 43435599..d4144887 100644 --- a/contributing.md +++ b/contributing.md @@ -81,6 +81,26 @@ The `.coderabbit.yaml` configuration file in the repository root contains coding standards and requirements that can be used by AI coding assistants to help generate code that follows project conventions. +When a substantial portion of your code was generated by AI, add a comment +with an attribution in-line to introduce the generated code, or at the top +of the file under the SPDX comment (if any), like this: + +``` +# Assisted by using model(s) ModelA[, ModelB, ...] +``` + +For example: + +``` +# Assisted by SquirmingFerret using models CodeEchidna 7.1, SoftBadger 6 +``` + +The git commit message/PR body should also contain an attribution like the following: + +``` +Assisted-by using model(s) ModelA[, ModelB, ...] +``` + ## Python Code The Python code needs to be **compatible with the Python versions supported by From ae3db8901c85758fa7425f6d04970a15e2c5c128 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 29 Oct 2026 12:44:00 -0600 Subject: [PATCH 2/2] docs: add AI policy; update setup-python, codeql actions Add AI policy. The summary is that contributions which include a significant amount of code written or generated by AI should include an attribution in a code comment and in the git commit message/PR body. Also include some recent updates to python related github actions. Signed-off-by: Rich Megginson --- .coderabbit.yaml | 2 +- contributing.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 1450c684..fb277747 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -99,7 +99,7 @@ reviews: ``` - mode: "warning" - name: "AI Agent Attribution + name: "AI Agent Attribution" instructions: | If the added code was substantially generated by AI, the generated code should contain a comment in-line or at the top of the file after the SPDX line (if any). The attribution diff --git a/contributing.md b/contributing.md index d4144887..41e7119c 100644 --- a/contributing.md +++ b/contributing.md @@ -98,7 +98,7 @@ For example: The git commit message/PR body should also contain an attribution like the following: ``` -Assisted-by using model(s) ModelA[, ModelB, ...] +Assisted-by: using model(s) ModelA[, ModelB, ...] ``` ## Python Code