Skip to content

Ollama stall-timeout path panics on missing llm_request log file #8485

@sunilkumarvalmiki

Description

@sunilkumarvalmiki

Summary

providers::ollama::tests::test_stream_ollama_timeout_on_stall panics due to unwrap() when request log file path does not exist.

Environment

  • Repo: aaif-goose/goose
  • Commit tested: 3f5277538d5f6df1a88faca5e77cecc0ee208ae1 (origin/main)
  • Host: macOS 26.4.1 (arm64)
  • Date tested: 2026-04-11

Reproduction

source bin/activate-hermit
cargo test -p goose --lib providers::ollama::tests::test_stream_ollama_timeout_on_stall -- --exact

Expected

Timeout handling should return a recoverable error path (or structured failure) without panicking.

Actual

Panic at crates/goose/src/providers/ollama.rs:523:10:

called `Result::unwrap()` on an `Err` value: failed to open file .../state/logs/llm_request.<uuid>.jsonl: No such file or directory (os error 2)

Impact

  • Hard panic in stall-timeout path
  • Test instability and potential runtime crash when log directory/file is absent

Evidence

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions