Thanks for your interest. SessionMesh is small enough to keep the contribution flow lightweight; this doc is the only thing between an idea and a merged PR.
git clone https://github.com/3theories/SessionMesh.git
cd SessionMesh
swift build # compile both products
swift test # run the suite (29 tests / 8 suites today)That's it — no Bundler, no SwiftLint config, no signing setup.
The repo is intentionally one Package.swift away from
swift run-able.
| Change | Path |
|---|---|
| Bug fix — engine drops a duplicate it shouldn't, transport leaks a snapshot, reducer returns the wrong state | Open an issue or send a PR with a failing test in the same commit as the fix. |
| New transport — Bluetooth, network framework, multipeer, custom socket | New product target under Sources/. Keep it as a separate library (the WatchConnectivity transport is the template). |
| Core protocol change — wire format, identity, engine semantics | Open an issue first. Backwards compatibility of the v1 wire format is a design constraint. |
| Docs / examples / typo | Send the PR straight, no issue needed. |
- Tabs are out; 4-space indent.
- One type per file. Filename matches the primary type
(
SessionSyncEngine.swiftdeclaresSessionSyncEngine). - Doc-comment every public symbol with
///. Comments describe why, not what. - Default to
internalaccess. Make somethingpubliconly when a consumer demonstrably needs it.
The codebase compiles under strict concurrency in Swift 6. New code should land sendable-clean from day one.
- Pure
XCTest(no third-party harness). Sources/SessionMesh/must build on Linux. Theextraction boundarytest enforces that noWatchConnectivity/UIKit/AppKitimport leaks into the core target — don't defeat it.- New protocol semantics deserve a new
ScenarioHarnesscase. Reducer regressions deserve aDiagnosticsSessionsnapshot test. Engine bugs deserve a focused unit test onSessionSyncEngine.
Conventional Commits in the subject line; full body in the imperative. Examples:
fix(engine): drop envelopes whose sequence trails the watermarkfeat(transport): network framework transport (closes #42)docs(readme): clarify the snapshot-request protocol
Keep subjects ≤ 72 chars. Use the body for the why.
Before requesting review:
-
swift buildclean -
swift testgreen - Public API additions documented (
///on the symbol, plus a note in the README if it's discoverable from the type list) -
CHANGELOG.mdupdated under[Unreleased] - Linux build still works — the
extraction boundarytest is your safety net but doesn't catch every accidental Apple-framework import
By contributing you agree your changes are licensed under the MIT License.