Skip to content

test: increase project coverage and set patch goal - #2346

Draft
Anchel123 wants to merge 83 commits into
stagingfrom
docs/patch-coverage-goal
Draft

Anchel123 wants to merge 83 commits into
stagingfrom
docs/patch-coverage-goal

Conversation

@Anchel123

@Anchel123 Anchel123 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Add meaningful coverage for CSV storage, desktop startup, graph transformations, and API routes, and ask agents to aim for at least 95% patch coverage. This is a draft: the finalized project coverage for commit a2715763 is 85.77%, above the unchanged 85% CI gate but below the at-least-95% project goal.

Local validation (Node 24.18.0):

  • npx eslint 'app/api/graph/[graph]/[element]/route.test.ts' and npx eslint app/api/chat/ai-routes.test.ts — passed.
  • npx tsc --noEmit --incremental false — passed.
  • npm run test:coverage — passed, 1,397 tests; the 100% result applies only to the selected unit coverage gate, not the whole project.
  • node --test --experimental-test-coverage --test-coverage-include='app/api/graph/*/*/*route.ts' --test-coverage-include='app/api/graph/*/*/*/route.ts' 'app/api/graph/?graph?/?element?/route.test.ts' — passed, 11 tests; all three route files reported 100% line coverage. Session and database boundaries are simulated.
  • node --test --experimental-test-coverage --test-coverage-include='app/api/chat/fix/route.ts' --test-coverage-include='app/api/chat/optimize/route.ts' app/api/chat/ai-routes.test.ts — passed, 6 tests; both routes reported 100% line coverage. Session, database and AI provider boundaries are simulated.
  • Full lint, production build and E2E tests were not rerun locally for this batch.

CI for a2715763 completed: coverage/project is 85.77%, while coverage/patch reports no changed lines to cover, not a measured 95%. Two Playwright tests passed only on retry, so the draft is not ready.

Checklist

  • Tests added/updated; npm run lint, npx tsc --noEmit, npm run test:coverage pass; patch coverage ≥ 95% (CI enforces 85%)
  • Docs updated (README / swagger spec (enforced for API routes) / .env.local.template / Helm) — or not needed
  • Design doc in docs/design/ created/updated — or not needed
  • Code is concise, efficient and clear (no dead code, duplication or speculative options)
  • All AI and human review threads are answered and resolved, after at least 3 AI review rounds
  • Superpowers code review (requesting-code-review) run on the full diff; every Critical/Important finding fixed or answered
  • CI is green on the final commit (watched to the end) with zero dangling tests (none failing, flaky or newly skipped)

Summary by cubic

Adds test coverage across CSV storage, chat and model discovery, graph listing, count, info, memory, config, stubs, transformation and mutation routes, connections, tokens, session migration, Auth.js options and origin guard, swagger, release cache, and other API routes, Cypher completion and Monaco linting glue, upload progress and previews, Cypher batch uploads, desktop startup, and UDF, query history, and data panel E2E flows. Sets a 95% patch-coverage goal for agents and raises the enforced CI floor from 80% to 85%.

  • Oversized uploads are now rejected outright instead of being silently truncated.
  • Graph count routes now always run read-only, so a count racing a delete can't recreate a just-deleted graph.
  • Disconnecting now navigates away before clearing cookies, so a late in-flight session response can't restore the cookie and break the logout flow.
  • The E2E settings specs now run after the parallel shard projects, since their server-wide graph config empties or times out queries other projects run meanwhile.
  • The header graph-count test now asserts against a fixed graph list instead of comparing to a second live API read, which could disagree under parallel workers.
  • Query history storage is now keyed by connection scope, and its E2E tests verify the scoped key, fallback behavior, and profile history against the authenticated connection.

Written for commit 81d5fef. Summary will update on new commits.

View guided diff Turn on auto-fix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
falkordb-browser Ready Ready Preview Nov 29, 2026 5:05pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.68%. Comparing base (ab6e169) to head (81d5fef).

Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2346      +/-   ##
===========================================
+ Coverage    83.30%   90.68%   +7.37%     
===========================================
  Files          294      294              
  Lines        44021    44087      +66     
  Branches      6947     7377     +430     
===========================================
+ Hits         36672    39979    +3307     
+ Misses        5312     2641    -2671     
+ Partials      2037     1467     -570     
Flag Coverage Δ
desktop 83.28% <ø> (+38.32%) ⬆️
e2e 79.86% <90.17%> (+1.36%) ⬆️
smoke 1.94% <0.00%> (-0.01%) ⬇️
unit 37.23% <91.07%> (+16.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/api/graph/[graph]/count/edges/route.ts 100.00% <100.00%> (+36.23%) ⬆️
app/api/graph/[graph]/count/nodes/route.ts 100.00% <100.00%> (+36.23%) ⬆️
app/api/graph/[graph]/count/route.ts 100.00% <100.00%> (+34.72%) ⬆️
app/api/swagger/swagger-spec.ts 100.00% <100.00%> (ø)
app/api/upload/route.ts 100.00% <100.00%> (+47.79%) ⬆️
app/graph/selectGraph.tsx 93.70% <100.00%> (+2.13%) ⬆️
app/providers.tsx 85.53% <100.00%> (-0.14%) ⬇️
lib/active-connection.ts 100.00% <100.00%> (ø)

... and 80 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

🔒 Trivy Security Scan Results


Report Summary

┌───────────────────────────────────────────────────────────────────────────┬──────────┬─────────────────┐
│                                  Target                                   │   Type   │ Vulnerabilities │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ falkordb/falkordb-browser:test (alpine 3.23.7)                            │  alpine  │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/checksums/package.json                          │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/client-s3/package.json                          │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/core/package.json                               │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-env/package.json            │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-http/package.json           │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-ini/package.json            │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-login/package.json          │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-node/package.json           │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-process/package.json        │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-sso/package.json            │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/credential-provider-web-identity/package.json   │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/middleware-sdk-s3/package.json                  │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/nested-clients/package.json                     │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/signature-v4-multi-region/package.json          │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/token-providers/package.json                    │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws-sdk/xml-builder/package.json                        │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@aws/lambda-invoke-store/package.json                    │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@falkordb/text-to-cypher/package.json                    │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@img/colour/package.json                                 │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@img/sharp-libvips-linux-x64/package.json                │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json            │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@img/sharp-linux-x64/package.json                        │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@img/sharp-linuxmusl-x64/package.json                    │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@js-temporal/polyfill/package.json                       │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@next/env/package.json                                   │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@redis/bloom/package.json                                │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@redis/client/dist/package.json                          │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@redis/client/package.json                               │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@redis/json/package.json                                 │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@redis/search/package.json                               │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@redis/time-series/package.json                          │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@smithy/core/package.json                                │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@smithy/credential-provider-imds/package.json            │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@smithy/node-http-handler/package.json                   │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@smithy/signature-v4/package.json                        │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@smithy/types/package.json                               │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/@swc/helpers/package.json                                │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/baseline-browser-mapping/package.json                    │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/bowser/package.json                                      │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/caniuse-lite/package.json                                │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/client-only/package.json                                 │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/detect-libc/package.json                                 │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/falkordb/package.json                                    │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/jsbi/package.json                                        │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/lodash/package.json                                      │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/nanoid/package.json                                      │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/next/dist/compiled/@edge-runtime/cookies/package.json    │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/next/dist/compiled/@edge-runtime/ponyfill/package.json   │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/next/dist/compiled/@edge-runtime/primitives/package.json │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/next/dist/compiled/react-is/package.json                 │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/next/dist/compiled/react-refresh/package.json            │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/next/dist/compiled/regenerator-runtime/package.json      │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/next/package.json                                        │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/picocolors/package.json                                  │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/postcss/package.json                                     │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/react-dom/package.json                                   │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/react/package.json                                       │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/redis/package.json                                       │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/semver/package.json                                      │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/sharp/package.json                                       │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/source-map-js/package.json                               │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/node_modules/styled-jsx/package.json                                  │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ app/package.json                                                          │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ opt/yarn-v1.22.22/package.json                                            │ node-pkg │        0        │
├───────────────────────────────────────────────────────────────────────────┼──────────┼─────────────────┤
│ usr/local/lib/node_modules/corepack/package.json                          │ node-pkg │        0        │
└───────────────────────────────────────────────────────────────────────────┴──────────┴─────────────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)


Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge staging while preserving the 85% coverage floor and the at-least-95% patch goal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise graph result merging, labels, properties and edge lifecycle without a database.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Anchel123 and others added 2 commits November 26, 2026 12:27
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Anchel123 and others added 2 commits November 26, 2026 14:23
The count was compared with a second live /api/graph read while parallel
workers create and delete graphs, so the two reads could disagree.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
settingsConfig sets server-wide graph config (RESULTSET_SIZE 0, 1 ms
timeouts) on the shared database. Running it alongside the other projects
made their queries come back empty or time out (mobile.spec.ts:359 found
no nodes after MATCH (n) RETURN n; reproduced with RESULTSET_SIZE 0).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Anchel123 and others added 3 commits November 26, 2026 14:36
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread app/api/swagger/route.test.ts Fixed
Exercise connection setup, session/JWT resolution, cache recovery, and failure handling with offline dependency stubs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Anchel123 and others added 2 commits November 29, 2026 12:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Anchel123 and others added 10 commits November 29, 2026 12:45
Deleting the shown library clears the editor; a refused delete keeps the
library and a retry removes it on the server; flush reports a refusal and
clears the panel on success (stubbed, as a real flush would remove other
parallel tests' libraries); a dropped file names the library; a library
that cannot be reached is reported and the panel returns to the shown one.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deleting the entry shown on the Explain tab shows the latest run; when that
run failed it has no plan or statistics, so the panel falls back to the Edit
Query tab. Opening history on a graph with no entries of its own lists every
entry instead of an empty, graph-scoped list.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…values

Enter saves and Escape abandons both an edit and a new attribute without closing the panel, an empty add and a value that does not fit its type are refused with no write, and a value longer than three lines is clamped behind a Show more toggle that also works from the keyboard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise provider selection, configuration errors, and cache invalidation with offline provider instances.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge staging and use the authenticated connection scope in the profile history scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview — 81d5fefd Deployed Nov 29, 2026 by vercel[bot]
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