* the house style is written down where the tooling reads it, and where an implementation may come from - #14
Conversation
…re an implementation may come from The .editorconfig carried an override forcing a 4-space indent on C# and project files. That has never been this repository's style. Measured over its own source, ignoring vendored and generated files: opening brace on its own line 2 opening brace on the same line 3494 and the leading-space histogram has 7321 lines at two and 5514 at six, which only occur on a two-space ladder. The override is removed -- [*] already gives 2 -- and a [*.cs] block now states the K&R brace rules in the form Roslyn can actually enforce, which nothing did. AGENTS.md gains the sourcing ladder from the template: licence-compatible source we can take outright, either vendored verbatim or converted into house style; then the clean-room path for source we cannot take, read for a specification, test cases and an oracle; then the normative specification, trusted secondary write-ups, and last untrusted material needing independent agreement. Constants sit outside the ladder because they cut across it -- tables, S-boxes and polynomials are facts, not expression, and get copied exactly.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4c6d03612
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Either way, record where it came from — a `THIRD_PARTY_NOTICES.md` in the package, or a | ||
| `THIRD-PARTY-NOTICE.<Name>.txt` beside the code. Attribution is a licence term, not a courtesy. |
There was a problem hiding this comment.
Preserve upstream licenses when converting code
When the compatible-source path uses “Convert” rather than “Vendor,” requiring only a provenance file is insufficient: a translation or adaptation remains derivative code subject to the upstream license. For example, Apache-2.0 requires preservation of its license, applicable NOTICE contents, and prominent notices of modifications. Agents following this guide could therefore ship converted code without satisfying its license; require compliance with every upstream license condition for both paths, not merely attribution, while retaining this repository's LGPL licensing.
AGENTS.md reference: AGENTS.md:L113-L114
Useful? React with 👍 / 👎.
| **Constants are not expression.** Tables, S-boxes, magic numbers, CRC polynomials, Huffman code | ||
| tables, quantisation matrices, window and filter coefficients: copy them exactly, from whichever | ||
| source is authoritative, on every rung of this ladder. A re-derived S-box is simply a wrong S-box, |
There was a problem hiding this comment.
Do not copy constants from incompatible sources
The “on every rung” exception explicitly directs contributors to copy tables even from the preceding proprietary or unlicensed-source rung. Although some standardized constants are uncopyrightable facts, arbitrary quantization matrices, filter coefficients, and collected tables can still be protected by copyright, database rights, patents, contract, or trade-secret restrictions. Limit verbatim copying to authoritative sources whose terms permit redistribution; incompatible sources should remain oracle-only so an implementation does not compromise the repository's LGPL distribution.
AGENTS.md reference: AGENTS.md:L113-L114
Useful? React with 👍 / 👎.
The .editorconfig carried an override forcing a 4-space indent on C# and project
files. That has never been this repository's style. Measured over its own source,
ignoring vendored and generated files:
opening brace on its own line 2
opening brace on the same line 3494
and the leading-space histogram has 7321 lines at two and 5514 at six, which only
occur on a two-space ladder.
The override is removed -- [] already gives 2 -- and a [.cs] block now states
the K&R brace rules in the form Roslyn can actually enforce, which nothing did.
AGENTS.md gains the sourcing ladder from the template: licence-compatible source
we can take outright, either vendored verbatim or converted into house style;
then the clean-room path for source we cannot take, read for a specification,
test cases and an oracle; then the normative specification, trusted secondary
write-ups, and last untrusted material needing independent agreement. Constants
sit outside the ladder because they cut across it -- tables, S-boxes and
polynomials are facts, not expression, and get copied exactly.