Pivot: fold drizzlebox as utils, HonkerEventTarget, OperationSpecs as repo surface
- Update architecture docs to reflect pivot from @libsql/client to Honker - Fold @alkdev/drizzlebox Phase 0 into src/sqlite/utils/ (ADR-046) - Add HonkerEventTarget adapter for pubsub TypedEventTarget (ADR-047) - Replace hand-written CRUD with OperationSpec generation (ADR-048) - Resolved OQ-26: Honker replaces Redis for single-node pub/sub (POC validated) - Updated OQ-17, OQ-18, OQ-19 for OperationSpec repository surface - Added OQ-30 (composite event target), OQ-31 (consumer naming), OQ-32 (Drizzle Kit) - POC results: adapter buildable, same-process pub/sub works, transactional outbox semantics confirmed, concurrent listeners/streams work - Research doc at docs/research/pivot-honker-sqlite-adapter.md
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
status: draft
|
||||
last_updated: 2026-05-31
|
||||
last_updated: 2026-06-01
|
||||
---
|
||||
|
||||
# Open Questions Tracker
|
||||
@@ -12,8 +12,8 @@ architecture documents, organized by theme.
|
||||
|
||||
| Status | Count |
|
||||
|--------|-------|
|
||||
| Open | 9 |
|
||||
| Resolved (this revision) | 15 |
|
||||
| Open | 10 |
|
||||
| Resolved (this revision) | 18 |
|
||||
| Previously resolved | 11 |
|
||||
|
||||
**Open questions requiring decisions:**
|
||||
@@ -23,10 +23,13 @@ architecture documents, organized by theme.
|
||||
- **OQ-11** (auto-migrate vs explicit) — conditional on OQ-10
|
||||
- **OQ-12** (schema evolution vs event-sourced replay) — post-v1 concern
|
||||
- **OQ-13** (schema evolution events in event stream) — post-v1
|
||||
- **OQ-26** (Honker replaces @alkdev/pubsub Redis transport) — integration design
|
||||
- **OQ-25** (scope string semantics) — evaluator concern
|
||||
- **OQ-27** (tenant DB schema migration strategy) — multi-tenant operations
|
||||
- **OQ-28** (cross-tenant delegation with separate DBs) — cross-DB coordination
|
||||
- **OQ-29** (standalone drizzle-honker npm package) — community value
|
||||
- **OQ-30** (composite event target for single-node hub) — latency optimization
|
||||
- **OQ-31** (consumer naming for durable subscriptions) — restart stability
|
||||
- **OQ-32** (Drizzle Kit migration compatibility) — custom adapter
|
||||
|
||||
## Theme 1: Package Boundaries and Dependencies
|
||||
|
||||
@@ -152,21 +155,23 @@ architecture documents, organized by theme.
|
||||
|
||||
### OQ-17: Attribute queries — JSON path, native columns, or dbtype-generated?
|
||||
|
||||
- **Status**: resolved (v1)
|
||||
- **Status**: resolved (updated)
|
||||
- **Priority**: high
|
||||
- **Resolution**: JSON path for v1. ADR-033. Long-term hybrid still open but less pressing without PG dual maintenance.
|
||||
- **Resolution**: JSON path for metagraph attributes (dynamic schemas). Native columns for domain-specific tables (CallGraph, etc.). OperationSpecs provide the CRUD contract for both patterns. ADR-048 supersedes ADR-033.
|
||||
- **Cross-references**: ADR-048
|
||||
|
||||
### OQ-18: Auto-generated vs hand-written CRUD?
|
||||
|
||||
- **Status**: resolved (v1)
|
||||
- **Status**: resolved (updated)
|
||||
- **Priority**: medium
|
||||
- **Resolution**: Hand-write for v1. ADR-033.
|
||||
- **Resolution**: Not hand-written CRUD — OperationSpecs. Storage outputs `OperationSpec[]` from table definitions. The consumer (hub/spoke) registers handlers. ADR-048.
|
||||
- **Cross-references**: ADR-048
|
||||
|
||||
### OQ-19: Storage-operations bridge package location?
|
||||
|
||||
- **Status**: resolved
|
||||
- **Status**: resolved (updated)
|
||||
- **Priority**: medium
|
||||
- **Resolution**: Less pressing now that Honker replaces the Redis transport. Can live in the hub for v1. Revisit if an adapter package becomes valuable.
|
||||
- **Resolution**: No separate bridge package needed. Storage outputs `OperationSpec[]` as part of its table definitions (type-only peer dep on `@alkdev/operations`). The consumer wires specs into the registry. ADR-048.
|
||||
|
||||
## Theme 7: Access Control
|
||||
|
||||
@@ -220,9 +225,10 @@ architecture documents, organized by theme.
|
||||
### OQ-26: Can Honker fully replace @alkdev/pubsub's Redis transport for single-node deployments?
|
||||
|
||||
- **Origin**: [honker-integration.md](honker-integration.md)
|
||||
- **Status**: open
|
||||
- **Status**: resolved
|
||||
- **Priority**: high
|
||||
- **Notes**: Honker's `notify()`/`listen()` and `stream()`/`subscribe()` provide the pub/sub primitives. The question is whether `@alkdev/pubsub`'s `TypedEventTarget` interface can be backed by Honker instead of Redis, and whether multi-node deployments still need Redis for internode communication.
|
||||
- **Resolution**: Yes for single-node. The `HonkerEventTarget` adapter (ADR-047) implements pubsub's `TypedEventTarget` on Honker's `notify`/`listen` and `stream`/`subscribe`. POC 2-4 validated: same-process pub/sub works, transactional semantics hold, concurrent listeners work. Redis still needed for multi-node deployments. In-process EventTarget provides sub-ms latency for hot paths (vs ~17ms for Honker round-trip).
|
||||
- **Cross-references**: ADR-047
|
||||
|
||||
### OQ-27: How are schema migrations applied across all tenant DBs?
|
||||
|
||||
@@ -245,6 +251,27 @@ architecture documents, organized by theme.
|
||||
- **Priority**: low
|
||||
- **Notes**: The adapter is ~100 lines and useful to anyone combining Drizzle with Honker. Publishing as `drizzle-honker` would benefit the community. Decision: start inside `@alkdev/storage`, extract later if there's demand.
|
||||
|
||||
### OQ-30: Composite event target for single-node hub deployments?
|
||||
|
||||
- **Origin**: [honker-integration.md](honker-integration.md)
|
||||
- **Status**: open
|
||||
- **Priority**: medium
|
||||
- **Notes**: POC 2 showed ~17ms median latency for Honker notify→listen vs sub-ms for in-process EventTarget. For single-node hubs, a composite that dispatches to both (in-process for speed, Honker for durability/cross-process) would be the ideal default. Design needed.
|
||||
|
||||
### OQ-31: Consumer naming convention for durable stream subscriptions?
|
||||
|
||||
- **Origin**: [honker-integration.md](honker-integration.md)
|
||||
- **Status**: open
|
||||
- **Priority**: medium
|
||||
- **Notes**: Honker's `stream.subscribe(consumer)` requires a consumer name for offset tracking. The name must be stable across hub restarts (PID-based names don't survive restart). Need a convention: `{service}:{host}` or a configurable consumer group ID.
|
||||
|
||||
### OQ-32: Drizzle Kit migration compatibility with Honker adapter?
|
||||
|
||||
- **Origin**: [honker-integration.md](honker-integration.md)
|
||||
- **Status**: open
|
||||
- **Priority**: medium
|
||||
- **Notes**: Drizzle Kit supports SQLite migrations but expects `better-sqlite3` or `libsql`. Need to verify `drizzle-kit push`/`drizzle-kit generate` works with the custom Honker adapter, or whether we need a custom migration runner.
|
||||
|
||||
## ADR Impact
|
||||
|
||||
| ADR | Resolves | Informs |
|
||||
@@ -255,7 +282,7 @@ architecture documents, organized by theme.
|
||||
| ADR-020 | OQ-24 | |
|
||||
| ADR-023 | OQ-14 | |
|
||||
| ADR-026 | OQ-15 | |
|
||||
| ADR-033 | OQ-04, OQ-16, OQ-17, OQ-18 | |
|
||||
| ADR-033 | OQ-04, OQ-16, OQ-17, OQ-18 | OQ-17 (superseded by ADR-048) |
|
||||
| ADR-034 | OQ-03, OQ-21 | OQ-25 |
|
||||
| ADR-035 | OQ-03 | |
|
||||
| ADR-038 | OQ-04 (moot) | OQ-17 (less pressure) |
|
||||
@@ -263,5 +290,8 @@ architecture documents, organized by theme.
|
||||
| ADR-041 | OQ-24 | |
|
||||
| ADR-042 | | OQ-24 |
|
||||
| ADR-043 | | |
|
||||
| ADR-044 | OQ-19 (less pressure) | |
|
||||
| ADR-045 | OQ-23 | OQ-20 |
|
||||
| ADR-044 | OQ-19 (less pressure) | OQ-29, OQ-32 |
|
||||
| ADR-045 | OQ-23 | OQ-20 |
|
||||
| ADR-046 | | OQ-17 |
|
||||
| ADR-047 | OQ-26 | OQ-30 |
|
||||
| ADR-048 | OQ-17 (updated), OQ-18 (updated), OQ-19 (updated) | |
|
||||
Reference in New Issue
Block a user