Skip to content

Fix selected-repository Ask grounding - #595

Open
prasadus92 wants to merge 8 commits into
mainfrom
fix/selected-repo-grounding
Open

Fix selected-repository Ask grounding#595
prasadus92 wants to merge 8 commits into
mainfrom
fix/selected-repo-grounding

Conversation

@prasadus92

@prasadus92 prasadus92 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require selected-repository coverage before code-memory readiness reports success
  • ground single-repository Ask questions in the explicitly named, verified checkout
  • isolate Claude and Codex Ask turns from writable tools, user configuration, MCP servers, hooks, and persisted sessions
  • narrow repository and code-map grounding to the current turn while preserving comparison questions
  • keep Graphify graphs checkout-relative so runtime attachment and readiness coverage agree
  • hide structured turn envelopes from live desktop and Slack chat rendering

Verification

  • full Python test suite
  • Ruff 0.15.22 check and format check
  • mypy 2.3.0
  • public scrub check
  • live read-only native Ask turn against a selected checkout
  • independent blocker review: clean

@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@prasadus92

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 9e85619845

ℹ️ 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 lib/server/setup.py Outdated
Comment thread lib/server/views.py
@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@codex review

Please review exact HEAD 2d57d8eb12f6c03c5960256ebb892dacd295433b.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 2d57d8eb12

ℹ️ 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".

@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@codex review

Please review exact HEAD 11bc6a2c628381e2b1c64ccd38554d6ce924204e.

@prasadus92

Copy link
Copy Markdown
Contributor Author

@codex review

Please review exact HEAD 11bc6a2c628381e2b1c64ccd38554d6ce924204e.

@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: 11bc6a2c62

ℹ️ 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 lib/server/views.py Outdated
Comment thread lib/server/views.py Outdated
Comment thread lib/server/views.py
@prasadus92

Copy link
Copy Markdown
Contributor Author

@codex review

@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@prasadus92

Copy link
Copy Markdown
Contributor Author

@codex review

@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@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: 0568f65117

ℹ️ 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 lib/server/views.py
Comment thread lib/server/setup.py Outdated
@prasadus92

Copy link
Copy Markdown
Contributor Author

@codex review

@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@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: 782564beb5

ℹ️ 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 lib/server/setup.py
Comment thread lib/server/streaming.py Outdated
@prasadus92

Copy link
Copy Markdown
Contributor Author

Updated at 5bb2b429 with the addressed review fixes plus conversation reliability hardening found during end-to-end validation:

  • buffered model turns run off the FastAPI event loop
  • all planning-draft mutations share a worker-owned state guard
  • streaming turns persist even after client disconnect
  • draft IDs and atomic writes are collision-safe
  • SSE errors never expose raw exception text

Full pytest, focused concurrency/privacy regressions, Ruff, mypy, scrub-check, and a live source-server responsiveness check pass.

@codex review

@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@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: 5bb2b429c1

ℹ️ 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 lib/server/views.py
Comment thread lib/server/setup.py
Comment thread lib/agent_runner/process.py Outdated
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Greptile Summary

Tightens selected-repository Ask grounding and read-only agent isolation.

  • Require verified selected-checkout coverage before code-graph readiness reports success
  • Ground single-repo Ask turns in the named verified checkout with workspace fallback disabled
  • Isolate Claude/Codex Ask and condense paths from writable tools, user config, MCP, hooks, and sessions
  • Keep Graphify graphs checkout-relative; hide structured turn envelopes from live chat rendering

Confidence Score: 5/5

The PR appears safe to merge.

Read-only Claude isolation no longer appends Alfred --settings or hooks, ordinary invocations still receive them, and tests cover both sides; no remaining blocking failure was identified for the read-only isolation behavior.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the focused selected-repository Ask grounding, readiness, and read-only isolation tests; all 26 tests passed.
  • Compared the runtime harness against the parent and changed revisions, confirming the changed revision rejects unverified workspace grounding and gates graph readiness on coverage.
  • Checked native Ask prerequisites; engine CLIs were unavailable, so no live authenticated invocation was attempted.
  • Validated the exact test run outputs show the focused tests completed with 26 passed under the after-state harness, while the before-state run lacked the isolation API and exited non-zero.
  • Captured the manifest listing of all passing test identifiers for reviewer inspection.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
lib/agent_runner/process.py Read-only Claude isolation skips Alfred settings/hooks and empty MCP config; Graphify graphs resolve only within checkout roots.
lib/compose_converse.py Ask/condense paths pass read-only isolation flags; repo grounding and code-map filtering support verified single-repo scope.
lib/server/views.py Compose converse uses verified repo mapping, explicit-repo workdir, and streaming reconciliation under draft locks.
lib/server/setup.py Code-graph readiness reconciles against per-selected-checkout Graphify/code-memory coverage instead of install-only signals.
lib/server/streaming.py Stream path owns full mutate-and-reconcile work and strips structured JSON envelopes from live token fragments.

Reviews (2): Last reviewed commit: "fix verified ask grounding and graph rea..." | Re-trigger Greptile

@prasadus92

Copy link
Copy Markdown
Contributor Author

@codex review

@prasadus92

Copy link
Copy Markdown
Contributor Author

@greptileai review

@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: b60acf6dae

ℹ️ 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 lib/server/views.py
Comment on lines +2771 to +2773
repo = repos[0].strip() if len(repos) == 1 else _explicit_conversation_repo(repos, messages)
if not repo:
return fallback

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 Give comparison turns access to selected checkouts

When the latest turn compares multiple repositories, _explicit_conversation_repo intentionally returns an empty string, so this branch runs the isolated model from the planning directory even though verified_repo_to_local contains every selected checkout. The prompt grounding includes summaries but not the checkout paths, and the invocation supplies no additional repository directories, so the newly required Read/Grep/Glob inspection cannot reach either codebase and the comparison can only rely on shallow metadata. Use a read-only common root or expose all verified checkout paths for comparison turns.

Useful? React with 👍 / 👎.

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