Skip to content

Normalize project paths for ADR lookups#780

Open
SS-42 wants to merge 1 commit into
DeusData:mainfrom
SS-42:fix/adr-path-normalization
Open

Normalize project paths for ADR lookups#780
SS-42 wants to merge 1 commit into
DeusData:mainfrom
SS-42:fix/adr-path-normalization

Conversation

@SS-42

@SS-42 SS-42 commented Jul 2, 2026

Copy link
Copy Markdown

Summary

This fixes several ADR lookup edge cases that can make an indexed project appear to have no ADR:

  • report adr_present from the SQLite-backed ADR store, with the legacy file as fallback
  • canonicalize existing repo_path values before indexing, so repo_path="." derives the same project key as the absolute path
  • normalize path-like project arguments through the same project-key derivation used by indexing, including symlink paths
  • return the existing rich project-list error for manage_adr and detect_changes when the project is missing
  • update the ADR creation hint to use manage_adr(mode='update')

Observed environment: macOS 26.5.2 (25F84), Darwin 25.5.0 arm64, Apple clang 21.0.0. The path normalization issue is not expected to be macOS-specific; the symlink case is POSIX-path dependent.

Test plan

  • make -f Makefile.cbm build/c/test-runner CC=clang CXX=clang++
  • ASAN_OPTIONS=detect_leaks=0 ./build/c/test-runner mcp
  • ASAN_OPTIONS=detect_leaks=0 ./build/c/test-runner fqn pipeline

@SS-42 SS-42 requested a review from DeusData as a code owner July 2, 2026 18:42
@SS-42 SS-42 force-pushed the fix/adr-path-normalization branch from b126c48 to d5cbac5 Compare July 2, 2026 18:43
Signed-off-by: SS-42 <noreply@incogni.to>
@SS-42 SS-42 force-pushed the fix/adr-path-normalization branch from d5cbac5 to 273a3af Compare July 2, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant