mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-08-28 22:28:28 +00:00
Scribe: Merge proto contract decisions from spawn batch
- Merged copilot-directive-protobuf-contract.md → decisions.md (architecture decision) - Merged copilot-directive-fixtures-from-prod.md → decisions.md (user directive) - Wrote orchestration log entry for spawn batch completion - decisions.md now 380 lines (7 Go Rewrite decisions, 2 new proto entries) - Proto validation spike complete: 33 fixtures, 0 errors, compiler-enforced contract Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -346,3 +346,8 @@ Playwright E2E tests (16 tests in `test-e2e-playwright.js`) are slow in CI. Anal
|
||||
**By:** Kpa-clawbot (via Copilot)
|
||||
**Decision:** All frontend/backend interfaces get protobuf definitions as the single source of truth. Go generates structs with JSON tags from protos. Node stays unchanged — protos are derived FROM Node's current JSON shapes. Proto definitions MUST use inheritance and composition (no repeating field definitions). Data flow: SQLite → proto struct → JSON. JSON blobs from DB deserialize against proto structs for validation.
|
||||
**Rationale:** Eliminates the endless parity bugs between Node and Go. Compiler-enforced contract instead of agent-verified field matching. DRY — shared message types composed, not duplicated.
|
||||
|
||||
### 2026-03-27T22:00:00Z: User directive — Proto fixture capture from prod
|
||||
**By:** Kpa-clawbot (via Copilot)
|
||||
**Decision:** CI pipeline's proto fixture capture should run against prod (the stable reference), not staging. Staging may have broken code. Prod is the known-good baseline for contract validation.
|
||||
**Rationale:** Ensures proto contracts are validated against production behavior, not potentially broken staging code.
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
# Spawn Batch — Proto Validation & Typed API Contracts
|
||||
|
||||
**Timestamp:** 2026-03-27T22:19:53Z
|
||||
**Scribe:** Orchestration Log Entry
|
||||
**Scope:** Go server proto validation, fixture capture, CI architecture
|
||||
|
||||
---
|
||||
|
||||
## Team Accomplishments (Spawn Manifest)
|
||||
|
||||
### Hicks (Backend Dev)
|
||||
- **Fixed #163:** 15 API violations — type mismatches in route handlers
|
||||
- **Fixed #164:** 24 proto mismatches — shape inconsistencies between Node.js JSON and Go structs
|
||||
- **Delivered:** `types.go` — 80 typed Go structs replacing all `map[string]interface{}` in route handlers
|
||||
- **Impact:** Proto contract fully wired into Go server; compiler now enforces API response shapes
|
||||
|
||||
### Bishop (Proto Validation)
|
||||
- **Validated:** All proto definitions (0 errors)
|
||||
- **Captured:** 33 Node.js API response fixtures from production
|
||||
- **Status:** Baseline fixture set ready for CI contract testing
|
||||
|
||||
### Hudson (CI/DevOps)
|
||||
- **Implemented:** CI proto validation pipeline with all 33 fixtures
|
||||
- **Fixed:** Fixture capture source changed from staging → production
|
||||
- **Improved:** CI split into parallel tracks (backend tests, frontend tests, proto validation)
|
||||
- **Impact:** Proto contracts now validated against prod on every push
|
||||
|
||||
### Coordinator
|
||||
- **Fixed:** Fixture capture source (staging → prod)
|
||||
- **Verified:** Data integrity of captured fixtures
|
||||
|
||||
---
|
||||
|
||||
## Key Milestone: Proto-Enforced API Contract
|
||||
|
||||
**Status:** ✅ Complete
|
||||
|
||||
Go server now has:
|
||||
1. Full type safety (80 structs replacing all `map[string]interface{}`)
|
||||
2. Proto definitions as single source of truth
|
||||
3. Compiler-enforced JSON field matching (no more mismatches)
|
||||
4. CI validation on every push (all 33 fixtures + 0 errors)
|
||||
|
||||
**What Changed:**
|
||||
- All route handlers return typed structs (proto-derived)
|
||||
- Response shapes match Node.js JSON exactly
|
||||
- Any shape mismatch caught at compile time, not test time
|
||||
|
||||
**Frontend Impact:** None — JSON shapes unchanged, frontend code continues unchanged.
|
||||
|
||||
---
|
||||
|
||||
## Decisions Merged
|
||||
|
||||
**New inbox entries processed:**
|
||||
1. ✅ `copilot-directive-protobuf-contract.md` → decisions.md (1 decision)
|
||||
2. ✅ `copilot-directive-fixtures-from-prod.md` → decisions.md (1 directive)
|
||||
|
||||
**Deduplication:** Both entries new (timestamps 2026-03-27T20:56:00Z, 2026-03-27T22:00:00Z). No duplicates detected.
|
||||
|
||||
---
|
||||
|
||||
## Decisions File Status
|
||||
|
||||
**Location:** `.squad/decisions/decisions.md`
|
||||
**Current Size:** ~380 lines
|
||||
**Archival Threshold:** 20KB
|
||||
**Status:** ✅ Well under threshold, no archival needed
|
||||
|
||||
**Sections:**
|
||||
1. User Directives (6 decisions)
|
||||
2. Technical Fixes (7 issues)
|
||||
3. Infrastructure & Deployment (3 decisions)
|
||||
4. Go Rewrite — API & Storage (7 decisions, +2 proto entries)
|
||||
5. E2E Playwright Performance (1 proposed strategy)
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
**Inbox Merged:** 2 entries → decisions.md
|
||||
**Orchestration Log:** 1 new entry (this file)
|
||||
**Files Modified:** `.squad/decisions/decisions.md`
|
||||
**Git Status:** Ready for commit
|
||||
|
||||
**Next Action:** Git commit with explicit file list (no `-A` flag).
|
||||
Reference in New Issue
Block a user