Normalize project paths for ADR lookups#780
Open
SS-42 wants to merge 1 commit into
Open
Conversation
b126c48 to
d5cbac5
Compare
Signed-off-by: SS-42 <noreply@incogni.to>
d5cbac5 to
273a3af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes several ADR lookup edge cases that can make an indexed project appear to have no ADR:
adr_presentfrom the SQLite-backed ADR store, with the legacy file as fallbackrepo_pathvalues before indexing, sorepo_path="."derives the same project key as the absolute pathprojectarguments through the same project-key derivation used by indexing, including symlink pathsmanage_adranddetect_changeswhen the project is missingmanage_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 mcpASAN_OPTIONS=detect_leaks=0 ./build/c/test-runner fqn pipeline