{"record":{"id":"07d8adc14b464de0","repo":"tursodatabase/turso","slug":"unknown-integrity-fixture-path-relative-path","errorCode":null,"errorMessage":"unknown integrity fixture path '{relative_path}'","messagePattern":"unknown integrity fixture path '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"testing/sqltest/src/generator/mod.rs","lineNumber":1423,"sourceCode":"        INTEGRITY_FIXTURE_OVERFLOW_LIST_LENGTH_MISMATCH_REL_PATH => {\n            generate_overflow_list_length_mismatch_fixture(db_path).await\n        }\n        INTEGRITY_FIXTURE_GENCOL_NOT_NULL_VIOLATION_REL_PATH => {\n            generate_gencol_not_null_violation_fixture(db_path).await\n        }\n        INTEGRITY_FIXTURE_STRICT_TYPE_VIOLATION_REL_PATH => {\n            generate_strict_type_violation_fixture(db_path).await\n        }\n        INTEGRITY_FIXTURE_STRICT_GENCOL_TYPE_VIOLATION_REL_PATH => {\n            generate_strict_gencol_type_violation_fixture(db_path).await\n        }\n        INTEGRITY_FIXTURE_STRICT_NOT_NULL_VIOLATION_REL_PATH => {\n            generate_strict_not_null_violation_fixture(db_path).await\n        }\n        INTEGRITY_FIXTURE_STRICT_REAL_INTEGER_SERIAL_REL_PATH => {\n            generate_strict_real_integer_serial_fixture(db_path).await\n        }\n        _ => anyhow::bail!(\"unknown integrity fixture path '{relative_path}'\"),\n    }\n}\n\n/// Backward-compatible helper for older call-sites.\npub async fn generate_integrity_missing_index_entry_fixture(db_path: &Path) -> Result<()> {\n    generate_integrity_fixture(db_path, INTEGRITY_FIXTURE_MISSING_INDEX_ENTRY_REL_PATH).await\n}\n\nasync fn create_tables(conn: &Connection, no_rowid_alias: bool) -> Result<()> {\n    let pk_type = if no_rowid_alias {\n        \"INT PRIMARY KEY\"\n    } else {\n        \"INTEGER PRIMARY KEY\"\n    };\n\n    let users_sql = format!(\n        r#\"\n        CREATE TABLE users (","sourceCodeStart":1405,"sourceCodeEnd":1441,"githubUrl":"https://github.com/tursodatabase/turso/blob/8d4a589f8d13ac184700d2a8f724f27e1995be3b/testing/sqltest/src/generator/mod.rs#L1405-L1441","documentation":"`generate_integrity_fixture` dispatches on a known set of relative fixture paths; any unrecognized path hits the catch-all arm and fails with this message. It is an API-contract check: callers must pass one of the exported `INTEGRITY_FIXTURE_*_REL_PATH` constants.","triggerScenarios":"Calling `generate_integrity_fixture(db_path, relative_path)` with a path string that isn't one of the module's `INTEGRITY_FIXTURE_*_REL_PATH` constants (e.g. a typo'd or hand-written path), from `run_tests` or custom call sites.","commonSituations":"Hand-typing the fixture path instead of using the exported constant, a renamed/deleted fixture constant after a refactor, or wiring a new integrity fixture before adding its match arm.","solutions":["Use the exported `INTEGRITY_FIXTURE_*_REL_PATH` constants instead of a literal string.","Check spelling/exact match of the relative path constant.","If adding a new fixture, add a match arm in `generate_integrity_fixture` before calling it."],"exampleFix":"// before\ngenerate_integrity_fixture(&db, \"integrity/missing_index.db\").await?;\n// after\ngenerate_integrity_fixture(&db, INTEGRITY_FIXTURE_MISSING_INDEX_ENTRY_REL_PATH).await?;","handlingStrategy":"validation","validationCode":"const VALID_PATHS: &[&str] = &[\n    INTEGRITY_FIXTURE_MISSING_INDEX_ENTRY_REL_PATH,\n    INTEGRITY_FIXTURE_STRICT_NOT_NULL_VIOLATION_REL_PATH,\n    INTEGRITY_FIXTURE_STRICT_REAL_INTEGER_SERIAL_REL_PATH,\n];\nassert!(VALID_PATHS.contains(&relative_path), \"unknown integrity fixture path '{relative_path}'\");","typeGuard":null,"tryCatchPattern":"match generate_integrity_fixture(&db, rel_path).await {\n    Err(e) if e.to_string().contains(\"unknown integrity fixture path\") => {\n        eprintln!(\"bad fixture path {rel_path}; use INTEGRITY_FIXTURE_* constants\");\n    }\n    other => other?,\n}","preventionTips":["Always pass exported INTEGRITY_FIXTURE_*_REL_PATH constants, never string literals","Add new fixtures' match arms before referencing them","Centralize fixture path selection in an enum rather than strings"],"tags":["fixture","testing","dispatch"],"backgroundTag":"invalid-enum-value","analyzedSha":"8d4a589f8d13ac184700d2a8f724f27e1995be3b","analyzedAt":"2026-09-20T13:18:14.658Z","contentChangedAt":"2026-09-20T13:18:14.658Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}