Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,33 @@ python -m cli chat

Run tests: `pytest tests/unit/` (unit, no Docker) · `pytest tests/integration/` (needs Docker)

## Git Workflow — Branch Discipline

**`master` is protected. Every change — no matter how small — must go through a PR.**

### Rules for all commits (AI agent and human alike)
1. **Always create a feature branch first** before making any file edits or commits:
```bash
git checkout master && git pull
git checkout -b <type>/<short-description>
```
2. **Never commit directly to `master`**. Pushing to `master` is blocked by branch protection and will be rejected.
3. **Before committing**, verify the active branch is not `master`:
```bash
git branch --show-current # must NOT print "master"
```
4. **Branch naming convention**: `<type>/<short-description>`
- `feat/` — new feature
- `fix/` — bug or CI fix
- `chore/` — housekeeping (deps, config, docs)
- `test/` — adding or fixing tests
5. **One logical change per PR** — keep diffs focused and reviewable.
6. After a PR is merged, **always sync local master** before starting the next branch:
```bash
git fetch origin
git checkout master && git reset --hard origin/master
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## Module Conventions

### `core/config.py`
Expand Down
33 changes: 25 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ jobs:

- name: Upload test results to Codecov
if: ${{ !cancelled() && matrix.python-version == '3.11' }}
uses: codecov/test-results-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./junit.xml
report_type: test_results

# ──────────────────────────────────────────────────────────────────────────
# Integration tests (spins up Neo4j + Qdrant in Docker)
Expand All @@ -103,14 +105,9 @@ jobs:
--health-retries 10

qdrant:
image: qdrant/qdrant:latest
image: qdrant/qdrant:v1.17.0
ports:
- 6333:6333
options: >-
--health-cmd "bash -c ':> /dev/tcp/localhost/6333'"
--health-interval 10s
--health-timeout 5s
--health-retries 10

steps:
- uses: actions/checkout@v6
Expand All @@ -125,11 +122,31 @@ jobs:
pip install -r requirements.txt
pip install -e .

- name: Wait for services
run: |
echo "Waiting for Neo4j..."
for i in $(seq 1 30); do
(timeout 1 bash -c 'cat < /dev/null > /dev/tcp/localhost/7687' 2>/dev/null) && break
sleep 2
done
(timeout 1 bash -c 'cat < /dev/null > /dev/tcp/localhost/7687' 2>/dev/null) || { echo "Neo4j failed to start"; exit 1; }
echo "Waiting for Qdrant..."
for i in $(seq 1 30); do
curl -sf http://localhost:6333/healthz && break
sleep 2
done
Comment thread
coderabbitai[bot] marked this conversation as resolved.
curl -sf http://localhost:6333/healthz || { echo "Qdrant failed to start"; exit 1; }

- name: Run integration tests
env:
NEO4J_URI: bolt://localhost:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: codemind123
QDRANT_HOST: localhost
QDRANT_PORT: 6333
run: pytest tests/integration/ -m integration -v
run: |
if find tests/integration -name 'test_*.py' 2>/dev/null | grep -q .; then
python -m pytest tests/integration/ -m integration -v
else
echo "No integration tests found — skipping."
fi
Loading