Commit graph

24 commits

Author SHA1 Message Date
trvon
a3997495e9
test(plugins): use host library names in the ORT resolution tests
The resolution tests used ELF names (libonnxruntime.so.1) everywhere,
but the policy only treats .dylib files as runtime libraries on macOS,
so the macOS test lane would have failed. Fixtures now use the host's
names (libonnxruntime.1.dylib / libonnxruntime.1.23.0.dylib on macOS)
and build paths with fs::path; the test is not registered on Windows,
where resolution is the DLL search for onnxruntime.dll.

grim (Linux, Debug): 7/7 cases, 34 assertions pass.

Signed-off-by: trvon <me@trevon.dev>
2026-10-01 23:55:40 -06:00
trvon
fe07469620
feat(plugins): prefer a system ONNX Runtime, fall back to a bundled copy
The ONNX plugin dlopen()ed ONNX Runtime from directories next to the
plugin first and only then from a few system prefixes, with no notion of
which copy it got or why, and the shipped packages contained no copy at
all, so on most hosts the plugin could only report "runtime not found".

The runtime resolution moves into plugins/ort_runtime/, built as a
hidden-visibility static library both ONNX-using plugins link (their
export maps still expose only the plugin C ABI). The policy is split out
as pure code (ort_runtime_resolution.{h,cpp}) so it is testable without a
runtime. Candidates are tried in this order and the first compatible one
wins:

  1. YAMS_ONNX_RUNTIME_LIB / YAMS_ONNX_RUNTIME_DIR (existing pin, kept),
     then the plugin config key runtime_library ([plugins.onnx] /
     [plugins.glint], a file or directory)
  2. a system copy: the loader search by soname, then the usual library
     directories (multiarch dir, /usr/lib64, /usr/lib, /usr/local/lib,
     /opt/onnxruntime, Homebrew) for versioned names such as Debian's
     libonnxruntime.so.1.23
  3. the private copy in <libdir>/yams/onnxruntime/
  4. legacy locations next to the plugin (build trees)

A candidate is accepted only if it exports OrtGetApiBase, GetApi() returns
an API table for the ORT_API_VERSION the plugins are compiled against, and
it meets the 1.23 minimum; otherwise it is skipped with a reason. A soname
lookup that returns a copy another plugin already loaded from the bundled
directory is reported as that copy. The choice ("Using system|bundled ONNX
Runtime <ver> from <path> (<why>)") and every skipped candidate go to the
plugin log and, through the libyams_onnx_resource host sink (new
OnnxConcurrencyRegistry::emitHostLog), to the daemon log; plugin health
reports runtime_source. With no compatible copy the plugin reports "ONNX
Runtime unavailable: ..." instead of failing.

Tests: tests/unit/plugins/ort_runtime_resolution_catch2_test.cpp covers
the order, the override pin, configured directories, system-over-bundled
preference, skipping an incompatible system copy, the not-found result
and the already-loaded classification.

Signed-off-by: trvon <me@trevon.dev>
2026-10-01 22:42:15 -06:00
trvon
ee51abcb1a
refactor(symbols): remove in-tree tree-sitter symbol extractor plugin and tests
Remove legacy Tree-sitter symbol extractor plugin (plugins/symbol_extractor_treesitter),
the unused plugin-symbols build option, and associated tests and benchmark targets:
- Drop plugins/symbol_extractor_treesitter/ (grammar_loader, symbol_extractor, plugin_api).
- Remove plugin-symbols Meson option and packaging references.
- Remove dedicated symbol plugin tests and benchmark targets (symbol_extraction_bench,
  symbol_extractor_all_langs_catch2_test, symbol_extractor_edge_cases_catch2_test,
  symbol_extractor_solidity_catch2_test, symbol_extractor_query_test,
  symbol_extractor_validation_test).
- Clean up dead symbol extraction plugin helper and test from hnsw_entity_search_bench.
- Prune obsolete portability allowlist entries.

Signed-off-by: trvon <me@trevon.dev>
2026-09-22 07:37:30 -06:00
trvon
5066fc0893
test: isolate process environment 2026-08-04 21:31:39 -04:00
trvon
c1e5ec0da6
fix(docs): Replace
missing paths where feasible, fail fast where support is
   not real, and sync docs with live behavior.

   - add vector/metadata and buffer extraction coverage
   - narrow storage and s3/plugin loader contracts
   - refresh pipeline, build, and test docs
2026-06-27 16:28:08 -04:00
trvon
8889ca11f0
fix(audit): remove no-op storage and metadata paths found in audit, use file-type detection for buffer handlers without, breaking generic multimedia fallback, and sync plugin and operator docs with shipped behavior 2026-06-27 10:50:59 -04:00
trvon
c25a4ad94d
security: expanding opengrep suite and addressing issues 2026-05-02 21:33:22 -04:00
trvon
8f06bd615f
feat: security fixes for plugin install and adding additional UTF-8 string sanitization 2026-02-28 10:17:03 -05:00
trvon
099bbef70d
feat: large update. Documentation update, config and plugin hardning and improvements related to loading trust. Exposed trust state in the doctor command with hints on improvements. Bug fixes and test improvements to reduce flakiness and TSAN issues 2026-02-26 11:21:29 -05:00
trvon
c49f0ba759
feat: optimizations based on profile runs in hashing and work coordinator. test updates and correctness fixes 2026-02-24 21:06:43 -05:00
trvon
66361a1efd
test fixes 2026-01-08 23:05:57 -05:00
trevon
a88e01c11e
improved graph extraction, cli interface and tools 2025-12-29 21:10:18 -05:00
trvon
aacd7af41f
running linter 2025-12-13 16:27:07 -05:00
trevon
e47142343e
updating tests / completing catch2 migration. plugin trust fixes 2025-12-12 10:58:48 -05:00
trvon
d03f94834b
linter run from windows work 2025-12-09 21:11:09 -05:00
trevon
606712b5f1
test improvements and stablizations 2025-12-06 18:27:25 -05:00
trevon
798b736156
checkpoint. working on plugin system external (sdk supported plugin) loading, updated graph implementation for binary extraction via ghidra plugin 2025-12-04 21:12:40 -05:00
trevon
1de9e31a58
cleaning up tests and exposing windows packaging and builds in ci 2025-11-27 10:54:09 -05:00
trvon
70e88af608
running linter 2025-11-25 13:10:29 -05:00
trevon
244cf02822
windows build stable on dev machine 2025-11-23 23:22:30 -05:00
trvon
166d8c520d
staging v0.7.7 2025-11-01 16:02:12 -04:00
trvon
d19a5d7b64
bug fixes and optimizations for v0.7.7. Finalizing tests, benchmarks and bug fixes prior to release 2025-10-24 12:49:00 -04:00
trvon
8d23211af2
improvements for ci, setup.sh and updates to new symbol extraction plugin 2025-10-21 19:38:45 -04:00
trvon
b6ca31dfb0
adding symbol extraction work, simplying build with ./setup.sh, updated plugin tests with new meson shard and other goodies 2025-10-20 16:11:31 -04:00