refactor(config): stabilize synchronous experiment access and add real-time updates

- Revert getExperimentValue to a synchronous interface to maintain compatibility with existing callers.
- Add Config.updateExperimentalSettings() to support immediate application of /experiment set/unset changes.
- Implement CLI argument normalization to handle kebab-case, camelCase, and snake_case consistently.
- Enhance getExperimentFlagIdFromName to be more resilient to different naming conventions.
- Rename getNumericalRoutingEnabled to isNumericalRoutingEnabled for better idiomatic consistency.
- Update documentation in experimentation skill to recommend strongly-typed wrappers in Config.ts.
- Add regression tests for CLI overrides and update all relevant routing and command tests.
- Fix lint errors by removing unnecessary await/Promise.all for synchronous config methods.
This commit is contained in:
mkorwel
2026-02-19 20:42:00 -06:00
committed by Matt Korwel
parent 8d041e2acd
commit 6dd2d219d9
14 changed files with 148 additions and 65 deletions
@@ -76,10 +76,8 @@ export class ModelRouterService {
const startTime = Date.now();
let decision: RoutingDecision;
const [enableNumericalRouting, thresholdValue] = await Promise.all([
this.config.getNumericalRoutingEnabled(),
this.config.getResolvedClassifierThreshold(),
]);
const enableNumericalRouting = this.config.isNumericalRoutingEnabled();
const thresholdValue = this.config.getResolvedClassifierThreshold();
const classifierThreshold = String(thresholdValue);
let failed = false;