rein-engine 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rein_engine-0.1.1/.github/workflows/ci.yml +38 -0
- rein_engine-0.1.1/.github/workflows/publish.yml +76 -0
- rein_engine-0.1.1/.gitignore +14 -0
- rein_engine-0.1.1/AGENTS.md +151 -0
- rein_engine-0.1.1/CONTRIBUTING.md +50 -0
- rein_engine-0.1.1/DCO +34 -0
- rein_engine-0.1.1/LICENSE +201 -0
- rein_engine-0.1.1/NOTICE +4 -0
- rein_engine-0.1.1/PKG-INFO +240 -0
- rein_engine-0.1.1/README.md +206 -0
- rein_engine-0.1.1/action.yml +46 -0
- rein_engine-0.1.1/examples/guarded_agent.py +43 -0
- rein_engine-0.1.1/pyproject.toml +52 -0
- rein_engine-0.1.1/src/rein/__init__.py +3 -0
- rein_engine-0.1.1/src/rein/cli/__init__.py +1 -0
- rein_engine-0.1.1/src/rein/cli/__main__.py +108 -0
- rein_engine-0.1.1/src/rein/cli/_helpers.py +169 -0
- rein_engine-0.1.1/src/rein/cli/commands.py +194 -0
- rein_engine-0.1.1/src/rein/core/__init__.py +5 -0
- rein_engine-0.1.1/src/rein/core/bandit.py +66 -0
- rein_engine-0.1.1/src/rein/core/baseline.py +45 -0
- rein_engine-0.1.1/src/rein/core/code.py +41 -0
- rein_engine-0.1.1/src/rein/core/commits.py +197 -0
- rein_engine-0.1.1/src/rein/core/config.py +111 -0
- rein_engine-0.1.1/src/rein/core/conventions.py +207 -0
- rein_engine-0.1.1/src/rein/core/conventions_base.py +72 -0
- rein_engine-0.1.1/src/rein/core/conventions_complexity.py +125 -0
- rein_engine-0.1.1/src/rein/core/conventions_layering.py +221 -0
- rein_engine-0.1.1/src/rein/core/custom.py +82 -0
- rein_engine-0.1.1/src/rein/core/diffs.py +84 -0
- rein_engine-0.1.1/src/rein/core/drift.py +153 -0
- rein_engine-0.1.1/src/rein/core/findings.py +77 -0
- rein_engine-0.1.1/src/rein/core/gitleaks.py +61 -0
- rein_engine-0.1.1/src/rein/core/junk.py +90 -0
- rein_engine-0.1.1/src/rein/core/learn.py +194 -0
- rein_engine-0.1.1/src/rein/core/lint.py +233 -0
- rein_engine-0.1.1/src/rein/core/lint_comments.py +107 -0
- rein_engine-0.1.1/src/rein/core/pragmas.py +43 -0
- rein_engine-0.1.1/src/rein/core/profile.py +228 -0
- rein_engine-0.1.1/src/rein/core/remediation.py +75 -0
- rein_engine-0.1.1/src/rein/core/review.py +125 -0
- rein_engine-0.1.1/src/rein/core/ruff.py +41 -0
- rein_engine-0.1.1/src/rein/core/sarif.py +95 -0
- rein_engine-0.1.1/src/rein/core/secrets.py +237 -0
- rein_engine-0.1.1/src/rein/core/security.py +239 -0
- rein_engine-0.1.1/src/rein/core/semgrep.py +87 -0
- rein_engine-0.1.1/src/rein/hooks/__init__.py +1 -0
- rein_engine-0.1.1/src/rein/hooks/precommit.py +108 -0
- rein_engine-0.1.1/src/rein/loop.py +85 -0
- rein_engine-0.1.1/src/rein/mcp/__init__.py +1 -0
- rein_engine-0.1.1/src/rein/mcp/server.py +71 -0
- rein_engine-0.1.1/src/rein/mcp/tools.py +101 -0
- rein_engine-0.1.1/src/rein/report.py +120 -0
- rein_engine-0.1.1/tests/test_accuracy.py +131 -0
- rein_engine-0.1.1/tests/test_bandit.py +65 -0
- rein_engine-0.1.1/tests/test_baseline.py +91 -0
- rein_engine-0.1.1/tests/test_baseline_cli.py +50 -0
- rein_engine-0.1.1/tests/test_cli_format.py +114 -0
- rein_engine-0.1.1/tests/test_code.py +38 -0
- rein_engine-0.1.1/tests/test_commits.py +74 -0
- rein_engine-0.1.1/tests/test_config.py +127 -0
- rein_engine-0.1.1/tests/test_config_cli.py +177 -0
- rein_engine-0.1.1/tests/test_conventions.py +913 -0
- rein_engine-0.1.1/tests/test_custom.py +75 -0
- rein_engine-0.1.1/tests/test_detectors.py +96 -0
- rein_engine-0.1.1/tests/test_diffs.py +152 -0
- rein_engine-0.1.1/tests/test_drift.py +201 -0
- rein_engine-0.1.1/tests/test_drift_cli.py +102 -0
- rein_engine-0.1.1/tests/test_gitleaks.py +72 -0
- rein_engine-0.1.1/tests/test_guardrail_tamper.py +53 -0
- rein_engine-0.1.1/tests/test_ignore.py +44 -0
- rein_engine-0.1.1/tests/test_junk.py +92 -0
- rein_engine-0.1.1/tests/test_learn.py +202 -0
- rein_engine-0.1.1/tests/test_learn_cli.py +88 -0
- rein_engine-0.1.1/tests/test_lint.py +398 -0
- rein_engine-0.1.1/tests/test_lint_cli.py +41 -0
- rein_engine-0.1.1/tests/test_loop.py +62 -0
- rein_engine-0.1.1/tests/test_mcp_tools.py +203 -0
- rein_engine-0.1.1/tests/test_perf.py +111 -0
- rein_engine-0.1.1/tests/test_pragmas.py +54 -0
- rein_engine-0.1.1/tests/test_precommit.py +51 -0
- rein_engine-0.1.1/tests/test_profile.py +470 -0
- rein_engine-0.1.1/tests/test_profile_cli.py +138 -0
- rein_engine-0.1.1/tests/test_remediation.py +39 -0
- rein_engine-0.1.1/tests/test_report.py +148 -0
- rein_engine-0.1.1/tests/test_review.py +71 -0
- rein_engine-0.1.1/tests/test_review_cli.py +142 -0
- rein_engine-0.1.1/tests/test_review_diff.py +63 -0
- rein_engine-0.1.1/tests/test_ruff.py +47 -0
- rein_engine-0.1.1/tests/test_sarif.py +161 -0
- rein_engine-0.1.1/tests/test_scan_diff.py +85 -0
- rein_engine-0.1.1/tests/test_secrets.py +67 -0
- rein_engine-0.1.1/tests/test_security.py +271 -0
- rein_engine-0.1.1/tests/test_security_cli.py +43 -0
- rein_engine-0.1.1/tests/test_semgrep.py +72 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
verify:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
with:
|
|
11
|
+
fetch-depth: 0
|
|
12
|
+
- uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.11"
|
|
15
|
+
- run: pip install -e . pytest
|
|
16
|
+
- run: pytest -q
|
|
17
|
+
- run: rein review src/
|
|
18
|
+
- run: rein commit-check
|
|
19
|
+
|
|
20
|
+
action:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read # checkout only; upload:false below needs no other scope
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- name: Self-test the GitHub Action (review + SARIF, no upload)
|
|
27
|
+
# upload:false: code scanning (Security tab) needs GitHub Advanced
|
|
28
|
+
# Security, absent on this private repo. The self-test proves the action
|
|
29
|
+
# installs rein, runs review, and emits valid SARIF; the Security-tab
|
|
30
|
+
# upload is a consumer-side concern exercised on repos that have it.
|
|
31
|
+
uses: ./
|
|
32
|
+
with:
|
|
33
|
+
path: src/
|
|
34
|
+
upload: false
|
|
35
|
+
- name: Assert SARIF was produced and is valid
|
|
36
|
+
run: |
|
|
37
|
+
test -s rein.sarif
|
|
38
|
+
python -c "import json,sys; d=json.load(open('rein.sarif')); assert d.get('version')=='2.1.0', d.get('version'); assert d['runs'][0]['tool']['driver']['name']=='rein'; print('SARIF valid:', len(d['runs'][0].get('results', [])), 'results')"
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Trusted publishing (OIDC) - no stored API token. Configure a trusted publisher
|
|
4
|
+
# on PyPI and TestPyPI for this repository and this workflow file. A manual run
|
|
5
|
+
# publishes to TestPyPI (a dry run); publishing a GitHub Release publishes to PyPI.
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
target:
|
|
12
|
+
description: "Package index to publish to"
|
|
13
|
+
type: choice
|
|
14
|
+
options:
|
|
15
|
+
- testpypi
|
|
16
|
+
- pypi
|
|
17
|
+
default: testpypi
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
# Guard so the workflow only runs in this repository, never in a fork.
|
|
22
|
+
if: github.repository == 'SametAtas/rein'
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.11"
|
|
31
|
+
- name: Build and check sdist + wheel
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install --upgrade build twine
|
|
34
|
+
python -m build
|
|
35
|
+
twine check dist/*
|
|
36
|
+
- uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
testpypi:
|
|
42
|
+
needs: build
|
|
43
|
+
if: >-
|
|
44
|
+
github.repository == 'SametAtas/rein'
|
|
45
|
+
&& github.event_name == 'workflow_dispatch'
|
|
46
|
+
&& inputs.target == 'testpypi'
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
permissions:
|
|
49
|
+
id-token: write # OIDC: mint the short-lived token the index trusts
|
|
50
|
+
contents: read
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/download-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: dist
|
|
55
|
+
path: dist/
|
|
56
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
57
|
+
with:
|
|
58
|
+
repository-url: https://test.pypi.org/legacy/
|
|
59
|
+
|
|
60
|
+
pypi:
|
|
61
|
+
needs: build
|
|
62
|
+
if: >-
|
|
63
|
+
github.repository == 'SametAtas/rein'
|
|
64
|
+
&& (github.event_name == 'release'
|
|
65
|
+
|| (github.event_name == 'workflow_dispatch' && inputs.target == 'pypi'))
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
environment: pypi # one-time: create this env on the public repo for an approval gate
|
|
68
|
+
permissions:
|
|
69
|
+
id-token: write
|
|
70
|
+
contents: read
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/download-artifact@v4
|
|
73
|
+
with:
|
|
74
|
+
name: dist
|
|
75
|
+
path: dist/
|
|
76
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Operating guide for AI agents (and humans) contributing to **rein**. Read this
|
|
4
|
+
fully before editing. It is the contract that keeps the codebase coherent across
|
|
5
|
+
multiple contributors who never talk to each other directly.
|
|
6
|
+
|
|
7
|
+
## What this project is
|
|
8
|
+
|
|
9
|
+
`rein` detects secrets, unsafe-code patterns, clean-code lint issues, and
|
|
10
|
+
commit hygiene; turns findings into a policy verdict with remediation guidance;
|
|
11
|
+
reviews whole files or diffs; and drives an agent steering loop -- usable from
|
|
12
|
+
the CLI, an MCP server, or a git hook. It must stay **agent-agnostic**:
|
|
13
|
+
usable from any agent or CI system, never tied to one host.
|
|
14
|
+
|
|
15
|
+
## The one architectural rule
|
|
16
|
+
|
|
17
|
+
> **`core/` thinks. Adapters do I/O.**
|
|
18
|
+
|
|
19
|
+
- `src/rein/core/` contains pure functions. No printing, no `sys.exit`, no
|
|
20
|
+
subprocess, no network, no reading global state. Every check returns a list of
|
|
21
|
+
`Finding` objects (see `core/findings.py`).
|
|
22
|
+
- `cli/`, `mcp/`, `hooks/` are **thin adapters**. They gather input (files, git,
|
|
23
|
+
JSON), call `core`, render the `Finding`s, and pick an exit code. They contain
|
|
24
|
+
no detection logic.
|
|
25
|
+
|
|
26
|
+
If you are about to put a regex or a rule inside an adapter, stop. It belongs in
|
|
27
|
+
`core/`, where every other interface can reuse it and a unit test can reach it
|
|
28
|
+
without spawning a process.
|
|
29
|
+
|
|
30
|
+
## Code style: the anti-slop charter
|
|
31
|
+
|
|
32
|
+
We want a repo that reads like one careful engineer wrote it, not a generator.
|
|
33
|
+
|
|
34
|
+
1. **Type-hint everything.** Public functions have full annotations. `from
|
|
35
|
+
__future__ import annotations` at the top of each module.
|
|
36
|
+
2. **Docstrings explain *why*, not *what*.** A docstring that restates the
|
|
37
|
+
function name ("`scan_file`: scans a file") is noise; delete it. Document
|
|
38
|
+
intent, edge cases, and the contract.
|
|
39
|
+
3. **Plain ASCII only, no emojis, anywhere.** No emojis, em-dashes, smart
|
|
40
|
+
quotes, arrows, or decorative symbols (such as check marks) in code, docs,
|
|
41
|
+
comments, CLI output, or commit messages. Use `-`, `:`, or rephrase. The
|
|
42
|
+
ASCII self-check below must print nothing. Comments mark non-obvious
|
|
43
|
+
decisions only; code that needs a comment to be readable should be rewritten.
|
|
44
|
+
4. **Small files, small functions.** If a module passes ~250 lines or a function
|
|
45
|
+
passes ~50, it probably wants splitting. Limits are guidelines -- split where
|
|
46
|
+
there is a real seam, but do not fragment a cohesive module just to hit a
|
|
47
|
+
number (that is its own slop; see rule 7). Prefer clarity over cleverness.
|
|
48
|
+
5. **Standard library first.** Add a dependency only when it earns its place;
|
|
49
|
+
justify it in the PR. `core` should stay dependency-free.
|
|
50
|
+
6. **Match the surrounding code.** Naming, structure, and idiom should be
|
|
51
|
+
indistinguishable from the existing modules.
|
|
52
|
+
7. **No dead scaffolding.** Don't commit `TODO`-stubs, empty handlers, or
|
|
53
|
+
"future-proofing" abstractions with one caller.
|
|
54
|
+
8. **No marketing prose.** Docs and READMEs are terse and factual. No selling,
|
|
55
|
+
no metaphors, no filler adjectives.
|
|
56
|
+
|
|
57
|
+
## Performance and resilience
|
|
58
|
+
|
|
59
|
+
rein is called everywhere, including agent loops that invoke it repeatedly, so
|
|
60
|
+
it must stay fast and hard to break.
|
|
61
|
+
|
|
62
|
+
1. Zero or minimal runtime dependencies. `core` stays dependency-free; stdlib first.
|
|
63
|
+
2. No redundant work. Parse a source once and share the AST across checks; keep
|
|
64
|
+
every check O(n) in input size.
|
|
65
|
+
3. Bound, do not blow up. Malformed, huge, or hostile input degrades gracefully
|
|
66
|
+
(return findings or empty, never crash). Parsing catches SyntaxError,
|
|
67
|
+
ValueError, and RecursionError.
|
|
68
|
+
4. Treat latency as a feature. The hot path is review/review_diff; the
|
|
69
|
+
perf-contract test asserts review parses the AST once.
|
|
70
|
+
5. External detectors run with a strict timeout and fail open to prevent hanging the review.
|
|
71
|
+
|
|
72
|
+
## Testing (non-negotiable)
|
|
73
|
+
|
|
74
|
+
- Every new behavior in `core/` ships with a `pytest` test in `tests/`.
|
|
75
|
+
- Tests must be deterministic and not touch the network.
|
|
76
|
+
- Test files are exempt from type-hint and future-import lint rules; `rein review .` warning on them is by design, while `rein review src/` is the clean gate.
|
|
77
|
+
- Run before every commit:
|
|
78
|
+
```bash
|
|
79
|
+
pytest -q
|
|
80
|
+
```
|
|
81
|
+
- A change with failing or missing tests is not done.
|
|
82
|
+
|
|
83
|
+
## Commits & security
|
|
84
|
+
|
|
85
|
+
We dogfood our own tool. Before committing, run all three and make sure they
|
|
86
|
+
are clean:
|
|
87
|
+
```bash
|
|
88
|
+
pytest -q
|
|
89
|
+
rein scan .
|
|
90
|
+
git ls-files | xargs grep -nP '[^\x00-\x7F]' # must print nothing: ASCII only
|
|
91
|
+
git ls-files | xargs grep -nP ' +$' # must print nothing: no trailing whitespace
|
|
92
|
+
```
|
|
93
|
+
- Commit messages follow **Conventional Commits** (`feat:`, `fix:`, `docs:`,
|
|
94
|
+
`refactor:`, `test:`, `chore:`), imperative mood, subject <= 72 chars. Keep
|
|
95
|
+
them short and plain: one line, no multi-clause descriptions.
|
|
96
|
+
- **No tool or AI attribution trailers.** Never add `Co-Authored-By` or any
|
|
97
|
+
tool or AI credit. A Developer Certificate of Origin `Signed-off-by:` line
|
|
98
|
+
(the human author certifying origin, via `git commit -s`) is allowed and is
|
|
99
|
+
required for outside contributions; see `CONTRIBUTING.md`. It is not an
|
|
100
|
+
attribution trailer.
|
|
101
|
+
- **Never commit secrets or personal data**: no API keys, tokens, `.env` files,
|
|
102
|
+
emails, home paths, or machine-specific config. `rein scan` must pass clean.
|
|
103
|
+
|
|
104
|
+
## How contributions are coordinated
|
|
105
|
+
|
|
106
|
+
Contributors do not share a chat. The repo is the shared memory:
|
|
107
|
+
|
|
108
|
+
- **Architecture & contracts** (the `Finding` shape, module boundaries, public
|
|
109
|
+
function signatures, the tests that define correct behavior) are authored by
|
|
110
|
+
the lead and committed first. Treat committed signatures and tests as fixed.
|
|
111
|
+
- **Implementation tasks** are picked up against those contracts. The job is to
|
|
112
|
+
make the specified tests pass without changing the contract. If a contract
|
|
113
|
+
seems wrong, leave it and raise it; don't silently rewrite it.
|
|
114
|
+
- When you finish a task: run `pytest -q` and `rein scan .`, then write a
|
|
115
|
+
Conventional-Commit message describing only what you changed.
|
|
116
|
+
|
|
117
|
+
## Keeping the docs current
|
|
118
|
+
|
|
119
|
+
The repo is the shared memory: anyone should be able to continue without a chat.
|
|
120
|
+
When you finish a slice, update the project's durable docs in the same commit, so
|
|
121
|
+
the status and the reasoning behind a choice stay current. Keep them in the
|
|
122
|
+
project's voice: terse, factual, ASCII, no marketing. They capture intent,
|
|
123
|
+
status, and reasoning that the code and git log do not.
|
|
124
|
+
|
|
125
|
+
## Project layout
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
src/rein/
|
|
129
|
+
core/ pure logic: findings, diffs, secrets, security, lint, commits, code,
|
|
130
|
+
review, remediation, baseline, config, conventions, drift, junk,
|
|
131
|
+
ruff/bandit/gitleaks/semgrep adapters, sarif, custom
|
|
132
|
+
loop.py agent-loop driver (pure; agent injected)
|
|
133
|
+
cli/ argparse adapter
|
|
134
|
+
mcp/ MCP server adapter
|
|
135
|
+
hooks/ git pre-commit adapter
|
|
136
|
+
tests/ pytest, one file per core module
|
|
137
|
+
examples/ runnable agent integrations
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Dev setup
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
pip install -e ".[dev]" # editable install + pytest
|
|
144
|
+
pytest -q # run tests
|
|
145
|
+
rein scan . # dogfood the scanner
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
rein dogfoods itself: `rein commit-check` rejects any commit message carrying AI
|
|
149
|
+
or tool attribution (`Co-authored-by`, `generated by ...`) and flags tampering
|
|
150
|
+
with rein's own config; CI runs it on every push. A human DCO `Signed-off-by:`
|
|
151
|
+
line is allowed and is required for outside contributions.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Contributing to rein
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in rein. A few rules keep the codebase coherent, and
|
|
4
|
+
contributions that ignore them will be asked to change:
|
|
5
|
+
|
|
6
|
+
- Architecture: detection logic lives in pure functions under `rein.core` and
|
|
7
|
+
returns `Finding` objects. The CLI, MCP server, and git hooks are thin adapters
|
|
8
|
+
that gather input, call core, and render. No detection logic in adapters.
|
|
9
|
+
- Style: type-hint everything, ASCII only (no emojis), keep files and functions
|
|
10
|
+
small, prefer the standard library, and include tests.
|
|
11
|
+
- Commits: sole-authored, with a DCO sign-off (below). AI or tool attribution
|
|
12
|
+
trailers are not accepted.
|
|
13
|
+
|
|
14
|
+
## License
|
|
15
|
+
|
|
16
|
+
rein is licensed under the Apache License, Version 2.0 (see `LICENSE`). By
|
|
17
|
+
contributing, you agree that your contributions are licensed under the same
|
|
18
|
+
terms.
|
|
19
|
+
|
|
20
|
+
## Developer Certificate of Origin (sign-off required)
|
|
21
|
+
|
|
22
|
+
This project uses the Developer Certificate of Origin (see `DCO`). Every commit
|
|
23
|
+
must be signed off, certifying that you wrote the change or have the right to
|
|
24
|
+
submit it under the project license. Add the sign-off with:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git commit -s -m "feat: your change"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This appends a line of the form:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Signed-off-by: Your Name <you@example.com>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The sign-off certifies the origin of the work. It is not a tool or AI
|
|
37
|
+
attribution, which this project does not accept.
|
|
38
|
+
|
|
39
|
+
## Before you open a pull request
|
|
40
|
+
|
|
41
|
+
Run all three and make sure they are clean:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pytest -q
|
|
45
|
+
rein scan .
|
|
46
|
+
git ls-files | xargs grep -nP '[^\x00-\x7F]' # must print nothing: ASCII only
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Use Conventional Commit messages (`feat:`, `fix:`, `docs:`, `refactor:`,
|
|
50
|
+
`test:`, `chore:`), one line, imperative mood, subject 72 chars or fewer.
|
rein_engine-0.1.1/DCO
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Developer Certificate of Origin
|
|
2
|
+
Version 1.1
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies of this
|
|
7
|
+
license document, but changing it is not allowed.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Developer's Certificate of Origin 1.1
|
|
11
|
+
|
|
12
|
+
By making a contribution to this project, I certify that:
|
|
13
|
+
|
|
14
|
+
(a) The contribution was created in whole or in part by me and I
|
|
15
|
+
have the right to submit it under the open source license
|
|
16
|
+
indicated in the file; or
|
|
17
|
+
|
|
18
|
+
(b) The contribution is based upon previous work that, to the best
|
|
19
|
+
of my knowledge, is covered under an appropriate open source
|
|
20
|
+
license and I have the right under that license to submit that
|
|
21
|
+
work with modifications, whether created in whole or in part
|
|
22
|
+
by me, under the same open source license (unless I am
|
|
23
|
+
permitted to submit under a different license), as indicated
|
|
24
|
+
in the file; or
|
|
25
|
+
|
|
26
|
+
(c) The contribution was provided directly to me by some other
|
|
27
|
+
person who certified (a), (b) or (c) and I have not modified
|
|
28
|
+
it.
|
|
29
|
+
|
|
30
|
+
(d) I understand and agree that this project and the contribution
|
|
31
|
+
are public and that a record of the contribution (including all
|
|
32
|
+
personal information I submit with it, including my sign-off) is
|
|
33
|
+
maintained indefinitely and may be redistributed consistent with
|
|
34
|
+
this project or the open source license(s) involved.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Abdulsamet Atas
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
rein_engine-0.1.1/NOTICE
ADDED