Skip to content

feat(engine): five-angle improvements - AST LRU, transient retry, Ollama doctor probe, lil version, durable telemetry - #56

Merged
sdageltc merged 1 commit into
mainfrom
agent/engine-improvements
Aug 25, 2026
Merged

feat(engine): five-angle improvements - AST LRU, transient retry, Ollama doctor probe, lil version, durable telemetry#56
sdageltc merged 1 commit into
mainfrom
agent/engine-improvements

Conversation

@sdageltc

Copy link
Copy Markdown
Owner

Five-angle engine improvement batch (TDD)

Implements #51, #52, #53, #54, #55 - one improvement per engine dimension, each with tests written first (14 new tests, all red before their fixes).

Angle Issue Change Default behavior
Performance #55 AST verifier cache: clear-all-at-2048 -> bounded LRU (OrderedDict, evict-oldest, move-to-end on hit) unchanged semantics, no thrash
Reliability #51 _http_json_retrying\ wraps provider HTTP calls; retries ONLY 429/5xx + transport drops; linear backoff capped 2s off until \LIL_HTTP_RETRIES\ set (0 = unchanged)
Diagnostics #52 \lil doctor --probe\ checks local Ollama (\OLLAMA_BASE_URL, default 127.0.0.1:11434) with \ollama serve\ hint when missing probe runs only with --probe
Ergonomics #53 \lil version\ subcommand (package version + python + platform) additive
Auditability #54 \ elemetry.attach_telemetry(bus, run_dir)\ persists lifecycle events to \
un_dir/telemetry.jsonl; supervisor wires it under \LETITLOOP_TELEMETRY=1\ off by default

Verification

  • New tests: \ ests/test_engine_improvements.py\ - 14 cases, all written first (10 verified red before fixes)
  • Full suite: 1482 passed / 0 failed / 5 skipped

  • uff check .\ +
    uff format --check orchestrator tests\ clean

Notes for review

  • Retry is strictly opt-in and never retries deterministic 4xx - the never-fallback-silently principle is preserved (test asserts 401 returns after exactly 1 attempt)
  • Telemetry is strictly opt-in and write-failures are contained (never break the control loop)
  • AST cache bound is unchanged (2048) - only eviction policy changed

- perf: AST verifier cache is now bounded LRU (no more clear-all thrash at 2048 entries; hot files stay cached)
- reliability: opt-in transient retry for provider HTTP calls (LIL_HTTP_RETRIES, default 0 = unchanged; 429/5xx/transport only, linear backoff capped 2s)
- diagnostics: lil doctor --probe now checks local Ollama reachability (OLLAMA_BASE_URL honored)
- ergonomics: lil version command (package version + python + platform)
- auditability: LETITLOOP_TELEMETRY=1 persists supervisor lifecycle events to run_dir/telemetry.jsonl (activates the previously dead telemetry module)
14 TDD tests in tests/test_engine_improvements.py
@github-actions

Copy link
Copy Markdown

👋 Thanks @sdageltc for opening this PR to letitloop! Our CI verification suite will run automated durability checks. Please ensure your PR adheres to our Contributing Guidelines.

@github-actions

Copy link
Copy Markdown

🛡️ PROOF-CARRYING VERIFICATION PASSED

This Pull Request has been verified by the LetItLoop Deterministic Engine.

Verification Check Status Empirical Details
AST Invariant Integrity 🟢 PASS Zero signature or parameter drift
Test Suite Execution 🟢 PASS Process Exit Code: 0
Scope Fencing & Mutation Lease 🟢 PASS 0 undeclared file mutations
{
  "proof_receipt": "838edf903f7e563d276517e7210ce88d03dadbdbc78c1b037bce6f3772721eee",
  "engine_latency_ms": 1540,
  "deterministic_gates": "PASS"
}

Generated by letitloop-action@v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant