Skip to content

codeintel: Auto-inference sandbox API

Administrator requested to merge ef/playground into main

Created by: efritz

This PR adds an initial internal/codeintel/autoindexing/internal/inference package that encodes the rules of our autoindexing inference in a Lua sandbox. This package is currently unused by any entrypoint (outside of unit tests) and subsequent efforts (#33044 (closed) and #33045 (closed)) will replace this code with the original.

Closes #33041 (closed) and #33040.

This PR does not close discussion on API design. This PR has roughed-out what seems to be a very usable interface for us to be able to extend. We're still waiting on customer feedback (see #33047) to help us ensure we're solving the right expressibility problem, but it doesn't seem to be a blocker for moving the PoC forward (but may be a blocker before moving onto or past #33046).

Reviewer hints:

Please review by-commit, paying special attention to the following:

  • 766e2547 adds the entire service implementation
  • e1894e18 reimplements the logic of lib/codeintel/autoindex in Lua
  • 7eac9d00 adds unit tests

Test plan

This PR adds significantly good coverage and shows that we have one-to-one behavior with our existing indexers (test cases are taken verbatim). Additional testing will be done before this code is hooked up to a production (or even development application) entrypoint.

Merge request reports

Loading