Repository navigation
Conversation
added 2 commits
October 16, 2026 04:01
…is, document serve.json caveats
Contributor
Author
|
Lead review: approved at 0f92d8b. All four review items are addressed: /health returns minimal identity to unauthenticated callers when auth is on, the fenced-SQL synthesis has tests, the discovery-file caveats are documented, and the build.rs overlap with #84 is deferred to a rebase. CI 16/16 green. Merge after #82–#86, rebasing onto #84 first. |
…-embed-model and Shivvr
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.
Summary
Implements items
a,b,c,d1,d2,e, andffor hertz ↔ Lume OTLP integration and document/logbook querying, plus updating stale semantic-search warning/error messages:/healthidentity):GET /healthandHEAD /healthreturn200. When no authentication is configured, or when a valid HTTP/Nuts/OTLP bearer is supplied,GET /healthreturns{"service":"lume","version":"<CARGO_PKG_VERSION + commit>","otlp":<bool>,"auth":<bool>}. When authentication is required (--http-token-file,--nuts-auth, or--otlp-token-file) and the request has no valid bearer,GET /healthreturns only{"service":"lume","auth":true}without leaking version or OTLP details (HEAD /healthremains200).serve.jsondiscovery file):lume serveandlume ti ingest --servewriteserve.jsonatomically (0600on Unix) on bind with{service, url, port, pid, version, otlp, token_file, started}(never the token string), defaulting to~/.lume/serve.jsonwith--discovery-file <path>and--no-discovery-file, and remove it on clean shutdown whenpidmatches. Documents multi-instance and WindowsCtrl-Cstale-file edge cases (--help,README.md,REFERENCE.md,CHANGELOG.md).otlpEnabled(bool, defaultfalse,"Accept radio and agent logs from hertz (OTLP)") toplugins/signalk-lume-ti. When enabled, creates<plugin-config-data>/otlp.token(32 random bytes hex, mode0600) if missing, passes--otlp --otlp-token-file <path> --discovery-file <path>tolume, exposes OTLP receiver status and token file path (never contents) in/api/statusand the web UI, and ignores empty"***"secret placeholders on config save.AnyValueunwrapping):parse_logs_jsonunwrapsstringValue,intValue,doubleValue,boolValue,arrayValue,kvlistValue, andbytesValuerecursively sodocs.bodystores plain JSON values (e.g.,{"body":"...","channel":"WX3","freq_mhz":162.475}). Note: only newly ingested OTLP log rows are unwrapped; existing rows in previously built stores retain their original shape.json_strandjson_numSQL functions): Addsjson_str(expr, 'key')(returningTextorNull) andjson_num(expr, 'key')(returningFloatorNull, parsing numeric strings when needed) inWHERE,SELECT,GROUP BY, andORDER BYacrossti-sqlandlume sql.docs+CHANGELOG.md):ti_schema(whendocsis non-empty) includesdocument_titles(title,count,min_ts,max_ts) and a compactdocument_guidenote explaining how to querydocsbytitle = '<title>'(ORDER BY ts_start DESC) and extract JSON fields withjson_str/json_numinstead of exact-spellingLIKEwhen transcripts may contain ASR/Whisper spelling errors.src/agent.rsandsrc/chat_sql.rsprompts include a compact note to checkti_schemafordocstitles (radio.weather,radio.transcript,logbook, etc.) when telemetry series have no match, andchat_sql.rsrendersdocsrows (ts_start,title,source,body) cleanly alongside telemetry series results.chat_sql.rshardening:ti_schema/ti_querytool args tolerate LLM hallucinated"store"strings (falling back to the bound store when the path does not exist) and coerce stringified"width_seconds"(e.g."300").SELECT/WITHquery inside a```sqlfenced block without emitting a structuredtool_callsentry (needed byqwen2.5:7bduring the acceptance run when it emits SQL in a fenced```sqlblock),synthesize_unexecuted_sql_tool_callsynthesizes at most oneti_query/lume_sqlcall per turn for the first unexecuted SQL block, skips already-executed SQL, and returnsNonewhen a final answer merely quotes already-executed SQL so the loop terminates cleanly (covered by unit testfenced_sql_synthesis_runs_at_most_once_and_skips_already_executed_sql).src/search.rs): Replaces the stale"no semantic session — index with -s"text in bothHybridStricterror and fallback warning with"Semantic search unavailable for this index (no vectors — reindex with --embed-model embeddinggemma-2, Shivvr at --shivvr-url, default http://localhost:8085)"(keeping"; falling back to lexical BM25."on the warning) and updates unit tests andtests/search_golden/*.stdout.Verification
cargo fmt --check(TI crates) &rustfmt --check --edition 2021(touched files +build.rs): exit0CARGO_INCREMENTAL=0 cargo clippy --locked -p ti-contracts -p ti-core -p ti-store -p ti-ingest -p ti-sql -p ti-sync -p ti-bench -p ti-geo -p lume --features lume/ti --all-targets -- -D warnings: exit0CARGO_INCREMENTAL=0 cargo test --locked --features ti: exit0cd plugins/signalk-lume-ti && node --check index.js lib/supervisor.js public/app.js test/otlp.test.js && npm test: exit0(99/99 pass)lume serve --ti-store <tmp> --otlp+ hertz OTLP logs +lume agent --ti-store <tmp> --ollama-model qwen2.5:7b "What was the temperature in New Braunfels on the last NOAA weather broadcast?"): exit0(discoversradio.weatherviati_schema, runsSELECT title, body, ts_start FROM docs WHERE title = 'radio.weather' ORDER BY ts_start DESC LIMIT 1, and answers89 degreesfrom the newest broadcast despite Whisper's"Newbrand Fulls"spelling).