Skip to content

Feat/v2 config response#247

Merged
locnguyen1986 merged 3 commits intomainfrom
feat/v2-config-response
Nov 17, 2025
Merged

Feat/v2 config response#247
locnguyen1986 merged 3 commits intomainfrom
feat/v2-config-response

Conversation

@locnguyen1986
Copy link
Collaborator

  • Add responses with queue tasks and webhook
  • Add db migrations for both media and response feature
  • Structure the configurations
  • Formalize all e2e tests

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements OpenAI-compatible background response processing for the Response API, standardizes database configuration naming, and adds comprehensive SQL-based migrations for both response-api and media-api services.

Key Changes:

  • Adds background task processing with PostgreSQL-backed queue and worker pool
  • Implements webhook notifications for async task completion
  • Migrates from GORM AutoMigrate to golang-migrate/migrate for structured SQL migrations
  • Standardizes database DSN environment variables to DB_POSTGRESQL_WRITE_DSN
  • Standardizes S3 credentials to AWS naming convention (MEDIA_S3_ACCESS_KEY_ID, MEDIA_S3_SECRET_ACCESS_KEY)
  • Adds comprehensive Postman test suite with 18 test scenarios for background mode

Reviewed Changes

Copilot reviewed 50 out of 55 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/automation/responses-postman-scripts.json Added 8 new test suites (726 lines) for background mode, webhooks, cancellation, and complex scenarios
services/response-api/migrations/*.sql New SQL migrations for responses, conversations, conversation_items, and tool_executions tables with proper schema namespacing
services/response-api/internal/worker/*.go Worker pool implementation with configurable concurrency and task timeout
services/response-api/internal/webhook/*.go HTTP webhook service with retry logic and structured payloads
services/response-api/internal/domain/response/service.go Split Create into createSync/createAsync with ExecuteBackground method for workers
services/response-api/internal/infrastructure/queue/*.go PostgreSQL queue using FOR UPDATE SKIP LOCKED for reliable task distribution
services/response-api/internal/infrastructure/database/migrate.go Replaced GORM AutoMigrate with golang-migrate for versioned migrations
services/response-api/internal/infrastructure/llmprovider/client.go Extended timeout to 900s, added API key header support, content serialization helper
services/response-api/internal/config/config.go Added 7 new config options for background workers and webhooks
services/media-api/migrations/*.sql New SQL migration for media_objects table with schema namespacing
services/template-api/internal/config/config.go Standardized to DB_POSTGRESQL_WRITE_DSN
pkg/config/types.go Renamed S3 env vars to AWS standard naming
kong/*.yml Increased response-api timeouts to 900s (15 minutes)
docs/guides/background-mode.md New 419-line comprehensive guide for background mode
docs/api/response-api/README.md Added 413 lines documenting background mode API usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@locnguyen1986 locnguyen1986 merged commit cb66844 into main Nov 17, 2025
13 of 17 checks passed
@locnguyen1986 locnguyen1986 deleted the feat/v2-config-response branch November 17, 2025 07:12
@github-project-automation github-project-automation bot moved this to QA in Jan Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

2 participants