Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Collaboration rules

These rules apply to every Bobine repository. A rule here wins over habit; the maintainer’s explicit decision wins over a rule here.

Language and writing

Everything written in a repository is in English: branch names, commits, pull requests, issues, identifiers, files, workflows, jobs, comments, logs and documentation. Translations meant for users are the only exception (interface texts, French README and site pages). An existing French name is renamed in the pull request that touches it, or in a pull request of its own; a name another repository reads or that is published is renamed readers first, without a break.

Write short, factual sentences. No filler, no superlatives, no marketing words. No emoji anywhere: code, interface, logs, command output, documentation, commits. No decorative symbols in documentation: no arrows, no dashes as punctuation; use a comma, a colon or a new sentence. A README has no horizontal scrolling: code lines of 80 characters at most, tables of three columns at most. Announce only what is shipped, and say where it was proven: unit tests, CI, emulator or real hardware.

Git

One working branch at a time, named type/short-topic. Everything goes through a pull request to main; nobody commits to main directly, and nobody force pushes, amends or rebases a pushed commit.

Commits, pull request titles and branches follow Conventional Commits, lowercase, with a scope, in the imperative, in plain ASCII: fix(playback): resync after a missed tick. Types: feat, fix, refactor, perf, test, docs, build, ci, chore, revert. The body says the root cause fixed, the mechanism added and the checks run. One commit is one coherent change: a refactor and a behavior change never share a pull request.

After a merge, the branch is deleted on the server and locally, and the local main is brought up to date. A repository keeps only main, plus gh-pages where Pages serves files and the open Dependabot branches.

Versions

Versions read X.Y.Z and follow the OpenSSL policy. MAJOR breaks a compatibility: a published API or command, a configuration or data format, a minimum system. MINOR adds without breaking. PATCH fixes bugs and security issues only. A number never goes back. Tags and package versions carry no date; a release title reads Bobine X.Y.Z (YYYY-MM-DD), the UTC day of the build.

Always agreed with the maintainer first: a release, a publication on a channel, a security advisory, a write to a real device, server or account, a new dependency, a change to a published format (API, configuration, addresses).

Pull requests

A pull request is merged only when every check of the repository passes on it. Never disable, skip, relax or retry a test, a lint rule or a threshold to get a pull request through. A failing test is resolved at its cause, in the tested code or the environment, never in the test: no changed expectation, wider tolerance, longer delay, added retry, skip, expected failure, or mock of the failing part. A test that fails now and then is a bug (race, clock, order, shared state): reproduce it, find the cause, fix it. A skip exists only for an environment (system, missing binary), with its reason, and every test runs on at least one CI runner.

Every fixed bug gets a regression test that failed before the fix. A move of code passes the full suite, and a split is proven by comparing old and new behavior. A validation that needs hardware nobody has is declared not done, never passed.

Each pull request touching the network, files, processes, uploads, updates, the native bridge or response headers answers four questions in its description: which new input, which bound, which failure and how it is logged, which test proves it.

Code hygiene

No comments: the code speaks through its names, types and tests. A comment exists only when it is essential (a standard, hardware, a third-party bug, a security invariant), as one technical English line. Kept: generated file headers, license headers, SAFETY comments, shebangs, one-line docstrings on a public API whose name does not say it all.

One task per function, about 50 lines; one file per job, about 300 lines, in the folder of its domain. Longer is accepted when it reads in one go (a flat dispatch, a data table, a sequence that delegates each step), with the reason in the pull request. Split by responsibility, never by number. Blocking limits: 80 lines for a backend function, 500 lines for a frontend file, exceptions recorded with their reason in the guard.

A lint exception names its rule and a reason no fix allows; never a global exception; a dead directive is removed.

One source per fact: search for what exists before writing, extend rather than copy. No versioned names (v2, Old, Legacy, copy) outside an external format. No dead code. Change in place and remove what is replaced, without a compatibility layer.

Architecture

A pure core, categories, implementations. Rules and calculations live in pure functions tested without network or disk; platform or technology implementations sit behind an interface, picked by a registry; no platform branch outside the registry and its implementations.

Thin edges: routes, commands and components translate only. A business rule is written once and every interface (API, bobine command, frontend, Android, site) uses it. A shared value lives in one place. Data drives lists and choices.

A reassigned variable and its readers stay in the same module. No swallowed error: a tolerated failure is logged, a failure that would leave a wrong state stops the operation. No new dependency without a written justification (need, alternatives, maintenance, license compatible with AGPL-3.0, weight on each profile) and the maintainer’s agreement.

Platforms

Bobine runs on four profiles: Android and Android TV, Linux desktop, Windows, macOS. Any change that touches the system (hardware, sleep, windowing, sound, storage, processes, network) is designed for all four. Only real hardware validates a profile; CI and emulators are named as what they are.

Security

The threat model comes before the code. Bobine trusts the local network and has no accounts; any new route, command or network opening says whether it stays inside that model. Access from outside the local network requires an authentication the maintainer decides.

Inputs are bounded at the boundary: bodies, uploads, archives, media, configuration and remote replies, by size, type, depth and path. Every path resolves under its root; nothing is written outside the data folders. Processes get argument lists, binaries by known path, a timeout and bounded output. Every served response carries security headers; an artifact is installed only after its signed checksum is checked; no response returns an internal path, a trace or a secret.

Forbidden: shell=True, os.system, eval, exec, new Function, pickle or marshal on received data, yaml.load without a safe loader, disabled TLS verification, tempfile.mktemp, SQL built from strings, innerHTML outside constants, unsafe Rust without a SAFETY comment, chmod 777.

No secret in code, tests, logs, command lines, URLs or documentation; a leaked secret is revoked at once. Dependencies are pinned to exact, locked versions; every download is checked by checksum or signature; actions are pinned by commit; workflow permissions are minimal; no secret reaches a pull request job.

Report a vulnerability privately, as described in SECURITY.md, never in a public issue.

Public repositories

Everything versioned is readable by everyone, history included: never a secret, a personal address, a local IP or an operations detail. Licenses: Bobine is AGPL-3.0; BobineWeb, bobine-packages and homebrew-bobine are published for reading only; this repository is MIT.

Public documentation stays minimal: a short README, and docs/ limited to release notes, generated reference, security and community files. Every repository has a public backup copy at gitlab.com/FantasmaGlad, pushed from GitHub Actions, named on one discreet line at the top of its README.

Working with the maintainer

No claim without proof: code, logs, a real request, a measurement. Say what is measured, what is read and what is estimated. Ask before a decision that is costly to undo. Stay in scope; write what you notice along the way in docs/status.md. A requirement that is ambiguous, contradictory or impossible as written is raised under pending decisions in docs/status.md with the options and their cost, never settled silently.