RESENTMENT OS 2.0.0

Contributing to RESENTMENT OS

Patches, bug reports and new providers are welcome. This document is short because most of what matters is enforced by make test rather than by review.


Branches

BranchWhat it isSend pull requests here for
v2.0.0the operating system: the kernel submodule, the desktop, the bridge, the tests, the docsanything under os/, tests/, docs/, the Makefile
mainthe website and the community filesanything under web/, tools/, this file and its siblings
v1.0.0the Linux distribution, frozennothing; it is history

The kernel is a submodule. A change to it goes to the kernel repository; this repository then bumps the pointer.

A branch and a tag share a name here, which git allows but treats as ambiguous: git checkout refs/heads/v2.0.0 for the branch, refs/tags/v2.0.0 for the tag.

Before you send anything

make test          # the desktop under Node, the bridge against a fake kernel
make qemu-test     # the real kernel through the bridge, if you have QEMU

Then open the desktop in a browser and use the part you changed. Say which browser in the pull request. "Tests pass" and "it works in Firefox" are different claims.

For the website:

sh tools/fetch-v2.sh && python3 tools/mksite.py --serve

What the code should look like

Match the surrounding file. Beyond that:

What the comments should say

Comments explain why, not what. The reason a piece of code is shaped the way it is: the constraint that forced it, the alternative that was rejected, the failure it prevents.

If you make a deliberate simplification with a known ceiling, mark it and name the upgrade path:

/* ponytail: the whole tree lives in memory, which is fine to a few tens of
 * megabytes; move to per-file IndexedDB reads if a user ever imports a
 * video. */

They are greppable, and they are how the tree stays honest about what it postponed.

Tests

New logic gets a check in tests/. The harness is node --test and node:assert/strict; no framework, no fixtures beyond a fresh() helper. Write the test so that it fails if you break the thing. A test that searches the whole transcript for a short string will pass against a kernel that never received a byte; the kernel's own harness learned that the hard way.

A new provider gets a request-shaping test and a stream-parsing test against a recorded stream in tests/providers.test.js. A new tool gets a test in tests/agent.test.js that grants and denies its scope.

Adding a provider

See docs/PROVIDERS.md. If it speaks one of the three wire formats, it is one table row.

Security

If you find something exploitable, open a private report rather than a public issue. The places that deserve the most suspicion:

Licence

Contributions are under Apache 2.0, the same as the rest of the tree. There is no CLA; opening the pull request is the agreement.