Skip to content

bug: expect() panic on tokio runtime creation in generator.rs #249

@aphoristicartist

Description

@aphoristicartist

Context

engine/src/context_tree/generator.rs:117 uses expect() which panics if tokio runtime creation fails:

let rt = self.runtime.get_or_init(|| {
    tokio::runtime::Runtime::new().expect("Failed to create tokio runtime")
});

Rest of codebase uses Result-based error propagation.

Suggested Fix

Return GeneratorError instead of panicking.

Files

  • engine/src/context_tree/generator.rs:117

Severity

High

Found during review of #242

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions