fix(cloud): tolerate missing directory in session upserts#259
fix(cloud): tolerate missing directory in session upserts#259jorgehara wants to merge 2 commits intoGentleman-Programming:feat/integrate-engram-cloudfrom
Conversation
…leman-Programming#249) BUGFIX Gentleman-Programming#249: Session mutations missing directory field when MCP server upserts sessions Changes: - Make session.directory optional in chunkcodec.normalizeMutationPayload() - Make session.Directory optional in cloudserver.validateDirectChunkArrayEntries() - Make directory optional in store cloud upgrade legacy mutation handling - Update tests to reflect new behavior This allows MCP server and other sources to create sessions without specifying a directory, which will be resolved from context or left empty. Fixes: Gentleman-Programming#249 Related: Gentleman-Programming#250
…completes Gentleman-Programming#260) This commit adds wildcard (*) support to ENGRAM_CLOUD_ALLOWED_PROJECTS, enabling local development with multiple projects without explicit listing. Changes: - internal/cloud/auth/auth.go: Wildcard support in authorizeProjectAgainstAllowlist() - internal/cloud/cloudstore/cloudstore.go: Wildcard support in SetDashboardAllowedProjects() - docker-compose.cloud.all-projects.yml: Example configuration When ENGRAM_CLOUD_ALLOWED_PROJECTS="*": - All sync operations are authorized - Dashboard displays all projects without filtering - Zero breaking changes for existing explicit allowlists Tested on Windows 11 with 22 projects synchronized successfully. Dashboard now displays project grid with sessions, observations, and prompts. Fixes: Gentleman-Programming#260 Related: Bug Gentleman-Programming#249 fix for session directory optional
Update: Additional Enhancement AddedThis PR now also includes wildcard support for ENGRAM_CLOUD_ALLOWED_PROJECTS (Issue #260). Complete Changes:Bug Fix (Issue #249):
Feature (Issue #260):
Files Changed:
Testing Results:✅ 22 projects synchronized successfully Example Usage:# docker-compose.cloud.all-projects.yml
environment:
ENGRAM_CLOUD_ALLOWED_PROJECTS: "*"Both issues are addressed in this single PR as they were discovered during the same debugging session. |
|
Thanks for taking this on and linking it to #249. Closing this PR because |
Fixes #249
Summary
This PR fixes the cloud sync failure when MCP server upserts sessions without a directory field. The directory is now optional and will be resolved from context or left empty.
Changes
Test Plan
Related
Contributor Checklist