Skip to content

feat: pull request review adapters for GitLab, Azure DevOps and Bitbucket (increment 4b, ADR-0145) - #108

Merged
James-Chapman merged 38 commits into
mainfrom
dev/review-sessions-4b
Dec 4, 2026
Merged

James-Chapman merged 38 commits into
mainfrom
dev/review-sessions-4b

Conversation

@James-Chapman

@James-Chapman James-Chapman commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Increment 4b of the pull request review contract: the GitLab, Azure DevOps, and Bitbucket fetch adapters (ADR-0145, version 0.93.0). Every host kind now has an adapter.

No adapter has run against a real host. Each was written from the host's documentation and runs against loopback fixtures only. Nothing here posts to a host, and the contract's list of unverified facts gains each adapter's assumptions.

This PR is stacked on #107 (increment 4a) and its base is main, because the Rust, frontend, and Sonar workflows only run for pull requests into main. Until #107 merges, the diff against main also shows 4a's commits. The 4b change alone is dev/review-sessions...dev/review-sessions-4b (29 files). The branch already contains the fixes made after the review of 4a (merged up to 22206f2, no rebase).

What changed

  • Four adapters.
    • GitLab and GitLab self-managed read a merge request, its diffs, the head tree, and raw files; the base and head come from diff_refs, and all three refs are recorded for posting.
    • Azure DevOps Services and Server read the pull request, its latest iteration and that iteration's changes, the head tree, and items; the base comes from commonRefCommit.
    • Bitbucket Cloud reads the pull request, the merge base, diffstat, the head tree, and each file with format=meta.
    • Bitbucket Data Center reads the pull request, the merge base, changes, the head tree, and raw files.
  • No response chooses a request. An adapter never requests a URL that a response names. A page token or number is read from a link and the request is built from the adapter's own segments; a link to another host leads to no request, and a repeated token ends the list.
  • Two new refusals: review_host_merge_base_unavailable (Bitbucket Data Center before 8.16.0, or no common ancestor; there is no fallback to the target branch's tip) and review_host_lfs_unsupported (a Git LFS file on Bitbucket Cloud, recorded as the outcome lfs).
  • Posting paths. ReportedPaths keeps the old and new path pair as the host reported it, for GitLab's posting. The room budget counts those paths as the fetch records them.
  • Repository names. One rule shared by every host: a GitLab group path, an Azure DevOps name with a space, and a Bitbucket Data Center personal repository are admitted.
  • Fixes after an audit of the adapters (docs/reviews.md):
    • A Git LFS file on Bitbucket Cloud is the outcome lfs, not fetch_failed, so ten in a row no longer end the fetch.
    • A request that the client itself refused counts neither toward those ten failures nor as a success that resets the count.
    • A file 30 components deep is requested on Bitbucket Cloud (the client allows 48 segments, from the 4a fix).
    • The limits the audit found and this change does not fix are written in docs/reviews.md: an unpinned change list, unbounded path text, a quadratic Cloud prefix index, a raw path in review.json, zero-width and tag characters, and redirects, hops, and any 2xx answer.
  • Not built: GitLab's pacing of raw-file requests, a telling of links and submodules apart in an on-demand fetch for GitLab, Azure DevOps and Data Center, and any use of a limit header that a 200 carries.
  • Documentation: ADR-0145, docs/reviews.md, docs/desktop-interface.md, docs/security-coding-rules.md, AGENTS.md, CHANGELOG.md. The help text of Review hosts in settings no longer says that only GitHub can be reviewed.

Why it changed

The review feature could only fetch from GitHub. The other host kinds an operator can record a review host for had no adapter, so New Review could not open their pull requests. The adapters follow the 4a contract: core, never the model, fetches into an isolated review folder, with the same budgets, ledger, and refusals.

Tests

Not run: Linux (the Linux VM was unreachable, so the Linux jobs rely on CI), a release-build timing check, and any real host.

Run locally on the pushed head (Windows):

  • cargo fmt --all --check, and cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo test --workspace --no-fail-fast: 3,377 passed, 0 failed, 10 ignored
  • UI: biome check, tsc --noEmit, Vitest 1,404 passed, test:dist 9 passed

Updated

  • start_tests.rs: the test that a kind without an adapter is refused before a folder or a request becomes every_host_kind_has_an_adapter_so_a_start_asks_its_host_and_leaves_nothing_on_a_failure, which starts a GitLab and a Bitbucket Cloud review against a host that answers 404 and checks that a request was sent and no folder is left.
  • tools_tests.rs: three record literals gain the new reported field.
  • The help text of Review hosts in settings changes (it said that only GitHub could be reviewed); no test asserts it.

New

  • Fixture suites for each adapter: GitLab, Azure DevOps, Bitbucket Cloud, and Bitbucket Data Center (about 5,700 lines of tests), including a host that answers another repository or pull request, a page that repeats or misnumbers itself, a pagination link to another origin (never requested), and a path that is not repository-relative.
  • many_git_lfs_files_in_a_row_are_recorded_as_lfs_and_do_not_abort_the_fetch and a_file_thirty_components_deep_is_requested_and_stored (Bitbucket Cloud).
  • the_host_reported_paths_of_a_record_count_toward_the_room_it_needs (room budget).
  • a_repository_name_of_any_host_form_is_plausible_and_a_hostile_one_is_not (the shared repository-name rule).

🤖 Generated with Claude Code

James-Chapman and others added 30 commits December 4, 2026 01:21
A review workspace is its own control record with fixed preferences, a
scratch-only write rule at the file layer, and a closing record that stops
every later binding and dispatch. Session journals gain the review.* events.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eview into a folder

Pure parsers for the PR URL, repository paths and unified diffs, the
GitHub and GHES adapter with a paced request sender, the folder writer,
and the fetch pipeline with per-version outcomes and a manifest. Tested
against loopback fixtures only; no real host was contacted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…logic

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ions

A review session's turns now offer two more tools, run under the review
workspace's fixed rules, refuse once the review is closed, and check the
review record under the control lock at turn start and every dispatch.
Also applies cargo fmt to the earlier review commits.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… list a review's actions

start_review parses the address against the recorded hosts, fetches into a new
review folder, records the review workspace, and creates the session, removing
the folder and closing the record on any failure. Adds turn-level tests for the
fixed rules, scratch-only writes, the close, and the draft tool, and the
actions list --review filter.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Closing a review ends its turns, deletes its folder only while it is still the
recorded directory, and leaves the folder for a retry when a turn does not end
in time. The host removal path now closes its reviews through the same steps.
Tool mode and skill loading resolve an open review's workspace.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds ADR-0144, the changelog entry, the review journal events in the session
storage guide, the review rules in the security coding rules, the review
session's tool list in the instructions guide, and an "Increment 4a as
implemented" section in the reviews contract that lists where the
implementation differs from it. The delivery list now splits increment 4 into
4a (GitHub and GitHub Enterprise Server) and 4b (the other adapters).

AGENTS.md swaps three long ADR link targets for plain ids to stay under the
32 KiB project-instructions cap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
GitLab's text position takes both old_path and new_path even for an added or
a deleted file, so the posting adapter of increment 5 needs the pair exactly
as the host sent it. RawFile and ChangedFile gain an optional `reported`
pair, kept apart from the normalised old_path and new_path and refused the
same way when a path cannot be recorded. No adapter fills it yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reads a pull request from the Azure DevOps REST API (version 7.1) through
the review request sender: the pull request, its latest iteration for the
merge base and the head, the iteration's changes compared with the merge
base, the head tree of the source repository, and one file per request.
Wired into the adapter table for both Azure kinds. Tested against loopback
fixtures only; nothing has contacted a real host (ADR-0145).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
GitLabAdapter reads a merge request, its changed files, the head tree, and
file versions from GitLab and self-managed GitLab through GET requests built
from path segments and query pairs only. The project path and each file path
are single segments (%2F). The merge request's diff_refs give the base and
head commits, and every changed file keeps the old_path and new_path GitLab
sent. Links and submodules are recognised from the diff modes and the tree
listing, and a pagination link is read only for its page token or number.
No host was contacted: the request shapes follow GitLab's REST documentation
and run against loopback fixtures only.

An existing start test used GitLab as a kind without an adapter; it now uses
Bitbucket Cloud.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…host shares

fetch_review checked both repository names with GitHub's owner/name rule, so
a GitLab group path, an Azure DevOps project with a space, or a Data Center
personal repository would have failed right after the pull request was read.
The shared check is now a bound (1 to 1,024 bytes, one or more slashes, no
control character, no outer space); each adapter checks its own host's form.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The shared repository check in fetch.rs now accepts group/sub/project, so the
whole-fetch test uses the nested path the notes had to avoid.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Read-only GET adapters for pull request reviews on Bitbucket Cloud and
Bitbucket Data Center, wired into supports, adapter_for and pull_request_of.
They have not run against a real host (ADR-0145); tests use loopback
fixtures only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts:
#	crates/omgcode-core/src/review/adapters.rs
Resolves the review.rs and adapters.rs wiring lines so Azure DevOps and the
two Bitbucket kinds all stay, and adds an end-to-end test that a Data Center
personal repository (~user/slug) passes fetch_review now that fetch.rs checks
repository names by the shared bound.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…iew's summary

Core and platform changes behind the review desktop (ADR-0144):

- A host path is compared after a per-character simple uppercase and then
  lowercase fold, for `.git`, `.OMGCode` and the device names too (COM0 to
  COM9, LPT0 to LPT9). A name that the volume already holds, or that needs a
  directory where a file is, is an `unportable_path` collision, not a failed
  fetch (`CreateError::is_name_conflict` in the platform crate). A failed
  review folder create removes the folder.
- A path over 256 bytes is unportable, including one given to the on-demand
  fetch tool, which refuses it before the host or the ledger is touched.
- A review start is refused up front once 1,024 review records exist.
- A review session refuses `workspace_git_read` with `git_read_disabled`.
- `review::summary` reads the title, author, and state of an open review from
  `review.json`, through the recorded folders and only while the manifest has
  the digest that `review.started` recorded.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds the Rust side of the review desktop (ADR-0144):

- Six `main` commands: `review_skills`, `review_start`, `review_progress`,
  `review_cancel`, `review_info`, and `review_remove`. A start runs on its own
  thread, at most two at once, and answers with an operation identifier. No
  command takes a host, a token, or a path, and every failure text is fixed.
- `session_tree` lists review sessions in a `reviews` list, each session
  carries `review` (`open`, `closed`, or null), `terminal_open` refuses a review
  session, and `workspace_entries` lists an open review's folder and refuses a
  closed one with `review_closed`.
- Removing a review host, or replacing its token, cancels every start in
  flight. A host removal reports each review whose folder was left, in the CLI
  and the desktop (`review_removal_incomplete`). Shutdown cancels starts and
  reports one that stays as `review_starts_still_running`.
- `review_info` reads the title, author, and state of an open review from
  `review.json` through core, and never from a journal.
- The command count is 93 (43 `main`, 3 `approvals`, 47 `settings`).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the main window

The UI side of the review desktop (ADR-0144). Every string from a host is a
text node: a link or image in a pull request stays inert text.

- **New Review** opens a dialog with the pull request address, a review skill,
  and the session's provider, model, and effort; it follows `review_progress`
  and can cancel.
- The sidebar lists review sessions in a collapsible **Reviews** section,
  apart from the workspace groups, and a closed review's row says so.
- A review session offers only Files, Context, and PR context. A header shows
  the pull request's title, author, and state and offers **Remove review...**
  with a retry when the folder was left; the transcript shows the `review.*`
  events as short text.
- The mock backend answers the six commands so the interface runs without
  Rust, and the settings help no longer says that creating a review is not
  available.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Records what increment 4a does and does not do (ADR-0144, docs/reviews.md):
the path and record limits, the known limits of the fetch, the desktop
commands and panels, the journal events, the closing rules, and that no
adapter has run against a real host and nothing posts. Bumps the workspace to
0.92.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every host kind has an adapter now, so the start test that expected
`review_host_kind_unsupported` for a kind without one becomes a test that a
Bitbucket Cloud and a GitLab host are asked and leave no folder on a 404. The
review hosts page no longer says that only GitHub can be reviewed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds ADR-0145 and an "Increment 4b as implemented" section to the review
contract: each adapter's requests, caps, and choices, the two new refusal
codes, what was not built (GitLab pacing, links and submodules in an on-demand
fetch), and each adapter's unverified assumptions. No adapter has run against a
real host. Bumps the workspace to 0.93.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sixteen findings of a review of the review folders and sessions, each with
a test (ADR-0144, Amendments):

- The review header says "Partial: N of M changed files" and "Incomplete:
  K changed files without stored content", and a busy journal shows the
  loading line, not an error.
- A start whose progress read answers busy no longer re-enables Start
  review, which could fetch the same review twice.
- The PR context fences the description so it cannot forge a field.
- review.json and pr/files.txt stay inside 1 MiB: the fetch counts the
  largest record of a file before it downloads the file.
- The trusted CLI's review-host remove deletes no review folder, because
  it cannot see the desktop's turns.
- Registering a workspace or granting a folder fails closed when the
  review folder root cannot be found.
- review_fetch_file changes one ledger at a time, counts a file stored
  before a failed ledger save, and removes its temporary file; removal and
  the start sweep clear the ledger files.
- A folder counts as deleted only when nothing is left at its place.
- A path the review text escapes can no longer be stored; one predicate
  and an exhaustive code-point test keep the sets equal.
- A request may have 48 path segments.
- A draft body with a bidirectional override or isolate is refused, and a
  carriage return and line feed pair is a line feed.
- A token change or host removal that will be refused cancels no start.
- Remove review takes the settings-change flag after its confirmation.
- Two different versions of more than 50,000 lines are not compared.

No adapter has run against a real host.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The review bot opened 22 threads on the previous head. Two were already
fixed by the previous commit, some read the code wrongly, and some are
documented limits. These held up and are fixed, each with a test where
one can reach it:

- pr/ keeps 1 MiB of its 128 MiB free for pr/files.txt, which is
  written after the versions.
- A start looks at a cancel once more before it records the review.
- A rate-limit reset time from a host cannot overflow the wait.
- The host help text no longer says that removing a host always deletes
  the folders.
- A test pins that a rename, a delete, and an edit of a fetched file in
  pr/ are refused.
- The contract says the PR context is recorded when the review starts,
  that four adapters (six kinds) remain, and three known limits.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A start that failed before it had a session, and could not delete its
folder, left a closed review record that no session could retry. The
orphan sweep skipped it because a record named it, so the fetched pull
request stayed on disk.

A start now deletes the folder of a closed review a day after its last
change, and only while it is still the folder the record names (the same
identity check a removal makes). Tests: an old recorded folder goes, a
young one stays, and a folder swapped for another directory stays.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cked

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Brings the fixes of the review of increment 4a into the adapters of
increment 4b: the room budget, the metadata reserve, the fixed
character sets, the ledger handling, the draft body checks and the
removal rules.

Where the two met:
- The room budget now counts the paths a host reported, which the
  GitLab posting needs, as the fetch records them (a test pins it).
- A Git LFS file is recorded as such (`review_host_lfs_unsupported`)
  and does not abort the fetch, and a local refusal of a request
  counts as no failure of the host (tests for 12 LFS files in a row
  and a path 30 components deep).
- The review hosts help text of 4a replaces the older text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Takes the sweep of a closed review's folder and the pinned fragment
cases of the pull request address.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 146 files, which is 46 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This organization's CodeRabbit subscription is cancelled. Resubscribe in Billing to continue reviews beyond the free-tier limit.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6dfeef9 and 3e3bea1.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 146

  • AGENTS.md
  • CHANGELOG.md
  • Cargo.toml
  • crates/omgcode-app/src/chat/skills.rs
  • crates/omgcode-app/src/desktop.rs
  • crates/omgcode-app/src/desktop/approvals.rs
  • crates/omgcode-app/src/desktop/chat.rs
  • crates/omgcode-app/src/desktop/error.rs
  • crates/omgcode-app/src/desktop/reviews.rs
  • crates/omgcode-app/src/desktop/reviews/tests.rs
  • crates/omgcode-app/src/desktop/session_setup.rs
  • crates/omgcode-app/src/desktop/sessions.rs
  • crates/omgcode-app/src/desktop/settings.rs
  • crates/omgcode-app/src/desktop/settings_review_hosts.rs
  • crates/omgcode-app/src/desktop/state.rs
  • crates/omgcode-app/src/desktop/terminal.rs
  • crates/omgcode-app/src/desktop/turns.rs
  • crates/omgcode-app/src/desktop/web_audit.rs
  • crates/omgcode-app/src/desktop/wire.rs
  • crates/omgcode-app/src/desktop/workspace_entries.rs
  • crates/omgcode-app/src/lib.rs
  • crates/omgcode-app/src/review_close.rs
  • crates/omgcode-app/src/review_close/tests.rs
  • crates/omgcode-app/src/review_host.rs
  • crates/omgcode-app/src/review_host/tests.rs
  • crates/omgcode-app/src/tool_mode.rs
  • crates/omgcode-app/tests/desktop_wire.rs
  • crates/omgcode-cli/src/actions_cli.rs
  • crates/omgcode-cli/src/review_host_cli.rs
  • crates/omgcode-cli/tests/actions_listing.rs
  • crates/omgcode-core/src/action_journal.rs
  • crates/omgcode-core/src/control.rs
  • crates/omgcode-core/src/control/credential.rs
  • crates/omgcode-core/src/control/folders.rs
  • crates/omgcode-core/src/control/review_host.rs
  • crates/omgcode-core/src/control/review_workspace.rs
  • crates/omgcode-core/src/control/review_workspace/tests.rs
  • crates/omgcode-core/src/files.rs
  • crates/omgcode-core/src/files/checkpoint.rs
  • crates/omgcode-core/src/lib.rs
  • crates/omgcode-core/src/review.rs
  • crates/omgcode-core/src/review/adapter.rs
  • crates/omgcode-core/src/review/adapters.rs
  • crates/omgcode-core/src/review/azure_devops.rs
  • crates/omgcode-core/src/review/azure_devops_tests.rs
  • crates/omgcode-core/src/review/bitbucket_cloud.rs
  • crates/omgcode-core/src/review/bitbucket_cloud_tests.rs
  • crates/omgcode-core/src/review/bitbucket_data_center.rs
  • crates/omgcode-core/src/review/bitbucket_data_center_tests.rs
  • crates/omgcode-core/src/review/budget.rs
  • crates/omgcode-core/src/review/context.rs
  • crates/omgcode-core/src/review/diff.rs
  • crates/omgcode-core/src/review/diff_tests.rs
  • crates/omgcode-core/src/review/error.rs
  • crates/omgcode-core/src/review/fetch.rs
  • crates/omgcode-core/src/review/fetch_tests.rs
  • crates/omgcode-core/src/review/folder.rs
  • crates/omgcode-core/src/review/github.rs
  • crates/omgcode-core/src/review/github_tests.rs
  • crates/omgcode-core/src/review/gitlab.rs
  • crates/omgcode-core/src/review/gitlab_tests.rs
  • crates/omgcode-core/src/review/model.rs
  • crates/omgcode-core/src/review/path.rs
  • crates/omgcode-core/src/review/path_tests.rs
  • crates/omgcode-core/src/review/start.rs
  • crates/omgcode-core/src/review/start_tests.rs
  • crates/omgcode-core/src/review/summary.rs
  • crates/omgcode-core/src/review/test_host.rs
  • crates/omgcode-core/src/review/tools.rs
  • crates/omgcode-core/src/review/tools_tests.rs
  • crates/omgcode-core/src/review/url.rs
  • crates/omgcode-core/src/review/url_tests.rs
  • crates/omgcode-core/src/review_host/client.rs
  • crates/omgcode-core/src/review_host/client/tests.rs
  • crates/omgcode-core/src/session.rs
  • crates/omgcode-core/src/session/inspection.rs
  • crates/omgcode-core/src/session/review.rs
  • crates/omgcode-core/src/turn.rs
  • crates/omgcode-core/src/turn/git_write_tool.rs
  • crates/omgcode-core/src/turn/granted_folder.rs
  • crates/omgcode-core/src/turn/review_session.rs
  • crates/omgcode-core/src/turn/review_session_tests.rs
  • crates/omgcode-core/src/turn/skill_dispatch_tests.rs
  • crates/omgcode-core/tests/review_session_events.rs
  • crates/omgcode-desktop/capabilities/main.json
  • crates/omgcode-desktop/src/command_names.rs
  • crates/omgcode-desktop/src/commands.rs
  • crates/omgcode-desktop/src/commands/reviews.rs
  • crates/omgcode-desktop/src/lib.rs
  • crates/omgcode-desktop/src/policy.rs
  • crates/omgcode-desktop/src/shutdown.rs
  • crates/omgcode-desktop/tests/layers.rs
  • crates/omgcode-desktop/ui/README.md
  • crates/omgcode-desktop/ui/src/ipc/client.ts
  • crates/omgcode-desktop/ui/src/ipc/errors.ts
  • crates/omgcode-desktop/ui/src/ipc/types.ts
  • crates/omgcode-desktop/ui/src/main/app.ts
  • crates/omgcode-desktop/ui/src/main/composer.ts
  • crates/omgcode-desktop/ui/src/main/context_tab.ts
  • crates/omgcode-desktop/ui/src/main/conversation.ts
  • crates/omgcode-desktop/ui/src/main/files_tab.ts
  • crates/omgcode-desktop/ui/src/main/model.ts
  • crates/omgcode-desktop/ui/src/main/new_review.ts
  • crates/omgcode-desktop/ui/src/main/new_session.ts
  • crates/omgcode-desktop/ui/src/main/pr_context_tab.ts
  • crates/omgcode-desktop/ui/src/main/review_entries.ts
  • crates/omgcode-desktop/ui/src/main/review_header.ts
  • crates/omgcode-desktop/ui/src/main/review_info_reader.ts
  • crates/omgcode-desktop/ui/src/main/setup_fields.ts
  • crates/omgcode-desktop/ui/src/main/side_panel.ts
  • crates/omgcode-desktop/ui/src/main/sidebar.ts
  • crates/omgcode-desktop/ui/src/main/status_footer.ts
  • crates/omgcode-desktop/ui/src/main/transcript.ts
  • crates/omgcode-desktop/ui/src/main/tree.ts
  • crates/omgcode-desktop/ui/src/mock/backend.ts
  • crates/omgcode-desktop/ui/src/mock/fixtures.ts
  • crates/omgcode-desktop/ui/src/mock/review.ts
  • crates/omgcode-desktop/ui/src/settings/review_hosts_section.ts
  • crates/omgcode-desktop/ui/src/settings/review_section.ts
  • crates/omgcode-desktop/ui/src/styles/main.css
  • crates/omgcode-desktop/ui/src/ui/dialog.ts
  • crates/omgcode-desktop/ui/src/ui/icons.ts
  • crates/omgcode-desktop/ui/src/ui/tabs.ts
  • crates/omgcode-desktop/ui/tests/dist.test.ts
  • crates/omgcode-desktop/ui/tests/helpers.ts
  • crates/omgcode-desktop/ui/tests/layout.test.ts
  • crates/omgcode-desktop/ui/tests/main_redesign.test.ts
  • crates/omgcode-desktop/ui/tests/mock_review.test.ts
  • crates/omgcode-desktop/ui/tests/panel_tab.test.ts
  • crates/omgcode-desktop/ui/tests/review_dialog.test.ts
  • crates/omgcode-desktop/ui/tests/review_info_state.test.ts
  • crates/omgcode-desktop/ui/tests/review_session.test.ts
  • crates/omgcode-desktop/ui/tests/review_sidebar.test.ts
  • crates/omgcode-desktop/ui/tests/settings_review_hosts.test.ts
  • crates/omgcode-desktop/ui/tests/side_panel.test.ts
  • crates/omgcode-desktop/ui/tests/ui_components.test.ts
  • crates/omgcode-platform/src/broker.rs
  • crates/omgcode-platform/src/broker/windows.rs
  • docs/adr/0144-fetch-reviews-from-github-into-isolated-review-folders-and-run-review-sessions.md
  • docs/adr/0145-fetch-reviews-from-gitlab-azure-devops-and-bitbucket.md
  • docs/adr/index.md
  • docs/agent-instructions.md
  • docs/desktop-interface.md
  • docs/reviews.md
  • docs/security-coding-rules.md
  • docs/session-storage.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@omg-review-bot

omg-review-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

⚠️ Review didn't finish on 3e3bea1

  • Started: 2026-12-04 05:58:13 UTC
  • Model: chatgpt
  • Review skill: code-change-review

It won't be retried until the next push, or until someone asks for a review in the bot.

James-Chapman and others added 7 commits December 4, 2026 05:07
Fixed:
- A host's removal or a token's replacement cancels the review starts in
  flight once the change is recorded (or may be), not before: a change that
  core then refused, such as a revision another writer moved, had already
  cancelled starts that it did not need to. The shared removal calls
  `host_unbound` on the caller's `ReviewTurns`.
- A review folder root that does not exist yet refuses a directory that
  contains the folder it will be created in, instead of passing it. A folder
  grant checks application storage first, so the data directory keeps the
  clearer `StorageOverlap` reason.
- The review header drops the pull request's title the moment an open review
  is shown as closed, also when the read of the closed review fails.
- The refusal for too many request path segments says 48, not 32.

Contract: `review-host set-token` closes no review; a cancel is looked at for
the last time just before the review is recorded and ends no start after it;
a start that fails deletes the folder it created by name, without the record
check; a summary read begun just before a closing may return once more.

Pinned by new tests, because findings were wrong about the code or the
behaviour was only implied: a path of control characters counts at its escaped
size in the room budget, a second distinct file replaces the ledger that the
first wrote, and a cancel from inside the session's preparation leaves the
review open.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Takes the fixes of the second re-review of increment 4a: the starts end
once a host change is recorded, a review root that is not there yet fails
closed, the review header drops a closed review's title, and the contract
text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d paths

The merge of the review sessions branch brought in a test that builds a
`RawFile` literal. This branch's `RawFile` has a `reported` field for the
paths a host reports, so the literal did not compile. The test now sets
`reported: None`, which is what a host that reports no paths gives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fixed:
- A host removal that closes several reviews judges the turns of each on
  their own. `ReviewTurns::stop` returns the reviews whose turns ended, not
  one flag for the batch, so a turn that does not end within 60 seconds leaves
  only its own review's folder. One flag left every folder in place, against
  the contract that a review that cannot be finished does not stop the others.
- The documents no longer say that a removal or a token replacement ends a
  review start. The start is asked to stop, a request already sent completes
  with the token it loaded, and the replaced token stays valid at the host
  until the operator revokes it there. They also say that a replacement whose
  journal write is uncertain cancels the starts and still reports the error.

Contract: a start writes nothing into the review folder after the review is
recorded (the files are written before), so a removal that deletes the folder
meets no writer, and the removal does not join the starts. A new test deletes
the folder from inside the session's preparation and checks that the start
finishes and that nothing brings the folder back.

Not changed: the finding that an ancestor of the review root is accepted before
the root exists is wrong about the code. A directory that holds the folder the
root will be created in, or any ancestor of it, is refused, and a sibling is
allowed, which an existing test pins.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Brings in the third re-review of increment 4a: a host removal judges the
turns of each review on its own, and the documents say that a start is asked
to stop and not ended.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… deletion

The test added for the third re-review deleted the review folder from inside
the session's preparation and asserted that the deletion worked. On Windows it
does not: the start keeps its own handle on the folder until it ends, so the
deletion fails, the removal reports `review_removal_incomplete` for that
review, and a retry deletes it. The test failed on the Windows filesystem job
and locally.

The test now pins what holds on both systems: after the record the start
writes nothing into the folder, so a folder that a removal deleted stays gone
and one that it could not delete is left exactly as the removal found it. The
contract says what happens on Windows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Brings in the test of the start's folder after the record, which now pins the
folder by its contents because a Windows deletion of it fails while the start
holds its handle.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

@James-Chapman
James-Chapman merged commit c24b633 into main Dec 4, 2026
19 checks passed
@James-Chapman
James-Chapman deleted the dev/review-sessions-4b branch December 4, 2026 22:27
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