fix: match path-qualified catalog entries by repo basename#156
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44de9e980f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if "/" in key and key.rsplit("/", 1)[-1] == normalized_repo_name | ||
| ] | ||
| if normalized_repo_name and len(basename_matches) == 1: |
There was a problem hiding this comment.
Do not basename-match when a workspace path is present
When callers already provide metadata['path'] and that exact path failed to match, this basename fallback can attach a different path-qualified catalog contract to the project. portfolio_truth_reconcile._build_truth_project passes the real relative path into catalog_entry_for_repo (src/portfolio_truth_reconcile.py:433-440), so a project at Other/StatusPage would inherit MoneyPRJsViaGPT/StatusPage if that is the only catalog entry with the same basename, corrupting lifecycle/disposition in the canonical portfolio truth. Please restrict this fallback to truly pathless metadata, or otherwise require the provided path to be compatible before using a basename match.
Useful? React with 👍 / 👎.
Summary
Verification