17 Commits
Author SHA1 Message Date
huangyuan 508132adba perf(test): reuse knowledge computations and expand skill live evaluation
Share content-addressed parsing and embedding caches across isolated test runs, fingerprint relevant dependencies and model assets, and remove implicit UI warm-up. Add realistic two-round Skill delivery evaluation and cache regressions.
2026-10-23 18:50:49 +08:00
hy 79d1b30a6c Refactor tests and update document references
- Updated legacy document references in various test files to reflect new document names and paths.
- Modified user input prompts in tests to align with the new document content and context.
- Adjusted assertions in tests to ensure they check for the correct content based on the updated documents.
- Added new test fixtures and removed outdated ones to maintain test integrity.
- Ensured all changes maintain the functionality of the tests while improving clarity and relevance.
2026-10-20 15:11:36 +08:00
Yoan Huang 2f154a6197 fix(test): support Windows backend release gates 2026-10-15 13:52:34 +08:00
hy 403848569f Refactor knowledge test plans and unit tests for workspace indexing
- Updated knowledge test plans to clarify the cancellation behavior of workspace indexing and its interaction with the backend.
- Revised assertions in the `workspace-index-cancel-contract` test to ensure completed entries are preserved and unfinished entries are reverted correctly.
- Enhanced the `prepare-workspaces-sequentially` test to validate that subsequent addresses do not start after the first is cancelled.
- Removed obsolete `cnipa-http.host.test.ts` and `electronBareNavigateHost.mjs` files as they are no longer needed.
- Added new assertions in the `workspace-index-job-progress.test.ts` to verify the handling of completed and unfinished job states.
- Improved the `workspace-index-worker-contract.test.ts` to ensure proper cancellation behavior during embedding processes.
- Updated E2E tests for right panel layout and tab interactions to include resizing functionality.
2026-10-14 18:01:13 +08:00
hy bd142b45d7 feat(tests): enhance DOCX overview assertions and add visual host for DOCX processing
- Introduced `assertEmptyDocxOverview` and `assertDocxReviewOverview` functions to validate the state of DOCX overviews in end-to-end tests.
- Updated existing tests to include assertions for empty and reviewed DOCX overviews.
- Added `docxVisualHost.ts` and `docxVisualRunner.ts` to facilitate the processing and analysis of DOCX files, capturing visual elements and their properties.
- Enhanced the workspace file explorer tests to include new file creation and deletion scenarios, ensuring proper handling of various file types.
- Improved browser lifecycle tests to manage background responses and ensure proper cleanup.
- Refactored scheduled task tests to streamline partner deletion and task management workflows.
2026-10-12 12:11:41 +08:00
hy 3bb3875eb1 feat(tests): enhance AI service tests for knowledge independence and embedding model handling
- Added tests for AI service to ensure it operates independently of knowledge configuration, including scenarios with missing or corrupt embedding models.
- Updated existing tests to prepare embedding models before execution to ensure consistent test environments.
- Introduced new utility functions for managing embedding models in test setups.
- Improved error handling in knowledge retrieval tests to verify behavior when embedding models are unavailable.
- Refactored test harness to streamline embedding model preparation and ensure proper initialization before running tests.
2026-10-09 10:49:26 +08:00
Cursor AgentandYoan 735c37def1 fix(windows): accept ORT N-1 thread delta and expose embedding runtime PID
Windows OS thread counts after creating an ORT session are intraOp-1 because
the calling thread is part of the pool. Foundation and settings E2E asserts
now use that floor while still requiring the slow/fast delta gap to match
the intraOp gap.

E2E no longer depends on Win32 CommandLine containing ncurator-emb-N.
EmbeddingRuntimeClient records the utility process PID after spawn, and
getEmbeddingStatus returns that PID plus intraOp for process discovery.

Co-authored-by: Yoan <Yoan98@users.noreply.github.com>
2026-09-20 11:11:44 +00:00
hy c684102c16 feat: enhance workspace index cancellation handling and UI feedback
- Updated the cancellation logic for workspace index preparation to ensure that unfinished tasks are properly tracked and reported.
- Modified the confirmation dialog to clarify that unfinished tasks will not continue indexing, while completed tasks will be retained.
- Improved the handling of job statuses to reflect the correct state after cancellation, including distinguishing between 'cancelled', 'succeeded', and 'failed' statuses.
- Added new tests to verify the behavior of cancellation after completion and ensure that the UI reflects the correct messages and states.
- Removed deprecated utility functions related to index cancellation previews to streamline the codebase.
2026-09-20 16:53:23 +08:00
hy 5225a9c100 feat: implement workspace index cancellation functionality
- Add utility functions for handling file and web index cancellation previews.
- Update selectors to include new buttons for index cancellation confirmation.
- Modify the workspace preparation logic to support cancellation and continuation of indexing jobs.
- Enhance types to accommodate new cancellation states and requests.
- Create tests to validate the cancellation behavior for both file and web indexing processes.
- Implement end-to-end tests to ensure UI reflects cancellation states and progress restoration.
2026-09-20 16:14:03 +08:00
hy 700c9c5022 feat: enhance workspace index speed functionality and testing
- Updated settings-test documentation to reflect changes in workspace index speed handling.
- Refactored index.ts to remove redundant error handling during embedding service initialization.
- Added checks in ipc handlers to prevent speed changes while an index job is running.
- Modified EmbeddingRuntimeClient to use a more descriptive process title for embedding runtime.
- Updated KnowledgeIndexSpeedControl component to improve UI responsiveness and state management.
- Created new tests for measuring index speed thread behavior during embedding processes.
- Implemented e2e tests for workspace index speed changes and ensured proper thread management.
- Removed outdated code and improved assertions in existing tests for clarity and accuracy.
2026-09-20 15:31:19 +08:00
hy 4f08aca775 feat(settings): enhance index speed control UI and update related tests 2026-09-20 14:51:58 +08:00
hy 950e066418 feat(thread-budget): implement thread budget management and measurement for embedding sessions 2026-09-20 14:12:14 +08:00
hy 7bbbebaf7e feat(settings): enhance workspace management and indexing
- Updated `settings-test.md` to include new test cases for sequential workspace address preparation and indexing.
- Modified `workbench-test.md` to clarify restrictions on direct calls to workspace preparation methods in E2E tests.
- Revised `test.md` to establish stricter rules for backend case testing, prohibiting the use of mocks and requiring production implementations.
- Refactored IPC handlers to improve job handling and indexing speed application.
- Enhanced `EmbeddingService` to apply indexing speed settings directly.
- Added new tests for sequential workspace preparation and indexing to ensure proper job execution order.
- Introduced utility functions for adding and removing workspace directories through the settings UI in E2E tests.
2026-09-20 13:41:25 +08:00
hy b2b7910dec refactor: streamline embedding runtime configuration and testing
- Removed the 'Not' field from test plan validation to simplify requirements.
- Updated the test architecture validation script to reflect changes in test plan fields.
- Introduced new functions for handling embedding runtime environment variables and session options.
- Refactored embedding runtime process to utilize new environment parsing logic.
- Enhanced unit tests to validate the correct mapping of thread budgets and session options for different performance tiers.
- Ensured that runtime environment variables are correctly set and parsed, maintaining consistency with budget configurations.
2026-09-20 12:58:08 +08:00
hy 4fab66e1ea refactor: update knowledge test plans and related documentation
- Enhanced `knowledge-test.md` to clarify the scope and objectives of the knowledge base testing, including the introduction of `foundation` and `optimization` categories.
- Updated references in `AGENTS.md` to reflect the changes in knowledge testing documentation.
- Improved test case structure in `index-speed-thread-budget.test.ts`, `kb-indexing-blocks-search.test.ts`, and `prepare-workspaces-sequentially.test.ts` to utilize `runBackendCase` for better consistency.
- Adjusted assertions in various test cases to ensure accurate validation of expected outcomes during indexing operations.
- Modified `run-log-contract.ts` and `test-types.ts` to include 'knowledge' as a valid domain for test cases.
- Updated `workspace-prepare-refresh.e2e.test.ts` to validate index speed switching functionality during workspace preparation.
2026-09-20 12:49:43 +08:00
hy a5fce348b2 Add unit tests for workspace indexing and scanning functionality
- Implement tests for index speed thread budget mapping based on logical cores.
- Create tests for handling indexing errors during knowledge base searches.
- Add tests to ensure workspaces are prepared sequentially.
- Introduce tests for workspace index job storage and recovery from interrupted jobs.
- Implement tests for workspace scan functionality, ensuring proper indexing and file handling.
2026-09-20 12:49:34 +08:00
hy 5e77c7ddc6 feat(tests): add knowledge test plan and update related documentation 2026-09-20 12:31:22 +08:00