fix(get): classify missing committed paths - #43
Conversation
|
Warning Review limit reachedNext included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5b391e15b
ℹ️ 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 s.sha != "" { | ||
| raw, err := git(s.repo, "show", s.sha+":"+path) | ||
| if err != nil { | ||
| if tree, treeErr := git(s.repo, "ls-tree", "-z", s.sha, "--", path); treeErr == nil && tree == "" { |
There was a problem hiding this comment.
Treat the ls-tree probe as a literal path
For legal paths beginning with Git pathspec magic, this is not an exact lookup. For example, if notes/existing.md exists but the requested literal path :(literal)notes/existing.md does not, git show fails while git ls-tree ... -- ":(literal)notes/existing.md" resolves the magic and returns the other file; Get consequently reports cortex_unavailable instead of not_found. Force literal pathspec handling or escape the lookup path before classifying the failure.
AGENTS.md reference: AGENTS.md:L48-L49
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Intent
Return
not_foundwhen a requested path is absent from a healthy committed publisher snapshot; preservecortex_unavailablefor snapshot failures.Decision
After
git showfails, use an exactgit ls-treelookup at the captured snapshot. Only a successful empty lookup means the path is absent. A failed lookup or an existing tree entry preserves the original Git failure.Checks
not_found; invalid snapshot is not misclassified.not_found.not_found../scripts/check.sh: passed; kernel 58,302/58,400 and CLI 16,177/16,200 tokens.Rollback
Revert this PR; missing committed paths return the prior
cortex_unavailableclassification.