Repository navigation
Conversation
added 2 commits
October 16, 2026 19:47
Contributor
Author
|
Lead review: approved at 4ef6f56. Judging is opt-in only (--decide-url / LUME_DECIDE_URL / --decide); the discovery file alone never enables it. Discovery accepts only loopback/LAN URLs, and its token goes only to that URL. Unrelated examples are never injected (no-overlap fallback removed; BM25 floor 1.35). CI 16/16 green via throwaway PR #89 (closed). Tested end to end against real Addita fb1d519 + Ollaya + qwen3.5:4b. Stays draft; retarget to main after #87 merges. |
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 the Lume decide client for Addita / Ollaya (
POST {decide_url}/api/decide), per-store run logging (<store>/agent_runs/YYYY-MM-DD.jsonl), and BM25 few-shot SQL example injection forlume agentandlume chat.Changes
src/decide.rs:--decide-url <URL>,LUME_DECIDE_URL, or--decide(use~/.addita/serve.jsondiscovery) is given. The presence of~/.addita/serve.jsonalone never enables judging.--decidereads~/.addita/serve.json(LUME_ADDITA_DISCOVERY_FILE), Lume accepts only loopback,host.docker.internal, or LAN URLs from the file (refusing any other URL with a clear error) and sends the file'stoken_filebearer only to that validated URL.GET {decide_url}/healthorGET {decide_url}/api/versionand includes"addita": {"ref": "lume-run-<uuid>"}whenservice == "addita"(omitted for plain Ollaya).POST {decide_url}/api/decide(30s default timeout via--decide-timeout/LUME_DECIDE_TIMEOUT, no retries) with boundedstate(<= 20rows,<= 16 KB,rows_truncated,sql,sql_all,error,answer) and either inlinequestionsmatchingpresets/lume.sql_judge.jsonor"preset": "lume.sql_judge"(--decide-preset).routing_model, studentnoulscores,student_ms,teacher_ms,teacher_model,teacher_host,addita_id,source,teacher,error, anderror_codeinDecideLogBlock, and prints a one-line stderr notice (judged by cloud teacher <model>) whenteacher_hostis not loopback/LAN.good = truewhenaddita.finalhas bothrows_answer_question: trueandanswer_supported: true, or when bothnoulscores are>= --decide-threshold(0.8). Storesteacher == "pending"asjudged: "pending", good: falseand resolves lateaddita.decision.finalOTLP records from the TI store'sdocstable on subsequent runs.<store>/agent_runs/YYYY-MM-DD.jsonl(0700dir,0600file, 30-day retention pruning) and ranks recent GOOD runs (<= 90days,<= 2000lines) via Lume's in-memory BM25 index withcoord_floor = 0.0and minimum score floorEXAMPLES_MIN_BM25_SCORE = 1.35(no fallback when there is no lexical overlap or only a weak one-word match) to inject up to 3 distinct SQL examples into the system prompt.src/chat_sql.rs&src/main.rs:--decide,--decide-url,--decide-model,--decide-token-file,--decide-threshold,--decide-preset,--decide-timeout,--no-decide,--no-agent-log, and--no-examplesintolume agentandlume chat.tests/decide.rs:main(fb1d519) + Ollaya0.7.2(laya:en) + Ollama (qwen3.5:4b) responses (no fake/mock HTTP servers).docs/ADDITA.md&CHANGELOG.md:Real End-to-End Verification (
Addita fb1d519+Ollaya 0.7.2 laya:en+Ollama qwen3.5:4b)89°Fand loggedjudged: true, good: true(addita_id: "4cff966e-6e96-42ae-a87e-217c8b92736b",routing_model: "laya:en",student_ms: 7265,teacher_ms: 13350,teacher_model: "qwen3.5:4b",teacher_host: "host.docker.internal:11434"). Notably, in Run 1 the studentnoulscored0.4535/0.5208(unsure, below0.8), so Addita escalated to the local teacher (qwen3.5:4b), which answeredtrue/trueand producedfinal = good(source: "teacher")—direct evidence that teacher escalation rescues valid SQL runs where the student alone is uncertain.-v): Injected Run 1's SQL underPast questions on this store answered with working SQL (examples, adapt; don't copy blindly):, answered89°Fin one query, and loggedjudged: true, good: true(addita_id: "84bc3f6c-a02c-429c-9d58-09c53f68d631",student_ms: 105,teacher_ms: 12991).