{"record":{"id":"da389ca70abcbd7c","repo":"openai/codex","slug":"compaction-request-compaction-request-id-complet","errorCode":null,"errorMessage":"compaction request {compaction_request_id} completion used compaction {compaction_id}, but start used {}","messagePattern":"compaction request (.+?) completion used compaction (.+?), but start used (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/rollout-trace/src/reducer/compaction.rs","lineNumber":101,"sourceCode":"        &mut self,\n        seq: RawEventSeq,\n        wall_time_unix_ms: i64,\n        compaction_id: String,\n        compaction_request_id: CompactionRequestId,\n        status: ExecutionStatus,\n        response_payload: Option<RawPayloadRef>,\n    ) -> Result<()> {\n        let Some(request) = self\n            .rollout\n            .compaction_requests\n            .get_mut(&compaction_request_id)\n        else {\n            bail!(\n                \"compaction request completion referenced unknown request {compaction_request_id}\"\n            );\n        };\n        if request.compaction_id != compaction_id {\n            bail!(\n                \"compaction request {compaction_request_id} completion used compaction {compaction_id}, but start used {}\",\n                request.compaction_id\n            );\n        }\n        request.execution.ended_at_unix_ms = Some(wall_time_unix_ms);\n        request.execution.ended_seq = Some(seq);\n        request.execution.status = status;\n        request.raw_response_payload_id = response_payload.map(|payload| payload.raw_payload_id);\n        Ok(())\n    }\n\n    /// Installs a compaction checkpoint into the reduced conversation graph.\n    ///\n    /// This is the semantic boundary where replacement history becomes the live\n    /// thread history; request attempts alone do not imply that change.\n    pub(super) fn reduce_compaction_installed_event(\n        &mut self,\n        wall_time_unix_ms: i64,","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rollout-trace/src/reducer/compaction.rs#L83-L119","documentation":"Cross-reference guard in complete_compaction_request: the completion names a compaction id that differs from the one recorded on the matching request start, so the events cannot be paired. Mismatched compaction ids between start and completion are the inputs at fault.","triggerScenarios":"Thrown at codex-rs/rollout-trace/src/reducer/compaction.rs:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the completion event carries the same compaction id as its start","Fix the producer that emits inconsistent compaction ids across the request lifecycle"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}