Skip to content

Commit 65ec2a7

Browse files
[RELEASE] Version v2.0.9 (Stable)
2 parents 28b89ea + 2f2b666 commit 65ec2a7

File tree

92 files changed

+8060
-2106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+8060
-2106
lines changed

.ast-grep/rules/multicast-rule-check-documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# .ast-grep/multicast-rule-check-test-documentation.yml
1+
# .ast-grep/multicast-rule-check-documentation.yml
2+
---
23
id: check-has-documentation
34
rule:
45
pattern:

.ast-grep/utils/python/structure/docstring_statement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ rule:
55
pattern:
66
selector: expression_statement
77
context: |
8-
$$$
8+
$EXPRESSION
99
has:
1010
pattern:
1111
selector: string

.coderabbit.yaml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ reviews:
1010
1111
- Ensure the code follows best practices and coding standards.
1212
- Check for security vulnerabilities and potential issues.
13-
- Ensure the code follows the **DRY, AHA, and SOLID** principles.
13+
- Ensure the code follows the **DRY, Avoid-Hasty-Abstractions, and SOLID** design principles.
1414
- Our "Code Review Checklist Guide" is documented in
1515
[CEP-4](https://gist.github.com/reactive-firewall/cc041f10aad1d43a5ef15f50a6bbd5a5),
1616
be sure to always consider
@@ -26,7 +26,7 @@ reviews:
2626
[Pure BASH Bible](https://github.com/dylanaraps/pure-bash-bible) standards.
2727
- Consider [CEP-5](https://gist.github.com/reactive-firewall/3d2bd3cf37f87974df6f7bee31a05a89)
2828
custom locking conventions.
29-
- Verify all **BASH** files (e.g. are of MIME-type 'text/x-shellscript') start with an
29+
- Verify all **BASH** files (e.g., are of MIME-type 'text/x-shellscript') start with an
3030
[extensive disclaimer](https://gist.github.com/reactive-firewall/866b42d175ae3ebefcb2a5878b30ea17).
3131
3232
# Documentation Review Instructions
@@ -35,16 +35,16 @@ reviews:
3535
- Verify that technical documentation includes a "References" section at
3636
the end of documentation, using the same format as actual RFCs, with
3737
both "Normative References" and "Informative References". Suggest improvements if unable.
38-
- Ensure that that project documentation and comments follow
38+
- Ensure that the project documentation and source-code comments follow
3939
[CEP-7](https://gist.github.com/reactive-firewall/123b8a45f1bdeb064079e0524a29ec20)
4040
4141
# Test Code Review Instructions
4242
- Ensure that test code is automated, comprehensive, and follows testing best practices.
4343
- Verify that all critical functionality is covered by tests.
44-
- Verify that minimal acceptance tests (e.g. those run by the workflow CI-MATs) are passing and
44+
- Verify that minimal acceptance tests (e.g., those run by the workflow CI-MATs) are passing and
4545
error free, pointing out any failure as below minimal acceptance (i.e. un-acceptable).
4646
- Ensure that the test coverage meets or exceeds the project's required threshold
47-
(e.g., aiming for 100% coverage as per Issue #53).
47+
(e.g., aiming for 100% coverage as per GitHub Issue #53).
4848
- For **test** code, *also* follow
4949
[CEP-9](https://gist.github.com/reactive-firewall/d840ee9990e65f302ce2a8d78ebe73f6)
5050
@@ -56,7 +56,9 @@ reviews:
5656
a BSD License, the Unlicence, the Apache v2 License, or that the dependency is optional. Do
5757
not assume a dependency is optional, confirm if it is or is not optional.
5858
- For **Python** code, consider [PEP 290](https://peps.python.org/pep-0290/) whenever a python
59-
(e.g. has the extension '.py') file is changed.
59+
(e.g., has the extension '.py') file is changed.
60+
- Our project's "AI Usage Policy" is documented in
61+
[.github/AI_USAGE_POLICY.md](https://github.com/reactive-firewall-org/multicast/tree/master/.github/AI_USAGE_POLICY.md).
6062
request_changes_workflow: true
6163
high_level_summary: true
6264
high_level_summary_placeholder: '@coderabbitai summary'
@@ -77,17 +79,27 @@ reviews:
7779
instructions: >-
7880
Apply when the PR/MR contains changes to the file `Makefile` or makefile
7981
code snippets.
80-
- label: Documentation
82+
- label: documentation
8183
instructions: >-
8284
Apply whenever project documentation (namely markdown source-code) is
8385
updated by the PR/MR. Also apply when PR contains a commit with a commit
8486
message prefixed with "[DOCUMENTATION] "
87+
- label: CI
88+
instructions: >-
89+
Apply whenever any project CI/CD components (namely GitHub Action source-code) are
90+
updated by the PR/MR. Also apply when PR contains a commit with a commit
91+
message prefixed with "[CI] "
8592
- label: Linter
8693
instructions: >-
8794
Apply when the purpose of the PR/MR is related to fixing the feedback
8895
from a linter. Also apply if suggested fixes are used and improve the
89-
code's compliance with the PEP-8 standard.
90-
path_filters: ['!*.xc*/**', '!node_modules/**', '!dist/**', '!build/**', '!.git/**', '!venv/**', '!__pycache__/**']
96+
code's compliance with project conventions or adopted standards.
97+
- label: Testing
98+
instructions: >-
99+
Apply when the purpose of the PR/MR is related to fixing/improving any
100+
testing components or test-code. Also apply if suggested fixes are
101+
used and improve the project's test-code.
102+
path_filters: ['!*.xc*/**', '!node_modules/**', '!dist/**', '!package.json', '!package-lock.json', '!yarn.lock', '!build/**', '!.git/**', '!venv/**', '!__pycache__/**']
91103
path_instructions:
92104
- path: README.md
93105
instructions: >-
@@ -120,7 +132,7 @@ reviews:
120132
the guidelines set by
121133
[CEP-7](https://gist.github.com/reactive-firewall/123b8a45f1bdeb064079e0524a29ec20).
122134
6. Verify Flake8's configuration file is located at ".flake8.ini". Flake8 is run
123-
automaticly by the `flake8-cq` GHA used by the `.github/workflows/flake8.yml` workflow.
135+
automatically by the `flake8-cq` GHA used by the `.github/workflows/flake8.yml` workflow.
124136
7. Verify alignment of any new changes, with the code style advocated in
125137
[CEP-8](https://gist.github.com/reactive-firewall/b7ee98df9e636a51806e62ef9c4ab161),
126138
pointing out any introduced deviations.
@@ -167,8 +179,8 @@ reviews:
167179
4. Consider these 'requirements.txt' files the records of truth regarding project
168180
dependencies.
169181
5. Consider the 'requirements.txt' file in the base of the git repository
170-
(e.g. './requirements.txt') the required python dependencies regarding Multicast project
171-
dependencies.
182+
(e.g., './requirements.txt') the required python dependencies regarding Multicast
183+
project dependencies.
172184
- path: tests/requirements.txt
173185
instructions: >-
174186
1. The multicast project's own dependencies are recorded in './requirements.txt'
@@ -192,7 +204,7 @@ reviews:
192204
1. Consider the files in the `docs/` directory tree the core/main/in-depth documentation
193205
of the project. Also consider the 'docs/**.md' files the second place to look for
194206
project documentation after the 'README.md' file.
195-
2. When reviewing the documentation files (e.g. `docs/**.md`), they should additionally
207+
2. When reviewing the documentation files (e.g., `docs/**.md`), they should additionally
196208
be linted with help from the tool `markdownlint`, pointing out any issues.
197209
3. When reviewing the documentation files in `docs/` directory, they should additionally
198210
be linted with help from the tool `languagetool`, pointing out any issues.

.deepsource.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ dependency_file_paths = [
3333
"requirements.txt",
3434
"tests/requirements.txt",
3535
"docs/requirements.txt",
36-
"setup.py"
3736
]
3837

3938
[analyzers.meta]

.gitattributes

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
1-
* text=auto
2-
*.cfg,*.conf text working-tree-encoding=UTF-8 diff=config
3-
*.txt text working-tree-encoding=UTF-8
4-
*.py text working-tree-encoding=UTF-8 diff=python merge=python
5-
multicast/*.py text working-tree-encoding=UTF-8 diff=python merge=python
6-
tests/*.py text working-tree-encoding=UTF-8 diff=python merge=python
7-
*.pyc -text
8-
*.sh text working-tree-encoding=UTF-8 diff=shell merge=shell
9-
*.bash text working-tree-encoding=UTF-8 diff=shell merge=shell
10-
*.ini text
11-
*.md text working-tree-encoding=UTF-8 diff=markdown merge=markdown
12-
*.yml text
13-
*.jpg -text
14-
*.png -text
15-
*.conf text diff=config
16-
*.bat text
17-
*.rst text
18-
tests/check_* text working-tree-encoding=UTF-8 diff=shell merge=shell
19-
Makefile text working-tree-encoding=UTF-8 diff=makefile merge=makefile
1+
# from -- https://github.com/reactive-firewall/ymmv.git
2+
3+
# Set default behaviour to automatically normalize line endings.
4+
* text=auto
5+
6+
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
7+
# in Windows via a file share from Linux, the scripts will work.
8+
*.{cmd,[cC][mM][dD]} text eol=crlf
9+
*.{bat,[bB][aA][tT]} text eol=crlf
10+
11+
# Force bash scripts to always use LF line endings so that if a repo is accessed
12+
# in Unix via a file share from Windows, the scripts will work.
13+
*.{ash,[aA][sS][hH]} text eol=lf diff=bash merge=bash working-tree-encoding=UTF-8
14+
*.{bash,[bB][aA][sS][hH]} text eol=lf diff=bash merge=bash working-tree-encoding=UTF-8
15+
*.{csh,[cC][sS][hH]} text eol=lf diff=bash merge=bash working-tree-encoding=UTF-8
16+
*.{dash,[dD][aA][sS][hH]} text eol=lf diff=bash merge=bash working-tree-encoding=UTF-8
17+
*.{sh,[sS][hH]} text eol=lf diff=bash merge=bash working-tree-encoding=UTF-8
18+
*.{zsh,[zZ][sS][hH]} text eol=lf diff=bash merge=bash working-tree-encoding=UTF-8
19+
20+
*.{cfg,[cC][fF][gG]},*.{conf,[cC][oO][nN][fF]} text eol=lf diff=config working-tree-encoding=UTF-8
21+
*.{toml,[tT][oO][mM][lL]} text eol=lf working-tree-encoding=UTF-8
22+
*.{ini,[iI][nN][iI]} text eol=lf working-tree-encoding=UTF-8
23+
*.{yml,[yY][mM][lL]},*.{yaml,[yY][aA][mM][lL]} text eol=lf working-tree-encoding=UTF-8
24+
*.{txt,[tT][xX][tT]} text eol=lf diff=markdown working-tree-encoding=UTF-8
25+
*.{rst,[rR][sS][tT]} text eol=lf working-tree-encoding=UTF-8
26+
*.{md,[mM][dD]},*.{markdown,[mM][aA][rR][kK][dD][oO][wW][nN]} text eol=lf diff=markdown merge=markdown working-tree-encoding=UTF-8
27+
28+
*.py text eol=lf diff=python merge=python working-tree-encoding=UTF-8
29+
*.pyc export-ignore diff=python -text
30+
*.pyi export-ignore text eol=lf diff=python merge=python working-tree-encoding=UTF-8
31+
32+
# May diverge in future
33+
# multicast/*.py text eol=lf diff=python merge=python working-tree-encoding=UTF-8
34+
# tests/*.py text eol=lf diff=python merge=python working-tree-encoding=UTF-8
35+
# docs/*.py text eol=lf diff=python merge=python working-tree-encoding=UTF-8
36+
# tests/check_* text eol=lf diff=bash merge=bash working-tree-encoding=UTF-8
37+
38+
*.jpg -text
39+
*.png -text
40+
*.{svg,[sS][vV][gG]} text eol=lf diff=html merge=html working-tree-encoding=UTF-8
41+
42+
# More rules
43+
.DS_Store export-ignore -text
44+
Makefile text eol=lf diff=makefile merge=makefile working-tree-encoding=UTF-8

.github/AI_USAGE_POLICY.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# Multicast Project AI Usage Policy
2+
3+
## 1. Purpose and Scope
4+
5+
### 1.1 Rationale :bookmark:
6+
7+
> [!IMPORTANT]
8+
> This policy governs the use of AI tools, particularly CodeRabbitAI, GH Copilot, and
9+
> Codecov-ai-reviewer, within the Multicast project's development workflow. It establishes
10+
> guidelines for responsible AI integration while maintaining the project's security, quality, and
11+
> integrity.
12+
13+
### 1.2 Definitions :book:
14+
15+
* 1.2.A The following acronyms and abbreviations are used throughout this document:
16+
* **AI** - Artificial Intelligence
17+
* **CEP** - Convention Enhancement Proposal
18+
* **CI** - Continuous Integration
19+
* **CWE** - Common Weakness Enumeration (security vulnerability classification system)
20+
* **e.g.** - exempli gratia (for example)
21+
* **GH** - GitHub (as used in "GH Copilot")
22+
* **GHI** - GitHub Issues
23+
* **LLM** - Large Language Model
24+
* **PR** - Pull Request
25+
26+
## 2. AI Role Definitions
27+
28+
### 2.1 Permitted AI Roles :information_desk_person:
29+
30+
* 2.1.A Assistive Code Review:
31+
* AI may provide feedback on code quality, style compliance, and potential issues.
32+
* 2.1.B Assistive Project-Management Delegation:
33+
* AI may provide feedback when requested on GitHub issues (GHIs), as well as open new, or comment
34+
on existing, GHI, to track suggested improvements to the project content.
35+
* 2.1.C Documentation Improvement:
36+
* AI may suggest improvements to documentation clarity and completeness.
37+
* 2.1.D Test Coverage Analysis:
38+
* AI may identify areas lacking test coverage.
39+
* 2.1.E Code Generation Assistance:
40+
* AI may suggest code implementations when requested.
41+
42+
> [!CAUTION]
43+
> However, AI may **NOT** apply changes, nor code suggestions, by themselves, to any protected
44+
> branch (That is reserved for qualified human contributors).
45+
46+
### 2.2 Prohibited AI Roles :no_entry_sign:
47+
48+
* 2.2.A Sole Developer:
49+
* AI (especially LLM-based AI) is not well suited for innovation; No vibe-coding - the direction
50+
and development of the project CANNOT meaningfully come from AI.
51+
* 2.2.B Sole Approver:
52+
* AI approval alone is insufficient for merging any PR.
53+
54+
> [!WARNING]
55+
> Only project admin may sufficiently act as a Sole Approver, and _even_ that is discouraged.
56+
57+
* 2.2.C Security Gatekeeper:
58+
* AI cannot be the only mechanism for security validation
59+
* 2.2.D Merge Commit Author:
60+
* AI cannot trigger auto-merge without human verification
61+
62+
## 3. PR Review Process
63+
64+
### 3.1 Required Human Review
65+
66+
* 3.1.A Human Review
67+
* All PRs MUST receive at least one human review from an authorized maintainer
68+
* 3.1.B Verify or Resolve
69+
* Human reviews must verify (or conversely reject) the AI's suggestions.
70+
* Discussions are encouraged in both cases, as humans and AI alike may later consider relevant
71+
project content in future reviews.
72+
* 3.1.C Very Large PRs
73+
* For PRs exceeding 99 changed files, at least two human reviews are recommended.
74+
75+
> [!NOTE]
76+
> Currently there is only one core maintainer. Hoping to change this.
77+
78+
* 3.1.D Review Conventions and Instructions
79+
* The project's code review conventions are currently enumerated in the living document:
80+
[CEP-4](https://gist.github.com/reactive-firewall/cc041f10aad1d43a5ef15f50a6bbd5a5)
81+
(convention enhancement proposal no.4)
82+
83+
## 3.2 AI Review Requirements
84+
85+
### 3.2 AI Assisted Code Review
86+
87+
* 3.2.A AI Review Purpose
88+
* AI reviews are supplementary and do not replace human review
89+
* 3.2.B AI Troubleshooting
90+
* When AI review is triggered but fails (e.g., due to throttling), the PR must be marked as
91+
requiring additional attention
92+
* AI approval comments should not be used to bypass branch protection rules
93+
94+
### 3.3 Large PR Handling
95+
96+
* 3.3.A Less is More
97+
* PRs with more than 99 changed files should be split into smaller PRs when possible.
98+
* When splitting is not feasible, PR authors must provide a summary highlighting the most
99+
critical changes for human reviewers.
100+
101+
## 4. Security Considerations
102+
103+
### 4.1 Verification and Validation
104+
105+
* 4.1.A Review Line-by-Line
106+
* Absolutely, NO "Vibe-coding" is acceptable for this project. ALL AI-suggestions MUST be
107+
understood by at least one core maintainer (same as all other reviewed code needs to be).
108+
109+
> [!TIP]
110+
> > Good code is its own best documentation. As you're about to add a comment, ask yourself,
111+
> > "How can I improve the code so that this comment isn't needed?" Improve the code and then
112+
> > document it to make it even clearer.
113+
> ~ Steve McConnell
114+
115+
* All AI-suggested code changes must be verified by a human maintainer (see § 3.1.B).
116+
* 4.1.B Signed Commits
117+
* Code signing with different keys for human vs. AI contributions is required.
118+
* 4.1.C Security Assessments
119+
* AI-suggested security fixes must undergo additional human security review.
120+
121+
### 4.2 Branch Protection
122+
123+
* 4.2.A Stable and master branches must maintain protection rules requiring:
124+
* Minimum of one human approval
125+
* Signed commits
126+
* Passing CI checks
127+
* Force-pushing to protected branches is prohibited
128+
129+
### 4.3 CWE-655 Mitigation
130+
131+
* 4.3.A dual-approval system
132+
* The project implements a dual-approval system to help prevent single points of failure.
133+
* AI approvals are tracked separately from human approvals in the review process. Humans
134+
must be responsible for the actual merge of pull-requests.
135+
* Every user (e.g., AI or human) must have a distinct code-signing identity (see § 4.1.B).
136+
* Only human controlled identities may merge branches, or commit to the default branch directly.
137+
138+
> [!NOTE]
139+
> Historically @dependabot (a simple bot, not a LLM-based AI) had been allowed to merge to the
140+
> default branch; this policy considers such actions in the past to now be violations of § 4.3.A
141+
> because the code-signing identity was not controlled by a human. Fortunately, these changes had
142+
> been limited to improving supply-chain security and required approval from the project admin.
143+
144+
## 5. Implementation and Compliance
145+
146+
### 5.1 Configuration Management
147+
148+
* 5.1.A CoderabbitAI Configuration
149+
* The `.coderabbit.yaml` file is the source of truth for CodeRabbitAI configuration.
150+
* 5.1.B Dependabot Configuration
151+
* The `.github/dependabot.yml` file is the source of truth for @dependabot configuration.
152+
* 5.1.C Configuration Updates
153+
* Changes to these configurations require PR approval from at least one core maintainer.
154+
* 5.1.D Configuration Audits
155+
* Regular audits of AI configuration will be conducted to ensure alignment with this policy.
156+
157+
### 5.2 Monitoring and Reporting
158+
159+
* 5.2.A Monitoring
160+
* Periodic audits of PR approvals will verify compliance with this policy.
161+
* 5.2.B Reporting
162+
* Security incidents related to AI usage must be reported via project security channels.
163+
164+
### 5.3 Developer Training
165+
166+
* 5.3.A Contributors should understand the limitations of AI tools in the review process.
167+
* 5.3.B Clear communication about when and how to utilize AI assistance will be provided.
168+
* 5.3.C New contributors will be directed to this policy as part of onboarding.
169+
170+
## 6. Exceptions
171+
172+
## 6.1 Exceptions to this policy require
173+
174+
* 6.1.A Documented justification.
175+
* 6.1.B Approval from at least two core maintainers.
176+
* 6.1.C Time-limited scope with defined expiration.
177+
* 6.1.D Post-implementation security review.
178+
179+
## 7. Policy Review
180+
181+
### 7.1 This policy will be reviewed
182+
183+
* 7.1.A After any security incident involving AI tools.
184+
* 7.1.B When significant changes to project AI integration are proposed.

0 commit comments

Comments
 (0)