Fix Oracle selection packaging and mutation ingress stalls#520
Merged
Conversation
This was referenced Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two related reliability failures in MCP/Agent workflows:
Oracle / selection packaging
Mutation ingress / file-edit stalls
Closes #515
Closes #390
Architecture
The final selection design intentionally avoids Context Builder-specific authority. Successful selection-changing tool calls commit canonical state immediately, and later discovery failure does not roll those writes back. Context Builder keeps only genuine lifecycle/routing behavior (run binding, frozen worktree/review context, tool policy, final prompt/meta publication).
Validation
ContextBuilderSelectionTransactionTests: 6/6ContextBuilderWorkspaceContextTests: 12/12ContextBuilderNestedMCPFailureTests: 2/2ContextBuilderWorktreeInheritanceTests: 5/5TabContextRoutingTests: 47/47MCPMutationRetryableFailureTests: 13/13CodemapAutomaticSelectionBasicTests: passCodemapStoreMutationTests: 3/3CodeMapRootManifestStoreTests: 28/28WorkspaceCodemapLocalGitClassificationTests: 10/10 plus repeated load-sensitive exact runsswift build --product RepoPrompt: pass after rebaserpce-cli-debugAgent selection/Oracle smoke: PASS (2 total / 2 full; Oracle readRepoPromptCEandMCPFileToolProvider)Two full root-suite attempts were run. The first exposed and led to hardening the Git-layout readiness budget. The second passed that boundary and failed only an untouched durable-artifact quarantine test, which then passed twice focused (0.023s each).
Notes
Rebased onto current
origin/main. Main already contains the debug provenance JSON validator fix, so this PR carries no temporary packaging workaround.