Fix: openmemory setup script and readme instructions #103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #79 - The
openmemory-setup.shscript was failing with "Script not found 'build'" error after fresh clone because the OpenMemory backend wasn't included in the repository.This PR improves the setup script to:
.gitdirectory from the cloned repo to avoid nested git repositories.envfile with placeholder values (no secrets exposed)Also updated the README with complete OpenMemory setup instructions and configuration guide.
Type of Change
Release
Is this a release? No - this is a bug fix and documentation update.
Testing
Test Environment Setup
Prerequisites:
services/openmemory/directory to simulate)bun --version)Repository Structure:
Test Scenarios
1. Fresh Clone Scenario (Backend Missing)
Setup:
Run Test:
# Run the setup script from repository root ./services/openmemory-setup.shExpected Behavior:
CaviraOSS/OpenMemorytoservices/openmemory/backend.gitdirectory from cloned repo.envfile atservices/openmemory/backend/.envwith placeholder valuesbun installinservices/openmemory/backendbun run buildservices/openmemory/backend/dist/directoryVerification Commands:
2. Backend Already Exists (Idempotent Test)
Setup:
Expected Behavior:
services/openmemory/backend)services/openmemory/backend/.env)Verification:
3. Validation Checks
Test A: Missing package.json
# Create backend directory without package.json rm -rf services/openmemory/backend mkdir -p services/openmemory/backend ./services/openmemory-setup.shExpected: Script exits with error: "❌ OpenMemory backend package.json not found!"
Test B: Missing build script
Expected: Script exits with error: "❌ 'build' script not found in package.json!"
4. Error Handling
Test Clone Failure:
Test Build Failure:
5. Configuration Verification
After Successful Setup:
Expected: All variables present with placeholder values, no actual API keys exposed.
6. Integration with Server
Test Server Connection:
Automated Testing Performed
bash -n services/openmemory-setup.shcdintoservices/openmemory/backendand back to root).envtemplate has no exposed secrets (uses placeholders).gitdirectory removal from cloned repositoryManual Testing Checklist
services/openmemory/backend.gitdirectory is removed from cloned repo.envfile created atservices/openmemory/backend/.envwith placeholdersservices/openmemory/backend/node_modulesservices/openmemory/backend/dist/.envtemplateChecklist