You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove 154 low-value test definitions, including 17 whole suites, and two redundant standalone relay checkpoints. Retain 109 definitions and 68 custom checkpoints in the reviewed sources.
What Changed
Trim desktop, CLI, mobile and relay tests that repeat projections, mocked forwarding, constructor wiring or private bookkeeping. Remove dead driver imports, timing entries and flaky-test allowances. Narrow the multi-client reliability note while preserving all historical receipts.
Preserve the schema generator embedded in a trimmed test as an explicit tsx tool. Its SQL export bytes, reader, output path, serialization and opt-in behavior remain unchanged.
To regenerate the schema from an installed checkout, first run pnpm --dir cloud --filter @orca-cloud/postgres-schema build from the repository root, then run UPDATE_OBJECT_STORE_SCHEMA=1 ./node_modules/.bin/tsx test/generate-object-store-schema.ts from cloud/apps/relay-edge. The direct tool needs the PostgreSQL schema package’s built exports; Vitest resolves those imports to source.
Why
Reduce test maintenance and noise. The removed checks deliberately lose coverage of those details, including a standalone audit-event count floor. Retained tests exercise durable state, ownership, rollback, encryption, real WebSockets and identity boundaries.
Linked Issue
Maintainer-requested test-suite maintenance; no linked issue.
Visual Proof
N/A — no product UI or interaction changes.
Testing
After review fixes on Linux: 1,022 desktop/CLI, 19 relay and 19 relay-edge passed (1,060 total); three desktop skips and four PostgreSQL skips. Includes the restored canonical-schema comparison and store parity. Counts include parameter expansion and imported suites.
Mobile: 28 passed before the final overlay; the overlay changes only desktop/cloud test sources, with no mobile or production dependency changes. No repeated mobile execution claim for the final overlay.
Normal commit hooks passed with no tree changes.
Final pnpm check:changed --base=4fabde28b15f316533b0b2fa2f03b9954a3a9b8c --maxWorkers=2 passed. Independent final combined source/metadata review accepted this exact tree.
Current command/import graph and all 153 reliability gate definitions checked; historical receipts preserved. Static graph checks do not establish runtime coverage and retain unresolved/computed-import limitations.
No replacement tests added. Standalone service-dependent relay scripts and the schema generator were not executed. No rendered UI, macOS, Windows or live SSH execution claim. Full CI must pass before merge.
Risk
Level: Medium. Intentionally reduced regression coverage could let changes to removed behavior go unnoticed. Revert this commit if a deleted boundary proves necessary. Product behavior and dependencies are unchanged; the schema-generator extraction is the principal executable tooling change.
Review
Full-source and bounded-owner review, followed by independent source, consumer and metadata acceptance. PR review restored the real canonical database-to-generated DDL consistency check and removed unused imports and pass-through filesystem spy wrappers. Current upstream changes and prior merged test-removal driver edits preserved. The selected CLI file changed upstream; fresh review confirmed its new annotation assertion duplicates stronger parent-environment tests. Those upstream tests and three other affected CLI suites ran successfully.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Cross-platform, remote, mobile and folder-workspace impacts considered through retained boundaries and unchanged product behavior. One combined batch; comprehensive auditing continues.
Checklist
Focused test-removal batch.
Change, rationale and coverage risk explained.
Visual proof N/A with reason.
Self-reviewed and independently reviewed.
Cross-platform, remote and path impacts considered.
Local scoped tests and hooks passed; full matrix covered by CI before merge.
The pull request removes or reduces tests across relay, mobile, CLI, and runtime areas. It changes object-store schema generation so a dedicated script writes the generated module when requested and its contents differ. It also updates flaky-test baselines, CI shard timings, and a reliability-gates known-gap entry. No runtime behavior changes are established by the test removals described here.
Merge Risk: Low · up to 84e1f
Schema regeneration can fail on an installed but unbuilt checkout. Running the cloud build first avoids the failure.
Pre-merge checks: 4 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Description check
The description follows the repository template closely. It has all required headings: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk, AI Disclosure (left blank, which is acceptabl…
1. Confirm whether the author is an outside contributor. If so, link a real issue in the Linked Issue section, because a Refs reference is not sufficient. 2. Reconcile the test counts. The description says 154 removed and 109 retained, and …
Passed checks: 4 passed
Check name
Status
Explanation
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Title check
The title "test: remove 154 low-value tests and redundant relay checkpoints" matches the main change. The diff deletes whole test files and trims test cases across desktop, CLI, mobile, relay and rela…
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 19 files.
Full details: Title check
Explanation
The title "test: remove 154 low-value tests and redundant relay checkpoints" matches the main change. The diff deletes whole test files and trims test cases across desktop, CLI, mobile, relay and relay-edge, and it removes two relay checkpoints. The count in the title (154) differs slightly from the PR objectives (155), but the title still describes the primary change accurately.
Full details: Description check
Explanation
The description follows the repository template closely. It has all required headings: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk, AI Disclosure (left blank, which is acceptable for maintainers), Review, Agent skill upstream boundary, Notes, and Checklist. It states the scope of removed tests and explains the schema generator extraction and how to regenerate the schema. It also gives a risk level of Medium with a revert path. The Linked Issue section says there is no linked issue and cites maintainer-requested maintenance. The template says outside contributors must link an issue, and the PR does not say whether the author is an outside contributor. Testing counts are inconsistent with the objectives summary: the description reports 154 removed definitions, 109 retained, and 1,060 total tests, while the objectives report 155 removed, 108 retained, and 1,087 total. The Risk section says to revert the commit but does not discuss data, settings, or compatibility impact beyond test changes. The AI Disclosure section is empty.
Resolution
Confirm whether the author is an outside contributor. If so, link a real issue in the Linked Issue section, because a Refs reference is not sufficient. 2. Reconcile the test counts. The description says 154 removed and 109 retained, and reports 1,060 total tests. The objectives summary says 155 removed, 108 retained, and 1,087 total. Use one set of verified numbers. 3. Fill in the AI Disclosure section, or confirm that the author is a StablyAI team member and the section does not apply. 4. Replace the Testing checklist claims with clear reproduction steps for a reviewer, and state which platforms were tested. The description says the work ran on Linux only. 5. Make the Risk section name the coverage that the removals stop protecting, and state how to back out the schema-generator extraction.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
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.
2-2: Trivial · Maintainability & Code Quality · Low value
Remove the dead node:fs/promises side-effect import and the unused writeFile and rename wrappers.
The removed test was the only code that used the writeFile and rename wrappers. The vi.mock calls at lines 10-16 stay in place. The readFileSync wrapper is in the same state. The bare import 'node:fs/promises' at Line 2 adds nothing, because vi.mock is hoisted and applies without it.
These mocks now wrap functions that no assertion reads. They add noise and imply coverage that no longer exists. This is the same type of dead code that the PR removes elsewhere.
Delete the import. Delete the mock factories too if no remaining test needs them. First confirm that the retained tests do not depend on the mocked behavior.
13-13: Trivial · Maintainability & Code Quality · Low value
Remove the unused side-effect import.
No code in the test file references SshHostNotServedError any more. The removed test was its only user. The bare import has no effect on the retained tests. Delete Line 13.
This change also removes the only test of the SSH rejection in readChatImagePreview. The guard is in requireLocalRuntimeFileRoute and is unchanged in src/main/runtime/files/file-reads.ts. This reduced coverage is a known trade-off of the PR.
Add a drift check for the generated schema, or confirm that CI covers it.
The removed test compared OBJECT_STORE_SCHEMA with the output of relayObjectStoreSchema(). This script only regenerates the file when UPDATE_OBJECT_STORE_SCHEMA=1. No retained check compares the two.
If someone changes the relay SQLite schema and does not regenerate the file, object-store.ts keeps using stale DDL. The OBJECT_DDL pin test was also removed, so no check detects this either.
The PR objectives say the drift check was removed on purpose. If that is intended, confirm that another gate covers this contract.
Without UPDATE mode, the script could compare the generated file with the expected body and exit with a non-zero status when they differ. Then CI or a hook could run it.
2-5: Trivial · Maintainability & Code Quality · Low value
Remove the dead imports from this test.
import 'node:fs' and import './object-store-schema' are side-effect imports. The test file does not use either module. They remain after the drift test was removed. The node:fs import is new in this change. Remove both.
Proposed change
-import 'node:fs'
import { expect, it } from 'vitest'
import { OBJECT_STORE_SCHEMA } from '../src/object-store-schema.generated'
-import './object-store-schema'
5-6: Trivial · Maintainability & Code Quality · Low value
Remove the unused side-effect imports.
import '../src/admin-jti' and import '../src/env' stay after the tests that used these modules were removed. The file still imports Env as a type on Line 7. Remove the two side-effect imports.
cloud/apps/relay-edge/test/jwt-keys.test.ts: 1
6-6: Trivial · Maintainability & Code Quality · Low value
Remove the unused side-effect import.
import '../src/jwks-persist' has no purpose now that the test for PERSISTED_JWKS_MAX_STALE_MS is removed. coldVerifier imports ../src/jwt dynamically.
14-14: Trivial · Maintainability & Code Quality · Low value
Remove the leftover side-effect import.
The "mode down" test was the only user of EdgeEvacuation in this file. No code in the provided context uses ./edge-relay-evacuation.js now. A bare import './edge-relay-evacuation.js' only loads the module and adds nothing to this test. It also leaves a dead import, which the PR aims to remove.
Delete the line unless a module-load order dependency needs it. If one exists, add a comment that names it.
♻️ Proposed fix
-import './edge-relay-evacuation.js'
cloud/apps/relay/src/edge-relay-fence.test.ts: 1
2-2: Trivial · Maintainability & Code Quality · Low value
Remove the leftover side-effect imports.
import 'jose' and import './edge-relay-evacuation.js' replace named imports whose tests are now deleted (jwtVerify and EdgeEvacuation). Neither bare import provides a binding to this file. The remaining tests do not use them.
Delete both lines unless a module-load order dependency needs them. If one exists, add a comment that names it.
2-2: Trivial · Maintainability & Code Quality · Low value
Remove the leftover side-effect imports.
import '@orca-cloud/relay-contract', import './connections/host-session-registry.js', and import './connections/splice-forwarder.js' replace named imports whose tests are deleted. The remaining tests in the provided context use none of them. These bare imports only load modules and add no bindings.
Delete the lines unless a module-load order dependency, such as a circular import, needs them. If one exists, add a comment that names it.
Remove the side-effect-only imports of Node built-ins.
node:fs, node:os, and node:path have no module-load side effects that a test needs. The removed test was the last user of mkdtempSync, tmpdir, and join. These three imports now do nothing. They also look like required setup to a reader.
Delete Lines 2-4. This pattern appears in the other files of this cohort. Examples are host-qualified-identity, runtime-agent-projections, and agent-session-lease-transitions. Keep a bare import only when the module registers state that the test needs, and add a comment that names that state.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
OrcaWin
changed the title
test: remove 155 low-value tests and redundant relay checkpoints
test: remove 154 low-value tests and redundant relay checkpoints
Nov 8, 2026
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Include the workspace build in the regeneration… · generate-object-store-schema.ts:1-10
cloud/apps/relay-edge/test/generate-object-store-schema.ts:1-10 Minor · Functional Correctness · Quick win
Include the workspace build in the regeneration instructions.
If the PostgreSQL schema package has not been built, the direct tsx command can fail on its dist import. The former Vitest command resolved that import to source. Document the required workspace build before the regeneration command, or make the tool resolve the source package.
6-6: Major · Data Integrity & Integration · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Keep a separate schema-version and migration check.
This comparison detects generated-schema drift, but it does not check OBJECT_SCHEMA_VERSION or MIGRATIONS. If a later change bumps the version to 2 without MIGRATIONS[2], this test can pass while openSchema() rejects existing version-1 objects. Restore a check for the version and required migration steps. Use a valid baseline rather than the removed DDL hash pin. (raw.githubusercontent.com)
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f21af6cc-ef32-4126-9422-e3f8f851b22b
Commits
Reviewing files that changed from the base of the PR and between cce9e94 and 84e1fae.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Remove 154 low-value test definitions, including 17 whole suites, and two redundant standalone relay checkpoints. Retain 109 definitions and 68 custom checkpoints in the reviewed sources.
What Changed
Trim desktop, CLI, mobile and relay tests that repeat projections, mocked forwarding, constructor wiring or private bookkeeping. Remove dead driver imports, timing entries and flaky-test allowances. Narrow the multi-client reliability note while preserving all historical receipts.
Preserve the schema generator embedded in a trimmed test as an explicit tsx tool. Its SQL export bytes, reader, output path, serialization and opt-in behavior remain unchanged.
To regenerate the schema from an installed checkout, first run
pnpm --dir cloud --filter @orca-cloud/postgres-schema buildfrom the repository root, then runUPDATE_OBJECT_STORE_SCHEMA=1 ./node_modules/.bin/tsx test/generate-object-store-schema.tsfromcloud/apps/relay-edge. The direct tool needs the PostgreSQL schema package’s built exports; Vitest resolves those imports to source.Why
Reduce test maintenance and noise. The removed checks deliberately lose coverage of those details, including a standalone audit-event count floor. Retained tests exercise durable state, ownership, rollback, encryption, real WebSockets and identity boundaries.
Linked Issue
Maintainer-requested test-suite maintenance; no linked issue.
Visual Proof
N/A — no product UI or interaction changes.
Testing
pnpm check:changed --base=4fabde28b15f316533b0b2fa2f03b9954a3a9b8c --maxWorkers=2passed. Independent final combined source/metadata review accepted this exact tree.Risk
Level: Medium. Intentionally reduced regression coverage could let changes to removed behavior go unnoticed. Revert this commit if a deleted boundary proves necessary. Product behavior and dependencies are unchanged; the schema-generator extraction is the principal executable tooling change.
Review
Full-source and bounded-owner review, followed by independent source, consumer and metadata acceptance. PR review restored the real canonical database-to-generated DDL consistency check and removed unused imports and pass-through filesystem spy wrappers. Current upstream changes and prior merged test-removal driver edits preserved. The selected CLI file changed upstream; fresh review confirmed its new annotation assertion duplicates stronger parent-environment tests. Those upstream tests and three other affected CLI suites ran successfully.
Agent skill upstream boundary
Notes
Cross-platform, remote, mobile and folder-workspace impacts considered through retained boundaries and unchanged product behavior. One combined batch; comprehensive auditing continues.
Checklist