feat(features): per-feature freshness spec — JIT vs batched (#61)
Each ml/features/*.py now declares freshness, source, and fallback per feature. ProfileFeature gains ttl_sec (mirrored from registry.ts), freshness="batched", source, and fallback. context.py adds ContextFeatureSpec + CONTEXT_FEATURES for the three JIT features (hour_of_day, day_of_week, tasks). CI test parses ttlSec from registry.ts to catch drift. ml/README updated with split JIT/batched feature contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
from .context import build_context, PromptContext, TaskSignal
|
||||
from .context import build_context, PromptContext, TaskSignal, ContextFeatureSpec, CONTEXT_FEATURES
|
||||
from .profile_schema import ProfileFeature, PROFILE_FEATURES, feature_names
|
||||
|
||||
__all__ = ["build_context", "PromptContext", "TaskSignal"]
|
||||
__all__ = [
|
||||
"build_context", "PromptContext", "TaskSignal",
|
||||
"ContextFeatureSpec", "CONTEXT_FEATURES",
|
||||
"ProfileFeature", "PROFILE_FEATURES", "feature_names",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user