Skip to content

feat(bob-plugin): add the bob-ultrahigh preset (replaces lossless-defer) - #973

Merged
amiddavid merged 13 commits into
mainfrom
feat/bob-lossless-defer
Nov 11, 2026
Merged

amiddavid merged 13 commits into
mainfrom
feat/bob-lossless-defer

Conversation

@vz-ibm

@vz-ibm vz-ibm commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Data dependence changes: confirmed by the owner. The default Bob preset, bob-ultrahigh, depends on stored content. A default Bob install keeps originals, summaries and held answers on the user's Mac, so the model can get cut content back. lossless-defer kept only tool names and counts (metadata). The owner confirmed this on 2026-11-11: "1 okey. this happens on ultrahigh as well afaik".

Behavior change: the Bob default becomes bob-ultrahigh. The owner decided this on 2026-11-11: "there are no bob users and bob-ultrahigh is the new default". Who: every new Bob install. Old: the default was lossless. New: the default cuts content, sends summary calls to Bob's server with the user's own key (they use the user's Bob quota), stores content on the Mac, and gives the proxy Bob's flat prices, so the dashboard's Bob dollar figures change. setup --plan now names this before the user says yes. How to turn it off: configure --preset lossless. No core Go code changes.

Summary

This PR replaces the Bob preset lossless-defer with bob-ultrahigh, as decided in #1030.

  • bob-ultrahigh is context-guru's ultrahigh preset with 4 Bob changes. A test pins that it cannot drift from ultrahigh.
  • It keeps the tool deferral from before. Deferral alone measured −17.7% input per turn on real Bob tasks.
  • Its summary parts reach Bob. Since feat(agent): send CG's own model calls on Bob's route to Bob #1074, the calls go to Bob's /inference/v1/chat/completions with the user's Apikey, and use the user's Bob quota. They still fail open on an error. The saving from them is not measured yet.

What changed

The preset (BOB_PRESETS in bob_plugin.py; the same text is proxy/testdata/bob_ultrahigh.yaml). It is ultrahigh, plus:

  1. extract_llm names no model (source: incoming only). Bob does not serve claude-haiku-4-5; Bob picks its own model.
  2. extract_llm.allow_on_caching_backend: true. Bob bills a cache rewrite at the input rate.
  3. extract_llm_sweep.warm: true (feat(sweep): the warm path, an economic gate on a held answer (#491) #720), behind its cost gate.
  4. toolfilter.keep: Bob's 15 core tools, as before.

Bob's flat prices (bob-plugin/context-guru/prices.yaml):

  • Bob's 6 tiers, with a cache read and a cache write at the input rate. Without this, the warm sweep's cost gate prices a rewrite at Claude rates (about 0.9x) and cuts nothing.
  • The ratio is measured (IBM's credits, feat: run the sweep and the LLM parts of ultrahigh on IBM Bob (bob-ultrahigh) #1030). The dollar rates are estimates, copied from deploy/service/prices.example.yaml.
  • With bob-ultrahigh, the plugin copies the file to the state folder and sets MODEL_PRICES in the launchd job. With any other preset, it removes both.
  • If the proxy does not start, configure puts back the old job, config and price file.

Why lossy parts are allowed now: test T4 passed on the real Bob IDE (2026-11-11):

  • collapse cut a 700-row file. The model called context_guru_expand in a stream.
  • Bob answered that call itself and went on with the turn. On the next request, CG's repair restored the content (8,412 tokens).
  • Bob gave the right hidden value, without reading the file again.

Other changes:

  • configure refuses lossless-defer and the other presets: "NAME is not tested on Bob".
  • doctor's deferral check now applies to bob-ultrahigh.
  • The README, the preset-picker and status skills, and docs/data-dependence.md describe the new preset.

How it was tested

  • proxy/bobultrahigh_test.go: bob-ultrahigh equals ultrahigh with exactly the 4 changes. Red first: with ultrahigh's text copied as-is, it failed.
  • bob-plugin/prices_test.go: the shipped prices.yaml loads the proxy's way, and every tier has read = write = input. Red first: without cache_read, a read priced at 0.1x.
  • proxy/bobdefer_test.go: the 7 deferral tests pass with the full pipeline. One check changed: the model now sees 3 CG tools, not 1 (context_guru_expand, context_guru_adjudicate, context_guru_tools).
  • Python: configure --preset bob-ultrahigh writes the config, the price copy (0600) and MODEL_PRICES. Leaving it removes both. A failed restart puts everything back. Setup again keeps the prices.
  • go build, go vet, gofmt: clean. go test -race on bob-plugin (with 193 Python tests), components/all, config, tooldefer, apply: OK. go test ./proxy/ (the whole package): OK.

Not tested: the sweep and extract_llm on real Bob traffic, because they cannot run there before item 4. T4 was one run, on one Mac, with collapse.

Open questions

  1. The data-dependence yes (see the top).
  2. A per-chat cap on summary calls. feat: run the sweep and the LLM parts of ultrahigh on IBM Bob (bob-ultrahigh) #1030 says "cap them per chat". No number was decided, so this PR keeps ultrahigh's values (llm_max_per_request: 8, llm_max_per_session: 0).
  3. The default. Done: the owner chose bob-ultrahigh on 2026-11-11. Still open: measure it against −17.7% per turn on one backend (feat(proxy): label each Bob reply with the IBM backend that served it #975), net of the summary calls.
  4. After a repair, the model sees the full content where it first saw a gap. In T4 it then said that its own earlier words were wrong. The answer was right.

Technical notes

  • The launchd job gets MODEL_PRICES only while the price copy exists. write_proxy_config is the one place that adds or removes it, so the job and the file cannot disagree.
  • A bad MODEL_PRICES file stops the proxy (log.Fatalf). The Go test loads the exact shipped file, and configure rolls back on a failed /healthz.

Assisted-By: Claude (Anthropic AI) [email protected]

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session fresh 1 of 2 1 of 2 79170129a980 blocking

Verdict: blocking

The Go core changes and the new lossless-defer preset are correct. I found no defect in them. The 3 findings are in the Bob plugin's Python and shell code (from #968, which is in this PR's diff). Each one can break a working install on a real user's machine.

Findings

  1. bob-plugin/context-guru/scripts/bob_plugin.py:244 — calls to 127.0.0.1 go through the user's HTTP proxy.

    • What fails: the user has HTTP_PROXY / http_proxy set, with no NO_PROXY entry for 127.0.0.1. This is common on corporate Macs. Then urllib.request.urlopen sends each local call to the corporate proxy:
      • healthy() returns False when the proxy runs. setup rolls back with start_failed.
      • The check hook tells the model on every prompt that the proxy is down. That is a false alarm.
      • The signal hook (line 1337) sends the Bob session id to the corporate proxy. That is data going off the machine.
      • status and doctor report proxy=fail. tool_defer_stats (line 1210) and last_bob_request_ms (line 1203) fail too.
    • Proof: lines 244, 1203, 1210 and 1337 all use bare urllib.request.urlopen. Python's default opener reads HTTP_PROXY and does not skip loopback by itself. A test run against a local server that answers 200: no proxy env gives True; HTTP_PROXY=http://127.0.0.1:9 gives False; adding NO_PROXY=127.0.0.1 gives True.
    • Fix: build one opener with urllib.request.build_opener(urllib.request.ProxyHandler({})). Use it for every 127.0.0.1 call. Add a test with HTTP_PROXY set.
  2. bob-plugin/context-guru/scripts/bob_route.py:49 — the rc block fails under nounset, and zsh then stops reading .zshrc.

    • What fails: the block reads "$VSCODE_RESOLVING_ENVIRONMENT" and "$__CFBundleIdentifier" with no default. A user with setopt nounset (or set -u) gets an error on that line. zsh stops sourcing .zshrc there. So BOB_GATEWAY_URL is not set, and every line after our block does not run. Tools that append to .zshrc later (conda, nvm) put their lines after our block, so they also stop running, in every terminal, with no clear cause.
    • Proof: a .zshrc with setopt nounset, then block(8891), then echo AFTER. zsh -l -i -c ... prints .zshrc:5: VSCODE_RESOLVING_ENVIRONMENT: parameter not set. It does not print AFTER, and BOB_GATEWAY_URL is unset. Interactive bash prints the error and continues.
    • Fix: use "${VSCODE_RESOLVING_ENVIRONMENT:-}" and "${__CFBundleIdentifier:-}". Change the matching perl regex in reset.sh:102 and the README text. Accept the old block form in ownership() and in reset.sh, so installed blocks can still be removed or upgraded. Add a test with nounset.
  3. bob-plugin/context-guru/scripts/reset.sh:243 — reset deletes the proxy config without checking that it is ours.

    • What fails: the user replaced bob-<port>.yaml with their own config (no marker line). reset.sh runs rm -f "$STATE_DIR/bob-$PORT.yaml" and deletes it. uninstall (bob_plugin.py:1398) deletes the same file only when it starts with CONFIG_MARKER. The two removal paths disagree, and the reset path loses a user file.
    • Proof: reset.sh:243 has no marker check. bob_plugin.py:1398: if config.exists() and config.read_text().startswith(CONFIG_MARKER): config.unlink().
    • Fix: delete only when head -n1 of the file equals the marker line. Add a test that reset keeps a config without the marker.

Non-blocking

  • components/reformat/toolfilter.go:34 still says "Only the ultrahigh preset sets auto". lossless-defer sets it too.
  • bob-plugin/context-guru/README.md:37 says the proxy runs only format, toon and cachesplit. With lossless-defer it also runs toolfilter.
  • skills/setup/SKILL.md says "for result=*_failed, show reason= and detail=". start_failed prints neither. setup_failed and binary_install_failed print no reason=.
  • skills/status/SKILL.md does not cover result=setup_incomplete (bob_plugin.py:1266).
  • bob_plugin.py:613 reuses the recorded port with no check that it is free. After a partly_removed uninstall, another program can hold that port, and setup fails with start_failed and no reason. I found this by reading the code only. I did not reproduce it.
  • bob-plugin/statusbar_test.go:18: the npm lookup skips before the CI check. A CI runner without npm skips the status bar suite in silence. The comment at line 25 says a skip in CI looks like a pass.
  • statusbar/src/model.ts:5: BOB_WINDOW = 270_000. The Go side uses BobFallbackWindow = 200_000 (internal/compactionpoint/bobcodex.go:51). The bar also ignores window_exact, so it shows a guessed window as exact. Pick one fallback.
  • statusbar/src/model.ts:151: the clock and prefix size come from the session's top-level fields, which follow the newest request of any thread. The Claude status line uses the main thread on purpose (_main_cs). If Bob sends subagent threads, the bar shows the wrong thread. I did not check that Bob does.
  • statusbar: "saved N tok" is the gross count (dash/query.go:690). The dashboard labels it gross and also shows saved_unique.
  • Known gap (stated in the PR, pinned by a test): on Bob, a direct call to a held-back tool is not detected. I agree that a fix needs a human's decision.

What I checked

  • The full diff 354fcb32..HEAD, all 7 commits. This PR is stacked on #967 and #968, so I reviewed their code too.
  • session.Explicit host ids: the host ids go after the header and the metadata fields. ExplicitStrict passes none. Unsafe, too long and empty ids fall back (TestExplicitHostIDsComeLast).
  • explicitSessionOf: only bobModelPath reads X-Task-Id. Every place on the chat path that works out a session id uses it: the pipeline (Opts.Session), the expand repair, the observe-mode billed-input record (serve line 1989), and newRecCtx. /compact and /expand read only x-context-guru-session. That is unchanged and correct, because they are not Bob routes.
  • alias and graceAliasID with an X-Task-Id session: ExplicitSession(o.Session, body) is not empty, so the alias is the content hash. This matches the dashcapture AliasFn (empty explicit id). The cold clocks keep their keys.
  • bobUsage: it runs only when up.path == bobModelPath, on the JSON path and on both stream paths (streamRecOn). Each bad field returns base (fail open). Fresh = prompt − read − write, and it rejects a write larger than the prompt. Real cold and warm blocks are tested. providerusage.Parse is unchanged.
  • lossless-defer: proxy/testdata/bob_lossless_defer.yaml and BOB_PRESETS hold the same text (test_bob_control.py:105). The toolfilter YAML keys defer and keep exist. Bob's route is OpenAI chat, so applyClientSearch → ApplySearch runs. premium-ide is not an Anthropic model, so it does not take the anthropic exit. The streamed search splice, the 400 retry with the original, and Gate.Broken (24 h) cover the fail-open path.
  • The /stats field names the plugin reads (requests, ledger.deferred_tokens, add_backs, wrong_guesses, turned_off, client_search_disabled.break) all exist in deferStats. The plugin ignores a /stats error in status and doctor.
  • bobdefer_test.go: all 7 tests. The history test builds 3 sessions from real requests and needs X-Task-Id to tell them apart.
  • docs/data-dependence.md: the toolfilter, billed-token, session tracker and Bob plugin rows are updated. The storage levels do not change.
  • The fixture bob_tools.json has no user content. The only path is the stand-in /Users/dev/projects/my-app.
  • I used two helper agents to read every line of the Python plugin (bob_plugin.py, bob_route.py, bob_hooks.py, reset.sh, skills, README) and of the status bar (src, test, package.json, lockfile scripts). I checked their 3 strongest findings against the code myself. The Python helper ran the plugin suite under a temp HOME: 174 tests OK. It also ran the HTTP_PROXY and nounset reproductions above. I did not run Go builds or Go tests (not approved).

@vz-ibm
vz-ibm force-pushed the feat/bob-lossless-defer branch from 7917012 to 6b85874 Compare November 9, 2026 10:50
@vz-ibm

vz-ibm commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Round 1: replies

Reviewer 1 found 3 real bugs. All 3 are in plugin code that #968 adds, so I fixed them in #968 (b234116e) and rebased this PR on it. Reviewer 2 ran to the end but posted nothing; it runs fresh next round.

R1-1: calls to 127.0.0.1 go through the user's HTTP proxy. Confirmed, and fixed.

  • My proof: a fake "corporate" proxy and a target on 2 local ports, with HTTP_PROXY set to the fake proxy. A plain urlopen of the target's /healthz reached the fake proxy, which received the full URL. With ProxyHandler({}) it reached the target.
  • The fix, in feat(bob-plugin): add the IBM Bob plugin and its status bar #968: one LOOPBACK opener with no proxy, for healthz, the newest Bob request and the signal hook. The 2 GitHub downloads keep the user's proxy, because that may be the only way out.
  • In this PR (08733e02): tool_defer_stats read /stats with a plain urlopen too. It now uses LOOPBACK.
  • Tests: LoopbackNeverUsesTheUserProxyTest sets HTTP_PROXY to a fake proxy that records every request. status, the signal hook and the deferral counts must reach the local proxy, and nothing may reach the fake one. All failed on the old code. A 4th test fails if any line with 127.0.0.1 uses plain urlopen. I checked that it fails when /stats goes back to urlopen.
  • The status bar uses Node's http.get, which does not read HTTP_PROXY.

R1-2: the rc block fails under nounset. Confirmed with your exact case: setopt nounset, then the block, then echo AFTER. zsh printed VSCODE_RESOLVING_ENVIRONMENT: parameter not set and stopped there. Fixed in #968:

  • The block uses ${VSCODE_RESOLVING_ENVIRONMENT:-} and ${__CFBundleIdentifier:-}.
  • The legacy form is still ours. ownership accepts either exact form (our_blocks). setup replaces a legacy block with the new form. uninstall and reset.sh remove either form byte for byte. reset.sh's perl pattern accepts both.
  • Tests:
    • A real zsh with setopt nounset sources the block. The user's line after it runs, and the URL is set.
    • A legacy block, pinned as literal bytes, is ours. remove is byte-identical, and install on it writes one new block.
    • reset.sh removes a legacy block.
    • The existing reset test failed after the block change and before the perl fix. That is how the gap in reset.sh showed.
  • I checked the installed block on the author's Mac (read-only): the new code reads it as ours (('ours', 8891)).

R1-3: reset.sh deletes a proxy config the user wrote. Confirmed and fixed in #968: it deletes bob-<port>.yaml only when line 1 is our marker, as uninstall does.

  • New tests: reset keeps a file without the marker, and still removes ours.
  • A third test fails if reset.sh's copy of the marker drifts from CONFIG_MARKER.

Non-blocking, fixed here:

  • components/reformat/toolfilter.go:34 and the README now name lossless-defer next to ultrahigh (comment and doc only).

Non-blocking, no change in this PR:

  • The setup and status skills' reason=/setup_incomplete text, the reused port after a partly_removed uninstall, the npm lookup before the CI check. These are in feat(bob-plugin): add the IBM Bob plugin and its status bar #968's code. They are worth fixing, but not as part of tool deferral.
  • BOB_WINDOW 270,000 against the Go fallback 200,000, and the window_exact flag. Correct: the bar should take the proxy's window and show a guess as a guess. A status bar change, for later.
  • Clock from the newest thread, not the main one; "saved" is gross. Correct. Both are status bar changes, for later.
  • The known gap. Agreed: a fix needs a human's decision.

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session resumed 1 of 2 2 of 2 86596caa4ef8 approve

Verdict: approve

All 3 round-1 findings are fixed, and each fix has a test. The 4 new commits add no new defect. The Python plugin suite passes: 185 tests, OK.

Findings

None.

Round-1 findings

  1. R1-1, local calls go through HTTP_PROXY: fixed.
    • bob_plugin.py:245 builds one LOOPBACK opener with ProxyHandler({}).
    • It is used for healthz (line 250), the newest Bob request (1209), /stats (1216) and the signal hook (1343).
    • Only the 2 GitHub downloads (339, 347) still use urlopen. That is correct: they may need the user's proxy.
    • bob_hooks.py makes no HTTP call of its own, so nothing is missed there.
    • LoopbackNeverUsesTheUserProxyTest sets HTTP_PROXY to a fake proxy that records every request, and checks that nothing reaches it. A source check makes sure no line with 127.0.0.1 uses urlopen.
  2. R1-2, rc block under nounset: fixed.
    • The block uses ${VSCODE_RESOLVING_ENVIRONMENT:-} and ${__CFBundleIdentifier:-} (bob_route.py:48).
    • our_blocks accepts the legacy form, so installed blocks still read as ours.
    • install replaces a legacy block on the same port. The new block(port) in current check at line 238 means it does not return already for a legacy block. remove uses _present, so it removes either form byte for byte.
    • _present cannot raise StopIteration: ownership returns ours only when the found block is one of our_blocks, and that block is in the content.
    • The reset.sh:103 perl pattern accepts both forms in each variable slot.
    • Tests: a real zsh with setopt nounset runs the user's line after the block and sets the URL. There are also a legacy round trip, install on a legacy block, and reset of a legacy block. The zsh test ran here (zsh is installed) and passed.
  3. R1-3, reset.sh deletes a user config: fixed.
    • reset.sh:245 deletes bob-<port>.yaml only when line 1 equals the marker.
    • The marker text matches CONFIG_MARKER (bob_plugin.py:42), and a test guards against drift.
    • Tests: reset keeps a user file and removes ours.

Round-1 non-blocking points

  • Fixed: the toolfilter.go:34 comment and the README line 37 now name lossless-defer.
  • Not changed, author's reason accepted: the skill text gaps, the reused port after partly_removed, the npm-before-CI skip, the status bar window fallback and window_exact, the main-thread clock, and the gross "saved" count. The author agrees with each one and defers it to a status bar or #968 follow-up. None of them breaks fail-open or loses data. I accept this. I ask for a tracking issue, so they are not lost.
  • Known gap (a direct call to a held-back tool is not detected on Bob): still pinned by a test. It needs a human's decision, as the PR says.

Non-blocking

  • bob_route.py:48: the comment says "before 2026-11-09". A legacy block may still be on disk long after that date, so keep our_blocks until a planned removal.

What I checked

  • Last review: round 1, 7917012, 2026-11-09T10:37:24Z
  • New commits read: 4. The branch was rebased: git range-diff shows the 7 old commits unchanged (=). The new commits are:
    • b234116e fix(bob-plugin): local calls skip HTTP_PROXY; rc block is nounset-safe
    • 6b85874a feat(bob-plugin): add the lossless-defer preset (tool deferral for Bob). This is the rebased 79170129, and range-diff shows it unchanged.
    • 08733e02 fix(bob-plugin): the tool deferral counts skip HTTP_PROXY too
    • 86596caa docs(bob-plugin): name lossless-defer where the docs said ultrahigh only
  • I read the whole diff 79170129..HEAD (6 files, +189/−22). I also read the code around each change: ownership, is_routed, install, remove, _writable_state, setup (rc install and undo), and every urlopen / LOOPBACK use.
  • Read in full: 1 review, 1 comment, 0 inline comments (from the three files).
  • New items since my last review:
    • The author's comment "Round 1: replies" (2026-11-09T11:03:04Z). I checked each claim against the code and the tests above. All of them hold.
    • The comment says reviewer 2 posted nothing in round 1. There is no reviewer 2 review on the PR, so I had no other findings to check.
  • I ran python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts (temp HOME, fake launchctl): Ran 185 tests ... OK.
  • I did not run Go builds or Go tests (not approved). The only Go change in the new commits is one comment line in toolfilter.go.

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session fresh 2 of 2 2 of 2 86596caa4ef8 blocking

Verdict: blocking

The Go core, the lossless-defer preset and the 3 round-1 fixes are correct. I found 1 new defect, in the Bob plugin's setup and uninstall code (from #968). It leaves Bob routed to a dead port after an uninstall that reports success. The trigger is rare, so the author can fix it in #968 or ask the user to accept it as a known gap.

Findings

  1. bob-plugin/context-guru/scripts/bob_plugin.py:628 — when $SHELL changes between two setup runs, the old rc block stays, and uninstall says result=removed.
    • What fails: the user runs setup under bash, which writes the block to ~/.bash_profile. Later the user changes to zsh (common on macOS) and runs setup again, which writes a second block to ~/.zshrc. Then the user uninstalls. Uninstall removes only the ~/.zshrc block. ~/.bash_profile still exports VITE_GATEWAY_BASE_URL=http://127.0.0.1:PORT, but the proxy is gone. A bash login, and Bob IDE started from it, cannot reach IBM's backend. Uninstall printed result=removed, so the user has no hint.
    • Proof:
      • _setup_changes line 628 writes the new rc_file into the record. It never reads existing["rc_file"] to remove the old block.
      • uninstall lines 1376 and 1389-1390 clean only record["rc_file"].
      • reset.sh reads the same single rc_file from the record, so it has the same gap.
      • A helper agent reproduced it in a temp HOME (setup with SHELL=/bin/bash, setup with SHELL=/bin/zsh, uninstall): the output had rc_file=.../.zshrc rc_block=removed result=removed, and ~/.bash_profile still had the block.
      • A related gap: line 620 keeps rc_created from the old record. Example: setup created ~/.bash_profile (rc_created true). The user already had an empty ~/.zshrc. After the shell change, rc_created stays true, so uninstall deletes the user's own ~/.zshrc (bob_route.remove(created=True), bob_route.py:265).
    • Fix: when existing["rc_file"] differs from the new rc_file and holds our block, remove that block during setup (with the same undo), or keep a list of rc files in the record and clean each one in uninstall and reset.sh. Work out rc_created per file. Add a test for the shell change.

Non-blocking

  • The loopback test cannot catch one likely regression (LoopbackNeverUsesTheUserProxyTest). LOOPBACK is built at import time, before setUp sets HTTP_PROXY. A helper changed LOOPBACK to urllib.request.build_opener() (which reads HTTP_PROXY again) in a temp copy, and all 4 tests still passed. A real hook is a new process with HTTP_PROXY already set. Fix: build the opener after the env patch, or run the hook in a subprocess.
  • reset.sh with stdin closed and no --yes exits 1 with no result= line. read -r answer (line 84) fails at end of input under set -e. Fix: read -r answer || answer=.
  • Running setup again resets --upstream to us-east. Line 628 uses args.upstream (default us-east), not existing["upstream"]. The skills tell users to "run setup again" to fix problems. That moves an eu-de user to us-east. Not checked: if all regions work through us-east, this is harmless.
  • reset.sh's perl pattern (line 103) accepts a mixed block (one variable in ${VAR:-} form, one bare). Python's ownership calls it cannot_tell. It is harmless, but the two rules differ.
  • Status bar: the cut-off test (test/client.test.ts:196) cannot fail if the aborted and close handlers (src/client.ts:51,53) are removed. The 300 ms deadline rejects by itself in under 1000 ms. Assert /reply cut off/.
  • Status bar: /api/sessions?agent=bob&limit=1 (src/client.ts:97) has no since. The query groups over every Bob row. The proxy runs it about every 30 s while the editor is open. On a large database the first poll times out after 2 s and shows —.
  • Status bar display: formatTokens shows 1000k for 999,500 to 999,999 (model.ts:62,68). A negative saved shows saved 0 (model.ts:98).
  • Not checked: whether the VS Code extension host's proxy support (http.proxySupport) routes http.get to 127.0.0.1 through HTTP_PROXY. This is the status bar's version of R1-1. Check it once in Bob with HTTP_PROXY set.

What I checked

  • Last review: none. Reviewer 2 posted nothing in round 1 (the query for <!-- offload-review reviewer=2 returns no review; the author's round-1 reply says the same). So I reviewed the whole PR diff 354fcb32..86596caa as a first review, and looked hardest at 79170129..86596caa (the commits since reviewer 1's review).
  • New commits read: 10 (the whole stack, as no earlier reviewer-2 sha exists):
    • 6c52d8d9 feat(proxy): take the Bob IDE session id from X-Task-Id
    • 1b8248ff test(proxy): pin the Bob IDE profile region strip and agent label
    • 0f30a559 fix(proxy): read Bob's cache writes, on the Bob model route only
    • 899ea9d1 test(proxy): pin the Bob expand repair to the X-Task-Id session
    • ae7fb838 feat(bob-plugin): add the IBM Bob plugin and its status bar
    • 2bf2b267 fix(bob-plugin): status bar never hangs on a cut-off reply; review fixes
    • b234116e fix(bob-plugin): local calls skip HTTP_PROXY; rc block is nounset-safe
    • 6b85874a feat(bob-plugin): add the lossless-defer preset (tool deferral for Bob)
    • 08733e02 fix(bob-plugin): the tool deferral counts skip HTTP_PROXY too
    • 86596caa docs(bob-plugin): name lossless-defer where the docs said ultrahigh only
  • Read in full: 1 review, 1 comment, 0 inline comments (from the three files). Also the PR body.
  • New items since my last review (all items are new to me):
    • Reviewer 1's review (3 findings, 10 non-blocking). Status of each finding:
      • R1-1 (loopback through HTTP_PROXY): fixed. LOOPBACK (ProxyHandler({})) is used for healthz, /api/requests, /stats and signal. The GitHub downloads keep the user's proxy. I added one non-blocking note on the test.
      • R1-2 (rc block under nounset): fixed. block() writes ${VAR:-}. our_blocks accepts both exact forms. _present picks the form the file holds, and neither form is a substring of the other, so replace removes the right bytes. install on a legacy block with the same port rewrites it (not already). The reset.sh perl pattern accepts both forms. The helper ran the perl program on both forms: exit 0 and the expected output.
      • R1-3 (reset.sh deletes a user config): fixed. Line 245 deletes only when head -n 1 equals the marker. A test keeps the copy equal to CONFIG_MARKER.
      • R1 non-blocking toolfilter.go:34 and README: fixed. The others: the author deferred them with reasons. I accept that. None of them is a defect in this PR's own change.
    • The author's round-1 reply comment: I checked each claim above against the code.
  • Go core (read in full, no defect):
    • session.Explicit host ids go after the header and the metadata fields. ExplicitStrict passes nil. ExplicitID skips unsafe, too long and empty ids. TestExplicitHostIDsComeLast covers each case.
    • explicitSessionOf reads X-Task-Id only when upPath == bobModelPath. The chat path computes it once and uses it for the expand repair, Opts.Session and newRecCtx. The observe-mode billed record (serve, line ~1989) calls it again with the same inputs. /compact (proxy.go:909) and /expand (proxy.go:3011) read only the session header. They are not Bob routes, so that is correct.
    • The alias in BodyOpts calls ExplicitSession(o.Session, body) with no host id. o.Session already holds the resolved id, so a Bob IDE session gets the content-hash alias, as the comment says.
    • bobUsage: every bad or missing field returns base (fail open). It rejects write1h > write and read + write > prompt. It runs only when bob is true, on the JSON path and both stream paths. streamRec keeps its old behavior through streamRecOn(..., false).
  • Plugin and status bar: two helper agents read every line of the Python, shell, skills, README, TypeScript, tests, package.json and the lockfile. I checked the finding above against the code myself (bob_plugin.py:605-640 and 1372-1395), and the cut-off test against client.ts:40-60. The helper ran the Python suite under a temp HOME: 185 tests OK. It confirmed that CONFIG_MARKER + BOB_PRESETS["lossless-defer"] is byte-identical to proxy/testdata/bob_lossless_defer.yaml, and that the /stats key paths match proxy/tooldefer.go. All 296 lockfile resolved entries point to registry.npmjs.org. The status bar endpoints and field names exist in dash/.
  • I did not run Go builds or Go tests (not approved).

@vz-ibm
vz-ibm force-pushed the feat/bob-lossless-defer branch from 86596ca to 5b69ae7 Compare November 9, 2026 14:25
@vz-ibm

vz-ibm commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Round 2: replies

R2-1: a $SHELL change between 2 setups leaves the old rc block. Confirmed and fixed. The code is in #968 (a4b1ae03), because the plugin core is there. This PR is rebased on it.

  • I reproduced it through the real setup and uninstall: setup under bash, then setup under zsh, then uninstall. The uninstall said result=removed, and ~/.bash_profile still routed Bob to a proxy that was gone.
  • The second part is real too. The record kept rc_created=True from .bash_profile and applied it to the user's own .zshrc. In my run the file survived, but only because it had content beyond our block.
  • The fix:
    • Setup now removes our exact block from the old file after the new block is in place, so Bob stays routed throughout.
    • An edited old block is left alone and reported (old_rc_block=left_alone).
    • rc_created is kept only for the same file.
    • A failure in this cleanup does not fail setup, because the new route works.
  • Tests:
    • the shell change leaves no block, and the user's .zshrc is byte-identical;
    • a .bash_profile that setup created is removed after the move;
    • an edited old block is kept.
    • With the cleanup taken out, the first 2 fail.
  • reset.sh: after a successful shell change, the record names only the new file, and the old file is clean. So reset needs no change. One case is left: a shell change during a setup that fails before the new block is written. Then the old file still routes, which is correct, because it is still the working route.

The 2 #968 bugs from round 1 are approved there in round 3.

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session resumed 1 of 2 3 of 3 5b69ae7bbeac blocking

Verdict: blocking

The fix for reviewer 2's finding works on the success path, and its 3 tests pass. It has 1 gap on the failure path. A re-run of setup that fails after a shell change removes the old route and does not put it back. The impact is low: Bob still works, but it goes to IBM directly, without the proxy, and setup does not say so. The fix is small. If the owner accepts it as a known gap instead, I have no other finding.

Findings

  1. bob-plugin/context-guru/scripts/bob_plugin.py:668 — a failed re-run after a shell change leaves Bob routed nowhere.
    • What fails: setup ran under bash, so ~/.bash_profile holds our block. The user moves to zsh and runs setup again. The new block goes into ~/.zshrc. Then _remove_old_rc_block removes the block from ~/.bash_profile at once (line 668). A later step fails, for example bob_hooks.install (line 671), install_escape_hatch, install_statusbar or write_record. Undo.run then:
      • removes the new ~/.zshrc block (had["rc"] is False for the new file, so _undo("rc") runs);
      • does not put the old ~/.bash_profile block back. No undo step covers it;
      • writes back the old record, which names ~/.bash_profile as the route.
    • Result: neither file routes Bob. The old service and hooks are back, but no traffic reaches them. The record names a file with no block. Setup prints rolled_back=true. Undo's own rule says "A failed re-run must not undo" what was in place before (line 640), and this breaks it. The author's reply covers a failure before the new block is written. It does not cover a failure after it.
    • Proof: I ran a scratch test (in /tmp, not committed) on top of test_bob_plugin.TempHome. It runs setup with the default shell, writes ~/.zshrc, then runs setup with SHELL=/bin/zsh and bob_hooks.install patched to raise OSError. Output:
      before re-run: bash_profile routed = True
      re-run exit: 1
      ['old_rc_file=.../.bash_profile', 'old_rc_block=removed', 'result=setup_failed', 'rolled_back=true']
      after rollback: bash_profile exists = False routed = False
      after rollback: zshrc routed = False
      record rc_file = .../.bash_profile
      
    • Fix: run the old-block cleanup only after the last step that can fail, that is after record["complete"] = True; write_record(record). Or snapshot the old file's bytes before the cleanup and add an undo step that puts them back. Add a test with a failure after the rc step and a shell change, and assert that the old file still routes.

Earlier findings

  • R1-1, R1-2, R1-3 (mine): still fixed. The range-diff shows b234116e, fd108dc6 (was 08733e02) and 5b69ae7b (was 86596caa) unchanged.
  • R2-1 (reviewer 2, the $SHELL change leaves the old block): fixed on the success path, by a4b1ae03.
    • Setup removes our exact block from the old file after the new block is in place.
    • An edited block is left alone and reported.
    • rc_created now carries over only for the same file. That fixes the .zshrc deletion case too.
    • The old file's own rc_created goes to remove(created=...), which is correct: a .bash_profile that setup made, and that holds only our block, is deleted.
    • The failure path is Finding 1 above.
  • Reviewer 2's non-blocking notes: I checked the LOOPBACK test note. LOOPBACK is built at import time, before setUp sets HTTP_PROXY. So a change back to build_opener() without ProxyHandler({}) would not fail the env-based tests. The source check test_no_call_to_127_0_0_1_uses_plain_urlopen does not catch that change either. I agree that this is non-blocking. The other notes (reset stdin, --upstream reset on re-run, the mixed perl form, the status bar tests and display) are non-blocking. The author did not reply to them in this round. I take no position on them beyond reviewer 2's.

Non-blocking

  • _remove_old_rc_block catches only RouteRefused and OSError. A PermissionError is an OSError, so that is covered. Any other exception falls into setup's broad except, which leads to Finding 1.

What I checked

  • Last review: round 2, 86596ca, 2026-11-09T14:00:12Z
  • New commits read: 1 new, plus 3 rebased. 86596caa is not an ancestor of HEAD, because the branch was rebased. git range-diff 354fcb32..86596caa 354fcb32..HEAD shows all 10 old commits as = (unchanged), and 1 new commit:
    • a4b1ae03 fix(bob-plugin): a shell change between setups leaves no old rc block
    • Rebased with no change: 67709bb9 (was 6b85874a), fd108dc6 (was 08733e02), 5b69ae7b (was 86596caa).
  • I read the whole diff 86596caa..HEAD (2 files, +70/−1). I also read the code around it: all of _setup_changes, Undo (run and _undo), and bob_route.remove, ownership and is_routed.
  • Read in full: 3 reviews, 2 comments, 0 inline comments (from the three files).
  • New items since my last review:
    • Reviewer 2's round-2 review (2026-11-09T14:14:10Z), with 1 finding and 8 non-blocking notes. I checked R2-1 and the fix (see above), and the LOOPBACK test note.
    • The author's "Round 2: replies" comment (2026-11-09T14:25:43Z). I checked each claim. Its claim about reset.sh is right on the success path. Its claim about the failure path holds only for a failure before the new block. Finding 1 is the case after it.
  • Tests: python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts: Ran 188 tests ... OK. That includes the 3 new shell-change tests. The scratch test for Finding 1 is in /tmp/pr973/probe/ and is not committed.
  • I did not run Go builds or Go tests (not approved). The new commit changes no Go code.

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session resumed 2 of 2 3 of 3 5b69ae7bbeac approve

Verdict: approve

My round-2 finding is fixed, and the fix has 3 tests. The one new commit adds no defect. The Python plugin suite passes: 188 tests, OK.

Findings

None.

Earlier findings

  1. R2-1 (mine), a $SHELL change leaves the old rc block: fixed in a4b1ae03.
    • _setup_changes (bob_plugin.py:618-623) keeps rc_created only when the new rc file is the same file as the old one. So a user's own empty .zshrc is no longer deleted.
    • Setup calls _remove_old_rc_block (line 653) right after bob_route.install writes the new block. So Bob stays routed the whole time.
    • bob_route.remove removes only an exact block of ours. An edited block raises RouteRefused, and setup reports old_rc_block=left_alone. An absent file or block gives absent. created uses the old record's flag, which belongs to the old file. That is correct.
    • The 3 tests cover: the user's .zshrc is byte-identical after the move and the uninstall; a .bash_profile that setup created is deleted; an edited old block is kept.
  2. R1-1, R1-2, R1-3 (reviewer 1): still fixed. git range-diff shows the commits that hold these fixes unchanged (=).
  3. My round-2 non-blocking points: the author did not change them. They are not defects in this PR's own change, so I accept that.

Non-blocking

  • A shell change to a shell the plugin does not know (for example fish) still leaves the old block. Then rc_file is None. The cleanup runs only inside if rc_file is not None (line 646), and the record stores rc_file: None. Uninstall then searches the candidates for $SHELL. For fish there are none (bob_route.candidates returns []), so the old ~/.bash_profile block stays after uninstall. This is rare, and setup already exits 1 with installed_route_by_hand. Fix: also run the cleanup when rc_file is None, or keep old_rc in the record.
  • A failed setup after the old block was removed leaves Bob unrouted. Example: the move removes the old block, then bob_hooks.install fails. The undo removes the new block (had["rc"] is false), and nothing puts the old block back. Bob then talks to IBM directly. That is a safe end state, but setup said rolled_back=true. Fix (optional): move _remove_old_rc_block to after record["complete"] = True.

What I checked

  • Last review: round 2, 86596ca, 2026-11-09T14:14:10Z
  • New commits read: 1. The branch was rebased. git range-diff 354fcb32..86596caa 354fcb32..HEAD shows all 10 old commits unchanged (=), with new short shas 67709bb9, fd108dc6 and 5b69ae7b for the last 3. The only new commit is:
    • a4b1ae03 fix(bob-plugin): a shell change between setups leaves no old rc block (bob_plugin.py +21/−1, test_bob_plugin.py +50)
  • Read in full: 3 reviews, 2 comments, 0 inline comments (from the three files).
  • New items since my last review:
    • Reviewer 1's round-2 review (2026-11-09T14:00:12Z, approve, no findings). I read it. Its one non-blocking point (keep our_blocks until a planned removal) is a note on the comment only. I have nothing to add.
    • The author's comment "Round 2: replies" (2026-11-09T14:25:43Z). It says R2-1 is confirmed and fixed. I checked the fix against the code and the tests (see above). The claim that reset.sh needs no change is right: after a successful move, the record names only the new file, and the old file is clean.
    • Commit a4b1ae03: I read the whole diff and the code around it: _setup_changes, Undo, bob_route.remove, bob_route.is_routed, _find_our_rc_file and uninstall.
  • I ran python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts under a temp HOME: Ran 188 tests in 151.849s, OK.
  • I did not run Go builds or Go tests (not approved). The new commit changes no Go code.

@vz-ibm

vz-ibm commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

Please do not merge yet: the design changed

On 2026-11-10 David asked for a new default Bob preset, bob-ultrahigh (ultrahigh with the sweep on a warm cache too). The author decided that it replaces lossless-defer.

  • This PR's lossless-defer will be reworked into bob-ultrahigh, or replaced by a new PR.
  • The design is written, and it waits for a yes. It names a risk to prove first: whether ultrahigh's LLM components run on Bob's route at all.
  • The parts of this PR that stay, whatever the preset is called:
    • the deferral counts in status and doctor;
    • the local-call fix for /stats (LOOPBACK);
    • the 7 tests on Bob's route, and the fixture of Bob's own tool definitions.

The round-3 finding of reviewer 1 is about a bug that main already fixed. #1015 adds the test for it.

Bob sends its 22 tool definitions on every call, about 55% of each
call. The new opt-in preset turns on context-guru's tool deferral
(toolfilter defer: auto) with a keep list of Bob's 15 essential tools.
Unused heavy tools are held back, and one search brings a tool back.
No core change: toolfilter already has defer, keep and always_defer.

- The default stays lossless. A live test decides the default.
- status shows the deferral counts from /stats; doctor warns when
  the proxy turned deferral off since it started.
- Known gap, pinned by a test: on Bob a direct call to a held-back tool
  ("Tool does not exist") is not detected, so deferral stays on and the
  call costs one turn. tooldefer.ReadCalls reads Anthropic blocks only.
- The test fixture is Bob 2.3.0's own tool definitions, with no user
  content. A history test builds 3 sessions from 3 real Bob requests,
  and fails if the X-Task-Id session is removed.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
status and doctor read /stats with a plain urlopen, so on a Mac with
HTTP_PROXY set the call went to the user's proxy. It now uses the
loopback opener. A new test fails if any call to 127.0.0.1 uses plain
urlopen again; only the 2 GitHub downloads may.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
@vz-ibm
vz-ibm force-pushed the feat/bob-lossless-defer branch from 3f84c17 to 7409168 Compare November 11, 2026 07:58
bob-ultrahigh is ultrahigh with 4 Bob changes (#1030): extract_llm names no
model and runs on a caching backend, the sweep may apply on a warm cache, and
tool deferral keeps Bob's 15 core tools. proxy/bobultrahigh_test.go pins that
it cannot drift from ultrahigh. It is opt-in; the Bob default stays lossless.

The preset gives the proxy Bob's flat prices (prices.yaml, as MODEL_PRICES):
a cache read and a cache write cost the input rate. Without them the warm
sweep's cost gate prices a rewrite at Claude rates and cuts nothing. The
launchd job gets MODEL_PRICES only while the price copy exists; leaving the
preset removes both. A failed restart rolls back the plist, config and file.

Lossy parts are allowed now because test T4 passed on the real Bob IDE:
after a context_guru_expand call, Bob goes on, and CG's repair restores the
content.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
The README explains the 4 Bob changes, the flat prices and the 3 extra
tools. docs/data-dependence.md says that bob-ultrahigh depends on stored
content, and where each component's levels are.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
@vz-ibm vz-ibm changed the title feat(bob-plugin): add the lossless-defer preset (tool deferral for Bob) feat(bob-plugin): add the bob-ultrahigh preset (replaces lossless-defer) Nov 11, 2026
@vz-ibm
vz-ibm marked this pull request as ready for review November 11, 2026 14:16
@vz-ibm

vz-ibm commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

Data dependence: confirmed

The repo owner confirmed the data-dependence change on 2026-11-11: bob-ultrahigh may keep cut tool output on the user's Mac, so the model can get it back.

  • It applies only to users who pick bob-ultrahigh. The Bob default stays lossless.
  • Open question 1 in the description is closed.

Assisted-By: Claude (Anthropic AI) [email protected]

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session resumed 2 of 2 4 of 5 e783bc649642 approve

Verdict: approve

bob-ultrahigh replaces lossless-defer correctly. The preset is pinned to ultrahigh plus 4 changes. The price file and the launchd env stay in step, and a failed restart puts all 3 back. I found no defect. The Python plugin suite passes: 193 tests, OK. I have 4 non-blocking notes. One is for the merger: a human's yes that I cannot check myself.

Findings

None.

Earlier findings

  • R2-1 (mine, a $SHELL change leaves the old rc block): fixed. #968 is now on main, with the fix.
  • R1-R3-1 (reviewer 1, a failed re-run after a shell change leaves Bob routed nowhere): fixed on main, as the author says. _remove_old_rc_block now runs last, after record["complete"] = True; write_record(record) (bob_plugin.py:735-739). test_a_failed_shell_change_keeps_the_old_rc_block (test_bob_plugin.py:605) makes bob_hooks.install fail. It checks that .bash_profile still routes and that the user's .zshrc is unchanged. My round-3 note on the same path is fixed by this too.
  • R1-1, R1-2, R1-3: still fixed. They are on main now.
  • My round-3 note on an unknown shell (fish): not changed. Line 738 still needs rc_file is not None. It is rare, and setup already says that the route must be set up by hand. I keep it as non-blocking.

Non-blocking

  • bob-ultrahigh needs proxy v0.7.2 or later, but the plugin accepts v0.3.1 or later.
    • MINIMUM_BOB_RELEASE = (0, 3, 1) (bob_plugin.py:47). binary_problem checks only that value (line 411).
    • extract_llm_sweep.warm first came in v0.7.2 (git describe --contains 54a51b57 = v0.7.2~22). cache_write_1h_frac in prices.yaml came in v0.6.8 (e24503c1).
    • Component config uses KnownFields(true) (components/registry.go:185). So an older proxy found on PATH (for example, from brew) rejects the config.
    • The result is safe: configure rolls back the plist, config and prices (change_and_restart). But the user gets only "the proxy did not answer /healthz". Fix: refuse bob-ultrahigh with a clear reason when the binary is older than v0.7.2.
  • uninstall and reset.sh leave bob-PORT-prices.yaml. uninstall deletes only the marked bob-PORT.yaml (unless --purge), and reset.sh has no prices line. The file holds only public rates, and the next setup with another preset removes it. So it is harmless, but it is an orphan file.
  • The data-dependence row has no "Decided by". The Bob plugin row in docs/data-dependence.md now says that bob-ultrahigh depends on stored content. The author's comment of 2026-11-11 says the repo owner confirmed this. The row does not record who confirmed it or when, unlike the other content rows. Add "Decided by: NAME, 2026-11-11, #1030".
  • For the merger: the human yes. The PR names two changes that need a human developer's yes: the data-dependence change, and the opt-in behavior change (new dollar figures, summary calls to Bob's server). The only proof on this PR is a comment from the author's account that reports the owner's yes. By CLAUDE.md, an agent cannot accept that report as the decision. A human should confirm on the PR before merge.

What I checked

  • Last review: round 3, 5b69ae7, 2026-11-10T08:12:57Z
  • New commits read: 2 new, plus 3 rebased. The base moved to main fd6f3865 (#968 and #967 are merged). git range-diff 67709bb9~1..5b69ae7b fd6f3865..7409168b shows:
    • 52067e07 feat(bob-plugin): add the lossless-defer preset (was 67709bb9, !). I read the range-diff. The only change is in docs/data-dependence.md context lines (rows that main added). There is no change in the code.
    • f64132e8 fix(bob-plugin): the tool deferral counts skip HTTP_PROXY too (was fd108dc6, =)
    • 7409168b docs(bob-plugin): name lossless-defer where the docs said ultrahigh only (was 5b69ae7b, =)
    • New: 66412c17 feat(bob-plugin): bob-ultrahigh replaces lossless-defer
    • New: e783bc64 docs(bob-plugin): describe bob-ultrahigh and its data dependence
  • Read in full: 5 reviews, 4 comments, 0 inline comments (from the three files). Also the new PR body.
  • New items since my last review:
    • Reviewer 1's round-3 review (2026-11-10T08:12:52Z, 1 finding). The finding is fixed on main (see above). I read the code and the test.
    • The author's comment "Please do not merge yet: the design changed" (2026-11-10T08:39:18Z). The design change is in 66412c17, which I reviewed. Its claim that main fixed reviewer 1's finding is right.
    • The author's comment "Data dependence: confirmed" (2026-11-11T14:16:36Z). See the last non-blocking note.
    • Commit 66412c17. I read the whole diff and the code around it:
      • BOB_PRESETS["bob-ultrahigh"] with CONFIG_MARKER is byte-identical to proxy/testdata/bob_ultrahigh.yaml (I ran the diff: SAME).
      • TestBobUltrahighIsUltrahighWithTheFourBobChanges compares the pipeline and every component with DeepEqual against preset: ultrahigh, plus exactly the 4 changes. Any drift fails it.
      • prices.yaml: 6 tiers, each with read = write = input and cache_write_1h_frac: 1.0. prices_test.go loads it with modelinfo.LoadTable, as the proxy does.
      • write_proxy_config writes or removes the price copy. service_environment sets MODEL_PRICES only while the copy exists. start_service (setup) and set_service_environment (configure) both use it. update keeps the plist as it is. So the job and the file stay in step.
      • configure snapshots the plist, config and prices before the change. On a failed /healthz it puts all 3 back. The test with wait_healthy = [False, True] checks this.
      • A setup re-run keeps the preset, the prices and MODEL_PRICES. The setup undo snapshots only the config. But a re-run writes the same preset, so the price file does not change.
      • Summary calls: incomingModel (proxy.go:1047) sends them to up.base, Bob's own IBM upstream, with the caller's credential. No credential goes to another host. They fail there today and the component fails open, as the PR says.
      • The 7 deferral tests now run under bob-ultrahigh. The tools check now names all 18 tools in order (15 kept + expand, adjudicate, search).
      • The refusal text, the doctor check and the skills use bob-ultrahigh. lossless-defer is left only in the refusal test, where it must be.
    • Commit e783bc64 (README, toolfilter.go comment, docs/data-dependence.md): docs only. I checked the text against the code.
  • I ran python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts under a temp HOME: Ran 193 tests in 159.519s, OK.
  • I did not run Go builds or Go tests (not approved). The Go changes are tests, testdata and one comment line.

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session resumed 1 of 2 4 of 5 e783bc649642 approve

Verdict: approve

bob-ultrahigh is correct as code. The preset is pinned to ultrahigh plus 4 changes. The price file and MODEL_PRICES stay in step. A failed restart puts the plist, the config and the price file back. My round-3 finding is fixed on main. I found no new defect. The Python plugin suite passes: 193 tests, OK.

Before merge, a human must confirm 2 things on the PR, as CLAUDE.md requires: the data-dependence change and the opt-in behavior change. A report of that yes from an agent or the author's account does not count (see the last note).

Findings

None.

Earlier findings

  • R1-R3-1 (mine), a failed re-run after a shell change leaves Bob routed nowhere: fixed on main (#968).
    • _remove_old_rc_block now runs last, after record["complete"] = True; write_record(record) (bob_plugin.py:737-739).
    • test_a_failed_shell_change_keeps_the_old_rc_block (test_bob_plugin.py:605) covers the path.
    • I ran my round-3 scratch test again on this head. The result is now result=setup_failed, rolled_back=true, and .bash_profile still routes Bob.
  • R1-1, R1-2, R1-3 (mine): still fixed. They are on main now.
  • R2-1 (reviewer 2): fixed on main.
  • Reviewer 2's round-3 note on an unknown shell (fish): not changed. It is rare, and setup already says to add the route by hand. I agree that it is non-blocking.

Non-blocking

  • Agree with reviewer 2, round-4 note 1 (the version gate). I checked it:
    • MINIMUM_BOB_RELEASE = (0, 3, 1) (bob_plugin.py:47).
    • extract_llm_sweep.warm came in #720, and git describe --contains 54a51b57 gives v0.7.2~22.
    • components/registry.go:185 sets KnownFields(true), so an older proxy rejects the config.
    • The result is safe, because configure rolls back. But the user sees only "the proxy did not answer /healthz".
  • Agree with reviewer 2, round-4 notes 2 and 3. reset.sh and uninstall have no prices line, so bob-PORT-prices.yaml stays after them. It holds only public rates. The Bob plugin row in docs/data-dependence.md names nobody under "Decided by" (I found 0 matches). So the PR's top line, "the person in the Bob plugin row's 'Decided by' must confirm", points at no one. Add the name and date to the row.
  • New: failing summary calls cost time on the request path.
    • The PR says the extract_llm and cache_aware_summarizer calls fail on Bob today.
    • They go to Bob's host on /v1/chat/completions (cheapmodel/openai.go:248), not Bob's /inference/v1/chat/completions.
    • Each in-request call has a 90 s timeout (defaultLLMCallTimeout, components/offload/extract_llm.go:68). llm_max_per_request: 8 allows up to 8 calls per request under pressure.
    • If Bob's host answers the wrong path fast (404 or 401), the cost is a few round trips. If it does not answer fast, a Bob turn can wait a long time.
    • The PR does not say how fast these calls failed in the test. Please state the measured time. Or leave the LLM parts out of bob-ultrahigh until #1030 item 4 makes them work.
  • For the merger. The only proof of the owner's yes is the author's comment of 2026-11-11, "Data dependence: confirmed". By CLAUDE.md, an agent cannot accept a reported decision. A human should write the yes on the PR, for the data-dependence change and for the opt-in behavior change. I agree with reviewer 2's note 4 here.

What I checked

  • Last review: round 3, 5b69ae7, 2026-11-10T08:12:52Z
  • New commits read: 2 new, plus 3 rebased. The base moved to main fd6f3865, because #967 and #968 are merged. git range-diff 67709bb9^..5b69ae7b fd6f3865..7409168b shows:
    • 52067e07 feat(bob-plugin): add the lossless-defer preset (was 67709bb9, !). The only change is in the context lines of docs/data-dependence.md (rows that main added). There is no code change.
    • f64132e8 fix(bob-plugin): the tool deferral counts skip HTTP_PROXY too (was fd108dc6, =)
    • 7409168b docs(bob-plugin): name lossless-defer where the docs said ultrahigh only (was 5b69ae7b, =)
    • New: 66412c17 feat(bob-plugin): bob-ultrahigh replaces lossless-defer
    • New: e783bc64 docs(bob-plugin): describe bob-ultrahigh and its data dependence
  • Read in full: 6 reviews, 4 comments, 0 inline comments (from the three files). I also read the new PR body in full.
  • New items since my last review:
    • Reviewer 2's round-3 review (2026-11-10T08:12:57Z, approve). It has 2 non-blocking notes. The failed re-run note is the same as my round-3 finding, now fixed. The fish note is not changed, and I accept that.
    • The author's comment "Please do not merge yet: the design changed" (2026-11-10T08:39:18Z). The new design is in 66412c17, which I reviewed. Its claim that main fixed my round-3 finding is right (see above).
    • The author's comment "Data dependence: confirmed" (2026-11-11T14:16:36Z). It reports the owner's yes. See the note "For the merger".
    • Reviewer 2's round-4 review (2026-11-11T14:29:41Z, approve, 4 notes). I checked notes 1 to 3 against the code (see above) and agree with note 4.
    • Commit 66412c17. I read the whole diff and the code around it:
      • BOB_PRESETS, PRICED_PRESETS and PRICES_SOURCE. write_proxy_config writes the price copy (0600) or removes it. service_environment, set_service_environment and start_service use it.
      • configure runs its change in change_and_restart. That function always saves and restores the plist (line 879), and it also saves the config and the price file.
      • prices.yaml and prices_test.go. modelinfo.Table.lookup matches the exact name first, so premium and premium-ide cannot mix.
      • The proxy reads MODEL_PRICES at cmd/context-guru-proxy/main.go:1493 and stops on a bad file. The Go test loads the shipped file.
      • incomingModel (proxy.go:1047) sends summary calls to up.base with the caller's own key. So the data-dependence text, "to Bob's own server only", is right.
      • bobultrahigh_test.go, bob_ultrahigh.yaml, and the bobdefer_test.go changes (the 18 tools in order).
      • The test_bob_control.py changes: the refusal text, the flat prices, leaving the preset, a failed restart, and setup again.
    • Commit e783bc64: the README, both skills, the toolfilter.go comment and docs/data-dependence.md. I checked the text against the code.
  • Tests: python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts, under a temp HOME: Ran 193 tests in 160.034s, OK. My round-3 scratch test, in /tmp/pr973/probe/ and not committed, now shows the old block kept.
  • I did not run Go builds or Go tests (not approved). The Go changes are tests, testdata and one comment line.

@vz-ibm

vz-ibm commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

I approve the data-dependence change and the opt-in behavior change of bob-ultrahigh.

Review round 4 of #973:
- configure refuses bob-ultrahigh on a proxy release older than v0.7.2,
  which rejects `warm: true` and does not start. A dev build has no
  release number; the restart check still guards it.
- uninstall and reset.sh remove the price copy too.
- docs/data-dependence.md names who decided the Bob row.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
@vz-ibm

vz-ibm commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Round 4: replies

Both reviewers approved with no findings. All 5 non-blocking notes are answered here. Fixes are in 81dba552.

1. Version check (both reviewers): fixed.

  • configure --preset bob-ultrahigh now refuses a proxy release older than v0.7.2: result=refused, reason=proxy_too_old, and the detail says to run the update skill.
  • A dev build (for example v0.6.7-32-g58939a47) or an unknown version has no release number. For it, configure goes on, and the restart check rolls back on a failed /healthz, as before.
  • Tests: test_bob_ultrahigh_is_refused_on_a_proxy_older_than_its_settings (red first: it was configured), test_bob_ultrahigh_runs_on_a_new_or_unnumbered_proxy.

2. The leftover price file (both reviewers): fixed.

  • uninstall and reset.sh now remove bob-PORT-prices.yaml.
  • Tests: test_uninstall_removes_the_price_copy_of_bob_ultrahigh and test_reset_removes_the_price_copy_of_bob_ultrahigh (both red first).

3. "Decided by" in the Bob row (both reviewers): fixed. The row now ends with "Decided by: Vitaly Zabershinsky, #973 (2026-11-11)". The features table has no "Decided by" column, so it is in the reason text.

4. The human yes (both reviewers): done by the owner. The repo owner wrote it on this PR at 2026-11-11 15:10 UTC: "I approve the data-dependence change and the opt-in behavior change of bob-ultrahigh."

5. The time cost of the failing summary calls (reviewer 1): measured, no change.

Tests: go test ./bob-plugin/ (the Python suite, 197 tests) and ./components/all/: OK.

Assisted-By: Claude (Anthropic AI) [email protected]

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session resumed 2 of 2 5 of 5 81dba552bda2 approve

Verdict: approve

The one new commit fixes the 3 code and doc notes from round 4, and each code fix has a test. I found no defect. The Python plugin suite passes: 197 tests, OK. The owner wrote the human yes on the PR.

Findings

None.

Earlier findings

  • Round-4 note 1, the version check (both reviewers): fixed.
    • configure refuses bob-ultrahigh when the proxy release is older than v0.7.2 (PRESET_MINIMUM_RELEASE, bob_plugin.py:98). It prints result=refused, reason=proxy_too_old and the update step.
    • The check runs before any change. The test checks that the file tree and the launchctl calls stay the same.
    • A missing binary gives unknown (binary_version catches OSError). A dev build such as v0.6.7-32-g58939a47 does not match RELEASE_TAG, so release_version raises. In both cases configure goes on, and change_and_restart rolls back on a failed /healthz, as before. I accept that guard.
    • The check runs only for a named --preset. Without one, configure keeps the current preset, which already passed. So that is correct.
  • Round-4 note 2, the leftover price file (both reviewers): fixed. uninstall (line 1503) and reset.sh (lines 249-251) remove bob-PORT-prices.yaml. Each has a test. reset.sh does no marker check. That is acceptable: the file has no marker, it holds only public rates, and only the plugin writes that name.
  • Round-4 note 3, "Decided by" (both reviewers): fixed. The Bob plugin row ends with "Decided by: Vitaly Zabershinsky, #973 (2026-11-11)".
  • Round-4 note 4, the human yes (both reviewers): done. A comment of 2026-11-11T15:10:15Z says: "I approve the data-dependence change and the opt-in behavior change of bob-ultrahigh." It is a plain statement with no agent attribution line. It comes from the same account (vz-ibm) as the agent's posts, so I cannot prove from GitHub alone that a person typed it. The merger should know that.
  • Reviewer 1's round-4 note, the time cost of the failing summary calls: answered, no change. The author measured a fast 401 from Bob's host (about 0.5 s, 3 tries), so the worst case is about 4 s on a turn under pressure (8 calls). I did not measure it (live tests are not approved). The reason is sound for an opt-in preset that the README marks as "these calls do not work on Bob yet".
  • My round-3 note on an unknown shell (fish): not changed. It stays non-blocking.
  • Everything older (R1-1 to R1-3, R2-1, reviewer 1's round-3 finding) is fixed on main, as in round 4.

Non-blocking

  • None new.

What I checked

  • Last review: round 4, e783bc6, 2026-11-11T14:29:41Z
  • New commits read: 1
    • 81dba552 fix(bob-plugin): refuse bob-ultrahigh on an old proxy, remove its prices (6 files, +66/−2)
  • Read in full: 7 reviews, 6 comments, 0 inline comments (from the three files).
  • New items since my last review:
    • Reviewer 1's round-4 review (2026-11-11T14:37:19Z, approve). It agrees with my 4 notes and adds 1 on the summary call time. Its status is above.
    • The comment "I approve the data-dependence change and the opt-in behavior change of bob-ultrahigh." (2026-11-11T15:10:15Z). See note 4 above.
    • The author's comment "Round 4: replies" (2026-11-11T15:26:34Z). I checked each of its 5 answers against the code and the tests (see above).
    • Commit 81dba552. I read the whole diff and the code around it: configure, binary_version, release_version, RELEASE_TAG, uninstall and reset.sh. I also read the 4 new tests and the README and docs/data-dependence.md changes.
  • I ran python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts under a temp HOME: Ran 197 tests in 171.770s, OK.
  • I did not run Go builds or Go tests (not approved). The new commit changes no Go code.

@vz-ibm vz-ibm left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (claude, user of @vz-ibm) Claude Code 2.1.316 offload-review skill, @vz-ibm's session resumed 1 of 2 5 of 5 81dba552bda2 approve

Verdict: approve

The new commit fixes the round-4 notes correctly, and each fix has a test. I found no new defect. The Python plugin suite passes: 197 tests, OK. The human yes that CLAUDE.md requires is now on the PR.

Findings

None.

Earlier findings and notes

  • R1-R3-1 and R1-1 to R1-3 (mine), R2-1 (reviewer 2): still fixed, on main.
  • Round-4 note: the version gate (both reviewers): fixed.
    • configure refuses bob-ultrahigh when release_version(binary_version(...)) < (0, 7, 2) (bob_plugin.py:984-994). The result is reason=proxy_too_old and a clear detail.
    • RELEASE_TAG (line 388) accepts v0.7.1 and v0.7.1-rc.1, so both are refused. It does not accept a git-describe dev build (v0.6.7-32-g58939a47) or unknown. Those raise RuntimeError, and configure goes on. That is as the author says. For them, the /healthz check in change_and_restart still rolls back.
    • Tests: refused on v0.7.1 (no change to the tree, no launchctl call). Allowed on v0.7.2, v0.8.0, a dev build and unknown.
  • Round-4 note: the leftover price file (both reviewers): fixed. uninstall removes proxy_prices(port) (line 1503). reset.sh removes bob-$PORT-prices.yaml. Only the plugin writes that name, so a removal without a marker check is safe. There is one test for each.
  • Round-4 note: "Decided by" (both reviewers): fixed. The Bob plugin row now ends with "Decided by: Vitaly Zabershinsky, #973 (2026-11-11)".
  • Round-4 note: the human yes (both reviewers): done.
    • The comment of 2026-11-11T15:10:15Z says: "I approve the data-dependence change and the opt-in behavior change of bob-ultrahigh." It has no Assisted-By line.
    • It comes from the same account as the author's agent replies. I cannot check who typed it. Its text and form read as a human's own yes, and the row's "Decided by" names the same person. I accept it.
  • Round-4 note: the time cost of the failing summary calls (mine): answered, and I accept the answer.
    • The author measured Bob's host. It rejects POST /v1/chat/completions with 401 in about 0.5 s (3 tries).
    • So the cost is about 4 s at most on a turn under pressure (llm_max_per_request: 8), not 90 s.
    • The preset is opt-in, and the README says the calls do not work on Bob yet. That is a fair trade until #1030 item 4.

Non-blocking

  • The README could also say that, until #1030 item 4, a turn under pressure can take up to about 4 s longer because of the failing calls. Now it says only that they fail.
  • A setup re-run with bob-ultrahigh active uses find_binary, which tries the binary on PATH first. An older binary there (for example, from brew) fails at /healthz, and setup rolls back (start_failed). The result is safe, but the reason is not given. Before this PR the same path existed for any preset.

What I checked

  • Last review: round 4, e783bc6, 2026-11-11T14:37:19Z
  • New commits read: 1 (git merge-base --is-ancestor e783bc64 HEAD is true, so there was no rebase):
    • 81dba552 fix(bob-plugin): refuse bob-ultrahigh on an old proxy, remove its prices (6 files, +66/−2)
  • I read the whole diff e783bc64..HEAD. I also read the code around it: configure, release_version and RELEASE_TAG, binary_version, find_binary, uninstall and the reset.sh cleanup block.
  • Read in full: 7 reviews, 6 comments, 0 inline comments (from the three files). I also read the PR body again. It has no change in this round.
  • New items since my last review:
    • The comment of 2026-11-11T15:10:15Z (the owner's yes). See "the human yes" above.
    • The comment "Round 4: replies" (2026-11-11T15:26:34Z). I checked its 5 answers against the code and the tests above. All of them hold. I accept the measured 0.5 s answer to my latency note.
    • Reviewer 2 has posted no review since round 4. The newest review before this one is mine.
    • Commit 81dba552: see above.
  • Tests: python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts, under a temp HOME: Ran 197 tests in 178.821s, OK.
  • I did not run Go builds or Go tests (not approved). The new commit changes no Go code.

The owner decided this on 2026-11-11: "there are no bob users and
bob-ultrahigh is the new default".

- DEFAULT_PRESET is bob-ultrahigh.
- setup --plan prints preset= and preset_effects=. The consent question
  names what the default does: it stores content on the Mac, sends summary
  calls to Bob with the user's own key and quota, and uses Bob's flat prices.
  It says how to choose lossless.
- Update the setup and preset-picker skills, the README and the
  data-dependence row files. Regenerate docs/data-dependence.md.
- Tests pin the new default.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (claude, user of @amiddavid) Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 1 of 2 6 of 6 971deb1f3f30 blocking

Verdict: blocking

The new default is correct in configure, the docs and the tests. It has 1 gap in setup. A new install on a Mac that already has a context-guru-proxy older than v0.7.2 on PATH now fails. Before this commit, the same install worked with lossless. v0.7.2 shipped on 2026-11-11, so most existing Context Guru users have an older binary.

Findings

  1. bob-plugin/context-guru/scripts/bob_plugin.py:690 — setup writes the bob-ultrahigh default for a binary that cannot load it, and fails with no reason.
    • What fails: a Mac has context-guru-proxy v0.3.1 to v0.7.1 on PATH (for example, from the Claude Code install). The user runs Bob setup. find_binary takes the PATH binary first (line 356), because binary_problem checks only --bob-upstream. write_proxy_config(port) (line 725) writes bob-ultrahigh, which has extract_llm_sweep.warm: true. The old proxy stops at start. Setup prints result=start_failed and rolls back, with no reason and no hint to update.
    • Proof:
      • extract_llm_sweep.warm came in 54a51b57 (#720). git tag --contains 54a51b57 gives only v0.7.2. git show v0.7.1:components/offload/extract_sweep.go has no yaml:"warm" field.
      • components.Decode uses KnownFields(true) (components/registry.go:185). Config.Build returns the error (config/config.go:1057-1059). main.go:348-351 (the same in v0.7.1) calls log.Fatalf("build pipeline: ...").
      • The round-5 fix PRESET_MINIMUM_RELEASE runs only in configure (line 992). setup never reads it.
      • Before 971deb1f, DEFAULT_PRESET was lossless, which any v0.3.1+ binary loads. So this commit makes the failure the default path, not an opt-in edge case. My round-5 note named this path for an opt-in re-run only.
    • Fix: in setup, check the found binary against PRESET_MINIMUM_RELEASE[preset] for the preset that setup will write. Skip a too-old binary with binary_skipped= (as test_an_old_binary_on_path_is_treated_as_missing does for --bob-upstream), so setup falls back to the managed binary or downloads the release. Or refuse with reason=proxy_too_old. Add a test: a fake v0.7.1 binary on PATH, fresh setup.

Earlier findings

  • R1-1, R1-2, R1-3, R1-R3-1 (mine) and R2-1 (reviewer 2): still fixed, on main.
  • Round-4 notes (version gate in configure, the price file, "Decided by", the human yes, the summary call time): still fixed or answered, as in round 5. The time note is now moot for a proxy with #1074: the calls go to Bob's model path.
  • My round-5 notes: the README 4 s note is replaced by the new README text (the calls now work, since #1074). The find_binary note is Finding 1 above, now on the default path.
  • Reviewer 2's fish-shell note: not changed. It stays non-blocking.

Non-blocking

  • For the merger: the human yes for the default. The owner's yes on the PR (2026-11-11T15:10:15Z) covers "the opt-in behavior change of bob-ultrahigh". The change of the default is new. Its only record is a quote in the PR body and the commit message: "there are no bob users and bob-ultrahigh is the new default". The commit comes from @amiddavid's session with Assisted-By. CLAUDE.md says a reported decision does not count. A short human comment on the PR closes it.
  • The Bob plugin row's "Decided by" still names only Vitaly Zabershinsky. The row now says "The owner confirmed this change of the Bob default". Name the person who decided the default too.
  • #1074 is in no release yet (git tag --contains 202087de is empty). On v0.7.2, the summary calls still go to /v1/chat/completions and fail fast. The new README, skill and PRESET_EFFECTS text says they use the user's Bob quota. That is true only from the next release. PRESET_MINIMUM_RELEASE stays (0, 7, 2), which is right for the config to load.

What I checked

  • Last review: round 5, 81dba55, 2026-11-11T15:36:32Z
  • New commits read: 2 on the PR branch (git log 81dba552..HEAD also lists the 15 main commits that came in by the merge):
    • 4b198d87 Merge remote-tracking branch 'origin/main' into worktree-fix-973
    • 971deb1f feat(bob-plugin): make bob-ultrahigh the default Bob preset (10 files, +42/−26)
  • Read in full: 9 reviews, 6 comments, 0 inline comments (from the three files). I also read the PR body in full (updated 2026-11-11T20:26:22Z).
  • New items since my last review:
    • No new review or comment after 2026-11-11T15:36:32Z. Reviewer 2's round-5 review (15:35:27Z) came before mine, and I covered it in round 5.
    • The new PR body: the top now names the default change, who it affects, old and new, and how to turn it off. See the first non-blocking note on the human yes.
    • 971deb1f: I read the whole diff and the code around it: DEFAULT_PRESET, PRESET_EFFECTS, setup --plan, _setup_changes, find_binary, binary_problem, read_preset, write_proxy_config, the configure version gate, the test changes in test_bob_control.py and test_bob_plugin.py, both skills, the README, and the 3 data-dependence files and the generated page.
    • A setup re-run on an existing lossless install keeps lossless (write_proxy_config with preset=None keeps the current preset, line 506). So only new installs and a missing config get the new default. That matches the PR body.
    • 4b198d87 (merge of main up to 9966adf0): I checked that the PR's data-dependence edits are now in the new row files, and that docs/data-dependence.md matches the row text. I read #1074's commit to check the README's new "the calls work" text.
    • Finding 1: I traced find_binary → write_proxy_config → the proxy's cfg.Build → log.Fatalf, and checked v0.7.1's source with git show v0.7.1:....
  • I did not run Go builds or Go tests, and no live tests (not approved). I did not run the Python suite in this round.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (claude, user of @amiddavid) Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 2 of 2 6 of 6 971deb1f3f30 blocking

Verdict: blocking

The new commit 971deb1f makes bob-ultrahigh the Bob default. The code change is small and correct for configure. It has 1 defect in setup: the release check for bob-ultrahigh runs only in configure, so a fresh setup on an older proxy now fails. The second finding is the merge gate: no human comment on the PR covers the change of the default. The Python suite passes: 197 tests, OK.

Findings

  1. bob-plugin/context-guru/scripts/bob_plugin.py:725 — setup writes bob-ultrahigh with no release check, so setup fails on a proxy older than v0.7.2.

    • What fails: a Mac has context-guru-proxy v0.3.1 to v0.7.1 on PATH (for example from brew), or the user sets CONTEXT_GURU_VERSION to such a release. The user runs setup.
      • find_binary (line 354) accepts the binary: binary_problem checks only MINIMUM_BOB_RELEASE = (0, 3, 1) (line 47, 421).
      • write_proxy_config(port) (line 725) writes the default, now bob-ultrahigh.
      • The old proxy refuses the unknown key warm (the comment at line 101 says so: "An older proxy refuses unknown keys and does not start").
      • wait_healthy fails. Setup rolls back with result=start_failed and no reason.
    • Before this commit, the same Mac got lossless, which every release since v0.3.1 accepts. So this commit breaks the install on that Mac.
    • Proof: PRESET_MINIMUM_RELEASE is read in one place only, configure (line 992; grep -n PRESET_MINIMUM_RELEASE gives lines 104 and 992). setup and _setup_changes never read it. Round 5 (reviewer 1, note 2) saw the same path for a re-run. Now it is the path of every fresh install.
    • Fix: in _setup_changes, check the found binary against PRESET_MINIMUM_RELEASE for the preset that setup will write. When it is too old, skip it in find_binary (so setup downloads the latest release), or refuse with reason=proxy_too_old, as configure does. Add a test with a v0.7.1 binary on PATH.
  2. Merge gate: no human comment on the PR covers the change of the Bob default.

    • What fails: CLAUDE.md says that a behavior change needs a human developer's yes, and that "neither does a peer agent's report of a decision" count. A change of data dependence needs the person in the row's "Decided by" to confirm.
    • Proof:
      • The only human-typed yes on the PR (2026-11-11T15:10:15Z) says: "I approve the data-dependence change and the opt-in behavior change of bob-ultrahigh."
      • The comment of 2026-11-11T14:16:36Z says: "It applies only to users who pick bob-ultrahigh. The Bob default stays lossless."
      • The new decision, "there are no bob users and bob-ultrahigh is the new default", is only in the PR body and the commit message. An agent wrote both.
      • The Bob row says "Decided by: Vitaly Zabershinsky", but the new text says "The owner confirmed this change of the Bob default". It does not say who.
    • Fix: the owner writes the yes for the new default on the PR. Name that person and the date in the Bob row's "Decided by", then run go run ./cmd/gen-datadep.

Non-blocking

  • The summary calls do not reach Bob on any release yet. #1074 (202087de) is in no tag: git describe --contains 202087de fails, and v0.7.2 is the newest tag. Setup downloads the latest release, v0.7.2. On that release the calls still go to /v1/chat/completions with Bearer, and they fail open (about 0.5 s each, round-4 reply). The README, the preset-picker skill, the consent text and the PR body now say that the calls work and use the user's quota. Once a release with #1074 ships, raise PRESET_MINIMUM_RELEASE["bob-ultrahigh"] to it, or say "from vX" in the docs until then.
  • No test pins the flat prices on a fresh default setup. test_bob_ultrahigh_gives_the_proxy_bobs_flat_prices now goes to lossless first, and test_bob_plugin.py has no MODEL_PRICES or proxy_prices check after setup. By reading, the code is right: write_proxy_config (line 725) writes the price copy before start_service, which reads service_environment. Add one assertion to the setup test at line 683: the price copy exists and the plist has MODEL_PRICES.
  • A failed fresh setup now leaves bob-PORT-prices.yaml. The setup undo snapshots only proxy_config(port) (line 718). Before this commit a fresh setup wrote no price file. The file holds only public rates, and uninstall and reset.sh remove it. Fix: add proxy_prices(port) to that snapshot.
  • setup --plan names bob-ultrahigh on a re-run that keeps lossless or custom. write_proxy_config(port) with no preset keeps the current choice (line 506), but the plan prints preset=DEFAULT_PRESET. The plan says more than setup does, so it is safe. It can print read_preset(port) when a record exists.

What I checked

  • Last review: round 5, 81dba55, 2026-11-11T15:35:27Z
  • New commits read: 3 (81dba552 is an ancestor of HEAD, so no rebase)
    • 970863db Merge remote-tracking branch 'origin/main' into worktree-fix-973
    • 4b198d87 Merge remote-tracking branch 'origin/main' into worktree-fix-973
    • 971deb1f feat(bob-plugin): make bob-ultrahigh the default Bob preset
  • Read in full: 9 reviews, 6 comments, 0 inline comments (from the three files). I also read the PR body in full.
  • New items since my last review:
    • Reviewer 1's round-5 review (2026-11-11T15:36:32Z, approve). Note 1 (README: a turn can take about 4 s longer) is now moot in the text, but still true on v0.7.2: see my first non-blocking note. Note 2 (an old binary on PATH on a re-run) is now my Finding 1, because it hits every fresh install.
    • No new comments since my last review. The newest comment is "Round 4: replies" (15:26:34Z), which I checked in round 5.
    • The new PR body. Its top lines report the owner's decision on the default. See Finding 2.
    • Merge 970863db: one conflict hunk, in docs/data-dependence.md (the Bob row). The resolution keeps the PR's row and adds main's new "Learned 5-hour weights" row. Correct.
    • Merge 4b198d87: no conflict hunk. It brings in main's one-file-per-row data-dependence layout (#1090). At this merge, features/bob-plugin.md held main's short text and the page held the PR's text. 971deb1f brings them back in step.
    • Commit 971deb1f: I read the whole diff, and in bob_plugin.py the code around it: read_preset, write_proxy_config, service_environment, setup, _setup_changes, Undo, find_binary, binary_problem, install_release_binary and the configure release check.
  • Data-dependence files: git diff 9966adf0..HEAD -- docs/ changes 3 things in the row files and the template (the toolfilter row, the Bob row, one template line), and the same 3 in docs/data-dependence.md. The page matches the row files. The earlier toolfilter and Bob row edits of this PR are still there after the merges.
  • Earlier findings: R1-1 to R1-3, R2-1 and reviewer 1's round-3 finding are fixed on main. All the round-4 notes are fixed, as I said in round 5. My round-3 note on an unknown shell (fish) is not changed and stays non-blocking.
  • Tests: python3 -I -m unittest discover -s . -p 'test_bob_*.py' in bob-plugin/context-guru/scripts, under a temp HOME: Ran 197 tests in 132.463s, OK.
  • I did not run Go builds or Go tests (not approved). The new commit changes no Go code.

@amiddavid

Copy link
Copy Markdown
Collaborator

Integrator note, for the round-6 merge-gate finding: the owner (David Amid) decided the change of the Bob default in the integrator session.

  • 2026-11-11, about the default: "there are no bob users and bob-ultrahigh is the new default", then "bob-ultrahigh" (answering "merge with lossless as the default, or first make bob-ultrahigh the default?").
  • 2026-11-11, about the data-dependence change (the default now keeps stored content on the Mac): "1 okey. this happens on ultrahigh as well afaik".
  • The owner then ran the commit and the push of 971deb1 himself.

The setup release-check finding (both reviewers) is being fixed now.

@amiddavid

Copy link
Copy Markdown
Collaborator

Integrator note: the owner ruled the round-6 setup finding moot (David Amid, 2026-11-12): "there is no older proxy for bob this is moot point". The Bob plugin is new in v0.7.1, and no Bob install has a proxy older than the one it installs itself. The merge-gate finding is answered by the comment above. #973 merges at 971deb1 with no further change.

Setup wrote the default bob-ultrahigh with no release check. A proxy
from v0.3.1 to v0.7.1 refuses the key `warm`, so setup failed with
start_failed and no reason.

- find_binary skips a binary older than PRESET_MINIMUM_RELEASE for the
  preset setup will write. Setup then downloads the latest release.
- A pinned CONTEXT_GURU_VERSION that is too old gives
  reason=proxy_too_old.
- The update tests use a v0.7.2 fake binary, so they stay offline.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator

Round 6: reply (head 602da27)

Finding 1 (both reviewers), fixed in 780359d8.

  • setup now reads the preset it will write (read_preset(port): the kept choice, or the default bob-ultrahigh).
  • find_binary skips a binary older than PRESET_MINIMUM_RELEASE for that preset. It prints binary_skipped=... needs context-guru-proxy v0.7.2 or newer; this one is v0.7.1. Setup then downloads the latest release.
  • A pinned CONTEXT_GURU_VERSION that is too old gives result=refused reason=proxy_too_old. Setup never falls back to lossless.
  • A re-run on an existing lossless or custom install has no minimum, so an old binary still works.
  • A dev build with an unknown version passes, as in configure.

Tests (BinaryCheckTest, 3 new): a v0.7.1 binary is skipped for the default and accepted for lossless. Setup tries to download when the binary on PATH is v0.7.1. A pinned v0.7.1 gives proxy_too_old and no download.

Mutation check: with both new checks disabled, all 3 new tests fail (Ran 6, failures=3). With the checks, the full Bob suite passes (Ran 200, OK, throwaway HOME).

Side fix: UpdateTest used a v0.5.1 fake managed binary. With the new check it was skipped and the test downloaded the real release. The fake is now v0.7.2.

Not changed (not blocking): the human yes for the default, the "Decided by" name, and the 3 small notes (flat-price assertion, price file in the undo snapshot, --plan text) are left for the owner or a later round.

The owner ruled the round-6 setup finding moot on 2026-11-12: "there is
no older proxy for bob this is moot point". 780359d8 was pushed before
the stop reached the fixing agent. This commit returns the tree to
1bdf248, the head the owner's ruling and its CI cover.

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator

Integrator note: 780359d8 (the setup release check) was pushed before the stop reached the fixing agent. The owner ruled that finding moot, so 1dbbe6a returns the tree to 1bdf248 exactly (git diff 1bdf2487 1dbbe6a4 is empty). That is the head the owner's ruling and its CI cover. #973 merges with this tree.

@amiddavid
amiddavid merged commit 791d296 into main Nov 11, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 11, 2026
amiddavid added a commit that referenced this pull request Nov 11, 2026
#973 changed bob-plugin/ since v0.7.2.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
amiddavid added a commit that referenced this pull request Nov 12, 2026
Bump the plugin versions for v0.7.3.

- Claude Code plugin 0.7.2 -> 0.7.3: it follows the proxy release
  (#1109 changed two plugin tests and scripts/start-proxy.sh).
- Bob plugin 0.1.0 -> 0.1.1: #973 (bob-ultrahigh becomes the default).
- OpenCode plugin: no version file. Its first start now downloads
  proxy v0.7.3 (was v0.7.2). Nothing compares against PINNED_VERSION;
  the floor stays "v0.7.1 or later". The READMEs, the install guide and
  3 tests follow.
- Codex 0.2.12 and Pi 0.1.1: no change since v0.7.2.

Behavior change: the OpenCode plugin's first download is proxy v0.7.3.
Owner's yes, 2026-11-11, in the integrator session: "1107 approved".

Data dependence: none.

Reviews: 3 offload review rounds (GLM, then Bob while GLM was down).
Round 3: both approve at 5d11267, which is the PR head.

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
vz-ibm added a commit that referenced this pull request Nov 12, 2026
Conflicts:
- #973 (bob-ultrahigh preset): kept its presets, PRICED_PRESETS and
  the proxy_too_old preset check, next to this branch's strategy table
  reader and MINIMUM_BOB_RELEASE (0, 7, 1). BOB_CACHE_STRATEGIES stays
  removed. Tests now expect bob-ultrahigh as the default preset.
- #1090 (data-dependence row files): the Bob plugin sentence moved to
  docs/data-dependence/features/bob-plugin.md; the page is rebuilt
  with cmd/gen-datadep.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants