Skip to content

Conversation

@HardMax71
Copy link
Owner

@HardMax71 HardMax71 commented Jan 4, 2026

Summary by CodeRabbit

  • Documentation
    • JWT token lifetime clarified (30 minutes → 24 hours) and expanded rate-limiting configuration with WebSocket vs SSE guidance.
    • New runtime registry endpoints and example payload formats documented.
    • Added comprehensive docs for workers (Coordinator, DLQ Processor, Event Replay, K8s Worker, Pod Monitor, Result Processor, Saga Orchestrator) and deployment notes.
    • Frontend routing, full environment variables reference, expanded API reference, and reorganized site navigation.

✏️ Tip: You can customize this high-level summary in your review settings.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

📝 Walkthrough

Walkthrough

This pull request expands and reorganizes documentation across architecture, components, workers, frontend, and reference sections—adding new worker docs, environment variables reference, routing guidance, API reference expansions, and numerous "key files" tables and clarifications.

Changes

Cohort / File(s) Summary
Architecture & Config
docs/architecture/authentication.md, docs/architecture/overview.md, docs/architecture/rate-limiting.md, docs/architecture/runtime-registry.md
Updated JWT lifetime in docs (30m → 24h); added Event Streaming note and enabling guidance; expanded rate-limiting env vars and clarified WebSocket vs SSE endpoints; introduced new runtime registry endpoints and nested example-scripts payload.
Workers — New
docs/components/workers/index.md, docs/components/workers/coordinator.md, docs/components/workers/saga_orchestrator.md, docs/components/workers/k8s_worker.md, docs/components/workers/event_replay.md, docs/components/workers/dlq_processor.md
Added comprehensive docs for multiple workers: responsibilities, Kafka topics, workflows, key files, deployment snippets, and diagrams (saga & DLQ flows).
Workers — Updated
docs/components/workers/pod_monitor.md, docs/components/workers/result_processor.md
Prose refinements, capitalization normalization, added "Key files" tables, deployment snippets, and resource-cleanup/reconciliation details.
SSE & DLQ Docs
docs/components/sse/sse-architecture.md, docs/components/sse/sse-partitioned-architecture.md, docs/components/sse/execution-sse-flow.md, docs/components/dead-letter-queue.md
Inserted "Key files" tables, related-docs links, and minor editorial additions (no behavioral changes).
Schema & Saga Support Docs
docs/components/schema-manager.md, docs/components/saga/resource-allocation.md
Added "Key files" subsections with file purposes and links; minor editorial expansions.
Frontend & Reference
docs/frontend/routing.md, docs/reference/api-reference.md, docs/reference/environment-variables.md
New Svelte 5 routing guide (auth guards, stores, SSE); expanded API quick-reference tables; added a full Environment Variables reference grouped by subsystem.
Index & Navigation
docs/index.md, mkdocs.yml
Reorganized site navigation: added Workers subtree, Environment Variables under API Reference, Frontend routing entry, and index layout/content updates (dev credential warning, grouped components).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through pages, stitching thread by thread,

Docs grown tall where ideas were spread,
Workers and routes, a tidy map—hooray!
Kafka hums and DLQs find their way,
🥕—A rabbit's cheer for docs today.

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR adds comprehensive documentation across multiple architecture and component areas (authentication, overview, rate-limiting, runtime-registry, dead-letter-queue, SSE, workers, frontend routing, API reference, and environment variables), but the title focuses narrowly on 'workers' documentation. While worker documentation is a significant part of the changes, the PR encompasses much broader documentation improvements across the entire system. Consider a more inclusive title that reflects the broader scope, such as 'chore: expand documentation for architecture, workers, and components' or 'chore: comprehensive documentation updates for system architecture and operations'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d85d17 and 03c7cd8.

📒 Files selected for processing (1)
  • docs/components/workers/dlq_processor.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/components/workers/dlq_processor.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@HardMax71 HardMax71 changed the title added more docs chore: better documentation about workers Jan 4, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
docs/components/schema-manager.md (1)

37-43: Consider using relative links for consistency and maintainability.

The "Key files" table is helpful for readers to locate source implementations. However, the hardcoded absolute GitHub URLs (pointing to the main branch) differ from the relative markdown link strategy used elsewhere in the documentation (e.g., in execution-sse-flow.md and overview.md).

For better consistency and maintainability, consider using relative paths instead. If you choose to keep absolute GitHub links, document why (e.g., to ensure external docs readers can always access source, or to handle versioned documentation).

If converting to relative links, the paths might look like:

