feat: implement project bus MVP

This commit is contained in:
Codex Lead Engineer
2026-07-30 02:13:26 +02:00
commit bc55924198
28 changed files with 3518 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
# Independent Claude Review Brief
## Role
Act as independent Lead Reviewer for `WP-PA-001 — Epimonos Project Bus MVP`.
Do not modify the implementation during the first review pass. The implementer
is Codex; reviewer identity and evidence must remain independent.
## Review objectives
1. Verify every requested capability against code, schema, tests, and docs.
2. Challenge BASDM separations:
- PA cannot make product/architecture/gate decisions;
- implementer cannot review or accept own work;
- only authorized PM/PO actors close gates and release baselines.
3. Inspect transaction boundaries, idempotency replay, concurrent claims,
cursor semantics, and projection/event atomicity.
4. Assess authentication, cross-project isolation, origin handling, input
validation, SQL usage, audit immutability, and operational failure modes.
5. Check MCP `2025-03-26` request/response interoperability assumptions.
6. Confirm the core contains no Sandbox/Epimonos product-specific logic.
7. Confirm documentation accurately states all production gaps.
## Required output
Return:
- verdict: `APPROVE`, `CHANGES_REQUESTED`, or `REJECT`;
- numbered findings with severity `Critical/High/Medium/Low`;
- exact file and line reference;
- exploit/failure scenario;
- required correction and suggested verification;
- scope-completeness matrix;
- residual-risk statement.
Run at minimum:
```bash
PYTHONPATH=src python -m unittest discover -v
PYTHONPATH=src python -m compileall -q src tests
```
Also add adversarial tests where a claimed invariant is not adequately proven.
Do not accept solely because the existing suite is green.
+40
View File
@@ -0,0 +1,40 @@
WP-PA-001 VERIFICATION
Date: 2026-07-30
Candidate version: 0.1.0
RESULTS
- Python source compilation: PASS
- Source-tree test suite: PASS (16 tests)
- Built/installed-package test suite: PASS (16 tests)
- Installed-package migration smoke test: PASS
- Local Git repository root initialized: PASS
- External repository creation/push: NOT PERFORMED (by scope)
- Container build: NOT RUN (Docker unavailable in execution environment)
- Independent Claude review: PENDING
- ChatGPT/Claude Code client interoperability: PENDING ACTIVATION
COMMANDS
PYTHONPATH=src python -m compileall -q src tests
PYTHONPATH=src python -m unittest discover -v
PIP_CACHE_DIR=/tmp/pip-cache python -m pip install --root-user-action=ignore --no-deps --no-build-isolation --target <temporary-directory> .
PYTHONPATH=<temporary-directory> PROJECT_BUS_MIGRATIONS=<repository>/migrations python -m unittest discover -v
SCOPE INTEGRITY
- Canonical Sandbox ZIP SHA-256 after implementation:
9ca8ec98221146730c1ed82d8d5e2011b710d623ea046b7ab87a1d1cfb4e8bad
- Handoff delta SHA-256 after implementation:
81fd1e58319299c4acfaf6c22bddacfe6f1de34ccfffac7943647d834aa912e6
- Neither file exists inside this repository.
PRE-VERIFICATION SOURCE SET
- Files: 27
- Aggregate SHA-256 over sorted per-file SHA-256 records:
e379541644e82fa4fd8096761625a0ec015528e51f20b21b13c9a7fa7bf53ce1
- This aggregate intentionally excludes this VERIFICATION.txt file.
REMAINING GATES
1. Independent Claude security/architecture review using CLAUDE_REVIEW_BRIEF.md.
2. Correction and re-verification of any findings.
3. Exact MCP interoperability checks with intended ChatGPT and Claude Code versions.
4. PM gate acceptance.
5. Production hardening work package before internet-facing deployment.
+56
View File
@@ -0,0 +1,56 @@
# WP-PA-001 Evidence
## Scope delivered
- standalone generic repository root;
- relational schema and migration;
- append-only project event log;
- projects, actors, formal roles, work packages, results, reviews, decisions,
escalations, links, gates, baselines, and cursor synchronization;
- authorization, identity abstraction, idempotency, atomic claims, and
concurrency-safe writes;
- MCP Streamable HTTP request/response interface;
- unit, governance, concurrency, and HTTP integration tests;
- deployment example, architecture, tool contract, threat model, production
delta, and independent review brief.
## Verification commands
```bash
PYTHONPATH=src python -m compileall -q src tests
PYTHONPATH=src python -m unittest discover -v
python -m unittest discover -v
```
The third command is run after editable installation and proves the packaged
import path. Record the final observed counts and hashes in
`VERIFICATION.txt`; generated database files are excluded.
## Acceptance mapping
| Requested evidence | Location |
|---|---|
| Append-only event log | `migrations/001_initial.sql`, trigger tests |
| Project/actor/role model | migration, `models.py`, service tests |
| Work/result/review lifecycle | `service.py`, full workflow test |
| Decision and gate separation | authorization tests |
| Reviewer independence | request/submit checks and test |
| Idempotency | table, canonical hash logic, replay/mismatch test |
| Concurrency safety | `BEGIN IMMEDIATE`, concurrent claim test |
| Cursor synchronization | `sync_since`, pagination test |
| Commit/artifact/baseline links | service and MCP tools |
| Authentication abstraction | `AuthProvider`, static adapter |
| MCP interface | `mcp.py`, HTTP integration tests |
| Deployment and production differences | `deploy/`, production profile |
| Threat model | `docs/THREAT_MODEL.md` |
| Independent review input | `CLAUDE_REVIEW_BRIEF.md` |
## Explicit exclusions
- no external repository creation, commit, or push;
- no production deployment or ChatGPT/Claude activation;
- no PostgreSQL adapter, OIDC provider, SSE push channel, or chat wake-up;
- no Sandbox/Epimonos product domain logic;
- no copy of the Sandbox SG handoff delta;
- no modification of the canonical Sandbox v0.1.0 ZIP.