3578 Commits

Author SHA1 Message Date
5efe995659 0.9.33
All checks were successful
Deploy on push / deploy (push) Successful in 11m31s
2025-10-09 01:19:45 +03:00
e41107daff Merge branch 'dev' of https://dev.dscrs.site/discours.io/core into dev 2025-10-09 01:16:56 +03:00
3c40bbde2b 0.9.29] - 2025-10-08
### 🎯 Search Quality Upgrade: ColBERT + Native MUVERA + FAISS

- **🚀 +175% Recall**: Интегрирован ColBERT через pylate с НАТИВНЫМ MUVERA multi-vector retrieval
- **🎯 TRUE MaxSim**: Настоящий token-level MaxSim scoring, а не упрощенный max pooling
- **🗜️ Native Multi-Vector FDE**: Каждый токен encode_fde отдельно → список FDE векторов
- **🚀 FAISS Acceleration**: Двухэтапный поиск O(log N) для масштабирования >10K документов
- **🎯 Dual Architecture**: Поддержка BiEncoder (быстрый) и ColBERT (качественный) через `SEARCH_MODEL_TYPE`
- ** Faster Indexing**: ColBERT индексация ~12s vs BiEncoder ~26s на бенчмарке
- **📊 Better Results**: Recall@10 улучшен с 0.16 до 0.44 (+175%)

### 🛠️ Technical Changes

- **requirements.txt**: Добавлены `pylate>=1.0.0` и `faiss-cpu>=1.7.4`
- **services/search.py**:
  - Добавлен `MuveraPylateWrapper` с **native MUVERA multi-vector** retrieval
  - 🎯 **TRUE MaxSim**: token-level scoring через списки FDE векторов
  - 🚀 **FAISS prefilter**: двухэтапный поиск (грубый → точный)
  - Обновлен `SearchService` для динамического выбора модели
  - Каждый токен → отдельный FDE вектор (не max pooling!)
- **settings.py**:
  - `SEARCH_MODEL_TYPE` - выбор модели (default: "colbert")
  - `SEARCH_USE_FAISS` - включить FAISS (default: true)
  - `SEARCH_FAISS_CANDIDATES` - количество кандидатов (default: 1000)

### 📚 Documentation

- **docs/search-system.md**: Полностью обновлена документация
  - Сравнение BiEncoder vs ColBERT с бенчмарками
  - 🚀 **Секция про FAISS**: когда включать, архитектура, производительность
  - Руководство по выбору модели для разных сценариев
  - 🎯 **Детальное описание native MUVERA multi-vector**: каждый токен → FDE
  - TRUE MaxSim scoring алгоритм с примерами кода
  - Двухэтапный поиск: FAISS prefilter → MaxSim rerank
  - 🤖 Предупреждение о проблеме дистилляционных моделей (pylate#142)

### ⚙️ Configuration

```bash
# Включить ColBERT (рекомендуется для production)
SEARCH_MODEL_TYPE=colbert

# 🚀 FAISS acceleration (обязательно для >10K документов)
SEARCH_USE_FAISS=true              # default: true
SEARCH_FAISS_CANDIDATES=1000       # default: 1000

# Fallback к BiEncoder (быстрее, но -62% recall)
SEARCH_MODEL_TYPE=biencoder
```

### 🎯 Impact

-  **Качество поиска**: +175% recall на бенчмарке NanoFiQA2018
-  **TRUE ColBERT**: Native multi-vector без упрощений (max pooling)
-  **MUVERA правильно**: Используется по назначению для multi-vector retrieval
-  **Масштабируемость**: FAISS prefilter → O(log N) вместо O(N)
-  **Готовность к росту**: Архитектура выдержит >50K документов
-  **Индексация**: Быстрее на ~54% (12s vs 26s)
- ⚠️ **Latency**: С FAISS остается приемлемой даже на больших индексах
-  **Backward Compatible**: BiEncoder + отключение FAISS через env

### 🔗 References

- GitHub PR: https://github.com/sionic-ai/muvera-py/pull/1
- pylate issue: https://github.com/lightonai/pylate/issues/142
- Model: `answerdotai/answerai-colbert-small-v1`
2025-10-09 01:15:19 +03:00
b611ed541c nogt-test
All checks were successful
Deploy on push / deploy (push) Successful in 5m36s
2025-10-06 19:40:57 +03:00
33fbd4051f shout-following-upgrade
All checks were successful
Deploy on push / deploy (push) Successful in 5m59s
2025-10-05 22:53:30 +03:00
86dec15673 0.9.32] - 2025-10-05
All checks were successful
Deploy on push / deploy (push) Successful in 5m54s
###  Features
- **Редактирование мигрированных шаутов**: Добавлена мутация `create_draft_from_shout` для создания черновика из существующего опубликованного шаута
  - Создаёт черновик со всеми данными из шаута (title, body, lead, topics, authors, media, etc.)
  - Проверяет авторство перед созданием черновика
  - Переиспользует существующий черновик если он уже создан для этого шаута
  - Копирует все связи: авторов и темы (включая main topic)

### 🔧 Fixed
- **NotificationEntity enum**: Исправлена ошибка `NotificationEntity.FOLLOWER` → `NotificationEntity.AUTHOR`
  - В enum не было значения `FOLLOWER`, используется `AUTHOR` для уведомлений о подписчиках

### Technical Details
- `core/schema/mutation.graphql`: добавлена мутация `create_draft_from_shout(shout_id: Int!): CommonResult!`
- `core/resolvers/draft.py`: добавлен resolver `create_draft_from_shout` с валидацией авторства
- `core/resolvers/notifier.py`: исправлено использование `NotificationEntity.AUTHOR` вместо несуществующего `FOLLOWER`
2025-10-05 17:12:28 +03:00
13343bb40e fix: handle follower and shout notifications in notifications_seen_thread
All checks were successful
Deploy on push / deploy (push) Successful in 3m13s
- Add support for marking follower notifications as seen (thread='followers')
- Add support for marking new shout notifications as seen
- Use enum constants (NotificationAction, NotificationEntity) instead of strings
- Improve thread ID parsing to support different formats
- Remove obsolete TODO about notification_id offset
- Better error handling with logger.warning() instead of exceptions

Resolves TODOs on lines 253 and 286 in resolvers/notifier.py
2025-10-04 08:59:47 +03:00
163c0732d4 notifications-fixes
All checks were successful
Deploy on push / deploy (push) Successful in 5m16s
2025-10-04 08:36:24 +03:00
6faf75c229 maintainance
All checks were successful
Deploy on push / deploy (push) Successful in 6m5s
2025-10-03 13:58:52 +03:00
91a3189167 feat: version 0.9.30 - cache invalidation fixes
🔧 Fixed cache invalidation for featured materials:
- Enhanced invalidate_shout_related_cache with featured keys
- Fixed set_featured/set_unfeatured functions with async cache invalidation
- Materials now correctly appear/disappear from main page on feature/unfeature

 Code Quality: Python Standards Compliance
- Ruff linting & formatting checks passed
- MyPy type checking passed
- All functions have proper type hints and docstrings
- Tests passing successfully

Version bump: 0.9.30
2025-10-02 22:31:13 +03:00
3f263f35ef Merge branch 'dev' of https://dev.discours.io/discours.io/core into dev
All checks were successful
Deploy on push / deploy (push) Successful in 3m3s
2025-10-02 02:42:06 +03:00
4038c5dbf5 docs-restruct 2025-10-02 02:38:57 +03:00
3e7431b601 docs-restruct
All checks were successful
Deploy on push / deploy (push) Successful in 3m11s
2025-10-02 01:16:14 +03:00
31cf6b6961 invalidation-fix4
All checks were successful
Deploy on push / deploy (push) Successful in 3m9s
2025-10-01 23:59:09 +03:00
116deb16d7 invalidation-follow-fix3
All checks were successful
Deploy on push / deploy (push) Successful in 3m12s
2025-10-01 23:53:09 +03:00
2dacb837f3 follow-cache-invalidation-fix
All checks were successful
Deploy on push / deploy (push) Successful in 3m18s
2025-10-01 23:41:28 +03:00
50539a71ba following-cache-invalidation-fix
All checks were successful
Deploy on push / deploy (push) Successful in 3m20s
2025-10-01 17:53:28 +03:00
4800f227bc follow-cache-invalidate-before-fix
All checks were successful
Deploy on push / deploy (push) Successful in 5m18s
2025-10-01 15:04:36 +03:00
14ff155789 config-fix
All checks were successful
Deploy on push / deploy (push) Successful in 3m19s
2025-09-30 21:48:29 +03:00
3ae675c52c auth-fix
All checks were successful
Deploy on push / deploy (push) Successful in 5m44s
2025-09-30 19:20:41 +03:00
1e9a6a07c1 docs 2025-09-29 17:57:45 +03:00
9b284852e9 oath2.0
All checks were successful
Deploy on push / deploy (push) Successful in 2m57s
2025-09-29 16:33:49 +03:00
504152981b admin-auth
All checks were successful
Deploy on push / deploy (push) Successful in 3m3s
2025-09-29 16:08:58 +03:00
f2398d3592 protected-route-fix
All checks were successful
Deploy on push / deploy (push) Successful in 3m2s
2025-09-29 15:54:22 +03:00
8e944e399a oauth-fix
All checks were successful
Deploy on push / deploy (push) Successful in 3m7s
2025-09-29 13:59:49 +03:00
f10c29c9ca logfix
All checks were successful
Deploy on push / deploy (push) Successful in 2m51s
2025-09-29 12:51:04 +03:00
b4b41fde08 oauth-fixing
All checks were successful
Deploy on push / deploy (push) Successful in 2m47s
2025-09-29 08:53:39 +03:00
327135c09b cleaner-log4
All checks were successful
Deploy on push / deploy (push) Successful in 4m29s
2025-09-29 08:15:15 +03:00
a0ab20f276 cleaner-log3
All checks were successful
Deploy on push / deploy (push) Successful in 3m2s
2025-09-29 01:00:18 +03:00
d7e50c6e31 cleaner-log2
All checks were successful
Deploy on push / deploy (push) Successful in 2m53s
2025-09-29 00:46:54 +03:00
d57e59f98b cleaner-log
All checks were successful
Deploy on push / deploy (push) Successful in 2m57s
2025-09-29 00:40:10 +03:00
6496bee531 fetch-profile
All checks were successful
Deploy on push / deploy (push) Successful in 2m55s
2025-09-29 00:27:16 +03:00
147e227fa0 oauth-google
All checks were successful
Deploy on push / deploy (push) Successful in 2m57s
2025-09-28 20:53:42 +03:00
c338bdc683 oauth-github
Some checks failed
Deploy on push / deploy (push) Has been cancelled
2025-09-28 20:52:17 +03:00
44b69dc743 oauth-raw-req-control
All checks were successful
Deploy on push / deploy (push) Successful in 2m55s
2025-09-28 20:45:08 +03:00
9b727ac9ca oauth-fix
All checks were successful
Deploy on push / deploy (push) Successful in 2m55s
2025-09-28 20:34:26 +03:00
d1e35dd8b1 oauth-redirect-uri-fix
All checks were successful
Deploy on push / deploy (push) Successful in 2m54s
2025-09-28 20:04:52 +03:00
dcdb6c7b30 lesslogs2
All checks were successful
Deploy on push / deploy (push) Successful in 2m54s
2025-09-28 17:36:04 +03:00
af0f3e3dea lesslogs
All checks were successful
Deploy on push / deploy (push) Successful in 2m55s
2025-09-28 17:26:23 +03:00
752e2dcbdc [0.9.28] - 2025-09-28
All checks were successful
Deploy on push / deploy (push) Successful in 2m46s
### 🍪 CRITICAL Cross-Origin Auth
- **🔧 SESSION_COOKIE_DOMAIN**: Добавлена поддержка поддоменов `.discours.io` для cross-origin cookies
- **🌐 Cross-Origin SSE**: Исправлена работа Server-Sent Events с httpOnly cookies между поддоменами
- **🔐 Unified Auth**: Унифицированы настройки cookies для OAuth, login, refresh, logout операций
- **📝 MyPy Compliance**: Исправлена типизация `SESSION_COOKIE_SAMESITE` с использованием `cast()`

