diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..b1588c9
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,22 @@
+name: tests
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+
+jobs:
+ pytest:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest]
+ python-version: ["3.10", "3.12"]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ - run: pip install -e '.[dev]'
+ - run: pytest -q
diff --git a/README.md b/README.md
index 43ab544..841326a 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
# Second Brain
+[](https://github.com/alfielambert/second-brain/actions/workflows/tests.yml)
+[](LICENSE)
+
+
Most second brains store information.
This one decides what deserves to become knowledge.
@@ -78,19 +82,13 @@ this" by walking the chain back to the original evidence. See
## Architecture
-**Local mode** - everything on your machine, nothing required beyond this repo:
-
-```
-Sources -> Connectors -> Claim Store -> KEP -> Governed Knowledge -> Local AI
-```
+
+
+
-**Multiplayer mode** - once more than one agent needs the same knowledge:
-
-```
-Sources -> Connectors -> Claim Store -> KEP -> Governed Knowledge -> OpenLore -> Multiple AI agents
-```
+**Local mode** runs everything on your machine and needs nothing beyond this repo. **Multiplayer mode** adds OpenLore at the end, once more than one agent needs the same knowledge.
-[OpenLore](https://github.com/aakarim/go-openlore) is an open-source
+[OpenLore](https://github.com/aakarim/OpenLore) is an open-source
knowledge server for AI agents. **Second Brain creates and governs
knowledge. OpenLore distributes governed knowledge to agents.** The two
are cleanly separable, and OpenLore is entirely optional - you do not
diff --git a/docs/architecture.md b/docs/architecture.md
index a3bdfd8..5d03103 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -40,7 +40,7 @@ Sources -> Connectors -> Claim Store -> KEP -> Governed Knowledge -> OpenLore ->
```
The only thing that changes is the last step. OpenLore
-(https://github.com/aakarim/go-openlore) is a separate, already
+(https://github.com/aakarim/OpenLore) is a separate, already
open-source, MIT-licensed knowledge server - not a proprietary add-on. It
knows nothing about claims, KEP, or this schema; it just serves a directory
of markdown+frontmatter over SSH/MCP/HTTP to authenticated identities.
diff --git a/docs/assets/how-it-works.svg b/docs/assets/how-it-works.svg
new file mode 100644
index 0000000..da8c890
--- /dev/null
+++ b/docs/assets/how-it-works.svg
@@ -0,0 +1,108 @@
+
diff --git a/docs/openlore-integration.md b/docs/openlore-integration.md
index 31a91fc..1346cdc 100644
--- a/docs/openlore-integration.md
+++ b/docs/openlore-integration.md
@@ -18,7 +18,7 @@ synchronization problem wearing a knowledge-management costume.
## What OpenLore is
-[OpenLore](https://github.com/aakarim/go-openlore) is a separate,
+[OpenLore](https://github.com/aakarim/OpenLore) is a separate,
already-open-source (MIT), agent-native knowledge server. It serves a
directory of markdown+frontmatter to authenticated agent identities over
SSH, MCP (HTTP or stdio), and a JSON REST API - with per-identity scoped
@@ -42,7 +42,7 @@ with no manual copying.
go install github.com/aakarim/go-openlore/cmd/openlore@latest
```
-(Requires Go 1.26+. See the [OpenLore README](https://github.com/aakarim/go-openlore#installation) for other install methods.)
+(Requires Go 1.26+. See the [OpenLore README](https://github.com/aakarim/OpenLore/blob/main/docs/start/quickstart.md#install) for other install methods.)
### 2. Point it at governed knowledge
diff --git a/tests/test_subprocess_timeout.py b/tests/test_subprocess_timeout.py
index 19d341f..d6bcb44 100644
--- a/tests/test_subprocess_timeout.py
+++ b/tests/test_subprocess_timeout.py
@@ -72,5 +72,19 @@ def test_grandchild_process_does_not_survive_the_timeout_kill():
if content: # the grandchild got far enough to write its pid before being killed
grandchild_pid = int(content)
- with pytest.raises(ProcessLookupError):
- os.kill(grandchild_pid, 0) # signal 0: just checks if the process exists
+ assert not _is_running(grandchild_pid)
+
+
+def _is_running(pid):
+ """True if pid exists and is not a zombie. A killed orphan stays a
+ zombie until init reaps it, and some container inits never do, so
+ os.kill(pid, 0) alone would report a dead process as alive."""
+ try:
+ os.kill(pid, 0) # signal 0: just checks if the process exists
+ except ProcessLookupError:
+ return False
+ try:
+ with open(f"/proc/{pid}/stat") as f:
+ return f.read().rsplit(")", 1)[1].split()[0] != "Z"
+ except FileNotFoundError: # no /proc (macOS): trust os.kill
+ return True