Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
44beeac
audio upload extension with gdrive credentials
01PrathamS Dec 5, 2025
d5b9518
FIX: API parameters
01PrathamS Dec 5, 2025
9392989
Merge branch 'main' into audio_upload_extend
AnkushMalaker Dec 7, 2025
5b5ea64
UPDATE: tmp files cleanup n code refactored as per review
01PrathamS Dec 8, 2025
5abd99d
REFACTOR: minor refactor as per review
01PrathamS Dec 8, 2025
3d00bac
REFACTOR: minor update as per review
01PrathamS Dec 8, 2025
b036185
UPDATE: gdrive sync logic
01PrathamS Dec 9, 2025
cff1a4c
REFACTOR: code update as per gdrive and update credential client
01PrathamS Dec 10, 2025
6534288
REFACTOR: validation updated - as per review from CR
01PrathamS Dec 10, 2025
1ff28cb
UPDATE: code has been refactore for UUID for diffrent audio upload so…
01PrathamS Dec 15, 2025
8e5a6b2
REFACTOR: updated code as per review
01PrathamS Dec 15, 2025
d2795cb
Update documentation and configuration to reflect the transition from…
AnkushMalaker Dec 18, 2025
2e4473d
Merge branch 'main' into audio_upload_extend
AnkushMalaker Dec 18, 2025
e393250
Merge branch 'dev' into audio_upload_extend
AnkushMalaker Dec 18, 2025
f4907a9
Merge branch 'dev' into further-rename
AnkushMalaker Dec 18, 2025
e9363b9
Update test script to use docker-compose-test.yml for all test-relate…
AnkushMalaker Dec 20, 2025
2e79b70
Merge pull request #203 from chronicler-ai/further-rename
AnkushMalaker Dec 20, 2025
1385321
Added standard MIT license
thestumonkey Dec 22, 2025
eb25a5d
Merge branch 'dev' into chronicle-main
thestumonkey Dec 22, 2025
f578ce9
Merge pull request #226 from Ushadow-io/license
thestumonkey Dec 22, 2025
dc70ca2
Fix/cleanup model (#219)
AnkushMalaker Dec 22, 2025
79390c3
fix/broken-tests (#230)
AnkushMalaker Dec 22, 2025
dafe563
Feat/add obsidian 3 (#233)
AnkushMalaker Dec 24, 2025
fd61688
Update .gitignore to exclude all files in app/ios and app/android dir…
AnkushMalaker Jan 1, 2026
39a680c
fix: Copy full source code in speaker-recognition Dockerfile (#243)
AnkushMalaker Jan 2, 2026
b85c55e
Enhance configuration management and add new setup scripts (#235)
AnkushMalaker Jan 2, 2026
1036a17
Refactor configuration management in wizard and ChronicleSetup (#246)
AnkushMalaker Jan 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ uv sync --dev
cp .env.template .env.test
# Add your API keys to .env.test

# Run test (modify CACHED_MODE in test_integration.py if needed)
uv run pytest test_integration.py::test_full_pipeline_integration -v -s
# Run Robot Framework integration tests
uv run robot --outputdir test-results --loglevel INFO tests/integration/integration_test.robot
```
83 changes: 0 additions & 83 deletions .github/workflows/integration-tests.yml

This file was deleted.

156 changes: 19 additions & 137 deletions .github/workflows/robot-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
env:
DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
echo "Verifying required secrets..."
if [ -z "$DEEPGRAM_API_KEY" ]; then
Expand All @@ -38,8 +39,13 @@ jobs:
echo "❌ ERROR: OPENAI_API_KEY secret is not set"
exit 1
fi
if [ -z "$HF_TOKEN" ]; then
echo "❌ ERROR: HF_TOKEN secret is not set"
exit 1
fi
echo "✓ DEEPGRAM_API_KEY is set (length: ${#DEEPGRAM_API_KEY})"
echo "✓ OPENAI_API_KEY is set (length: ${#OPENAI_API_KEY})"
echo "✓ HF_TOKEN is set (length: ${#HF_TOKEN})"
echo "✓ All required secrets verified"

- name: Set up Docker Buildx
Expand All @@ -61,7 +67,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'

- name: Install uv
uses: astral-sh/setup-uv@v4
Expand All @@ -72,148 +77,25 @@ jobs:
run: |
uv pip install --system robotframework robotframework-requests python-dotenv websockets

- name: Create test environment file
working-directory: tests/setup
run: |
cat > .env.test << EOF
# API URLs
API_URL=http://localhost:8001
BACKEND_URL=http://localhost:8001
FRONTEND_URL=http://localhost:3001

# Test Admin Credentials
[email protected]
ADMIN_PASSWORD=test-admin-password-123

# API Keys (from GitHub secrets)
OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
DEEPGRAM_API_KEY=${{ secrets.DEEPGRAM_API_KEY }}

# Test Configuration
TEST_TIMEOUT=120
TEST_DEVICE_NAME=robot-test
EOF

- name: Start test environment
working-directory: backends/advanced
env:
DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LLM_PROVIDER: openai
TRANSCRIPTION_PROVIDER: deepgram
MEMORY_PROVIDER: friend_lite
run: |
# Debug: Check if secrets are available
echo "Checking environment variables..."
echo "DEEPGRAM_API_KEY is set: $([ -n "$DEEPGRAM_API_KEY" ] && echo 'YES' || echo 'NO')"
echo "OPENAI_API_KEY is set: $([ -n "$OPENAI_API_KEY" ] && echo 'YES' || echo 'NO')"
echo "LLM_PROVIDER: $LLM_PROVIDER"
echo "TRANSCRIPTION_PROVIDER: $TRANSCRIPTION_PROVIDER"

# Create memory_config.yaml from template (file is gitignored)
echo "Creating memory_config.yaml from template..."
cp memory_config.yaml.template memory_config.yaml

# Clean any existing test containers for fresh start
echo "Cleaning up any existing test containers..."
docker compose -f docker-compose-test.yml down -v || true

# Start ALL services in parallel - Docker Compose handles dependencies via healthchecks
echo "Starting all services in parallel (docker-compose-test.yml)..."
echo "Note: Using test compose file with source mounts for faster startup"

# Export API keys so docker-compose can use them
export DEEPGRAM_API_KEY
export OPENAI_API_KEY
export LLM_PROVIDER
export TRANSCRIPTION_PROVIDER
export MEMORY_PROVIDER

DOCKER_BUILDKIT=0 docker compose -f docker-compose-test.yml up -d

# Show container status
echo "Container status:"
docker compose -f docker-compose-test.yml ps

# Single wait for backend readiness (backend depends_on ensures infra is ready)
echo "Waiting for backend readiness (up to 120s)..."
for i in {1..40}; do
if curl -s http://localhost:8001/readiness > /dev/null 2>&1; then
echo "✓ Backend is ready (all dependencies satisfied)"
break
fi
# Show logs every 10 attempts to help debug
if [ $((i % 10)) -eq 0 ]; then
echo "Still waiting... showing recent logs:"
docker compose -f docker-compose-test.yml logs --tail=20 friend-backend-test
fi
if [ $i -eq 40 ]; then
echo "✗ Backend failed to start - showing full logs:"
docker compose -f docker-compose-test.yml logs
exit 1
fi
echo "Attempt $i/40..."
sleep 3
done

echo "✓ Backend is ready!"

# Verify workers are registered with Redis (Robot tests need stable workers)
echo "Waiting for workers to register with Redis (up to 60s)..."
for i in {1..30}; do
WORKER_COUNT=$(docker compose -f docker-compose-test.yml exec -T workers-test uv run python -c 'from rq import Worker; from redis import Redis; import os; r = Redis.from_url(os.getenv("REDIS_URL", "redis://redis-test:6379/0")); print(len(Worker.all(connection=r)))' 2>/dev/null || echo "0")

if [ "$WORKER_COUNT" -ge 6 ]; then
echo "✓ Found $WORKER_COUNT workers registered"
# Show worker details
docker compose -f docker-compose-test.yml exec -T workers-test uv run python -c 'from rq import Worker; from redis import Redis; import os; r = Redis.from_url(os.getenv("REDIS_URL", "redis://redis-test:6379/0")); workers = Worker.all(connection=r); print(f"Total registered workers: {len(workers)}"); [print(f" - {w.name}: queues={w.queue_names()}, state={w.get_state()}") for w in workers]'
break
fi

if [ $i -eq 30 ]; then
echo "✗ Workers failed to register after 60s"
echo "Showing worker logs:"
docker compose -f docker-compose-test.yml logs --tail=50 workers-test
exit 1
fi

echo "Attempt $i/30: $WORKER_COUNT workers registered (waiting for 6+)..."
sleep 2
done

echo "✓ All services ready!"

- name: Verify checked out code
working-directory: tests
run: |
echo "Current git commit:"
git log -1 --oneline
echo ""
echo "Test files in current checkout:"
find . -name "*.robot" -type f | head -10
echo ""
echo "Sample of tags in test files:"
grep -h "\[Tags\]" endpoints/*.robot infrastructure/*.robot integration/*.robot 2>/dev/null | head -20 || echo "No tag files found"

- name: Clean previous test results
working-directory: tests
- name: Create test config.yml
run: |
echo "Cleaning any previous test results..."
rm -rf results
mkdir -p results
echo "✓ Fresh results directory created"
echo "Copying test configuration file..."
mkdir -p config
cp tests/configs/deepgram-openai.yml config/config.yml
echo "✓ Test config.yml created from tests/configs/deepgram-openai.yml"
ls -lh config/config.yml

- name: Run Robot Framework tests
working-directory: tests
env:
# Required for backend imports in test libraries
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: https://api.openai.com/v1
OPENAI_MODEL: gpt-4o-mini
# Required for test runner script
DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
CLEANUP_CONTAINERS: "false" # Don't cleanup in CI - handled by workflow
run: |
# Run all tests (don't fail workflow to allow artifact upload)
make all OUTPUTDIR=results
# Use the unified test script that mirrors local development
./run-robot-tests.sh
TEST_EXIT_CODE=$?
echo "test_exit_code=$TEST_EXIT_CODE" >> $GITHUB_ENV
exit 0 # Don't fail here, we'll fail at the end after uploading artifacts
Expand All @@ -223,7 +105,7 @@ jobs:
working-directory: backends/advanced
run: |
echo "=== Backend Logs (last 50 lines) ==="
docker compose -f docker-compose-test.yml logs --tail=50 friend-backend-test
docker compose -f docker-compose-test.yml logs --tail=50 chronicle-backend-test
echo ""
echo "=== Worker Logs (last 50 lines) ==="
docker compose -f docker-compose-test.yml logs --tail=50 workers-test
Expand Down
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
!**/.env.template
**/memory_config.yaml
!**/memory_config.yaml.template
tests/setup/.env.test

# Main config (user-specific)
config/config.yml
!config/config.yml.template

# Config backups
config/*.backup.*
config/*.backup*

example/*
**/node_modules/*
**/ollama-data/*
Expand Down Expand Up @@ -76,7 +86,8 @@ extras/openmemory-mcp/data/*
backends/advanced/nginx.conf
backends/advanced/Caddyfile

app/ios/Pods
app/ios/*
app/android/*
results
log.html
output.xml
Expand Down
49 changes: 46 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,49 @@ This supports a comprehensive web dashboard for management.

**❌ No Backward Compatibility**: Do NOT add backward compatibility code unless explicitly requested. This includes fallback logic, legacy field support, or compatibility layers. Always ask before adding backward compatibility - in most cases the answer is no during active development.

## Initial Setup & Configuration

Chronicle includes an **interactive setup wizard** for easy configuration. The wizard guides you through:
- Service selection (backend + optional services)
- Authentication setup (admin account, JWT secrets)
- Transcription provider configuration (Deepgram, Mistral, or offline ASR)
- LLM provider setup (OpenAI or Ollama)
- Memory provider selection (Chronicle Native with Qdrant or OpenMemory MCP)
- Network configuration and HTTPS setup
- Optional services (speaker recognition, Parakeet ASR)

### Quick Start
```bash
# Run the interactive setup wizard from project root
uv run python wizard.py

# Or use the quickstart guide for step-by-step instructions
# See quickstart.md for detailed walkthrough
```

### Setup Documentation
For detailed setup instructions and troubleshooting, see:
- **[@quickstart.md](quickstart.md)**: Beginner-friendly step-by-step setup guide
- **[@Docs/init-system.md](Docs/init-system.md)**: Complete initialization system architecture and design
- **[@Docs/getting-started.md](Docs/getting-started.md)**: Technical quickstart with advanced configuration
- **[@backends/advanced/SETUP_SCRIPTS.md](backends/advanced/SETUP_SCRIPTS.md)**: Setup scripts reference and usage examples
- **[@backends/advanced/Docs/quickstart.md](backends/advanced/Docs/quickstart.md)**: Backend-specific setup guide

### Wizard Architecture
The initialization system uses a **root orchestrator pattern**:
- **`wizard.py`**: Root setup orchestrator for service selection and delegation
- **`backends/advanced/init.py`**: Backend configuration wizard
- **`extras/speaker-recognition/init.py`**: Speaker recognition setup
- **Service setup scripts**: Individual setup for ASR services and OpenMemory MCP

Key features:
- Interactive prompts with validation
- API key masking and secure credential handling
- Environment file generation with placeholders
- HTTPS configuration with SSL certificate generation
- Service status display and health checks
- Automatic backup of existing configurations

## Development Commands

### Backend Development (Advanced Backend - Primary)
Expand Down Expand Up @@ -73,11 +116,11 @@ cp .env.template .env # Configure API keys

# Manual test execution (for debugging)
source .env && export DEEPGRAM_API_KEY && export OPENAI_API_KEY
uv run pytest tests/test_integration.py::test_full_pipeline_integration -v -s
uv run robot --outputdir test-results --loglevel INFO ../../tests/integration/integration_test.robot

# Leave test containers running for debugging (don't auto-cleanup)
CLEANUP_CONTAINERS=false source .env && export DEEPGRAM_API_KEY && export OPENAI_API_KEY
uv run pytest tests/test_integration.py::test_full_pipeline_integration -v -s
uv run robot --outputdir test-results --loglevel INFO ../../tests/integration/integration_test.robot

# Manual cleanup when needed
docker compose -f docker-compose-test.yml down -v
Expand Down Expand Up @@ -347,7 +390,7 @@ docker compose up --build -d

### Testing Strategy
- **Local Test Scripts**: Simplified scripts (`./run-test.sh`) mirror CI workflows for local development
- **End-to-End Integration**: `test_integration.py` validates complete audio processing pipeline
- **End-to-End Integration**: Robot Framework tests (`tests/integration/integration_test.robot`) validate complete audio processing pipeline
- **Speaker Recognition Tests**: `test_speaker_service_integration.py` validates speaker identification
- **Environment Flexibility**: Tests work with both local .env files and CI environment variables
- **Automated Cleanup**: Test containers are automatically removed after execution
Expand Down
Loading
Loading