Files
flyer-crawler.projectium.com/docs/adr/index.md
Torben Sorensen 441467eb8a
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 26m39s
feat: add lightweight version sync workflow (ADR-062)
Implements efficient version synchronization between production and test
environments without running the full test deployment pipeline.

Problem:
- Production version bumps triggered full 5-7 minute test deployment
- Wasteful: 95% less CPU, 99.8% less file I/O needed
- Code already tested when originally pushed to main

Solution (matching stock-alert architecture):
- New sync-test-version.yml workflow (~30 seconds)
- Triggers automatically after successful production deployment
- Updates only package.json in test directory
- Restarts PM2 with --update-env to refresh version metadata

Benefits:
- 90% faster (30 sec vs 5-7 min)
- Saves ~20 minutes/month of CI time
- Clean separation: no conditionals polluting deploy-to-test.yml
- Same end state, optimized path

Changes:
- Added .gitea/workflows/sync-test-version.yml (new workflow)
- Added docs/adr/0062-lightweight-version-sync-workflow.md (decision record)
- Updated docs/adr/index.md (ADR catalog)
- Cleaned up duplicate TSOA generation step in deploy-to-test.yml

Architecture:
- deploy-to-test.yml: unchanged (runs on code changes)
- deploy-to-prod.yml: unchanged (no explicit trigger needed)
- sync-test-version.yml: auto-triggers via workflow_run

Related:
- Inspired by stock-alert project optimization (commit 021f9c8)
- ADR-061: PM2 Process Isolation Safeguards

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-18 11:33:05 -08:00

7.2 KiB

Architectural Decision Records

This directory contains a log of the architectural decisions made for the Flyer Crawler project.

Implementation Tracker: Track implementation status and effort estimates for all ADRs.

1. Foundational / Core Infrastructure

ADR-002: Standardized Transaction Management and Unit of Work Pattern (Accepted) ADR-007: Configuration and Secrets Management (Accepted) ADR-020: Health Checks and Liveness/Readiness Probes (Accepted) ADR-030: Graceful Degradation and Circuit Breaker Pattern (Proposed)

2. Data Management

ADR-009: Caching Strategy for Read-Heavy Operations (Accepted) ADR-013: Database Schema Migration Strategy (Superseded by ADR-023) ADR-019: Data Backup and Recovery Strategy (Accepted) ADR-023: Database Schema Migration Strategy (Proposed) ADR-031: Data Retention and Privacy Compliance (Proposed)

3. API & Integration

ADR-003: Standardized Input Validation using Middleware (Accepted) ADR-008: API Versioning Strategy (Accepted - Phase 2 Complete) ADR-018: API Documentation Strategy (Superseded - tsoa migration complete) ADR-022: Real-time Notification System (Accepted) ADR-028: API Response Standardization and Envelope Pattern (Implemented)

4. Security & Compliance

ADR-001: Standardized Error Handling for Service and Repository Layers (Accepted) ADR-011: Advanced Authorization and Access Control Strategy (Proposed) ADR-016: API Security Hardening (Accepted) ADR-029: Secret Rotation and Key Management Strategy (Proposed) ADR-032: Rate Limiting Strategy (Accepted) ADR-033: File Upload and Storage Strategy (Accepted) ADR-048: Authentication Strategy (Accepted)

5. Observability & Monitoring

ADR-004: Standardized Application-Wide Structured Logging (Accepted) ADR-015: Error Tracking and Observability (Accepted) ADR-050: PostgreSQL Function Observability (Accepted) ADR-051: Asynchronous Context Propagation (Accepted) ADR-052: Granular Debug Logging Strategy (Accepted) ADR-056: Application Performance Monitoring (Proposed)

6. Deployment & Operations

ADR-006: Background Job Processing and Task Queues (Accepted) ADR-014: Containerization and Deployment Strategy (Partially Implemented) ADR-017: CI/CD and Branching Strategy (Accepted) ADR-024: Feature Flagging Strategy (Proposed) ADR-037: Scheduled Jobs and Cron Pattern (Accepted) ADR-038: Graceful Shutdown Pattern (Accepted) ADR-053: Worker Health Checks and Stalled Job Monitoring (Accepted) ADR-054: Bugsink to Gitea Issue Synchronization (Proposed) ADR-061: PM2 Process Isolation Safeguards (Accepted) ADR-062: Lightweight Version Sync Workflow (Accepted)

7. Frontend / User Interface

ADR-005: Frontend State Management and Server Cache Strategy (Accepted) ADR-012: Frontend Component Library and Design System (Partially Implemented) ADR-025: Internationalization (i18n) and Localization (l10n) Strategy (Proposed) ADR-026: Standardized Client-Side Structured Logging (Accepted) ADR-044: Frontend Feature Organization Pattern (Accepted)

8. Development Workflow & Quality

ADR-010: Testing Strategy and Standards (Accepted) ADR-021: Code Formatting and Linting Unification (Accepted) ADR-027: Standardized Naming Convention for AI and Database Types (Accepted) ADR-040: Testing Economics and Priorities (Accepted) ADR-045: Test Data Factories and Fixtures (Accepted) ADR-047: Project File and Folder Organization (Proposed) ADR-057: Test Remediation Post-API Versioning (Accepted) ADR-059: Dependency Modernization - tsoa Migration (Accepted) ADR-060: TypeScript Test Error Remediation Strategy (Implemented)

9. Architecture Patterns

ADR-034: Repository Pattern Standards (Accepted) ADR-035: Service Layer Architecture (Accepted) ADR-036: Event Bus and Pub/Sub Pattern (Accepted) ADR-039: Dependency Injection Pattern (Accepted) ADR-041: AI/Gemini Integration Architecture (Accepted) ADR-042: Email and Notification Architecture (Accepted) ADR-043: Express Middleware Pipeline Architecture (Accepted) ADR-046: Image Processing Pipeline (Accepted) ADR-049: Gamification and Achievement System (Accepted) ADR-055: Database Normalization and Referential Integrity (Accepted)