Skip to content

[backend] CorpusBackend bundle.py:_source_paths v1.1 migration to Protocol-aware staleness tracking #314

@dep0we

Description

@dep0we

Context

PR 3 of the CorpusBackend arc (#65) pinned the v1.1 deferral for bundle.py:_source_paths with the test test_source_paths_v11_deferral_returns_direct_wiki_path in tests/test_cascade_bundle.py. The test documents the current behavior (filesystem-only direct path return) and explicitly marks the migration target. PR 4 closes the arc; this issue formalizes the deferral with a target-version label so it does not fall through the cracks when the #258 Postgres-adapter family ships.

Evidence

tests/test_cascade_bundle.py::test_source_paths_v11_deferral_returns_direct_wiki_path exists and passes. atomic_agents/bundle.py:_source_paths still calls the direct wiki path rather than routing through corpus_backend. The test docstring documents this as an intentional v1.1 deferral pending Protocol-aware staleness tracking design. SQLite backends have no wiki/INDEX.md file path to return for staleness tracking; the Protocol surface needs a get_source_paths(corpus) -> list[Path] | None (or similar) method that filesystem-shape backends implement and structured-storage backends return None from.

Proposed fix

No code change required at v1.0. This issue tracks the deferral for v1.1:

  1. When PgvectorCorpusBackend ships alongside the #258 Postgres-adapter family, design a Protocol method for source-path tracking (or an alternative staleness signal that does not require a filesystem path).
  2. bundle.py:_source_paths migrates to route through the new Protocol method.
  3. Retire test_source_paths_v11_deferral_returns_direct_wiki_path and replace with a Protocol-aware integration test parametrized across both filesystem and SQLite backends.

Acceptance criteria

  • At v1.1 (or when #258 ships), bundle.py:_source_paths routes through corpus_backend for staleness checks.
  • The deferral-documentation test is retired and replaced with a Protocol-aware integration test.
  • uv run pytest -q passes with zero regressions.

Source

PR 3 of #65 (PR #304), D-RC-2 / D13 deferral lock; spec/34 §"Out of scope".

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendProtocol-pattern backend abstractions (memory, logs, locks, etc.)v0.1-followupModule deferred from initial v0.1 release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions