Skip to content

fix(get): classify missing committed paths - #43

Merged
moomooskycow merged 1 commit into
masterfrom
exec/exocortex-get-missing-path-error
Sep 1, 2026
Merged

fix(get): classify missing committed paths#43
moomooskycow merged 1 commit into
masterfrom
exec/exocortex-get-missing-path-error

Conversation

@moomooskycow

Copy link
Copy Markdown
Contributor

Intent

Return not_found when a requested path is absent from a healthy committed publisher snapshot; preserve cortex_unavailable for snapshot failures.

Decision

After git show fails, use an exact git ls-tree lookup 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

  • Kernel Get regression: missing path -> not_found; invalid snapshot is not misclassified.
  • MCP stdio Get: JSON error not_found.
  • CLI command path: exit 1 and JSON error not_found.
  • Existing dirty and upstream-loss fail-closed tests.
  • ./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_unavailable classification.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 9912c757-1db2-406b-90c7-15930e72b4ad

📥 Commits

Reviewing files that changed from the base of the PR and between dacb855 and c5b391e.

📒 Files selected for processing (5)
  • internal/cli/orient_test.go
  • internal/kernel/clean_writer_test.go
  • internal/kernel/mcp_test.go
  • internal/kernel/read.go
  • internal/kernel/read_refresh_test.go

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread internal/kernel/read.go
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 == "" {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T22:58:43.571352Z c5b391e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@moomooskycow
moomooskycow merged commit cd4da42 into master Sep 1, 2026
2 checks passed
@moomooskycow
moomooskycow deleted the exec/exocortex-get-missing-path-error branch September 1, 2026 22:59
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