Skip to content

Suppress non-fatal OpenDAL memory backend warnings #416

@AlexMikhalev

Description

@AlexMikhalev

Description

When running terraphim-agent graph or terraphim-agent replace, multiple warning messages are logged even though the operations complete successfully:

[2026-01-06T18:17:40Z WARN  opendal::services] service=memory name=0x60000018c910 path=embedded_config.json: read failed NotFound (permanent) at read, context: { service: memory, path: embedded_config.json, range: 0- } => memory doesn't have this path
[2026-01-06T18:17:54Z WARN  opendal::services] service=memory name=0x600003bec9d0 path=thesaurus_terraphim_engineer.json: read failed NotFound (permanent) at read
[2026-01-06T18:17:54Z ERROR terraphim_service] Failed to load thesaurus: OpenDal(NotFound (permanent) at read => memory doesn't have this path

Impact

  • Functional: None - replacements work correctly despite warnings
  • UX: Confusing for users who see ERROR/WARN logs for successful operations
  • Git hooks: Warnings pollute hook output (currently suppressed with 2>/dev/null)

Expected Behavior

  • Optional config files should not produce warnings when missing
  • The thesaurus_*.json loading should gracefully handle "not found" without ERROR level log
  • Or: provide a way to configure log level / suppress expected "not found" cases

Environment

  • terraphim-agent version: latest from cargo install
  • OS: macOS Darwin 23.6.0
  • Usage: git prepare-commit-msg hook for knowledge graph replacements

Reproduction

terraphim-agent graph --role "Terraphim Engineer"
echo "test" | terraphim-agent replace --role "Terraphim Engineer"

Suggested Fix Options

  1. Change log level from WARN/ERROR to DEBUG for optional file lookups
  2. Check file existence before attempting read
  3. Add configuration option to suppress expected "not found" warnings
  4. Use Result handling that distinguishes "missing optional file" from "actual error"

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