Skip to content

Commit f1f1121

Browse files
authored
Merge pull request #722 from objectstack-ai/copilot/fix-metadata-implementation
2 parents 7b381fa + 04630f0 commit f1f1121

File tree

2 files changed

+89
-44
lines changed

2 files changed

+89
-44
lines changed

ROADMAP.md

Lines changed: 88 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ObjectStack Protocol — Road Map
22

3-
> **Last Updated:** 2026-02-16
3+
> **Last Updated:** 2026-02-18
44
> **Current Version:** v3.0.6
55
> **Status:** Protocol Specification Complete · Runtime Implementation In Progress
66
@@ -64,6 +64,25 @@ the ecosystem for enterprise workloads.
6464
12 of 25 service contracts are specification-only (no runtime implementation).
6565
These are the backbone of ObjectStack's enterprise capabilities.
6666

67+
### Minimal Implementation Strategy
68+
69+
ObjectStack follows a **minimal-first** approach to service implementation:
70+
71+
1. **Implement the smallest possible working version first** — Each service starts with the minimal viable implementation that unblocks real-world use cases.
72+
73+
2. **In-memory fallbacks via dev-plugin** — All non-critical services already have working in-memory fallbacks provided by `@objectstack/plugin-dev`, allowing development and testing to proceed while production implementations are built incrementally.
74+
75+
3. **DatabaseLoader is the single P0 blocker** — The only critical gap preventing production deployment is `DatabaseLoader` in the metadata service. This component enables:
76+
- Platform-level metadata editing in Studio
77+
- User overlay persistence across sessions
78+
- Multi-instance metadata synchronization
79+
- Production-grade metadata storage
80+
81+
4. **Independent upgrade path** — Each service can be independently upgraded from:
82+
- **Stub** (dev-plugin fallback) → **MVP** (minimal working implementation) → **Production** (full-featured with adapters)
83+
84+
This strategy ensures rapid iteration while maintaining a clear path to production readiness.
85+
6786
---
6887

6988
## Codebase Metrics
@@ -197,67 +216,92 @@ The following renames are planned for packages that implement core service contr
197216

198217
## Phase 4: Service Implementations (🔴 In Progress)
199218

200-
> **Goal:** Implement the remaining 19 service contracts as production-ready packages.
219+
> **Goal:** Implement the remaining service contracts following the minimal-first strategy.
201220
> **Naming:** All contract implementations use `service-*` prefix (see [Package Naming Convention](#package-naming-convention)).
202221
203-
### Priority 1 — Essential Services
222+
### Phase 4a: Metadata Persistence (P0 — Weeks 1-2)
223+
224+
**The single critical blocker preventing production deployment.**
225+
226+
**DatabaseLoader Implementation:**
227+
- [ ] **Implement `DatabaseLoader`** in `packages/metadata/src/loaders/database-loader.ts`
228+
- [ ] Implement `MetadataLoader` interface with protocol `datasource:`
229+
- [ ] Accept `IDataDriver` instance via kernel DI
230+
- [ ] Map to `sys_metadata` table CRUD operations
231+
- [ ] Support `scope` filtering (system/platform/user)
232+
- [ ] Auto-create `sys_metadata` table on first use
233+
- [ ] Implement upsert semantics for `save()` operations
234+
- [ ] Support optimistic concurrency via `version` field
235+
- [ ] Implement `list()` with type filtering and pagination
236+
- [ ] Declare capabilities: `{ read: true, write: true, watch: false, list: true }`
237+
238+
**Metadata Manager Integration:**
239+
- [ ] Auto-configure `DatabaseLoader` when `config.datasource` is set
240+
- [ ] Resolve datasource → `IDataDriver` via kernel service registry
241+
- [ ] Implement fallback strategy per `config.fallback` setting
242+
- [ ] Persist overlay customizations to database
243+
- [ ] Support multi-tenant isolation via `tenantId` filter
244+
245+
**Tests:**
246+
- [ ] Unit tests with mock `IDataDriver`
247+
- [ ] Integration tests with `MemoryDriver`
248+
- [ ] Fallback behavior tests (datasource unavailable → filesystem/memory)
249+
250+
**This unblocks:**
251+
- Platform-level metadata editing in Studio
252+
- User overlay persistence across sessions
253+
- Multi-instance metadata synchronization
254+
- Production-grade metadata storage
255+
256+
### Phase 4b: Infrastructure Service Upgrades (P1 — Weeks 3-4)
257+
258+
**Upgrade existing services from in-memory fallbacks to production adapters.**
259+
260+
| Contract | Current Status | Upgrade Path |
261+
|:---|:---|:---|
262+
| `ICacheService` | ✅ Memory adapter + Redis skeleton | Add Redis adapter implementation |
263+
| `IQueueService` | ✅ Memory adapter + BullMQ skeleton | Add BullMQ adapter implementation |
264+
| `IJobService` | ✅ Interval scheduler + cron skeleton | Add cron adapter implementation |
265+
| `IStorageService` | ✅ Local FS + S3 skeleton | Add S3 adapter implementation |
204266

205-
| Contract | Priority | Package | Notes |
206-
|:---|:---:|:---|:---|
207-
| `ICacheService` | **P0** | `@objectstack/service-cache` | Memory cache + Redis adapter skeleton |
208-
| `IQueueService` | **P0** | `@objectstack/service-queue` | Memory queue + BullMQ adapter skeleton |
209-
| `IJobService` | **P0** | `@objectstack/service-job` | setInterval scheduler + cron adapter skeleton |
210-
| `IStorageService` | **P1** | `@objectstack/service-storage` | Local filesystem + S3 adapter skeleton |
211-
| `ISchemaDriver` | **P1** || DDL operations — needed for `objectstack migrate` CLI command |
267+
- [ ] `service-cache` — Implement Redis adapter with connection pooling
268+
- [ ] `service-queue` — Implement BullMQ adapter with job persistence
269+
- [ ] `service-job` — Implement cron adapter with distributed coordination
270+
- [ ] `service-storage` — Implement S3 adapter with multipart upload
212271

213-
- [x] `service-cache` — Implement `ICacheService` with memory adapter + Redis skeleton
214-
- [x] `service-queue` — Implement `IQueueService` with memory adapter + BullMQ skeleton
215-
- [x] `service-job` — Implement `IJobService` with interval scheduling + cron skeleton
216-
- [x] `service-storage` — Implement `IStorageService` with local filesystem + S3 skeleton
217-
- [ ] Schema driver integration into PostgreSQL/MongoDB drivers
272+
### Phase 4c: Communication & Search Services (P1 — Weeks 5-6)
218273

219-
### Priority 2 — Communication Services
274+
**Implement new service contracts with minimal viable implementations.**
220275

221276
| Contract | Priority | Package | Notes |
222277
|:---|:---:|:---|:---|
223-
| `IRealtimeService` | **P1** | `@objectstack/service-realtime` | WebSocket/SSE pub/sub for live data |
224-
| `INotificationService` | **P2** | `@objectstack/service-notification` | Email/SMS/Push/Slack/Teams/Webhook |
225-
| `IGraphQLService` | **P2** | `@objectstack/service-graphql` | Auto-generated GraphQL from object schemas |
226-
| `II18nService` | **P2** | `@objectstack/service-i18n` | Runtime i18n with locale loading and translation |
227-
228-
- [ ] `service-realtime` — Implement `IRealtimeService` with WebSocket + Redis pub/sub
229-
- [ ] `service-notification` — Implement `INotificationService` with channel adapters
230-
- [ ] `service-graphql` — Implement `IGraphQLService` with auto-schema generation from objects
278+
| `II18nService` | **P1** | `@objectstack/service-i18n` | Map-backed translation with locale resolution |
279+
| `IRealtimeService` | **P1** | `@objectstack/service-realtime` | WebSocket/SSE push (replaces Studio setTimeout hack) |
280+
| `ISearchService` | **P1** | `@objectstack/service-search` | In-memory search first, then Meilisearch driver |
281+
| `INotificationService` | **P2** | `@objectstack/service-notification` | Email adapter (console logger in dev mode) |
282+
231283
- [ ] `service-i18n` — Implement `II18nService` with file-based locale loading
284+
- [ ] `service-realtime` — Implement `IRealtimeService` with WebSocket + in-memory pub/sub
285+
- [ ] `service-search` — Implement `ISearchService` with in-memory search + Meilisearch adapter
286+
- [ ] `service-notification` — Implement `INotificationService` with email adapter
232287

233-
### Priority 3 — Business Logic Services
288+
### Phase 4d: Business Logic Services (P2 — Future)
289+
290+
**Advanced services for workflow automation and business intelligence.**
234291

235292
| Contract | Priority | Package | Notes |
236293
|:---|:---:|:---|:---|
237-
| `IAutomationService` | **P2** | `@objectstack/service-automation` | Flow execution engine — depends on queue/job |
294+
| `IAutomationService` | **P2** | `@objectstack/service-automation` | Flow execution engine |
238295
| `IWorkflowService` | **P2** | `@objectstack/service-workflow` | State machine + approval processes |
239-
| `ISearchService` | **P2** | `@objectstack/service-search` | Full-text search via MeiliSearch/Elasticsearch |
240-
| ~~`IUIService`~~ | **Deprecated** | | Merged into `IMetadataService` — use `metadata.getView()`, `metadata.getEffective('view', name, { userId })` |
241-
| `IAnalyticsService` | **P3** | `@objectstack/service-analytics` | BI/OLAP queries (memory impl exists as reference) |
296+
| `IGraphQLService` | **P2** | `@objectstack/service-graphql` | Auto-generated GraphQL from objects |
297+
| `IAIService` | **P2** | `@objectstack/service-ai` | LLM integration (OpenAI/Anthropic/local) |
298+
| `IAnalyticsService` | **P3** | `@objectstack/service-analytics` | BI/OLAP queries |
242299

243300
- [ ] `service-automation` — Implement `IAutomationService` with flow execution engine
244301
- [ ] `service-workflow` — Implement `IWorkflowService` with state machine runtime
245-
- [ ] `service-search` — Implement `ISearchService` with MeiliSearch adapter
246-
- [ ] ~~Enhance `IUIService` runtime implementation~~ (merged into IMetadataService)
247-
- [ ] `service-analytics` — Implement full `IAnalyticsService` beyond memory reference
248-
249-
### Priority 4 — Platform Services
250-
251-
| Contract | Priority | Package | Notes |
252-
|:---|:---:|:---|:---|
253-
| `IAIService` | **P2** | `@objectstack/service-ai` | LLM integration (OpenAI/Anthropic/local) |
254-
| `IStartupOrchestrator` | **P3** || Advanced startup coordination (current kernel handles basics) |
255-
| `IPluginValidator` | **P3** || Plugin marketplace validation |
256-
| `IPluginLifecycleEvents` | **P3** || Typed event emitter (partial in kernel) |
257-
302+
- [ ] `service-graphql` — Implement `IGraphQLService` with auto-schema generation
258303
- [ ] `service-ai` — Implement `IAIService` with multi-provider LLM routing
259-
- [ ] Advanced startup orchestrator for large plugin graphs
260-
- [ ] Plugin marketplace validator for community plugins
304+
- [ ] `service-analytics` — Implement full `IAnalyticsService` beyond memory reference
261305

262306
---
263307

packages/metadata/ROADMAP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# @objectstack/metadata — Roadmap
22

3+
> **Last Updated:** 2026-02-18
34
> Development roadmap for the ObjectStack Metadata Service.
45
56
## Current Status (v3.0)

0 commit comments

Comments
 (0)