[`schema_manager.py`](../../../backend/app/db/schema/schema_manager.py)
[`schema_registry.py`](../../../backend/app/events/schema/schema_registry.py)
[`dishka_lifespan.py`](../../../backend/app/dishka_lifespan.py)
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 47f6716 and 8d85d17.

📒 Files selected for processing (23)
  • docs/architecture/authentication.md
  • docs/architecture/overview.md
  • docs/architecture/rate-limiting.md
  • docs/architecture/runtime-registry.md
  • docs/components/dead-letter-queue.md
  • docs/components/saga/resource-allocation.md
  • docs/components/schema-manager.md
  • docs/components/sse/execution-sse-flow.md
  • docs/components/sse/sse-architecture.md
  • docs/components/sse/sse-partitioned-architecture.md
  • docs/components/workers/coordinator.md
  • docs/components/workers/dlq_processor.md
  • docs/components/workers/event_replay.md
  • docs/components/workers/index.md
  • docs/components/workers/k8s_worker.md
  • docs/components/workers/pod_monitor.md
  • docs/components/workers/result_processor.md
  • docs/components/workers/saga_orchestrator.md
  • docs/frontend/routing.md
  • docs/index.md
  • docs/reference/api-reference.md
  • docs/reference/environment-variables.md
  • mkdocs.yml
🧰 Additional context used
🪛 LanguageTool
docs/reference/environment-variables.md

