Skip to content

open db read-only if flag "--dry-run" is used #631

Description

@mickume

Running "af code --dry-run" while there is an ongoing "af code" session results in the following error:

Error: Failed to open knowledge store: Knowledge store initialization failed (.agent-fox/knowledge.duckdb): Failed to open knowledge store: IO Error: Could not set lock on file "/Users/candlekeep/devel/workspace/agent-fox/.agent-fox/knowledge.duckdb": Conflicting lock is held in /Users/candlekeep/.local/share/uv/python/cpython-3.12.12-macos-aarch64-none/bin/python3.12 (PID 60663) by user candlekeep. See also https://duckdb.org/docs/stable/connect/concurrency

If flag "--dry-run" is used on command "code", the DB should be opened "read-only" to avoid the problem. Command "after plan" works correctly in this regard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    af:fixIssues ready to be implementedaf:fixedbugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions