Repository navigation
fix(sessions): include remote default branch changes in review - #144246
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 3:19 PM ET / 19:19 UTC (Revision 3). ClawSweeper reviewWhat this changesThe session Review panel now includes committed branch changes when only origin/main or origin/master identifies the default branch, with regression coverage for diff scopes and precedence. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and the latest release still omit the remote-only fallback. The supplied real-flow observations support the repair, and no blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway computes session Review data from the session’s Git checkout. Its base resolver determines which committed changes appear alongside working changes before session-start filtering produces the result shown in the Control UI. flowchart TD
A[Review request] --> B[Session checkout]
B --> C[Resolve default branch and merge base]
C --> D[Select All, Uncommitted, or Commit scope]
D --> E[Collect changes and branch history]
E --> F[Apply session baseline where applicable]
F --> G[Review panel]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +86. Total +86 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep default-branch discovery in the existing resolver, preserving symbolic/local precedence, explicit bases, and the existing scope and baseline contracts. Do we have a high-confidence way to reproduce the issue? Yes. Current source deterministically falls back to HEAD on a feature branch with remote main/master but no symbolic or local default; the supplied body also records a real Gateway/UI reproduction. This review did not execute it. Is this the best way to solve the issue? Yes. Extending the existing fallback list repairs automatic discovery without adding another owner, configuration option, network lookup, or repository mutation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 441761374758. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Preserve local and symbolic default precedence while resolving remote-only main and master refs through the existing merge-base flow. Cover branch, working-tree and commit scopes against real repositories, and distinguish competing valid default refs in precedence tests.
|
Thanks @zhangguiping-xydt! Bug: All Changes omitted committed branch work when the checkout had only a remote-tracking default branch. Fix: The existing merge-base resolver now checks Proof: A real Gateway and served Review reproduced the omission on main and restored the committed file and history in the same original session. Independent API/browser controls preserved Uncommitted, commit rejection, and session-start filtering. All 69 focused tests and exact-head review passed.
|
…law#144246) ## Problem and fix Fixes openclaw#144205. Review's All Changes omitted committed branch work when a feature checkout had `origin/main` or `origin/master`, but no `origin/HEAD` or local default branch. The resolver fell back to `HEAD`, which made All Changes look like Uncommitted and hid branch history. The existing resolver now tries those two remote-tracking refs after symbolic and local defaults. It uses local Git reads and the existing merge-base path. Uncommitted keeps its `HEAD` comparison; session-start filtering, commit ancestry checks, and explicit repository bases retain their existing behavior. ## Validation - Real isolated Gateway and served Control UI reproduced the failure on pinned main. The proof settled a session baseline through ordinary `/status` before creating committed, uncommitted, and untracked work. - New real-Git remote-main and remote-master cases failed on baseline; the local-main control passed. - 69 focused tests passed across resolver precedence, baseline lifecycle, Gateway diff scopes and safety controls, and live/stopped repository paths. - Formatting, syntax lint, line-count and assertion-safety checks, and the normal commit hook passed. - Candidate `424dd2880e15` restored the committed file and branch history in the same original session, repository and served Review UI. Uncommitted retained only tracked/untracked working changes. - A separate fresh-session control hid all preexisting work after baseline capture. The original session remained unchanged. No model inference was required. - Independent public reads and browser controls checked All, Uncommitted, the advertised commit, and explicit rejection of the base and an unknown commit. A capture-wrapper cleanup failure was retained; a focused recovery verified normal shutdown and unchanged refs without repeating the completed behavior cases. Preserves the original contributor commits and credit. Full suites and type checks run in hosted CI. Co-authored-by: Ayaan Zaidi <[email protected]>
Problem and fix
Fixes #144205. Review's All Changes omitted committed branch work when a feature checkout had
origin/mainororigin/master, but noorigin/HEADor local default branch. The resolver fell back toHEAD, which made All Changes look like Uncommitted and hid branch history.The existing resolver now tries those two remote-tracking refs after symbolic and local defaults. It uses local Git reads and the existing merge-base path. Uncommitted keeps its
HEADcomparison; session-start filtering, commit ancestry checks, and explicit repository bases retain their existing behavior.Validation
Real isolated Gateway and served Control UI reproduced the failure on pinned main. The proof settled a session baseline through ordinary
/statusbefore creating committed, uncommitted, and untracked work.New real-Git remote-main and remote-master cases failed on baseline; the local-main control passed.
69 focused tests passed across resolver precedence, baseline lifecycle, Gateway diff scopes and safety controls, and live/stopped repository paths.
Formatting, syntax lint, line-count and assertion-safety checks, and the normal commit hook passed.
Candidate
424dd2880e15restored the committed file and branch history in the same original session, repository and served Review UI. Uncommitted retained only tracked/untracked working changes.A separate fresh-session control hid all preexisting work after baseline capture. The original session remained unchanged. No model inference was required.
Independent public reads and browser controls checked All, Uncommitted, the advertised commit, and explicit rejection of the base and an unknown commit. A capture-wrapper cleanup failure was retained; a focused recovery verified normal shutdown and unchanged refs without repeating the completed behavior cases.
Preserves the original contributor commits and credit. Full suites and type checks run in hosted CI.