Skip to content

Desktop interface, stored credentials, streaming, and cancellation (Phases E, D2-D5) - #33

Open
James-Chapman wants to merge 10 commits into
mainfrom
codex/desktop-interface
Open

James-Chapman wants to merge 10 commits into
mainfrom
codex/desktop-interface

Conversation

@James-Chapman

Copy link
Copy Markdown
Contributor

Summary

Adds the prototype desktop shell (Phase E) and five provider increments on top
of it: stored-credential use (D2), endpoint binding (D3), streamed replies with
pushed chat events (D4, E6), and mid-stream cancellation (D5). Versions 0.29.0
to 0.33.0, ADRs 0044 to 0050. It is a prototype and is not release-ready.

What changed

  • Phase E (0.29.0, ADR-0044 to 0046). A Tauri 2 shell, omgcode-desktop,
    with a session tree, full-text search over a derived SQLite index, a paged
    transcript, chat, and an isolated approvals window. A new omgcode-app
    library holds the chat turn and the front-end-neutral DesktopService; the
    CLI is now a thin adapter over it. The webview has no authority: each
    command needs a per-window capability and passes a Rust window policy first.
  • D2 (0.30.0, ADR-0047). --provider-profile makes the LM Studio adapter
    read its token from protected OS storage. Every failure ends the turn; there
    is no fallback to no token or another token.
  • D3 (0.31.0, ADR-0048). An lm_studio profile records one immutable
    loopback endpoint, so a stored token goes only to that endpoint.
    --endpoint and --provider-profile are mutually exclusive.
  • D4, E6 (0.32.0, ADR-0049). The adapter can read a streamed reply under
    strict event-stream rules. Streamed text is provisional; the journal still
    records only the validated whole reply. chat --stream on the CLI. The
    shell pushes chat events to the main window through one caller-scoped IPC
    channel (chat_subscribe, 19 commands) and no longer polls every 750 ms.
  • D5 (0.33.0, ADR-0050). A cancel request stops a streamed request, checked
    every 25 ms. A cancelled turn is recorded as cancelled and leaves no open
    turn. Exit no longer abandons a streamed turn.
  • Test fix. concurrent_runs_complete_and_are_recorded waited on a fixed
    CPU loop. It now uses a file rendezvous, which also proves the two runs
    overlapped.
  • CI. rust.yml gains the Tauri system packages and the frontend build;
    a new frontend.yml runs the type check, Biome, Vitest, and bundle checks.

Why it changed

The plan called for a desktop interface with the Rust core as the only
authority, and for the provider path to stop depending on an environment
variable and a command-line endpoint. Streaming and cancellation close the two
gaps an operator meets first: no output until a turn ends, and no way to stop
one.

Tests

Local results on the final commit, on a host held at 82 to 100% CPU by an
unrelated build:

  • Windows 11: cargo fmt --check, Clippy --locked, all-target tests (943
    passed, 0 failed, 8 ignored), and doc tests pass.
  • Linux (WSL 6.6, Ubuntu 24.04): the same four pass (935 passed, 0 failed, 8
    ignored).
  • Frontend on Windows: type check and Biome clean, 159 tests, 5 bundle tests.
  • The real Windows shell was driven end to end over the WebView2 debugging
    port against mock model servers, for the base flow, streaming, and
    cancellation.

Not verified: these CI workflows have never run before this pull request; no
live LM Studio server was used for streaming or cancellation; no window has
been opened on Linux; neither suite ran on a quiet host after the last two
commits.

Updated

  • omgcode-cli suites moved to the thin adapter; cli_workflow gains
    event-stream fixtures.
  • omgcode-core local_provider and turn_runtime for the stream rules, the
    cancel token, and the cancelled outcome.
  • omgcode-app chat_turn and desktop_chat: a cancelled turn now reports
    the code cancelled (was turn).
  • run_workflow::concurrent_runs_complete_and_are_recorded: file rendezvous in
    place of a timed loop; assertions unchanged.

