Releases: Hyromy/Lucy-API
Release list
Gossiper
Summary
This release introduces comprehensive real-time event broadcasting capabilities to the Lucy-API. The new Gossiper system enables all Guild CRUD operations to automatically publish events to Redis, allowing connected clients to receive live updates via Server-Sent Events (SSE). This establishes a solid foundation for reactive, event-driven architectures where multiple clients can stay synchronized on guild state changes.
Highlights
- Event Broadcasting: Complete integration of Redis event publishing across all Guild operations (create, update, delete).
- Real-Time Synchronization: Clients connected to the
/api/events/endpoint now receive instant notifications of guild changes. - Version Tracking: Automatic version incrementing on updates provides reliable change tracking and conflict detection capabilities.
- Comprehensive Test Coverage: Added 4 new test cases covering event publication, payload structure, and custom source headers.
Added
- Added
perform_create()method toGuildViewSetto publishlucy.guild.createdevents when guilds are created. - Added
perform_update()method toGuildViewSetwith automatic version increment andlucy.guild.updatedevent publishing. - Added
perform_destroy()method toGuildViewSetto publishlucy.guild.deletedevents before deletion. - Added
test_create_guild_publishes_event()to verify creation events with correct payload structure. - Added
test_update_guild_publishes_event_with_version()to verify update events include incremented version numbers. - Added
test_delete_guild_publishes_event()to verify deletion events are published before record removal. - Added
test_redis_payload_includes_custom_source()to verifyX-Sourceheader capture in event metadata.
Changed
- Refactored
GuildViewSetto intercept all CRUD operations and inject Redis event broadcasting. - Updated test suite to include mocking of
publish_on_redisfor proper event verification. - Enhanced
_redis_payload_keys()helper method usage across all perform methods for consistent event metadata.
Fixed
- Fixed potential race conditions by ensuring Redis events are published before database changes are persisted (for destruction operations).
- Fixed payload consistency by centralizing metadata generation through the
_redis_payload_keys()method.
Breaking Changes
- None. This release is fully backward compatible with existing API consumers.
Event Schema
All published events follow this structure:
{
"event": "lucy.guild.{created|updated|deleted}",
"version": 1,
"updated_at": "2026-05-02T12:00:00Z",
"source": "api request|X-Source header value",
"id": "guild_id",
"lang": { "code": "en", "name": "English" },
"joined_at": "2026-05-02T12:00:00Z"
}Deployment/Infra
- No infrastructure changes required. Works with existing Redis configuration.
- Event streaming is handled by existing
/api/events/endpoint via SSE.
Full Changelog
Fat Wall
Summary
This release delivers a major step forward in project maturity. It introduces a dedicated Discord domain module, modernizes configuration and dependency management with Poetry, expands operational documentation, and strengthens reliability through better logging, health checks, session support, and broader test coverage.
Highlights
- Architecture Upgrade: Consolidated and simplified API views while introducing a new dedicated
apps/discordmodule. - Production Readiness: Added structured docs, request ID logging, Redis/session support, and improved deployment workflows.
- Dependency Modernization: Migrated from
requirements.txtto Poetry withpyproject.tomland lockfile tracking. - Quality & Automation: Added CI quality workflow, rollback flow, pre-commit hooks, and improved container/image pipelines.
Added
- Added new
apps/discordapp with models, routes, views, admin registration, tests, and migrations. - Added
project/config.pyfor centralized configuration handling. - Added project-level tests and utility logging module under
utils/. - Added
.env.examplefor safer environment bootstrap. - Added docs package including onboarding, runbook, troubleshooting, virtual-env guide, and ADR conventions.
- Added GitHub workflows for quality checks, deploy-by-tag, and rollback operations.
- Added Poetry project metadata and lock file (
pyproject.toml,poetry.lock).
Changed
- Refactored general project structure and endpoint organization.
- Unified API view layout into
apps/api/views.pyreplacing split view modules. - Updated settings management with improved environment/session/frontend configuration.
- Updated
Guildmodel behavior and migration strategy (including versioning and timestamp adjustments). - Updated README and deployment/runtime documentation.
- Updated Docker and compose configuration for more stable runtime behavior.
Fixed
- Fixed insecure fallback paths in configuration/runtime handling.
- Fixed Discord auth stability issues and callback behavior.
- Fixed API health endpoint behavior and integration docs alignment.
- Fixed request tracing consistency by introducing request ID logging refinements.
- Fixed test coverage gaps for auth endpoints (
auth_me,auth_logout) and Discord callback scenarios.
Breaking Changes
- Module Structure: Discord concerns were moved out of API utility/view internals into dedicated
apps/discorddomain modules. - Dependency Tooling:
requirements.txtwas removed in favor of Poetry-based dependency management. - API Internals: Previous split API view file paths were consolidated, which can affect internal imports.
Deployment/Infra
- Added and updated CI/CD workflows for build image, quality checks, deploy by tag, deploy, and rollback.
- Improved
.dockerignore,.gitignore, and container setup for reproducible builds. - Enhanced ASGI/WSGI and runtime project entrypoint configuration for deployment consistency.
Full Changelog
Prototype
Summary
This release establishes the first functional baseline of Lucy-API. It introduces Discord authentication, restructures the codebase into modular apps, and formalizes API routing for bot and dashboard features while improving deployment readiness.
Highlights
- Project Baseline: Initial production-oriented API foundation with Docker and deployment workflow updates.
- Discord Authentication: Implemented and stabilized Discord auth flows, including callback and redirect URI fixes.
- Modular App Structure: Refactored from a single app layout into dedicated modules under
apps/. - Routing Expansion: Added and organized bot, dashboard, and health endpoints for clearer API boundaries.
Added
- Added
apps/_authmodule with app configuration, routes, views, and base tests. - Added dashboard-related API endpoints.
- Added bot routes and endpoint structure.
- Added health check endpoint for service monitoring.
- Added Discord integration utilities under the API module.
- Added migration updates for
Guildmetadata fields (banner,icon).
Changed
- Reorganized project structure from legacy app paths to modular
apps/layout. - Updated root URL configuration to support split auth/API routing.
- Updated deployment-related configuration in Docker and workflow files.
- Updated README and startup/deployment project documentation.
Fixed
- Fixed Discord auth flow issues across multiple callback and redirect scenarios.
- Fixed production host configuration issues (
ALLOWED_HOSTS). - Fixed
GuildViewretrieval behavior. - Fixed Docker Compose setup inconsistencies.
- Fixed merge artifacts and duplicate-line cleanup from earlier merges.
Breaking Changes
- Internal Project Structure: Legacy paths under old app locations were moved to
apps/_authandapps/api. - Routing Layout: API and bot route organization changed from the initial prototype setup.
Deployment/Infra
- Updated GitHub Actions deployment workflow.
- Improved container configuration in
Dockerfileanddocker-compose.yml.