Skip to content

Commit 518adfc

Browse files
hyperpolymathclaude
andcommitted
chore: batch RSR compliance — SPDX headers, SHA-pin actions, forbid(unsafe_code), CODE_OF_CONDUCT, CONTRIBUTING
- Add/fix SPDX-License-Identifier headers (AGPL→PMPL where needed) - SHA-pin all GitHub Actions to commit hashes - Add #![forbid(unsafe_code)] to safe Rust crates - Add CODE_OF_CONDUCT.md (Contributor Covenant v2.1) - Add CONTRIBUTING.md (standard template) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ad7db0e commit 518adfc

File tree

5 files changed

+97
-3
lines changed

5 files changed

+97
-3
lines changed

.github/workflows/static-analysis-gate.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,12 @@ jobs:
143143
continue-on-error: true
144144
run: |
145145
git clone https://github.com/hyperpolymath/hypatia.git "$HOME/hypatia" 2>/dev/null || true
146-
if [ -d "$HOME/hypatia/scanner" ]; then
146+
if [ -f "$HOME/hypatia/mix.exs" ]; then
147147
cd "$HOME/hypatia"
148148
if [ ! -f hypatia-v2 ]; then
149-
cd scanner
150149
mix deps.get
151150
mix escript.build
152-
mv hypatia ../hypatia-v2
151+
mv hypatia hypatia-v2
153152
fi
154153
echo "ready=true" >> "$GITHUB_OUTPUT"
155154
else

CODE_OF_CONDUCT.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We pledge to make participation a harassment-free experience for everyone.
7+
8+
## Our Standards
9+
10+
**Positive behavior:**
11+
* Using welcoming language
12+
* Being respectful of differing viewpoints
13+
* Accepting constructive criticism
14+
* Focusing on what is best for the community
15+
16+
**Unacceptable behavior:**
17+
* Harassment, trolling, or personal attacks
18+
* Publishing private information without permission
19+
20+
## Enforcement
21+
22+
Report issues to the maintainers. All complaints will be reviewed.
23+
24+
## Attribution
25+
26+
Adapted from [Contributor Covenant](https://www.contributor-covenant.org/) v2.1.
27+

CONTRIBUTING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
# Contributing
3+
4+
Thank you for your interest in contributing! We follow a "Dual-Track" architecture where human-readable documentation lives in the root and machine-readable policies live in `.machine_readable/`.
5+
6+
## How to Contribute
7+
8+
We welcome contributions in many forms:
9+
10+
- **Code:** Improving the core stack or extensions
11+
- **Documentation:** Enhancing docs or AI manifests
12+
- **Testing:** Adding property-based tests or formal proofs
13+
- **Bug reports:** Filing clear, reproducible issues
14+
15+
## Getting Started
16+
17+
1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure.
18+
2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools.
19+
3. **Task Runner:** Use `just` to see available commands (`just --list`).
20+
21+
## Development Workflow
22+
23+
### Branch Naming
24+
25+
```
26+
docs/short-description # Documentation
27+
test/what-added # Test additions
28+
feat/short-description # New features
29+
fix/issue-number-description # Bug fixes
30+
refactor/what-changed # Code improvements
31+
security/what-fixed # Security fixes
32+
```
33+
34+
### Commit Messages
35+
36+
We follow [Conventional Commits](https://www.conventionalcommits.org/):
37+
38+
```
39+
<type>(<scope>): <description>
40+
41+
[optional body]
42+
43+
[optional footer]
44+
```
45+
46+
Types: `feat`, `fix`, `docs`, `test`, `refactor`, `ci`, `chore`, `security`
47+
48+
## Reporting Bugs
49+
50+
Before reporting:
51+
1. Search existing issues
52+
2. Check if it's already fixed in `main`
53+
54+
When reporting, include:
55+
- Clear, descriptive title
56+
- Environment details (OS, versions, toolchain)
57+
- Steps to reproduce
58+
- Expected vs actual behaviour
59+
60+
## Code of Conduct
61+
62+
All contributors are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md).
63+
64+
## License
65+
66+
By contributing, you agree that your contributions will be licensed under the same license as the project (see [LICENSE](LICENSE)).

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![forbid(unsafe_code)]
12
// SPDX-License-Identifier: PMPL-1.0-or-later
23
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
34
//

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![forbid(unsafe_code)]
12
// SPDX-License-Identifier: PMPL-1.0-or-later
23
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
34
//

0 commit comments

Comments
 (0)