{"record":{"id":"2ce809bc7dec50a2","repo":"Hmbown/CodeWhale","slug":"compaction-summary-response-was-unusable-only-whi","errorCode":null,"errorMessage":"Compaction summary response was unusable: only whitespace or punctuation was returned.","messagePattern":"Compaction summary response was unusable: only whitespace or punctuation was returned\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/compaction.rs","lineNumber":1137,"sourceCode":"    prompt\n}\n\nfn validate_compaction_summary(summary: &str) -> Result<()> {\n    let trimmed = summary.trim();\n    if trimmed.is_empty() {\n        anyhow::bail!(\"Compaction summary response was unusable: no text was returned.\");\n    }\n\n    // Strip every non-word edge, not just ASCII punctuation. Providers can\n    // return visually non-empty Unicode punctuation or emoji-only payloads;\n    // neither is a usable continuation checkpoint. `is_alphanumeric` keeps\n    // this language-neutral for CJK and other scripts without imposing a\n    // prose-length heuristic.\n    let normalized = trimmed\n        .trim_matches(|ch: char| !ch.is_alphanumeric())\n        .to_ascii_lowercase();\n    if normalized.is_empty() {\n        anyhow::bail!(\n            \"Compaction summary response was unusable: only whitespace or punctuation was returned.\"\n        );\n    }\n    if matches!(\n        normalized.as_str(),\n        \"no summary available\"\n            | \"summary unavailable\"\n            | \"no summary\"\n            | \"n/a\"\n            | \"na\"\n            | \"not available\"\n            | \"i cannot provide a summary\"\n            | \"i can't provide a summary\"\n            | \"unable to provide a summary\"\n    ) {\n        anyhow::bail!(\"Compaction summary response was unusable: a placeholder was returned.\");\n    }\n    Ok(())","sourceCodeStart":1119,"sourceCodeEnd":1155,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/compaction.rs#L1119-L1155","documentation":"After trimming every non-alphanumeric edge character, nothing remains: the payload was whitespace, punctuation, or emoji only (crates/tui/src/compaction.rs:1137). is_alphanumeric keeps the check language-neutral for CJK; visually non-empty punctuation or emoji-only payloads are not usable checkpoints.","triggerScenarios":"The model answers with '...', a divider line of dashes, markdown asterisks, or emoji-only content; Unicode punctuation-only replies from CJK models.","commonSituations":"Models hedging with decorative output instead of summarizing; degenerate sampling settings (temperature extremes); prompt templates that elicit formatting-only responses.","solutions":["Retry - punctuation-only outputs are usually one-off sampling artifacts","Lower or normalize the compaction sampling temperature","Switch the compaction model","Shorten the history being summarized so the model is not reduced to filler"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check any summary text you produce yourself\nfn has_word_chars(s: &str) -> bool {\n    s.trim_matches(|c: char| !c.is_alphanumeric()).chars().any(|c| c.is_alphanumeric())\n}","typeGuard":"fn is_punctuation_only_summary(msg: &str) -> bool {\n    msg.contains(\"only whitespace or punctuation was returned\")\n}","tryCatchPattern":"match compact().await {\n    Err(e) if is_punctuation_only_summary(&e.to_string()) => {\n        lower_temperature();\n        compact().await\n    }\n    r => r,\n}","preventionTips":["Normalize sampling temperature for compaction requests","Detect degenerate filler early in pipelines by checking alphanumeric presence"],"tags":["compaction","validation","unicode","provider"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}