New

  • Core: lock-free inspection, discovery, the session index, approval review,
    the event-stream parser under arbitrary chunking, and cancellation before a
    request, before the response head, and during the body.
  • omgcode-app: desktop_sessions, desktop_approvals, desktop_chat,
    desktop_events, desktop_wire, stored_credential,
    desktop_stored_credential, and stream redaction across piece boundaries.
  • omgcode-desktop: layers (command names, capabilities, policy, and
    frontend argument keys agree) and launch_flags (the real binary).
  • Frontend: chat_runner, live_preview, client, main_window,
    approvals, security, and dist suites.

🤖 Generated with Claude Code

James-Chapman and others added 6 commits November 16, 2026 18:01
Version 0.29.0 adds a prototype Tauri desktop shell with a session tree,
full-text search, chat, and an isolated approvals window. The trusted CLI
is unchanged in behaviour. See ADR-0044, ADR-0045, and ADR-0046.

- core: inspect a journal without the writer lock, discover journals
  within bounds, and index them in a rebuildable SQLite FTS5 store
- core: review an approval by reproducing its digest with the tool
  dispatcher's own request builder, and render display-safe fields
- omgcode-app: move the chat turn out of the CLI binary into a shared
  library and add the desktop service layer; no CLI test file changed
- omgcode-desktop: an 18-command Tauri 2 shell. Only the approvals
  window can decide an approval, enforced by capability files and by a
  Rust check that every handler runs first
- frontend: strict TypeScript that renders text nodes only, with Vite,
  Vitest, and Biome
- ci: build the frontend before Cargo and add a Frontend workflow
- docs: a desktop interface guide, three ADRs, and corrected guides

Verified on Windows 11 and on Linux under WSL 6.6: formatting, Clippy,
all-target tests, and doc tests pass on both. The real shell was driven
end to end on Windows only. No window has been opened on Linux, and the
workflow changes have not run on GitHub.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Version 0.30.0 lets the operator select a provider profile so that the
local LM Studio adapter reads its server token from protected OS storage
instead of the OMGCODE_LM_TOKEN environment variable. See ADR-0047.

- core: provider_credential_binding decides whether a credential may be
  used without taking a credential store, so it cannot touch native
  storage. It refuses an unknown profile, a profile of another provider
  kind, a subscription profile, and an unbound api_key profile.
  load_provider_credential then refuses a binding from another backend
  before it reads a secret
- omgcode-app: TokenSource and resolve_lm_token. A selected profile is
  the only source, the environment variable is not read, and any failure
  ends the turn with a credential error. The token is held in a zeroing
  buffer for one turn
- cli: --provider-profile on chat and session compact, and
  stored_credential_adapters in capabilities
- desktop: --provider-profile at launch, checked once before any window
  opens and resolved again for each turn. The wire contract is unchanged
- docs: ADR-0047, the authentication and desktop guides, the changelog,
  and the plan. The plan's Phase E entries no longer say the shell has no
  Linux build

Without the flag, behaviour is unchanged. The credential is bound to a
provider kind, not to an endpoint. No cloud adapter or login exists.

Verified on Windows 11 with DPAPI and on Linux under WSL 6.6 with the
Secret Service: formatting, Clippy, all-target tests, and doc tests pass
on both. A stored-credential turn was not driven through the real
shell's windows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Version 0.31.0 lets an lm_studio provider profile record its endpoint,
so a selected profile supplies both the endpoint and the token. A
stored token can no longer be sent to an endpoint named on the command
line. See ADR-0048, which amends ADR-0047.

- core: a provider profile records an optional immutable endpoint.
  Only lm_studio accepts one; it is checked by the shared
  validate_base_url when recorded and again on replay, and is limited
  to 256 bytes. provider_credential_binding returns the endpoint with
  the binding and refuses a profile without one as
  endpoint_not_recorded. The journal field is written only when
  present, so a journal without an endpoint is unchanged
- omgcode-app: ConnectionSource and resolve_local_connection replace
  resolve_lm_token. A selected profile is the only source of both
  values. The desktop service refuses a turn with endpoint_changed
  when the profile's endpoint no longer equals the launch value
- cli: --endpoint on provider-profile-add. --endpoint and
  --provider-profile conflict on chat and session compact (exit 2).
  capabilities reports provider_profile_endpoints
- desktop: --endpoint and --provider-profile conflict at launch, and
  the shell shows the profile's endpoint. A launch_flags suite runs
  the real binary. The wire contract is unchanged
- docs: ADR-0048, the authentication, desktop, and workspace settings
  guides, the changelog, and the plan

Without --provider-profile, behaviour is unchanged. A profile recorded
before 0.31.0 has no endpoint and must be removed and added again. A
control journal that records an endpoint cannot be read by 0.30.0. No
endpoint rule exists for a non-loopback provider, and no cloud adapter
or login exists.

Verified on Windows 11 with DPAPI and on Linux under WSL 6.6 with the
Secret Service: formatting, Clippy, all-target tests, and doc tests
pass on both. A stored-credential turn was not driven through the real
shell's windows, and CI has not run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Version 0.32.0 lets the LM Studio adapter read a streamed reply and has
the desktop shell push chat events to the main window, so the chat
window shows text while the model generates and no longer polls every
750 ms for the end of a turn. See ADR-0049.

- core: complete_streaming and complete_with_tools_streaming send the
  same request with stream set to true and read the reply as
  server-sent events under strict rules, within the existing 1 MiB and
  thirty-second bounds. A stream that ends without [DONE] is the new
  IncompleteStream error. Tool calls are assembled by index and hold
  only the members received, so the existing tool-call validation
  applies unchanged. DisplaySafeStream is a streaming form of the
  display-safe escaping. The non-streaming methods are unchanged and
  stay the default
- omgcode-app: ChatHooks::on_stream delivers provisional text, and a
  turn streams only when it is set. StreamRedactor removes the server
  token across piece boundaries. The journal still records only the
  whole validated reply and does not say whether it was streamed. The
  desktop service gains an event hub with one subscriber, a bounded
  preview per running turn, and a guard that sends finished after the
  result is recorded
- cli: chat --stream writes escaped provisional text to standard
  error; standard output still carries the one JSON result.
  capabilities reports streaming_adapters
- desktop: chat_subscribe, main window only, takes a caller-created
  Tauri IPC channel, so neither window needs a core permission. The
  shell has 19 commands. --stream <on|off> at launch, default on
- frontend: one subscription, a live entry for the open session
  rendered as text, one chat_status read on finished, a five-second
  reconcile check, and the 750 ms poll as a fallback. The command name
  stays out of the approvals bundle
- docs: ADR-0049, the desktop, provider, development, testing, and
  session storage guides, the changelog, and the plan

Streamed text is provisional: a later failure discards it. Cancellation
still cannot interrupt a request in flight, and the thirty-second
deadline still covers the whole response. No dependency is added, and
sessions stay at schema version 3.

Verified on Windows 11 and on Linux under WSL 6.6: formatting, Clippy,
all-target tests, and doc tests pass on both. The frontend checks pass
on Windows. The real Windows shell was driven end to end against a
paced event-stream mock. No live LM Studio server was used, no window
has been opened on Linux, and CI has not run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Version 0.33.0 makes a cancel request stop a streamed model request.
Before, cancellation was checked only between model rounds and tool
calls, a text-only turn could not be cancelled at all, and the desktop
shell abandoned a turn still waiting on the model when it exited. See
ADR-0050.

- core: complete_streaming and complete_with_tools_streaming take a
  CancelToken. The streamed request runs on an async client inside a
  single-thread runtime made for that one request, with the same
  settings and the same thirty-second total deadline as the blocking
  client. The token is checked every 25 ms before the request is sent,
  while the response head is awaited, and while each piece is awaited.
  A set token drops the request and returns the new
  ProviderError::Cancelled. The event-stream reader becomes a push
  parser, so the ADR-0049 rules hold for any chunking.
  ToolModelRequest carries the turn token, and the runtime ends a turn
  as cancelled when a model reports ModelError::Cancelled and the
  token is set
- omgcode-app: a streamed text-only turn creates a cancel token and
  hands it to the front end. A cancelled turn is recorded with the
  existing failure reason cancelled, no assistant message, and no open
  turn, and is reported with the new error kind cancelled. The tool
  path used the general kind turn before
- desktop: chat_cancel now stops a streamed request, and exit no
  longer abandons a streamed turn. No command, event, or wire type
  changes
- frontend: a failed status with the code cancelled shows the plain
  notice Turn cancelled, decided by the code only
- docs: ADR-0050, the desktop, provider, testing, and session storage
  guides, the changelog, and the plan

Still not interruptible: a non-streamed request, the compaction
request before a turn, and a tool call in progress. The CLI has no
cancel source. No dependency or cargo feature is added, no journal
record changes shape, and sessions stay at schema version 3.

Verification ran on a host held at 82 to 100 percent CPU by an
unrelated build. Linux under WSL 6.6: formatting, Clippy, all-target
tests, and doc tests pass. Windows 11: formatting, Clippy, and doc
tests pass; the all-target run has one failure,
run_workflow::concurrent_runs_complete_and_are_recorded, a CPU-bound
confined-runner test that reached its 60-second limit. It fails the
same way on a clean checkout of the previous commit under the same
load and uses none of the changed code. It was not rerun on a quiet
host. The frontend checks pass on Windows, and the real Windows shell
was driven end to end against a mock that holds a stream open. No
live LM Studio server was used, no window has been opened on Linux,
and CI has not run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On Windows each run in concurrent_runs_complete_and_are_recorded spun a
fixed loop of 30,000 "cd ." iterations before writing its file, and the
test allowed 60 seconds for both. On a host held near 100 percent CPU
by an unrelated build, one such loop took 22 to 24 seconds in a plain
shell, and the test failed three times in a row, on the cancellation
change and on the commit before it.

Each run now writes its own file and waits until it sees the file of
the other run. Exit code 0 from both proves the two runs were alive at
the same time, which the old scripts did not: two runs made one after
the other would also have passed. A run that never sees the other file
exits non-zero. The Linux scripts use the same rendezvous in place of
"sleep 1". The assertions and the 60-second limit are unchanged, and
no production code changed.

The testing guide gains the rule that a fixed amount of work is not a
reliable delay. The changelog and the plan record the cause and the
results.

Verified on the same loaded host: formatting, Clippy, all-target
tests, and doc tests pass on Windows 11 and on Linux under WSL 6.6,
with no failures. Neither suite has run on a quiet host since.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 175 files, which is 75 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 review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Check out review usage here.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 60430ee and b151362.

Files ignored due to path filters: 7

  • Cargo.lock is excluded by !**/*.lock
  • crates/omgcode-desktop/icons/128x128.png is excluded by !**/*.png
  • crates/omgcode-desktop/icons/128x128@2x.png is excluded by !**/*.png
  • crates/omgcode-desktop/icons/32x32.png is excluded by !**/*.png
  • crates/omgcode-desktop/icons/icon.ico is excluded by !**/*.ico
  • crates/omgcode-desktop/icons/icon.png is excluded by !**/*.png
  • crates/omgcode-desktop/ui/package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 175

  • .gitattributes
  • .github/workflows/frontend.yml
  • .github/workflows/rust.yml
  • .github/workflows/sonar.yml
  • .gitignore
  • AGENTS.md
  • CHANGELOG.md
  • Cargo.toml
  • IMPLEMENTATION_PLAN.md
  • README.md
  • crates/omgcode-app/Cargo.toml
  • crates/omgcode-app/src/chat.rs
  • crates/omgcode-app/src/chat/output.rs
  • crates/omgcode-app/src/chat/preflight.rs
  • crates/omgcode-app/src/chat/stream.rs
  • crates/omgcode-app/src/chat/text.rs
  • crates/omgcode-app/src/chat/tools.rs
  • crates/omgcode-app/src/context.rs
  • crates/omgcode-app/src/credential_source.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/events.rs
  • crates/omgcode-app/src/desktop/review_tokens.rs
  • crates/omgcode-app/src/desktop/sessions.rs
  • crates/omgcode-app/src/desktop/state.rs
  • crates/omgcode-app/src/desktop/turns.rs
  • crates/omgcode-app/src/desktop/wire.rs
  • crates/omgcode-app/src/desktop/workspaces.rs
  • crates/omgcode-app/src/error.rs
  • crates/omgcode-app/src/lib.rs
  • crates/omgcode-app/src/paths.rs
  • crates/omgcode-app/src/secrets.rs
  • crates/omgcode-app/src/sessions.rs
  • crates/omgcode-app/src/tool_mode.rs
  • crates/omgcode-app/tests/chat_turn.rs
  • crates/omgcode-app/tests/common/credential.rs
  • crates/omgcode-app/tests/common/mod.rs
  • crates/omgcode-app/tests/desktop_approvals.rs
  • crates/omgcode-app/tests/desktop_chat.rs
  • crates/omgcode-app/tests/desktop_events.rs
  • crates/omgcode-app/tests/desktop_sessions.rs
  • crates/omgcode-app/tests/desktop_stored_credential.rs
  • crates/omgcode-app/tests/desktop_wire.rs
  • crates/omgcode-app/tests/stored_credential.rs
  • crates/omgcode-cli/Cargo.toml
  • crates/omgcode-cli/src/context_cli.rs
  • crates/omgcode-cli/src/control_cli.rs
  • crates/omgcode-cli/src/main.rs
  • crates/omgcode-cli/src/model_tools.rs
  • crates/omgcode-cli/src/stream_cli.rs
  • crates/omgcode-cli/tests/cli_workflow.rs
  • crates/omgcode-cli/tests/run_workflow.rs
  • crates/omgcode-cli/tests/stored_credential.rs
  • crates/omgcode-core/Cargo.toml
  • crates/omgcode-core/src/control.rs
  • crates/omgcode-core/src/control/approval/tests.rs
  • crates/omgcode-core/src/control/credential.rs
  • crates/omgcode-core/src/control/credential/tests.rs
  • crates/omgcode-core/src/control/credential/tests/loading.rs
  • crates/omgcode-core/src/control/provider.rs
  • crates/omgcode-core/src/control/provider/tests.rs
  • crates/omgcode-core/src/lib.rs
  • crates/omgcode-core/src/provider.rs
  • crates/omgcode-core/src/provider/stream.rs
  • crates/omgcode-core/src/session.rs
  • crates/omgcode-core/src/session/discovery.rs
  • crates/omgcode-core/src/session/filename.rs
  • crates/omgcode-core/src/session/inspection.rs
  • crates/omgcode-core/src/session_index.rs
  • crates/omgcode-core/src/session_index/query.rs
  • crates/omgcode-core/src/session_index/refresh.rs
  • crates/omgcode-core/src/session_index/schema.rs
  • crates/omgcode-core/src/session_index/snippet.rs
  • crates/omgcode-core/src/storage.rs
  • crates/omgcode-core/src/turn.rs
  • crates/omgcode-core/src/turn/review.rs
  • crates/omgcode-core/tests/approval_review.rs
  • crates/omgcode-core/tests/local_provider.rs
  • crates/omgcode-core/tests/session_index.rs
  • crates/omgcode-core/tests/session_inspection.rs
  • crates/omgcode-core/tests/turn_runtime.rs
  • crates/omgcode-core/tests/workspace_listing.rs
  • crates/omgcode-desktop/.gitignore
  • crates/omgcode-desktop/Cargo.toml
  • crates/omgcode-desktop/build.rs
  • crates/omgcode-desktop/capabilities/approvals.json
  • crates/omgcode-desktop/capabilities/main.json
  • crates/omgcode-desktop/src/command_names.rs
  • crates/omgcode-desktop/src/commands.rs
  • crates/omgcode-desktop/src/commands/approvals.rs
  • crates/omgcode-desktop/src/commands/chat.rs
  • crates/omgcode-desktop/src/commands/sessions.rs
  • crates/omgcode-desktop/src/error.rs
  • crates/omgcode-desktop/src/launch.rs
  • crates/omgcode-desktop/src/lib.rs
  • crates/omgcode-desktop/src/main.rs
  • crates/omgcode-desktop/src/policy.rs
  • crates/omgcode-desktop/src/shutdown.rs
  • crates/omgcode-desktop/src/windows.rs
  • crates/omgcode-desktop/tauri.conf.json
  • crates/omgcode-desktop/tests/launch_flags.rs
  • crates/omgcode-desktop/tests/layers.rs
  • crates/omgcode-desktop/ui/.npmrc
  • crates/omgcode-desktop/ui/README.md
  • crates/omgcode-desktop/ui/approvals.html
  • crates/omgcode-desktop/ui/biome.json
  • crates/omgcode-desktop/ui/index.html
  • crates/omgcode-desktop/ui/package.json
  • crates/omgcode-desktop/ui/src/approvals.ts
  • crates/omgcode-desktop/ui/src/approvals/app.ts
  • crates/omgcode-desktop/ui/src/approvals/model.ts
  • crates/omgcode-desktop/ui/src/approvals/review.ts
  • crates/omgcode-desktop/ui/src/dom.ts
  • crates/omgcode-desktop/ui/src/format.ts
  • crates/omgcode-desktop/ui/src/ipc/approvals_client.ts
  • crates/omgcode-desktop/ui/src/ipc/chat_events.ts
  • 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.ts
  • crates/omgcode-desktop/ui/src/main/app.ts
  • crates/omgcode-desktop/ui/src/main/chat_runner.ts
  • crates/omgcode-desktop/ui/src/main/composer.ts
  • crates/omgcode-desktop/ui/src/main/conversation.ts
  • crates/omgcode-desktop/ui/src/main/model.ts
  • crates/omgcode-desktop/ui/src/main/new_session.ts
  • crates/omgcode-desktop/ui/src/main/sidebar.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/poll.ts
  • crates/omgcode-desktop/ui/src/styles/approvals.css
  • crates/omgcode-desktop/ui/src/styles/main.css
  • crates/omgcode-desktop/ui/src/styles/tokens.css
  • crates/omgcode-desktop/ui/tests/approvals.test.ts
  • crates/omgcode-desktop/ui/tests/chat_runner.test.ts
  • crates/omgcode-desktop/ui/tests/client.test.ts
  • crates/omgcode-desktop/ui/tests/dist.test.ts
  • crates/omgcode-desktop/ui/tests/helpers.ts
  • crates/omgcode-desktop/ui/tests/live_preview.test.ts
  • crates/omgcode-desktop/ui/tests/main_window.test.ts
  • crates/omgcode-desktop/ui/tests/mock.test.ts
  • crates/omgcode-desktop/ui/tests/model.test.ts
  • crates/omgcode-desktop/ui/tests/poll.test.ts
  • crates/omgcode-desktop/ui/tests/security.test.ts
  • crates/omgcode-desktop/ui/tests/transcript.test.ts
  • crates/omgcode-desktop/ui/tsconfig.json
  • crates/omgcode-desktop/ui/vite.config.ts
  • docs/README.md
  • docs/adr/0044-observe-journals-without-the-writer-lock-and-index-them-in-sqlite.md
  • docs/adr/0045-build-the-desktop-shell-on-tauri-with-a-narrow-command-surface.md
  • docs/adr/0046-decide-model-tool-approvals-in-an-isolated-desktop-window.md
  • docs/adr/0047-read-the-local-provider-token-from-the-credential-store.md
  • docs/adr/0048-bind-a-stored-credential-to-its-profile-endpoint.md
  • docs/adr/0049-stream-local-model-replies-and-push-chat-events.md
  • docs/adr/0050-interrupt-a-streamed-model-request-on-cancellation.md
  • docs/adr/index.md
  • docs/agent-instructions.md
  • docs/coding-rules.md
  • docs/context-management.md
  • docs/desktop-interface.md
  • docs/development.md
  • docs/execution.md
  • docs/file-access.md
  • docs/platform-support.md
  • docs/provider-authentication.md
  • docs/repository-checks.md
  • docs/security-coding-rules.md
  • docs/session-storage.md
  • docs/testing-standards.md
  • docs/workspace-permissions.md
  • sonar-project.properties

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

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread .github/workflows/frontend.yml Fixed
Comment thread .github/workflows/rust.yml Fixed
James-Chapman and others added 3 commits November 17, 2026 00:52
The first Sonar analysis of pull request 33 failed its quality gate and
raised six findings. This fixes the findings and the analysis scope.

- Both workflows install the frontend dependencies with
  "npm ci --ignore-scripts". The ui .npmrc already set this; the flag
  makes it hold even if that file changes
- Four lines of frontend source and tests held raw bidirectional
  control characters, inside the pattern and the test strings that
  deal with those characters. They are now written as \u escapes,
  which denote the same characters. A frontend test fails if a raw one
  is added to source, styles, pages, or tests
- sonar-project.properties declares test code as test code: every
  tests directory, every tests.rs module, and every *.test.ts file.
  All 1,035 duplicated lines Sonar reported were in test files, and
  1,421 of the 2,767 lines it counted as code to cover were the
  frontend tests themselves

Not fixed: the gate condition on coverage of new code. Sonar counts
the frontend TypeScript sources as code to cover and no coverage report
is produced, so that condition is expected to fail again. Producing one
needs a coverage provider, which is a new dependency and is left for a
decision. The repository-checks guide now says this.

Verified on Windows: the frontend type check, Biome, 160 tests, and the
5 bundle tests pass, and the desktop crate tests pass. The Sonar
configuration cannot be run locally; the pull request analysis is its
check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
CodeQL flagged the assertion message in
a_tampered_stored_path_is_never_returned as cleartext logging: some of
the tampered paths are built from a session identifier, and the message
printed the path. The identifier is a random value made for the test
and is not a credential, but a test has no need to print it. The
message now names the case by its position in the list.

