Migrate config to Pydantic, fix datetime deprecation, add import guards#8
Merged
JustAGhosT merged 3 commits intotembo/refactor-codebase-structurefrom Dec 23, 2025
Merged
Conversation
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- Migrate config.py from dataclasses to Pydantic BaseModel with comprehensive validation - Add URL validation for DatabaseConfig and RedisConfig - Add temperature bounds (0.0-2.0) and max_tokens validation for LLMConfig - Add positive integer validation for WorkflowConfig - Mark secret fields (api_key, token, private_key, webhook_secret) as SecretStr - Replace deprecated datetime.utcnow() with timezone-aware datetime.now(timezone.utc) - Fixed in base.py (BaseModel and TimestampMixin) - Fixed in events.py (WebhookEvent) - Add FindStaleIssuesOrPRs to guarded imports in actions/issues/__init__.py - Add guarded imports for ai_actions submodules (autogen, llm) - Make EnterpriseAuthorizationManager import guarded in __init__.py - Make all category module imports in actions/__init__.py guarded for graceful degradation Co-authored-by: JustAGhosT <5531814+JustAGhosT@users.noreply.github.com>
Field constraints already handle validation, no need for duplicate validators Co-authored-by: JustAGhosT <5531814+JustAGhosT@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor CodeFlow Engine package structure
Migrate config to Pydantic, fix datetime deprecation, add import guards
Dec 23, 2025
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
fd743a0
into
tembo/refactor-codebase-structure
1 check was pending
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addressed code review feedback requiring config validation, timezone-aware timestamps, and graceful degradation for optional dependencies.
Config Models → Pydantic
Migrated dataclass configs to Pydantic BaseModel with validation:
://)Datetime Deprecation
Replaced
datetime.utcnow()withdatetime.now(timezone.utc):All timestamps now timezone-aware (UTC).
Import Guards
Made optional dependency imports failsafe:
FindStaleIssuesOrPRsto guarded exportsautogen,llmsubmodule importsEnterpriseAuthorizationManagerimport✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.