Repository navigation
Description
Component
Code index
Use case
The code index reads .lua files as plain text today: they are chunked and searchable, but code.symbol, code.callers and code.outline know nothing in them (.lua is in _CODE_TEXT_EXTENSIONS in server/code/domain/extract/lang_text.py). A repository whose API or scripts live in Lua files gets no structure from them.
Describe the solution you'd like
Goal. A tree-less Lua lane (no new tree-sitter dependency) that gives those files symbols and edges, following docs/development/adding-language-support.md.
Files to start from
docs/development/adding-language-support.md: the whole procedure, including the extractor-stamp rule. A lane outside the stamp re-chunks nothing on existing deployments.lang_proto.pyfor the scanner shape andlane_units.pyfor chunks and call binding.server/code/domain/extract/lang_detect.py(LANG_BY_EXTENSION),server/code/app/index/ingest_parse.py(_PARSERS) andserver/code/domain/extract/lang_text.py(remove the extension from the text list).
Acceptance criteria
server/code/domain/extract/lang_lua.pywithparse_lua(path, source) -> ParsedFile:function a.b(),function a:b(),local function f()andM.f = function()asfunctionsymbols, qualified by the module path.- Reference sites for calls
f(...)anda.b(...)bound bylane_units.bind_sites, andrequire("a.b")as an include, bound withlane_units.bind_sites; built-in and unknown names bind to nothing. - The module is listed in
NON_EXTRACTOR_MODULESintests/unit/test_code_extractor_stamp.py, and no stamped module changes. - Fixtures under
tests/fixtures/code_lanes/lua/(synthetic, or an excerpt under its own licence listed intests/fixtures/code_lanes/NOTICE.md), withexpected.jsonregenerated and its diff reviewed.
How to test
.venv/bin/python -m pytest tests/unit/test_code_lang_lua.py tests/unit/test_code_extractor_stamp.py tests/unit/test_code_lanes_corpus.py tests/unit/test_code_regex_cost.py
.venv/bin/python -m tests.code_lanes.corpus --write && git diff tests/fixtures/code_lanes/expected.jsonThe cost test needs a SAMPLES entry in tests/unit/lane_walks.py for the new parser, so a pathological file cannot make the lane slower than linear.
Size: M (a day or two).
Describe alternatives you've considered
A tree-sitter grammar lane gives more, but adds a dependency (a material change discussed in an issue first). The tree-less shape is what the proto, HCL and Jsonnet lanes use.
Where the need comes from
The need is mine, an AI tool helped shape the proposal
Additional context
A good first issue: one new module, its tests and fixtures, no stamped code. Read CONTRIBUTING.md first (signed-off commits), and comment here to say you are working on it.
Activity
rahulsjha commentedon Nov 15, 2026
Hi @zlareb1, I'd like to take this one too. Plan:
lang_lua.pyas a tree-less scanner in the shape oflang_proto.py, coveringfunction a.b(),function a:b(),local function f()andM.f = function(); calls andrequire(...)bound withlane_units.bind_sites; listed inNON_EXTRACTOR_MODULES; synthetic fixtures, regeneratedexpected.json, and aSAMPLESentry for the cost test. Could you assign it to me?