Repository navigation
Unify repository context across planning and execution - #197
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6191484bdb
ℹ️ 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".
| return self._execute(resolution.playbook, spec, run_dir, | ||
| resolution_mode=resolution.mode, tier=resolution.tier) | ||
| resolution_mode=resolution.mode, tier=resolution.tier, | ||
| planned_context=repo_context) |
There was a problem hiding this comment.
Keep drift-blocked runs out of resume
When REPO_PATHS or the adapter manifest changes while confirmation is pending, the context comparison occurs only after run_task has created the run directory and written task.json. resume_last() treats that artifact as resumable and calls _execute without planned_context, so the next resume accepts the changed context and executes the run that this drift check just refused, potentially against a different checkout or policy. Recheck before persisting the run, or persist and enforce the planned context during resume.
Useful? React with 👍 / 👎.
| def adapter_for(self, repo: str) -> RepoAdapter | None: | ||
| name = repo.replace("-", "_") | ||
| try: | ||
| return AdapterRegistry(self.settings.adapters_dir).resolve(name=name) |
There was a problem hiding this comment.
Isolate adapter failures to the requested repository
When the adapters directory contains a malformed manifest for an unrelated repository, AdapterRegistry.resolve() eagerly loads every adapter through all(), so that unrelated AdapterError aborts this lookup before the requested adapter can match. Because ambient_repo_path() now uses this path, even a repository with a valid REPO_PATHS checkout can lose relative chat-path resolution or crash run-service readiness due solely to another repository's broken adapter. Load only the requested candidate or otherwise ignore failures outside the requested repository while retaining fail-closed behavior for its own adapter.
Useful? React with 👍 / 👎.
Planning and execution previously read adapter state through separate paths. A malformed known adapter failed planning but could be silently treated as absent during execution, allowing default branch and risk policy to replace its configured policy.
This change resolves the checkout, planner capabilities, protected branches, and high-risk modules through one application-level repository context. Execution rechecks that context before starting and blocks if the adapter is malformed or changed since planning. It also prevents an unresolved adapter path from claiming the
repo.pathcapability. Legacy adapter absence remains supported.Validation: full local pytest suite; focused repository-context, adapter, engine, contract, lifecycle, CLI, and Phase B tests; wheel build and installed import/runtime-resource smoke; strict SPEC freshness and doc/knowledge linters;
git diff --check.