### 🛠️ Technical Changes
- **settings.py**: Добавлен `SESSION_COOKIE_DOMAIN` с типобезопасной настройкой SameSite
- **auth/oauth.py**: Обновлены все `set_cookie` вызовы с `domain` параметром
- **auth/middleware.py**: Добавлена поддержка `SESSION_COOKIE_DOMAIN` в logout операциях
- **resolvers/auth.py**: Унифицированы cookie настройки в login/refresh/logout resolvers
- **auth/__init__.py**: Обновлены cookie операции с domain поддержкой

### 📚 Documentation
- **docs/auth/sse-httponly-integration.md**: Новая документация по SSE + httpOnly cookies интеграции
- **docs/auth/architecture.md**: Обновлены диаграммы для unified httpOnly cookie архитектуры

### 🎯 Impact
-  **GraphQL API** (`v3.discours.io`) теперь работает с httpOnly cookies cross-origin
-  **SSE сервер** (`connect.discours.io`) работает с теми же cookies
-  **Безопасность**: httpOnly cookies защищают от XSS атак
-  **UX**: Автоматическая аутентификация без управления токенами в JavaScript
2025-09-28 13:06:03 +03:00
fb98a1c6c8 [0.9.28] - OAuth/Auth with httpOnly cookie
All checks were successful
Deploy on push / deploy (push) Successful in 4m32s
2025-09-28 12:22:37 +03:00
6451ba7de5 cookie-fix
All checks were successful
Deploy on push / deploy (push) Successful in 2m53s
2025-09-27 20:37:19 +03:00
ee82a8f684 cookie-debug2
All checks were successful
Deploy on push / deploy (push) Successful in 2m47s
2025-09-27 20:25:30 +03:00
c46b30a671 cookie-debug
All checks were successful
Deploy on push / deploy (push) Successful in 2m48s
2025-09-27 20:17:00 +03:00
19e0092a83 cilog
All checks were successful
Deploy on push / deploy (push) Successful in 4m20s
2025-09-27 13:59:40 +03:00
bd54d900aa separate-codegen-fix2
Some checks failed
Deploy on push / deploy (push) Failing after 32s
2025-09-27 13:56:10 +03:00
eab0ba7b42 separate-codegen-fix
Some checks failed
Deploy on push / deploy (push) Failing after 30s
2025-09-27 13:53:00 +03:00
a2cca6f189 ..
Some checks failed
Deploy on push / deploy (push) Failing after 35s
2025-09-27 13:51:15 +03:00
2ac983d81e nodiag
Some checks failed
Deploy on push / deploy (push) Failing after 36s
2025-09-27 13:47:26 +03:00
e0e3e39d55 codegen-2addr
Some checks failed
Deploy on push / deploy (push) Failing after 35s
2025-09-27 13:30:47 +03:00