Skip to content

Governance: AI-contribution rules, AI statement check, pinned actions, workflow lint, dependency review - #835

Merged
Hananel-Hazan merged 1 commit into
masterfrom
governance-ai-policy
Nov 2, 2026
Merged

Hananel-Hazan merged 1 commit into
masterfrom
governance-ai-policy

Conversation

@Hananel-Hazan

@Hananel-Hazan Hananel-Hazan commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes and why

Puts in place the outside-contribution rules decided on 2026-10-23 after issue #781: AI-assisted work is welcome when a human has read and run every change, and the repository's own CI files are harder to tamper with.

  • CONTRIBUTING.md: new "AI-assisted contributions" section (NumPy and LLVM policies as the model). Autonomous agents may not open pull requests.
  • Pull request template: an "AI assistance" section. The new AI statement workflow fails until exactly one box is ticked, and asks for the tools when AI was used. It reads the description through an environment variable and runs no pull request code.
  • Every action in every workflow is pinned to a commit hash (version in a comment, Dependabot keeps them current). Checkouts no longer keep the token on disk.
  • New Workflow lint (zizmor 1.30.1, actionlint 1.7.12) and Dependency review (fails on a new or updated package with a known moderate or worse vulnerability).
  • CODEOWNERS now also covers .vscode/, .devcontainer/, .pre-commit-config.yaml, Dockerfile, .dockerignore, .readthedocs.yaml, docs/source/conf.py, every conftest.py, bindsnet/learning/, SECURITY.md and CONTRIBUTING.md.
  • SECURITY.md describes the current branch protection.
  • The CUDA test_transfer tests skip on machines without a GPU instead of returning early and reporting "passed".

Rebased from an unpushed commit of 2026-10-23. Its rule that results-changing fixes wait for 0.4.0 was dropped, because #833 replaced it.

How it was checked

  • zizmor 1.30.1 --offline .github/workflows: no findings. actionlint 1.7.12: no errors.
  • The AI statement script was run on six descriptions: blank template, empty body and both boxes ticked fail; "AI used" with no tools named fails; "no AI" passes; "AI used" with tools named passes.
  • pytest test/network/test_nodes.py test/network/test_connections.py on a machine with a GPU: 35 passed (the two test_transfer tests ran).
  • Each pinned hash was read from GitHub's API for the tag the workflow used before (checkout v7.0.1, setup-python v7.1.0, upload-artifact v7.0.2, download-artifact v8.0.2, gh-action-pypi-publish v1.14.3).

The weakened-tests check will list the two added skips. They replace early returns that passed silently, so the tests-changed-ok label applies.

Effect on results

No library code changes. Simulated results are unchanged.

AI assistance

  • No AI tools were used.
  • AI tools were used, and I (a human) have read every changed line, run the tests myself, and can explain the change in my own words.

Tools used and for which parts: Claude Code drafted every change and ran the checks above.

🤖 Generated with Claude Code

…, workflow lint, dependency review

- CONTRIBUTING.md: AI-assisted contributions are welcome when a human has read
  and run every change; autonomous agents may not submit.
- Pull request template gets an "AI assistance" section, checked by the new
  'AI statement' workflow (reads the description through an environment variable).
- CODEOWNERS extended to editor, container and docs configuration, every
  conftest.py, bindsnet/learning/, SECURITY.md and CONTRIBUTING.md.
- Every action pinned to a commit hash; checkouts do not keep the token.
- 'Workflow lint' (zizmor 1.30.1, actionlint 1.7.12; both pass) and
  'Dependency review' (actions/dependency-review-action v5.0.0) workflows.
- SECURITY.md states the current branch protection.
- CUDA test_transfer tests skip instead of returning early and passing.

Rebased from the unpushed commit 4afb130 (2026-10-23) onto master after #833;
its rule that results-changing fixes wait for 0.4.0 is dropped (replaced in #833).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Hananel-Hazan Hananel-Hazan added the tests-changed-ok Maintainer reviewed every item the weakened-tests check listed label Nov 2, 2026
@Hananel-Hazan
Hananel-Hazan merged commit 314c334 into master Nov 2, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-changed-ok Maintainer reviewed every item the weakened-tests check listed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant