resolve-source-path-db-dir-precedence
IN premise
`resolve_source_path` follows a strict precedence chain: `db_dir` resolution takes priority over agent repo resolution, which takes priority over repo-key-split resolution; missing files return `None`.
Summary
When the system needs to find a source file, it checks locations in a fixed order: first the database directory, then the agent's repo, then a repo-key-split path. It stops at the first match and returns nothing if none of them have the file. This means the database directory can shadow files that exist in other locations, which matters if the same filename appears in multiple places.
Details
| Source | entries/2026/05/05/tests-test_check_stale.md |