[uncategorized] ~73-~73: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...e` | Decode responses to strings | ## Rate Limiting Configuration | Variable ...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🔇 Additional comments (48)
docs/architecture/authentication.md (2)

54-63: Verify JWT token lifetime claim matches actual codebase configuration.

Line 63 claims the default token lifetime is "24 hours / 1440 minutes", but the AI summary indicates this was changed from 30 minutes. This is a significant change with security implications and requires verification that the documented default actually matches the backend configuration in core/security.py.


1-145: Documentation structure and content coverage looks solid.

The authentication documentation is comprehensive, well-organized, and includes proper code references with the --8<-- include syntax and GitHub links to relevant files. The progression from architecture diagram through token flow, backend/frontend implementation, to key files provides good context.

Run the verification script above to confirm:

  1. The actual default token lifetime matches the documented 24 hours/1440 minutes
  2. All referenced files exist in the repository at the documented paths
docs/components/dead-letter-queue.md (1)

91-98: Key files section is well-structured and follows documentation patterns.

The addition of the Key files table provides a helpful reference to the main components involved in DLQ operations. The links and descriptions are clear and purposeful.

Confirm the following files exist at the documented paths:

  • backend/workers/dlq_processor.py
  • backend/app/dlq/manager.py
  • backend/app/events/unified_producer.py
  • backend/app/api/routes/dlq.py
docs/components/saga/resource-allocation.md (1)

108-113: Key files section adds helpful navigation and follows established pattern.

This addition mirrors the documentation structure in other files, providing clear entry points to the core saga and persistence components.

Confirm the following files exist at the documented paths:

  • backend/app/services/saga/execution_saga.py
  • backend/app/db/repositories/resource_allocation_repository.py
docs/components/sse/execution-sse-flow.md (1)

13-18: Clear cross-document navigation links.

The "Related docs" section effectively surfaces related SSE documentation and provides readers with natural next steps for deeper exploration. The relative links align with the documentation structure. Looks good!

docs/architecture/overview.md (1)

4-13: Improved component navigation and configuration clarity.

The explicit component links replace a generic reference and provide clear entry points to detailed documentation. The Event Streaming note surfaces an important configuration requirement that users need to be aware of for the event-driven architecture to function. Well-structured additions!

docs/components/sse/sse-architecture.md (1)

85-93: Well-structured reference table.

The "Key files" section effectively maps documentation content to source files with appropriate GitHub links. All four files are properly documented in the preceding sections and the table format is consistent with best practices.

docs/components/sse/sse-partitioned-architecture.md (1)

36-42: Clear, focused reference table.

The two files represent the key components discussed in the document: the consumer pool router and connection tracking. The selection appropriately reflects the document's focus on the partitioned architecture redesign and shutdown coordination.

docs/components/workers/coordinator.md (5)

1-35: Excellent introduction and architecture overview.

The document clearly explains the coordinator's role with an effective diagram and concrete checks. Per-user limits (100 concurrent) and queue sizing (10,000) are well-documented.


39-50: Well-documented resource parameters.

The resource management table clearly explains pool sizing, overcommit strategy, and per-user limits. The defaults (32 cores, 64GB, 1.2× overcommit) are reasonable and align with the admission checks described earlier (100 per-user limit, 10,000 queue).

Verify that these configuration defaults match the actual code implementation (e.g., check coordinator.py or a configuration file for these values).


52-65: Well-curated key files reference.

The four files comprehensively cover coordinator functionality: entry point, main service, queue logic, and resource management. Topics are clearly documented, and GitHub links follow the repository structure.


66-73: Clear deployment guidance.

The deployment section appropriately covers the default single-replica configuration with a note about optional HA via Redis leader election. The Dockerfile path is clearly specified.


29-38: Code snippet inclusion is correct.

The file path backend/app/services/coordinator/queue_manager.py exists and lines 14–19 contain the QueuePriority enum definition showing priority values (0=CRITICAL, 1=HIGH, 5=NORMAL, 8=LOW, 10=BACKGROUND). This correctly supports the documentation's statement that lower numeric values are processed first. The MkDocs include syntax is valid.

docs/reference/api-reference.md (1)

1-164: Comprehensive and well-organized API reference.

The endpoint documentation is clearly structured with consistent formatting across all categories. Consider verifying that the openapi.json file referenced at line 164 exists in the correct location and is properly configured for the swagger-ui integration.

docs/architecture/rate-limiting.md (3)

69-71: Helpful clarification on WebSocket support.

The note distinguishing the /api/v1/ws pattern (future WebSocket support) from the current /api/v1/events/* SSE implementation provides useful context for developers. This prevents confusion about the current architecture.


50-51: All code snippet file paths in the documentation are valid and correctly reference existing backend files with valid line ranges. No action needed.


142-149: No action needed — all rate limiting configuration variables are properly defined and used in the backend.

All four new environment variables (RATE_LIMIT_ALGORITHM, RATE_LIMIT_DEFAULT_REQUESTS, RATE_LIMIT_DEFAULT_WINDOW, RATE_LIMIT_BURST_MULTIPLIER) are defined in backend/app/settings.py with defaults matching the documentation. The Redis prefix has been correctly changed to rate_limit:. These variables are actively used throughout the rate limiting implementation:

  • Algorithm selection in rate limit checks
  • Token bucket burst multiplier in overflow handling
  • Window duration in both sliding window and token bucket algorithms
  • Redis prefix in key construction
docs/frontend/routing.md (4)

113-124: All referenced stores are properly exported from their respective modules. Verification confirms:

  • auth.ts: isAuthenticated, username, userRole, csrfToken all exported
  • theme.ts: theme exported as custom store
  • notificationStore.ts: notifications exported as derived store

No issues found.


88-93: Verify all referenced route components exist.

The Route Components section references 11 components across public, protected, and admin pages. All referenced components exist at the paths specified in the tables:

  • Public Pages (4 components): All found ✓
  • Protected Pages (3 components): All found ✓
  • Admin Pages (4 components): All found ✓

48-56: The store import paths and auth module structure are correctly configured.

The $stores path alias is properly defined in tsconfig.json (resolving to src/stores), and the auth.ts module correctly exports userRole as a writable store. The code snippet uses the correct import pattern and the get() function from svelte/store appropriately.


24-28: Code snippet file paths and line ranges are valid.

The documentation correctly references lines 69-85 and 55-67 from frontend/src/App.svelte. Both line ranges exist within the file (105 lines total) and contain the appropriate content for their documentation context. The file paths will resolve correctly during documentation builds.

docs/components/workers/saga_orchestrator.md (4)

21-21: No issues found. The cross-document reference to k8s_worker.md exists and is properly registered in mkdocs.yml navigation alongside saga_orchestrator.md.


1-65: Saga Orchestrator documentation is properly integrated into navigation.

The file is registered in mkdocs.yml under the Workers section (line 137: - Saga Orchestrator: components/workers/saga_orchestrator.md), ensuring it's discoverable in the documentation structure.


49-55: All paths verified and correct. All three referenced files exist at their documented locations:

  • backend/workers/run_saga_orchestrator.py
  • backend/app/services/saga/saga_service.py
  • backend/app/services/saga/execution_saga.py

57-63: Deployment configuration is valid. The Dockerfile backend/workers/Dockerfile.saga_orchestrator exists and is correctly referenced in docker-compose.yaml with proper context path resolution (./backend context + workers/Dockerfile.saga_orchestrator dockerfile path).

docs/components/workers/pod_monitor.md (2)

46-52: All file references are accurate. The three key files exist at their documented paths and the documentation is correct.


54-60: Deployment configuration is correct.

The Dockerfile workers/Dockerfile.pod_monitor exists at backend/workers/Dockerfile.pod_monitor and the docker-compose service configuration accurately references it with the build context set to ./backend, resolving the path correctly. Service dependencies, environment variables, volumes, and network configuration are all properly configured.

docs/architecture/runtime-registry.md (2)

123-126: The Key Files section references are accurate and current. Both runtime_registry.py and execution.py exist in the codebase, and execution.py contains the documented endpoints: /example-scripts (line 283) and /k8s-limits (line 291). These are the correct primary files for users to reference.


84-103: No changes needed. The documented API response structures for both GET /api/v1/k8s-limits and GET /api/v1/example-scripts endpoints accurately match the implemented Pydantic models in backend/app/schemas_pydantic/execution.py. The ResourceLimits, LanguageInfo, and ExampleScripts models all conform to the JSON examples provided in the documentation.

docs/components/workers/index.md (4)

1-24: Excellent high-level overview with clear architecture diagram.

The introduction effectively explains the separation of concerns and inter-worker communication via Kafka. The Mermaid diagram clearly illustrates the event flow through the execution pipeline.


44-53: Clear local development instructions.

The documentation provides straightforward commands for both Docker Compose and direct Python execution.


57-59: Good scaling guidance with state management clarity.

The distinction between stateful and stateless workers helps operators understand scaling implications.


28-38: Comprehensive workers table with clear navigation.

The table provides a good summary of each worker's purpose and entry point. All documented entry points exist in backend/workers/ as claimed.

docs/components/workers/result_processor.md (4)

1-5: Improved overview with better inline linking.

The reworded introduction provides clearer context by linking to the Pod Monitor and explaining the processor's role in the pipeline.


18-23: Enhanced clarity on event handling and downstream notifications.

The updated description better explains the processor's responsibilities including metric recording and downstream event publishing.


46-46: Good operational guidance on scaling.

The note about consumer group and horizontal scaling provides useful operational context.


25-36: Valuable addition of resource cleanup documentation.

The new section documents an important aspect of the processor's responsibilities that was previously missing. The inclusion of the resource_cleaner.py module reference provides a clear path to the implementation.

docs/components/workers/event_replay.md (5)

1-11: Clear introduction with effective visualization.

The overview concisely explains the worker's purpose, and the Mermaid diagram effectively shows the replay flow from MongoDB through Kafka.


14-21: Comprehensive explanation of replay mechanics.

The documentation clearly explains trigger mechanisms, filter options, and the provenance marking feature that helps distinguish replayed events.


23-30: Excellent use cases section.

The three use cases (debugging, rebuilding projections, testing) provide concrete examples of when and why to use event replay, making the feature's value clear to readers.


32-35: Important feature callout.

Documenting the dry-run mode helps prevent operational mistakes by allowing validation before actual replay.


39-53: Good file references and operational guidance.

The key files table provides clear navigation to the implementation, and the deployment notes appropriately describe the on-demand scaling pattern. All referenced files exist at their documented paths.

mkdocs.yml (2)

128-128: Good addition of Environment Variables reference. Adding the environment variables reference to the navigation improves discoverability of configuration documentation.


136-143: Well-organized Workers navigation section.

The Workers subsection provides clear navigation to all seven worker components with an overview page. All referenced documentation files are present.

docs/index.md (2)

22-24: Good addition of security-conscious default credentials warning.

The warning clearly communicates that default credentials are for development only, which is important for users deploying to non-local environments. This helps prevent accidental security misconfigurations.


100-122: Documentation grid reorganization is well-structured and properly referenced.

The changes appropriately highlight the new documentation sections (Workers, Environment Variables, Frontend routing) and update navigation to reflect the expanded documentation structure. All referenced documentation files are present in the repository: components/workers/index.md, frontend/routing.md, and reference/environment-variables.md.

docs/components/workers/k8s_worker.md (1)

1-64: Well-structured worker documentation with comprehensive security details, but file references need verification.

The documentation clearly explains the K8s worker's role, responsibilities, and security posture with good visual hierarchy. The pod security controls table is particularly valuable. However, the hardcoded GitHub links pointing to the main branch and the referenced source file paths (run_k8s_worker.py, worker.py, pod_builder.py) should be verified to ensure they match the actual repository structure and remain maintainable. Additionally, confirm that the documented topics (saga_commands, execution_events, pod_events) are correctly named across the codebase.

docs/reference/environment-variables.md (1)

1-165: Environment variables documentation is accurate and comprehensive.

All documented variables are properly implemented in backend/app/settings.py with matching default values. The documentation provides clear organization into logical sections, consistent formatting, and accurate descriptions. No drift between documentation and actual backend configuration was detected.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 4, 2026

@HardMax71 HardMax71 merged commit ed8762b into main Jan 4, 2026
14 checks passed
@HardMax71 HardMax71 deleted the docs-precise branch January 4, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants