feat(discovery) Add fast discovery#615
Open
petrieh wants to merge 1 commit into
Open
Conversation
Add end-to-end fast discovery flow (discover fast) with pre-filter support and fallback behavior for unsupported cases. This feature is only created for VS Code and Cursor. The feature is by default disabled and can be enabled via VS Code settings. The feature is mainly tested with RF 7 and it is not guaranteed to work in older versions. Introduce incremental NDJSON discovery transport and client-side incremental tree updates to reduce payload pressure and improve responsiveness. Stabilize Test Explorer tree mapping/rendering (synthetic-root flattening, robust item lookup, safer refresh/prune behavior) to prevent collapse/churn. Add configurable discovery behavior: runEmptySuite support and fast-timeout override (robotcode.testExplorer.discovery.fastTimeoutMs) with adaptive defaults. Improve CLI/filter handling and diagnostics, including correct short-option parsing (-I vs -i) and clearer timeout/log output. Add/adjust tests and supporting updates across runner/debug/client modules to validate fast discovery behavior. Downgrade VS Code requirements. Cursor uses older VsCode base and RobotCode cannot be used with Cursor without the downgrade. If robotcode.analysis.loadWorkspaceDocuments is set to false, then analysis covers only for open files, not for all workspace files. Show full robot CLI args if robotcode.testExplorer.discovery.logCommandArgs and/or robotcode.debug.logCommandArgs is set to true. Added robotcode.debug.listenerLogTraffic settings flag. If this is set to false, then no log hooks of the RobotCode generate traffic. This is useful in the case the keywords are very verbose.
ffaa106 to
027625b
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add end-to-end fast discovery flow (discover fast) with pre-filter support and fallback behavior for unsupported cases. This feature is only created for VS Code and Cursor. The feature is by default disabled and can be enabled via VS Code settings. The feature is mainly tested with RF 7 and it is not guaranteed to work in older versions.
Introduce incremental NDJSON discovery transport and client-side incremental tree updates to reduce payload pressure and improve responsiveness.
Stabilize Test Explorer tree mapping/rendering (synthetic-root flattening, robust item lookup, safer refresh/prune behavior) to prevent collapse/churn.
Add configurable discovery behavior: runEmptySuite support and fast-timeout override (robotcode.testExplorer.discovery.fastTimeoutMs) with adaptive defaults.
Improve CLI/filter handling and diagnostics, including correct short-option parsing (-I vs -i) and clearer timeout/log output.
Add/adjust tests and supporting updates across runner/debug/client modules to validate fast discovery behavior.
Downgrade VS Code requirements. Cursor uses older VsCode base and RobotCode cannot be used with Cursor without the downgrade.
If robotcode.analysis.loadWorkspaceDocuments is set to false, then analysis covers only for open files, not for all workspace files.
Show full robot CLI args if robotcode.testExplorer.discovery.logCommandArgs and/or robotcode.debug.logCommandArgs is set to true.
Added robotcode.debug.listenerLogTraffic settings flag. If this is set to false, then no log hooks of the RobotCode generate traffic. This is useful in the case the keywords are very verbose.
Summary
Add end-to-end fast discovery flow (discover fast) with pre-filter support and fallback behavior for unsupported cases. This feature is only created for VS Code and Cursor
The feature is created because for the large test directories the RobotCode is slow with 8 - 10 minutes discovery and 8 - 10 minutes test start time of the tests.
The documentation is not updated this because the update is very focused on special case and not likely required by the larger audience
Type of change
Checklist
hatch run test:testpasses locally (RF matrix against the default Python) — or N/A for documentation-only /non-code changes. See Running Tests for faster iteration options and the full matrix.
hatch run lint:allpasses (also enforced by the pre-commit hooks if installed) — or N/A for documentation-only / non-codechanges.
git commi t -S, GPG/SSH).AI / tooling disclosure
Additional notes
The feature is by default disabled and can be enabled via VS Code settings. The feature testing is mainly focused on RF 7 while some unit tests support from RF 6.1 on. The integration testing is done entirely in WSL2 in Rocky Linux 9 container. There is no special documentation added for this as this feature is required only on very large Robot Framework test directories and therefore the expected audience of the feature is likely rather small.
As a small side note, in addition, one lock default timeout was updated to be indefinite. The actual default timeout caused real trouble in heavy load case. The lock 120s default acts likely as a deadlock guard. Here we intentionally override it only for cache-entry lazy initialization, because timeout exceptions in this path are more often false positives from long computation than true deadlocks. The change is intentionally narrow (e.lock(timeout=-1) only in get_cache) to preserve global lock-timeout behavior elsewhere.