{"record":{"id":"028ba59e87de12fa","repo":"dbt-labs/dbt-core","slug":"create-view-should-be-the-next-sequential-event","errorCode":null,"errorMessage":"CREATE VIEW should be the next sequential event","messagePattern":"CREATE VIEW should be the next sequential event","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/time_machine/event_replay.rs","lineNumber":3262,"sourceCode":"        // Strict mode replay: DATEDIFF_PROBE arrives first via global read search\n        let probe_args = serde_json::json!([probe_sql]);\n        let e = recording\n            .take_ro_exec_read(node_id, \"execute\", &probe_args)\n            .expect(\"probe should be matched globally\");\n        assert_eq!(e.seq, 1, \"should match the probe event (seq 1)\");\n\n        // SHOW_PARAMS also arrives out of order; matched globally\n        let show_args = serde_json::json!([show_sql]);\n        let e = recording\n            .take_ro_exec_read(node_id, \"execute\", &show_args)\n            .expect(\"SHOW PARAMETERS should be matched globally\");\n        assert_eq!(e.seq, 0);\n\n        // take_next (strict sequential) should skip seq 0 and seq 1 (already consumed\n        // as read-only execute reads) and return seq 2 (CREATE_VIEW).\n        let e = recording\n            .take_next(node_id)\n            .expect(\"CREATE VIEW should be the next sequential event\");\n        assert_eq!(\n            e.seq, 2,\n            \"take_next should skip ro_exec_matched events and return CREATE_VIEW\"\n        );\n    }\n\n    #[test]\n    fn test_sql_args_match_string_format() {\n        // Test that SQL can be passed as a direct string (not wrapped in array)\n        let sql1 = serde_json::json!(\"SELECT   *  FROM  users\");\n        let sql2 = serde_json::json!(\"SELECT * FROM users\");\n        assert!(\n            sql_args_match(&sql1, &sql2, AdapterType::Snowflake),\n            \"Direct SQL strings should be matched with fuzzy comparison\"\n        );\n    }\n\n    #[test]","sourceCodeStart":3244,"sourceCodeEnd":3280,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/time_machine/event_replay.rs#L3244-L3280","documentation":"Test-only assertion in the strict-mode replay test: after the two out-of-order reads matched globally, the CREATE VIEW write must be the next event matched in sequential order (seq 2). Fires only if write ordering breaks after global read matches.","triggerScenarios":"Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:3262 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify sequential write matching resumes correctly after global read consumption","Check the seq cursor advancement logic in strict replay","Treat failure as an event-replay determinism regression"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}