(strategy_mode: str)
| 190 | |
| 191 | def _strategy_settings(strategy_mode: str) -> Dict[str, Any]: |
| 192 | mode = str(strategy_mode or STRATEGY_SIMULATION).strip() or STRATEGY_SIMULATION |
| 193 | if mode == STRATEGY_REAL_USER: |
| 194 | return { |
| 195 | "mode": STRATEGY_REAL_USER, |
| 196 | "required_consecutive_days": 2, |
| 197 | "intent_increment": 0.15, |
| 198 | "intent_decay": 0.05, |
| 199 | "lock_threshold": 0.15, |
| 200 | "commitment_days": 3, |
| 201 | "progress_step": 0.35, |
| 202 | "score_step": 0.20, |
| 203 | "max_shift_episode_start": 2, |
| 204 | "max_recover_episode_start": 5, |
| 205 | "max_drift_cycles": None, |
| 206 | } |
| 207 | return { |
| 208 | "mode": STRATEGY_SIMULATION, |
| 209 | "required_consecutive_days": ANCHOR_REQUIRED_CONSECUTIVE_DAYS, |
| 210 | "intent_increment": ANCHOR_INTENT_INCREMENT, |
| 211 | "intent_decay": ANCHOR_INTENT_DECAY, |
| 212 | "lock_threshold": ANCHOR_LOCK_THRESHOLD, |
| 213 | "commitment_days": ANCHOR_COMMITMENT_DAYS, |
| 214 | "progress_step": ANCHOR_PROGRESS_STEP, |
| 215 | "score_step": ANCHOR_SCORE_STEP, |
| 216 | "max_shift_episode_start": 2, |
| 217 | "max_recover_episode_start": 5, |
| 218 | "max_drift_cycles": 3, |
| 219 | "max_drift_opportunities": SIMULATION_MAX_DRIFT_OPPORTUNITIES, |
| 220 | "checkfile_cooldown_episodes": SIMULATION_CHECKFILE_COOLDOWN_EPISODES, |
| 221 | "observing_to_shift_probability": SIMULATION_OBSERVING_TO_SHIFT_PROBABILITY, |
| 222 | } |
| 223 | |
| 224 | |
| 225 | def _candidate_shift_topics(profile: Dict[str, Any]) -> List[str]: |
| 226 | return _canonicalize_topics(list((profile.get("drift_plan", {}) or {}).get("shift_topics", []) or [])) |
no outgoing calls
no test coverage detected