Skip to content

fix(ai): Ollama/LM Studio/vLLM desktop discovery + PWA CORS noise (#266) + vendor-fork audit (#60)#269

Open
qnbs wants to merge 14 commits into
mainfrom
fix/266-ollama-desktop-discovery
Open

fix(ai): Ollama/LM Studio/vLLM desktop discovery + PWA CORS noise (#266) + vendor-fork audit (#60)#269
qnbs wants to merge 14 commits into
mainfrom
fix/266-ollama-desktop-discovery

Conversation

@qnbs

@qnbs qnbs commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #266 · Refs #60

#266 — Local AI server connectivity (root cause: CORS, not CSP)

  • All local-server traffic (ollamaService, scanLocalOpenAiCompatibleEndpoints) used the WebView fetch; inside the Tauri shell cross-origin localhost calls died on CORS/PNA, and the PWA settings auto-effect probed localhost:11434 on every visit (loud CORS console errors).
  • New thin services/localServerHttp.ts: native @tauri-apps/plugin-http on desktop (CORS-free), browser fetch on web; shared URL normalization, timeout composition, unreachable/timeout classification; user aborts propagate unchanged.
  • Audit finding: http:default grants no URL scope — every plugin-http call (incl. desktop cloud AI via fetchAdapter) was silently denied. Capability now allows loopback any-port + the cloud endpoints mirroring the Tauri CSP.
  • PWA: no more auto-probing; quiet "desktop app required" banner + download CTA. Desktop scan: classified status badges + one-click Use this URL.
  • Docs: ADR 0012, LOCAL-AI.md section, help articles; all new strings in 19 locales.

#60 — y-webrtc vendor-fork audit

  • Full-file diff vs upstream y-webrtc@10.3.0: only the 3 documented SC patches + DataChannel E2E encryption → packages/collab-transport/AUDIT.md, bump 10.3.0-sc2.
  • Removed deprecated patches/y-webrtc@10.3.0.patch + dead root y-webrtc dep; created the missing scripts/verify-vendor-fork.mjs invariant guard, wired as verify:vendor into the CI security job.

Hygiene

  • Stale Experimental search hints removed; ProForgeDashboard uses catalog-driven MaturityBadge; AGENTS.md drift (6 opt-in flags, 19 locales).

How to verify

  1. Gates: pnpm run lint && pnpm run typecheck && pnpm run i18n:check — all green locally; unit tests for every changed path (localServerHttp, ollamaService, aiProviderService scan/testAIConnection, AiProviderCard PWA+desktop branches, settingsSearchHints, proForge suite).
  2. Desktop: build/dispatch tauri-build.yml on this branch → Settings → AI → Ollama → Scan common local ports shows live badges with a running ollama serve; Use this URL adopts it; model list + test connection succeed without OLLAMA_ORIGINS.
  3. PWA: Settings → AI → Ollama shows the banner + CTA; console stays free of CORS errors.
  4. Vendor guard: pnpm run verify:vendor → all 8 invariants ✓ (also runs in the security job).

Notes

  • No CSP changes; no new secrets; privacy-first (no localhost call without a user-visible action).
  • CHANGELOG updated under [Unreleased] (Fixed / Security / Changed).
  • Dependabot batch (~18 open PRs) is handled as a follow-up after this lands, per plan.

Summary by CodeRabbit

  • New Features

    • Desktop users can connect to Ollama, LM Studio, and vLLM with improved local-server discovery.
    • Local endpoint scans now show actionable statuses, including HTTP errors, timeouts, and unreachable servers.
    • Usable discovered endpoints can be selected directly.
    • ProForge now displays a clearer maturity label.
  • Bug Fixes

    • Improved local AI connectivity and timeout reporting.
    • Refined browser messaging for desktop-only local-server features.
  • Documentation

    • Expanded local AI setup, troubleshooting, and help content across supported languages.

qnbs added 7 commits July 26, 2026 09:46
Root-cause analysis for Ollama/LM Studio/vLLM discovery on Tauri and the
PWA CORS noise: WebView fetch to localhost is cross-origin (CORS/PNA),
CSP was never the blocker. Decision: route local-server HTTP through the
Tauri HTTP plugin; PWA stays strictly desktop-only. Help articles updated
(Tauri desktop, provider FAQ).
New thin services/localServerHttp.ts: runtime-aware fetch (native
@tauri-apps/plugin-http on desktop — CORS-free, browser fetch on web),
shared base-URL normalization, timeout composition via AbortSignal.any,
and unreachable/timeout error classification. User aborts rethrow
unchanged (cancel != failure).

ollamaService (test/list/stream/pull) and scanLocalOpenAiCompatibleEndpoints
now use it; the scan returns per-endpoint state (ok/unreachable/timeout/http)
for actionable UI badges. Public signatures and legacy error strings are
preserved; new unit tests cover both fetch branches and classification.
…dges (#266)

- The settings auto-effect and model loading no longer probe localhost in
  the PWA (that was the CORS console noise); a quiet 'desktop app required'
  banner with a download CTA replaces it. testAIConnection's desktop-only
  guard is unchanged.
- Desktop scan results render classified status badges (reachable /
  no response / timeout / HTTP error) with aria-live, plus a one-click
  'Use this URL' action that adopts the found base URL + matching preset.
- Tauri http capability: http:default alone grants NO url scope (plugin
  allow-list denied every call, incl. desktop cloud AI). Scope now allows
  loopback any-port + the cloud endpoints mirroring the Tauri CSP.
New settings.ai keys (desktop-only banner title/body, download CTA, scan
timeout/HTTP states, use-this-URL) plus a corrected ollamaHint (no CORS
setup needed on desktop), translated for all 19 locales; runtime bundles
rebuilt (53827 keys).
… dep (#60)

Full-file diff of packages/collab-transport against upstream y-webrtc
10.3.0: no deviations beyond the three documented SC patches (PBKDF2 600k,
extractable:false, return-before-reject) + DataChannel E2E encryption.
Recorded in packages/collab-transport/AUDIT.md; fork bumped to -sc2.

Cleanup: removed the deprecated patches/y-webrtc@10.3.0.patch and the dead
root y-webrtc dependency (zero imports). Created the previously-referenced-
but-missing scripts/verify-vendor-fork.mjs invariant guard and wired it
into package.json (verify:vendor) + the CI security job.
- Experimental-category search hints referenced retired/promoted flags
  (plot board, codex, cross project); replaced with current features.
- ProForgeDashboard uses the catalog-driven MaturityBadge instead of a
  hard-coded Experimental pill (v1.24 maturity-label convention).
- AGENTS.md drift: six opt-in flags (enableProForge), 19 locales.
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldscript-studio Ready Ready Preview, Comment Jul 26, 2026 1:37pm

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aee3d28e-36c8-4b95-8809-1f44c06706aa

📥 Commits

Reviewing files that changed from the base of the PR and between 5d4c0ef and 8a7ff86.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (56)
  • .github/copilot-instructions.md
  • .github/workflows/ci.yml
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • VENDOR-FORKS.md
  • components/settings/AiProviderCard.tsx
  • docs/COVERAGE-POLICY.md
  • docs/FEATURE-PARITY.md
  • locales/ar/settings.json
  • locales/de/settings.json
  • locales/el/settings.json
  • locales/en/settings.json
  • locales/es/settings.json
  • locales/eu/settings.json
  • locales/fa/settings.json
  • locales/fi/settings.json
  • locales/fr/settings.json
  • locales/he/settings.json
  • locales/hu/settings.json
  • locales/is/settings.json
  • locales/it/settings.json
  • locales/ja/settings.json
  • locales/ko/settings.json
  • locales/pt/settings.json
  • locales/ru/settings.json
  • locales/sv/settings.json
  • locales/zh/settings.json
  • package.json
  • packages/collab-transport/src/crypto.js
  • pnpm-workspace.yaml
  • public/locales/ar/bundle.json
  • public/locales/de/bundle.json
  • public/locales/el/bundle.json
  • public/locales/en/bundle.json
  • public/locales/es/bundle.json
  • public/locales/eu/bundle.json
  • public/locales/fa/bundle.json
  • public/locales/fi/bundle.json
  • public/locales/fr/bundle.json
  • public/locales/he/bundle.json
  • public/locales/hu/bundle.json
  • public/locales/is/bundle.json
  • public/locales/it/bundle.json
  • public/locales/ja/bundle.json
  • public/locales/ko/bundle.json
  • public/locales/pt/bundle.json
  • public/locales/ru/bundle.json
  • public/locales/sv/bundle.json
  • public/locales/zh/bundle.json
  • scripts/verify-vendor-fork.mjs
  • services/ollamaService.ts
  • src-tauri/osv-scanner.toml
  • tests/unit/aiProviderService.test.ts
  • tests/unit/localServerHttp.test.ts
  • tests/unit/yWebrtcPatch.test.ts
📝 Walkthrough

Walkthrough

This PR adds runtime-aware local AI server connectivity, desktop-only Ollama probing, classified endpoint scan results, localized setup and status messaging, and Tauri HTTP capability rules. It also audits and verifies the vendored y-webrtc fork in CI, updates ProForge maturity labeling, and removes stale search hints.

Changes

Local AI connectivity

Layer / File(s) Summary
Runtime-aware HTTP and endpoint classification
services/localServerHttp.ts, services/ollamaService.ts, services/aiProviderService.ts, src-tauri/capabilities/default.json
Local requests use Tauri HTTP on desktop, browser fetch elsewhere, shared timeout/error handling, and richer endpoint states.
Desktop-only Ollama settings flow
components/settings/AiProviderCard.tsx, tests/unit/settings/AiProviderCard.test.tsx
PWA probing is disabled; desktop users receive model loading, scan badges, and a “Use this URL” action.
Documentation and translations
docs/LOCAL-AI.md, docs/adr/0012-local-server-connectivity-tauri-http.md, locales/*, public/locales/*
Local AI setup, troubleshooting, desktop-only behavior, and scan states are documented and localized.

Vendored fork security

Layer / File(s) Summary
Fork audit and CI invariant guard
packages/collab-transport/*, scripts/verify-vendor-fork.mjs, .github/workflows/ci.yml, package.json, VENDOR-FORKS.md
The fork advances to 10.3.0-sc2, obsolete patch/dependency bookkeeping is removed, and six fork invariants run in the security job.

Settings and dashboard hygiene

Layer / File(s) Summary
Catalog-driven maturity and search hints
components/proForge/ProForgeDashboard.tsx, services/settingsSearchHints.ts, CHANGELOG.md
ProForge uses MaturityBadge, and stale Experimental search hints are replaced with current terms.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AiProviderCard
  participant aiProviderService
  participant localServerHttp
  participant TauriHTTP
  User->>AiProviderCard: Scan local ports
  AiProviderCard->>aiProviderService: scanLocalOpenAiCompatibleEndpoints()
  aiProviderService->>localServerHttp: localServerFetch(endpoint, timeoutMs)
  localServerHttp->>TauriHTTP: Fetch through Tauri plugin on desktop
  TauriHTTP-->>localServerHttp: HTTP response or transport error
  localServerHttp-->>aiProviderService: Classified result
  aiProviderService-->>AiProviderCard: Render status and usable URL
  User->>AiProviderCard: Use URL
  AiProviderCard-->>User: Apply Ollama base URL and preset
Loading

Possibly related issues

  • Issue #60 — The vendored y-webrtc audit, fork version bump, and CI invariant verification directly implement the issue’s stated objective.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes substantial vendor-fork audit and cleanup work unrelated to #266, including collab-transport, scripts, AGENTS, and changelog changes. Split the vendor-fork audit and cleanup changes into a separate PR, or add matching linked issues for those unrelated updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and accurately covers the main local-AI discovery fix plus the vendor-fork audit.
Linked Issues check ✅ Passed The PR addresses #266 by removing PWA localhost probing, adding desktop-only messaging, and improving desktop discovery diagnostics.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/266-ollama-desktop-discovery

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
services/ollamaService.ts (1)

192-207: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve caller cancellation in streamOllama.

localServerFetch rethrows AbortError, but this catch wraps it as a generic connection failure. A user cancellation can therefore enter fallback/error handling instead of stopping the request. Re-throw aborts before wrapping.

Proposed fix
   } catch (err) {
+    if (isAbortError(err)) throw err;
     const error = new Error(
       `Ollama not reachable (${baseUrl}). Make sure Ollama is running: ollama serve`,
       { cause: err as Error },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/ollamaService.ts` around lines 192 - 207, Update the catch block in
streamOllama around localServerFetch to detect an AbortError and re-throw it
unchanged before constructing the wrapped Ollama connection error. Preserve the
existing wrapping behavior for non-abort failures and keep the current callback
contract intact.
🧹 Nitpick comments (1)
tests/unit/localServerHttp.test.ts (1)

1-19: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add the required QNBS-v3 rationale marker.

This non-trivial test module adds runtime-routing and transport-error contract coverage but has no single-line QNBS-v3 comment explaining that purpose.

As per coding guidelines, “For non-trivial changes, add one single-line QNBS-v3 comment explaining why the change was made.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/localServerHttp.test.ts` around lines 1 - 19, Add one single-line
QNBS-v3 comment near the imports in the localServerHttp test module, briefly
explaining that the tests cover runtime routing and transport-error contracts.
Keep the comment focused on the purpose of this non-trivial test coverage.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 390: Synchronize the feature-flag documentation so the opt-in count and
flag list match across the sections near the feature flag overview and the “23
flags” statement. Use the authoritative six opt-in flags—enableRtlLayout,
enableVoiceSupport, enableProForge, enableVoiceWasm, enableGlobalCopilot, and
enableLocalFirstSync—and remove the stale five-flag wording.

In `@CHANGELOG.md`:
- Around line 128-132: Update the feature-count statement in the changelog
bullet to reflect the final UI state of 22 flags, or explicitly label 23 flags
as an intermediate state; keep the surrounding catalog/default-state and test
details unchanged.

In `@components/settings/AiProviderCard.tsx`:
- Around line 75-80: Gate the user-triggered Ollama controls in AiProviderCard
using the existing isDesktop state: hide or disable both the “Load models”
action and the shared “Test connection” button when !isDesktop. Update the
relevant rendering paths around the Ollama model-loading handler and the shared
connection action, while preserving their current desktop behavior.
- Around line 121-133: Update handleUseScannedUrl and its surrounding follow-up
flow so adopting a scanned URL cannot trigger Ollama-specific model loading or
testing for lm_studio or vllm presets. Either restrict the action to Ollama URLs
or branch the subsequent checks by the selected localBackendPreset, while
preserving the existing Ollama behavior.

In `@locales/es/settings.json`:
- Around line 209-211: Remove the incorrect CSP attribution from the
settings.ai.ollamaDesktopOnlyBody translation while retaining the browser
CORS/private-network explanation. Apply the same wording update in
locales/es/settings.json (209-211), public/locales/is/bundle.json (1817-1819),
public/locales/it/bundle.json (1817-1819), public/locales/ja/bundle.json
(1817-1819), public/locales/ko/bundle.json (1817-1819), and
public/locales/pt/bundle.json (1817-1819), keeping all locale copies aligned.

In `@packages/collab-transport/src/crypto.js`:
- Around line 4-13: Update the vendor header comments to use the SC patch
terminology, reference the implementation’s decrypt() symbol instead of
encryptMessageContent, and add the required single-line QNBS-v3 rationale for
the JavaScript change. Keep the existing patch and audit metadata unchanged.

In `@scripts/verify-vendor-fork.mjs`:
- Around line 41-45: Update the DataChannel invariant check in the verification
script to validate encryption and decryption at the actual data-flow sites, not
merely anywhere in webrtcSrc. Assert that sendWebrtcConn and broadcastWebrtcConn
encrypt payloads before peer.send, and that the peer.on('data')/readPeerMessage
path decrypts inbound payloads; use targeted regexes or a structured parser
check.
- Around line 50-54: Expand Invariant 6 in the verification script beyond
rootPkg and the single y-webrtc@10.3.0.patch path: scan every workspace package
manifest, pnpm-lock.yaml, and the patches directory for any y-webrtc dependency,
patchedDependency, lockfile entry, or y-webrtc@*.patch file. Keep the invariant
passing only when no stale upstream wiring exists anywhere in these dependency
surfaces.

In `@tests/unit/aiProviderService.test.ts`:
- Around line 685-713: Update the scanLocalOpenAiCompatibleEndpoints tests to
isolate each global fetch mock by using vi.stubGlobal and restoring globals with
vi.unstubAllGlobals, or by saving and restoring the original globalThis.fetch.
Ensure cleanup runs between tests so the HTTP, timeout, and network-failure
cases cannot affect one another.

In `@VENDOR-FORKS.md`:
- Around line 39-40: Update the maintenance instruction around the
advisory-recording guidance to replace the stale VENDOR-DIFF.md destination with
packages/collab-transport/AUDIT.md, keeping the release-record workflow
consistent with the earlier statement.

---

Outside diff comments:
In `@services/ollamaService.ts`:
- Around line 192-207: Update the catch block in streamOllama around
localServerFetch to detect an AbortError and re-throw it unchanged before
constructing the wrapped Ollama connection error. Preserve the existing wrapping
behavior for non-abort failures and keep the current callback contract intact.

---

Nitpick comments:
In `@tests/unit/localServerHttp.test.ts`:
- Around line 1-19: Add one single-line QNBS-v3 comment near the imports in the
localServerHttp test module, briefly explaining that the tests cover runtime
routing and transport-error contracts. Keep the comment focused on the purpose
of this non-trivial test coverage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a5716990-2af4-4e31-bcaf-5f6a01f2f192

📥 Commits

Reviewing files that changed from the base of the PR and between 79aace8 and 5d4c0ef.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (62)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CHANGELOG.md
  • VENDOR-FORKS.md
  • components/proForge/ProForgeDashboard.tsx
  • components/settings/AiProviderCard.tsx
  • docs/LOCAL-AI.md
  • docs/adr/0012-local-server-connectivity-tauri-http.md
  • locales/ar/settings.json
  • locales/de/settings.json
  • locales/el/settings.json
  • locales/en/help.json
  • locales/en/settings.json
  • locales/es/settings.json
  • locales/eu/settings.json
  • locales/fa/settings.json
  • locales/fi/settings.json
  • locales/fr/settings.json
  • locales/he/settings.json
  • locales/hu/settings.json
  • locales/is/settings.json
  • locales/it/settings.json
  • locales/ja/settings.json
  • locales/ko/settings.json
  • locales/pt/settings.json
  • locales/ru/settings.json
  • locales/sv/settings.json
  • locales/zh/settings.json
  • package.json
  • packages/collab-transport/AUDIT.md
  • packages/collab-transport/package.json
  • packages/collab-transport/src/crypto.js
  • patches/y-webrtc@10.3.0.patch
  • public/locales/ar/bundle.json
  • public/locales/de/bundle.json
  • public/locales/el/bundle.json
  • public/locales/en/bundle.json
  • public/locales/es/bundle.json
  • public/locales/eu/bundle.json
  • public/locales/fa/bundle.json
  • public/locales/fi/bundle.json
  • public/locales/fr/bundle.json
  • public/locales/he/bundle.json
  • public/locales/hu/bundle.json
  • public/locales/is/bundle.json
  • public/locales/it/bundle.json
  • public/locales/ja/bundle.json
  • public/locales/ko/bundle.json
  • public/locales/pt/bundle.json
  • public/locales/ru/bundle.json
  • public/locales/sv/bundle.json
  • public/locales/zh/bundle.json
  • scripts/verify-vendor-fork.mjs
  • services/aiProviderService.ts
  • services/localServerHttp.ts
  • services/ollamaService.ts
  • services/settingsSearchHints.ts
  • src-tauri/capabilities/default.json
  • tests/unit/aiProviderService.test.ts
  • tests/unit/localServerHttp.test.ts
  • tests/unit/ollamaService.test.ts
  • tests/unit/settings/AiProviderCard.test.tsx
💤 Files with no reviewable changes (1)

Comment thread AGENTS.md Outdated
Comment thread CHANGELOG.md
Comment thread components/settings/AiProviderCard.tsx
Comment thread components/settings/AiProviderCard.tsx
Comment thread locales/es/settings.json Outdated
Comment thread packages/collab-transport/src/crypto.js
Comment thread scripts/verify-vendor-fork.mjs Outdated
Comment thread scripts/verify-vendor-fork.mjs Outdated
Comment thread tests/unit/aiProviderService.test.ts
Comment thread VENDOR-FORKS.md
@codeant-ai

codeant-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 5d4c0efb
Scan Time: 2026-07-26 08:02:10 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED Rating S: No issues

View Full Results

qnbs added 4 commits July 26, 2026 10:07
The CI security gate (pnpm audit --audit-level=high) started failing on
every PR: 9 high advisories in transitive dev paths. Overrides raised to
the patched lines (bounded to avoid unvetted major jumps):
adm-zip >=0.6.0, axios >=1.18.0, brace-expansion >=5.0.8,
fast-uri >=3.1.4 <4, js-yaml >=4.3.0 <5, postcss >=8.5.18, sharp >=0.35.0.
Also reverts an accidental packageManager pin to pnpm@11.17.0 (back to
11.5.2).
The npm audit bulk endpoint intermittently returns an undecoded gzip body
(ERR_PNPM_AUDIT_BAD_RESPONSE) — a registry/CDN-side flake, not a finding.
3 attempts with 20s backoff; real advisories still fail the gate.
…gate, vendor checks

- AiProviderCard: disable 'Load models' + 'Test connection' for ollama in PWA
- i18n: ollamaDesktopOnlyBody blames CORS/PNA, not CSP (ADR-0012) — all 19 locales + bundles
- ci: pnpm audit step now advisory (continue-on-error) — registry serves force-gzipped
  body pnpm cannot decode (ERR_PNPM_AUDIT_BAD_RESPONSE, deterministic per CDN edge);
  OSV scan of both lockfiles remains the enforced gate
- verify-vendor-fork: path-sensitive DataChannel encrypt/decrypt checks + full surface
  scan (workspace manifests, pnpm-lock, patches glob)
- ollamaService.streamOllama: rethrow AbortError before wrapping (caller cancel ≠ unreachable)
- collab-transport crypto.js header: SC patch naming, decrypt() fix, QNBS-v3 tag
- tests: scan tests use vi.stubGlobal/unstubAllGlobals; localServerHttp header comment
- docs: flag count truth 22 (16 on / 6 off) across AGENTS.md, CLAUDE.md,
  copilot-instructions.md, FEATURE-PARITY.md, CHANGELOG; VENDOR-FORKS.md AUDIT.md ref
@qnbs

qnbs commented Jul 26, 2026

Copy link
Copy Markdown
Owner Author

Review round addressed (commits e985623 + 0342b98):

Outside-diff comment (services/ollamaService.ts — Major): streamOllama now rethrows AbortError before wrapping, so caller cancellation propagates unchanged instead of surfacing as "not reachable" and entering the fallback chain. Covered by the ollamaService unit tests (20 passing).

Nitpick (tests/unit/localServerHttp.test.ts): QNBS-v3 rationale comment added near the imports.

All 10 actionable inline comments: fixed and replied individually above. Local gates green: lint, typecheck (tsgo), i18n:check (19 locales, 2833 keys each, bundles rebuilt), verify:vendor (12 checks), targeted vitest (88 tests across the 4 touched suites).

CI note: the Security Audit job was red because pnpm audit cannot decode the force-gzipped response some npm CDN edge nodes return (ERR_PNPM_AUDIT_BAD_RESPONSE — deterministic per edge, so the 3× retry loop could never succeed; same failure currently hits all open Dependabot PRs). The step is now advisory (continue-on-error with a warning); the OSV scan of both lockfiles in the same job remains the enforced vulnerability gate, so no security coverage is lost.

…ity gate

- Cargo.lock: quick-xml 0.39.4 → 0.41.0 (via plist 1.10.0; RUSTSEC-2026-0194/0195,
  CVSS 7.5), anyhow → 1.0.104, crossbeam-epoch → 0.9.20, serde_with → 3.21.0
- pnpm overrides: dompurify → 3.4.12, protobufjs → 8.7.1, body-parser → 1.20.6 (<2)
- osv-scanner.toml: drop 2 stale ignores whose advisories no longer match the lockfile
- CHANGELOG: record the remediation batch + advisory pnpm audit step
@socket-security

socket-security Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​dompurify@​3.4.121001001009370

View full report

…e source (#60)

The 'patch file exists' smoke test went stale when patches/y-webrtc@10.3.0.patch
was deleted in the vendor-fork cleanup; the invariant is now the file's absence.
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.05970% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
components/settings/AiProviderCard.tsx 82.60% 0 Missing and 4 partials ⚠️
services/localServerHttp.ts 90.62% 1 Missing and 2 partials ⚠️
services/ollamaService.ts 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

…RAGE-POLICY.md

Patch coverage is informational (no codecov.yml target, check passes); the 8
missing/partial lines are recorded as open follow-ups with a ≥90% backfill target.
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.

[Bug]: CORS warnings: Ollama (local), Chromium

1 participant