{"record":{"id":"54cc8311d9c0658d","repo":"Yeachan-Heo/oh-my-codex","slug":"native-hook-transaction-precondition-changed-for-a","errorCode":null,"errorMessage":"Native hook transaction precondition changed for ancestor ${expected.path}; refusing to mutate a stale topology.","messagePattern":"Native hook transaction precondition changed for ancestor (.+?); refusing to mutate a stale topology\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/setup.ts","lineNumber":849,"sourceCode":"\t);\n\treturn {\n\t\tcontrolledRoot,\n\t\tancestorPaths,\n\t\tsnapshots: await captureNativeHookTransactionAncestorSnapshots(ancestorPaths),\n\t};\n}\n\nasync function assertNativeHookTransactionAncestorPrecondition(\n\tprecondition: NativeHookTransactionAncestorPrecondition,\n): Promise<void> {\n\tconst actual = await captureNativeHookTransactionAncestorSnapshots(\n\t\tprecondition.ancestorPaths,\n\t);\n\tfor (let index = 0; index < precondition.snapshots.length; index += 1) {\n\t\tconst expected = precondition.snapshots[index]!;\n\t\tconst current = actual[index]!;\n\t\tif (!nativeHookTransactionAncestorTopologyEqual(current.topology, expected.topology)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Native hook transaction precondition changed for ancestor ${expected.path}; refusing to mutate a stale topology.`,\n\t\t\t);\n\t\t}\n\t}\n}\n\nasync function refreshNativeHookTransactionAncestorPrecondition(\n\tprecondition: NativeHookTransactionAncestorPrecondition,\n\tartifactPath: string,\n): Promise<void> {\n\tconst allowedCreatedPaths = new Set(\n\t\tnativeHookTransactionArtifactAncestorPaths(precondition.controlledRoot, [artifactPath]),\n\t);\n\tconst actual = await captureNativeHookTransactionAncestorSnapshots(\n\t\tprecondition.ancestorPaths,\n\t);\n\tfor (let index = 0; index < precondition.snapshots.length; index += 1) {\n\t\tconst expected = precondition.snapshots[index]!;","sourceCodeStart":831,"sourceCodeEnd":867,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/setup.ts#L831-L867","documentation":"Error \"Native hook transaction precondition changed for ancestor ${expected.path}; refusing to mutate a stale topology.\" thrown in Yeachan-Heo/oh-my-codex.","triggerScenarios":"Thrown at src/cli/setup.ts:849 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}