Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
26 lines
660 B
Python
26 lines
660 B
Python
from __future__ import annotations
|
|
|
|
from app.config import settings
|
|
|
|
|
|
FEATURE_FLAG_NAMES = (
|
|
"ENABLE_RETROSPECTIVE",
|
|
"ENABLE_SESSION_RETROSPECTIVE_SEARCH",
|
|
"ENABLE_RUNTIME_SKILL_SHORTLIST",
|
|
"ENABLE_LEARNING_SIGNALS",
|
|
"ENABLE_SKILL_PROMOTION",
|
|
"ENABLE_LEARNED_SKILL_LOADING",
|
|
"ENABLE_PARALLEL_TASK_GRAPH",
|
|
)
|
|
|
|
|
|
class RollbackController:
|
|
def snapshot_flags(self) -> dict[str, bool]:
|
|
return {
|
|
flag_name: bool(getattr(settings, flag_name, False))
|
|
for flag_name in FEATURE_FLAG_NAMES
|
|
}
|
|
|
|
def is_enabled(self, flag_name: str) -> bool:
|
|
return bool(getattr(settings, flag_name, False))
|