The assertion itself is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Sonar quality gate requires 80 percent coverage on new code. Sonar
counts the frontend TypeScript sources as code to cover, and no report
existed, so the condition stood at 0 percent.

- ui: add @vitest/coverage-v8 5.1.0 as a development dependency,
  pinned to the Vitest version, and an "npm run coverage" script. It
  writes coverage/lcov.info with paths relative to the repository
  root. The provider is published with each Vitest release under the
  MIT licence, adds 12 packages to the lockfile, none with an install
  script, and is used by nothing in the built bundle
- sonar.yml: a new job, Frontend coverage, installs the locked
  dependencies, runs the tests with coverage, and uploads the report.
  The analysis job waits for it and downloads the report. The tests
  run dependency code, so they run in a job that never references the
  Sonar credential
- sonar-project.properties: point sonar.javascript.lcov.reportPaths
  at the report
- docs: the repository-checks, development, and desktop guides, the
  frontend README, and the changelog

Nothing is excluded from the measure, including the development mock.
Locally it is 85.7 percent of lines and 76.0 percent of branches, about
82 percent by the combined measure Sonar uses. That margin is thin.
Rust is still not measured for coverage.

Verified on Windows: a clean "npm ci --ignore-scripts", the type
check, Biome, 160 tests, the coverage run, and the 5 bundle tests pass,
and npm audit reports no vulnerabilities. The workflow and the Sonar
configuration cannot be run locally; the pull request analysis is
their check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Both were found by the first CI and Sonar runs on pull request 33.

- stored_credential::early_outcomes_need_no_native_store failed on the
  Windows runner. It assumed that a folder under the temp directory
  inherits an access list the credential store refuses. That holds on
  some machines and not on the runner, whose temp folder grants only
  the user, the system, and administrators, which the store trusts.
  The test now grants the built-in Users group read access itself, by
  its identifier, so the condition it needs holds on any host. The
  store was correct on both machines
- security.test.ts held raw bidirectional control characters in the
  pattern that scans for them: it was meant to be written with escapes
  and was saved as the characters. The test did not notice, because a
  glob never matches the file that contains it. The pattern is now
  written with escapes, and the test reads its own source as well

Verified on Windows. The credential test: the old version fails with
the CI message under a temp folder holding only trusted principals,
and the new version passes there and under the normal temp folder, 12
of 12 each time. The scan test: planting a raw character in the file
makes it fail and name the file; the frontend type check, Biome, 160
tests, the coverage run, and the 5 bundle tests pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@James-Chapman
James-Chapman added this pull request to stack #35 November 17, 2026 09:25
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.

2 participants