Skip to content

feat(discovery) Add fast discovery#615

Open
petrieh wants to merge 1 commit into
robotcodedev:mainfrom
petrieh:fast_discovery_upstream_refactored
Open

feat(discovery) Add fast discovery#615
petrieh wants to merge 1 commit into
robotcodedev:mainfrom
petrieh:fast_discovery_upstream_refactored

Conversation

@petrieh

@petrieh petrieh commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Refactor / internal change
  • Documentation
  • Build / CI / tooling
  • Breaking change

Checklist

  • I have read the Contribution Guide and the AI and Automated Contribution Policy.
  • The change is focused on a single concern (no unrelated refactors or formatting noise).
  • Tests for the change have been added or updated, and hatch run test:test passes 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:all passes (also enforced by the pre-commit hooks if installed) — or N/A for documentation-only / non-code
    changes
    .
  • Documentation has been updated where relevant (user docs, code comments, README).
  • Generated files (if any) were regenerated with the documented script, not edited by hand.
  • Commits follow Conventional Commits and are cryptographically signed (git commi t -S, GPG/SSH).

AI / tooling disclosure

  • No AI/automation was used beyond ordinary editor autocomplete.
  • AI/automation was used; tool(s): Devin
  • I reviewed the generated output manually, understand it, and verified it locally.

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.

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.
@petrieh petrieh force-pushed the fast_discovery_upstream_refactored branch from ffaa106 to 027625b Compare June 11, 2026 15:47
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.

1 participant