Skip to content

Ongrid v0.7.179 — chat history integrity (4 layers) + LLM timeout unification

Choose a tag to compare

@singchia singchia released this 06 Jun 01:53
· 565 commits to main since this release
2bf1276

Highlights

Eight changes since v0.7.176. Five of them harden the chat-completion path against eino ToolsNode's parallel persistence drops + the dirty histories DeepSeek-strict providers refuse to replay. One unifies LLM timeouts across every call site. Two clean up the curl-pipe edge uninstaller. And the roadmap doc lands open-core.

Chat persistence + replay (4 fixes)

  • #50AI 助查 · PromQL returned HTTP 502 immediately on every translate. queryTranslateTimeout was hard-coded at 6 s, tuned for a Haiku-class default; DeepSeek v4-flash averages 5–8 s for short JSON output and tripped the wall. Bump to 20 s; also surface plain-text response bodies into ApiError.message so the UI no longer drops the actionable detail.
  • #51 — every LLM call site had its own timeout (6 / 20 / 30 / 60 s), all tuned for Haiku. Unified to 120 s across pkg/llm/client.go::defaultTimeout, query_translate.go::queryTranslateTimeout, alert/investigator::SummarizerTimeout, and aiops/investigator::defaultLLMTimeout. DB / tool / probe / monitor-sync timeouts deliberately untouched.
  • #52 — on .91 session b528bfb0-..., an assistant emitted 4 parallel host_bash tool_calls but only 2 of 4 role=tool rows landed in chat_messages. Replay then sent an envelope DeepSeek rejected with 400 insufficient tool messages following tool_calls. The error classifier ALSO mis-categorised this as "余额不足/限流" because of a bare insufficient substring match — operator chased provider config while the actual bug was history corruption. Two fixes: (a) replay precheck — before emitting an assistant with hydrated ToolCalls, every call_id must have a hoistable role=tool row, or the whole turn is dropped; (b) classifier tightened (insufficient_quota, insufficient balance, credit balance is too low, etc.) + a distinct case for the protocol error that tells the user truthfully: this session's history is poisoned, open a new one.
  • #53 — Layer 2 of the integrity fix: PersistenceHandler now tracks the per-assistant tool batch, marks each tool_call_id seen in persistToolEnd, and at the next ChatModel.OnStart (and on chatruntime defer for browser-close cases) writes a stub role=tool row for every missing call_id. Stub body honestly says {"error":"tool response was not persisted ...","autoheal":true}. Adds ongrid_chat_tool_response_loss_total{outcome,tool_name} counter + info-level traces on every callback firing so the underlying eino bug becomes observable instead of being discoverable only via user-reported HTTP 400. Tests cover the 4-of-4 / 2-of-4 / sequential-batches / no-batch / finalize-idempotent cases.

Operations

  • #46 / #47 — edge curl-pipe uninstaller (https://<server>/uninstall.sh) printed [OK] while every agent process kept running. Two issues: (1) only node_exporter + process_exporter got rm -f'd, leaving promtail + plugin work dir orphaned; (2) the if systemctl list-unit-files | grep -q ... precondition silently skipped on hosts where formatting confused the anchored grep. Fix: wholesale rm -rf of /usr/local/lib/ongrid-edge + /var/lib/ongrid-edge; stop units unconditionally + pkill -9 -f /usr/local/{bin,lib}/ongrid-edge as a belt-and-suspenders.

Docs

  • #48 / #49ROADMAP.md + ROADMAP.zh-CN.md land at the open-core root with nested-bullet structure, A–L sections, status legend ◯ □ ◐ ✓. Sections A (root-cause RCA), B–G (value chain + ops), H (sandbox), I (security/compliance), J (ecosystem), K (SOP), L (periodic agent jobs).

Upgrade

wget https://github.com/ongridio/ongrid/releases/download/v0.7.179/ongrid-v0.7.179-linux-amd64.tar.xz
tar -xJf ongrid-v0.7.179-linux-amd64.tar.xz
cd ongrid-v0.7.179-linux-amd64
bash upgrade.sh

In-place; no schema migration. Edge agents pick up #46/#47 on their next bundle-upgrade heartbeat (ADR-024).

Checksums

59f7cb572bb514f3373de5b4dfb8af433610df4044247391a4f6964047e16052  ongrid-v0.7.179-linux-amd64.tar.xz