You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to the merged context-guru plugin (#660), addressing the
non-blocking review comments from @mrsabath and @huang195.
Plugin (authlib/plugins/contextguru):
- OnRequest now skips compaction when there is no session identity
instead of falling back to an empty ("") engine-store key, which
would bleed per-session compaction state across unrelated callers.
- Configure fails loud when exactly one of model.base_url / model.model
is set (previously it silently degraded to deterministic — a typo'd
or empty ${VAR} expansion would disable the cheap model with no error).
- Add unit tests for the sentinel-header recursion guard (the one
safety-critical branch) and the no-session skip.
Build footprint:
- Make context-guru opt-IN (//go:build include_plugin_contextguru)
rather than opt-out. Its embedded engine pulls a large transitive set
(bifrost/core, tiktoken-go, tree-sitter grammars, starlark), so the
default authbridge-proxy/-envoy binaries stay lean (~16 MB smaller)
and only pay for it when built with -tags include_plugin_contextguru.
Documented in authbridge/CLAUDE.md as the deliberate exception to the
exclude_plugin_* convention.
Demo (demos/context-guru):
- Remove the hardcoded internal IBM VPC endpoint from run.sh and
agent.yaml; require CG_MODEL_BASE (fail-loud like CG_MODEL_KEY) and
wire it into the deployment via kubectl set env, so no real endpoint
lands in the repo. agent.yaml ships a neutral placeholder.
- Harden the drive() poll loop: break on terminal pod phases
(Failed/Unknown) with a readable error + describe/logs instead of
piping crashed-pod logs into json.loads.
- Add modest resources requests/limits to both demo containers so the
manifest doubles as a usable template.
- run.sh builds with -tags include_plugin_contextguru for the opt-in
plugin.
Supply-chain / hardening:
- Digest-pin the envoy:v1.37.1 builder stage in the envoy Dockerfile
(parity with the other stages).
- Digest-pin alpine:3.20 in run.sh's generated demo Dockerfile.
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Osher-Elhadad <Osher.Elhadad@ibm.com>
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
while [ "$(kubectl -n "$NS" get pod cgdrive -o jsonpath='{.status.phase}')"="Running" ] || \
81
-
[ "$(kubectl -n "$NS" get pod cgdrive -o jsonpath='{.status.phase}')"="Pending" ];do sleep 5;done
86
+
# Wait for the driver pod to finish. Break explicitly on terminal failure so a
87
+
# crashed/unschedulable pod gives a readable error instead of piping non-JSON
88
+
# logs into json.loads below.
89
+
while:;do
90
+
phase=$(kubectl -n "$NS" get pod cgdrive -o jsonpath='{.status.phase}'2>/dev/null ||echo Unknown)
91
+
case"$phase"in
92
+
Succeeded) break ;;
93
+
Running|Pending) sleep 5 ;;
94
+
*) echo"!! cgdrive pod ended in phase=$phase — the audit did not complete:"
95
+
kubectl -n "$NS" describe pod cgdrive | tail -n 25
96
+
kubectl -n "$NS" logs cgdrive 2>/dev/null ||true
97
+
exit 1 ;;
98
+
esac
99
+
done
82
100
echo"--- agent answer ($mode) ---"
83
101
kubectl -n "$NS" logs cgdrive | python3 -c 'import sys,json;b=sys.stdin.read().split("EXIT=")[0].strip();d=json.loads(b);r=d.get("result",{});m=(r.get("status")or{}).get("message")or{};p=m.get("parts") or (r.get("artifacts") or [{}])[0].get("parts",[]);print(" ".join(x.get("text","") for x in p)[:600])'
0 commit comments