{"record":{"id":"18ec8d9ecd918e11","repo":"ruvnet/ruflo","slug":"value-did-not-change-from-string-initialvalue","errorCode":null,"errorMessage":"Value did not change from ${String(initialValue)} within timeout","messagePattern":"Value did not change from (.+?) within timeout","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/testing/src/helpers/test-utils.ts","lineNumber":75,"sourceCode":" * @example\n * await waitUntilChanged(() => counter.value, { from: 0 });\n */\nexport async function waitUntilChanged<T>(\n  getValue: () => T | Promise<T>,\n  options: WaitUntilChangedOptions<T> = {}\n): Promise<T> {\n  const { from, timeout = 5000, interval = 50 } = options;\n  const initialValue = from ?? await getValue();\n  const startTime = Date.now();\n\n  while (true) {\n    const currentValue = await getValue();\n    if (currentValue !== initialValue) {\n      return currentValue;\n    }\n\n    if (Date.now() - startTime >= timeout) {\n      throw new Error(`Value did not change from ${String(initialValue)} within timeout`);\n    }\n\n    await sleep(interval);\n  }\n}\n\n/**\n * Options for waitUntilChanged utility\n */\nexport interface WaitUntilChangedOptions<T> {\n  from?: T;\n  timeout?: number;\n  interval?: number;\n}\n\n/**\n * Retry an operation with exponential backoff\n *","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/testing/src/helpers/test-utils.ts#L57-L93","documentation":"waitUntilChanged polled getValue until timeout and the value never differed from the recorded initial value (explicitly supplied via `from` or sampled at start). The expected change in the observed state did not occur within the deadline.","triggerScenarios":"Thrown at v3/@claude-flow/testing/src/helpers/test-utils.ts:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the value is expected to change; trigger the action that mutates it.","Increase the polling timeout or fix the getter to read the live value."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}