Repository navigation
Add the agent, contributor and security rules, and format and lint the Erlang code - #92
Merged
Merged
Conversation
Adopt the formatter erlang_quic uses: rebar3 fmt rewrites src, test, examples, scripts and rebar.config, and the Lint job now fails on code it would change. Apart from the plugin and CI lines, this commit only reformats.
elvis.config takes erlang_quic's rule set. The modules that broke a rule when it was adopted are exempted per rule, so a new module follows all of them and the lists only shrink. Two map_size comparisons now use =:= and py_venv's one-line Python programs are split under 120 columns. The Lint job runs rebar3 lint.
The guide moves to the root, where GitHub shows it on issues and pull requests, and takes erlang_quic's rules for contributors: write for the person who reads it, what AI tools may do, which reports are bugs rather than security issues, branch and commit conventions, one pull request with a commit per step, and how a release is made. make lint-docs now checks it too.
SECURITY.md says what to report privately: memory corruption or code execution from data passing through the library, or code loaded from a place the configuration did not name. Anything Python code can do is a bug, because Python holds the authority of the user running the node, as the sandbox and isolated mode guides already say.
AGENTS.md gathers what an agent must know before changing the code: a NIF bug is the node's, so a fix covers the whole defect class and proves its mechanism with a test; Python code is not a security boundary; the checks CI gates on and the CMake cache trap; how tests, plans, commits, pull requests and releases are done. CLAUDE.md points to it.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
erlang_python had no written rules for agents, no security policy, and no formatter or linter. Style drifted, and nothing said where a bug ends and a vulnerability starts. This brings over what erlang_quic uses, adapted to a library that runs Python inside the VM.
The Erlang sources are formatted with erlfmt and linted with Elvis, and the Lint job checks both. The reformat is its own commit and changes no code. Elvis exempts, rule by rule, the modules that broke a rule when it was adopted, so new modules follow every rule. AGENTS.md holds the rules for agents, and CLAUDE.md points to it. The contributor guide moves to CONTRIBUTING.md and gains erlang_quic's rules for contributors. SECURITY.md draws the line: anything Python code can do is a bug, since Python holds the authority of the user running the node.
No breaking changes. A branch open against main will conflict with the reformat; run
rebar3 fmton it before merging main in.