feat: community module — CommunityDB, CommunityPost, SharedStore (MIT) #46

Open
opened 2026-04-12 17:11:25 -07:00 by pyr0ball · 0 comments
Owner

Summary

Add a community module to circuitforge-core providing the shared PostgreSQL connection pool, migration runner, and base data models consumed by Kiwi, Snipe, and Peregrine.

Implementation plan: circuitforge-plans/circuitforge-core/superpowers/plans/2026-04-12-community-module.md

Files

  • circuitforge_core/community/__init__.py
  • circuitforge_core/community/db.pyCommunityDB (psycopg2 pool + migration runner)
  • circuitforge_core/community/models.pyCommunityPost frozen dataclass (full element snapshot schema)
  • circuitforge_core/community/store.pySharedStore base class (typed pg read/write)
  • circuitforge_core/community/migrations/001_community_posts.sql
  • circuitforge_core/community/migrations/002_community_post_reactions.sql (stub)
  • tests/community/ — full test coverage

BSL boundary

All code in this issue is MIT. CommunitySignal (BSL 1.1) is explicitly excluded — it lives in cf-orch (see circuitforge-orch#35).

Dependencies

None. This is the foundation — cf-orch and kiwi community features depend on this.

Version bump

v0.9.xv0.10.0 (new module)

Dependency: psycopg2 (not psycopg2-binary)

Add psycopg2>=2.9 to pyproject.toml.

## Summary Add a `community` module to circuitforge-core providing the shared PostgreSQL connection pool, migration runner, and base data models consumed by Kiwi, Snipe, and Peregrine. **Implementation plan:** `circuitforge-plans/circuitforge-core/superpowers/plans/2026-04-12-community-module.md` ## Files - `circuitforge_core/community/__init__.py` - `circuitforge_core/community/db.py` — `CommunityDB` (psycopg2 pool + migration runner) - `circuitforge_core/community/models.py` — `CommunityPost` frozen dataclass (full element snapshot schema) - `circuitforge_core/community/store.py` — `SharedStore` base class (typed pg read/write) - `circuitforge_core/community/migrations/001_community_posts.sql` - `circuitforge_core/community/migrations/002_community_post_reactions.sql` (stub) - `tests/community/` — full test coverage ## BSL boundary All code in this issue is **MIT**. `CommunitySignal` (BSL 1.1) is explicitly excluded — it lives in cf-orch (see circuitforge-orch#35). ## Dependencies None. This is the foundation — cf-orch and kiwi community features depend on this. ## Version bump `v0.9.x` → `v0.10.0` (new module) ## Dependency: psycopg2 (not psycopg2-binary) Add `psycopg2>=2.9` to `pyproject.toml`.
pyr0ball added the
enhancement
priority:high
labels 2026-04-12 17:11:25 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/circuitforge-core#46
No description provided.