Files
Martin Vogel 45f0c430d2 fix(cross-repo): a pre-#768 store no longer aborts ["*"] or wipes edges (#2133)
cross-repo-intelligence with target_projects ["*"] failed with "cross-repo
source or target project is missing, invalid, or not indexed" while naming
the same live targets worked.

Root cause: the wildcard enumerator and the pre-write validation both used
cr_project_exists(), which only does a read-only open plus the exact-project
check. A store indexed before the #768 edges.local_name_gen column passes
that (it still serves queries, so list_projects shows it), but the matcher's
read-write open (store init_schema) refuses it until a reindex. One such
legacy store anywhere in the cache therefore made every ["*"] run fail, and
it failed only after delete_cross_edges() had already removed the source's
previous CROSS_* generation, so a failed run was also destructive.

Fix: the #768 probe moves into cbm_store_edges_schema_current() (init_schema
now calls it too, one definition), and cr_project_exists() additionally
requires it. The wildcard skips a legacy store (logged as
cross_repo.project_unusable with the project name); naming one still fails,
but during validation, before any write. The probe is read-only, so the
legacy store is left untouched for its reindex.

Refs #2133

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-09-25 19:10:07 +02:00
..