Skip to content

feat(bob): read the cache strategy offer from the proxy table - #1093

Merged
amiddavid merged 3 commits into
mainfrom
feat/bob-strategies-from-proxy
Nov 12, 2026
Merged

amiddavid merged 3 commits into
mainfrom
feat/bob-strategies-from-proxy

Conversation

@vz-ibm

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

Copy link
Copy Markdown
Collaborator

Behavior change for Bob users: the minimum proxy version goes from v0.3.1 to v0.7.1. Approved by the repo owner, @vz-ibm, on 2026-11-12.

  • Who: Bob users who install or update to a pinned proxy release older than v0.7.1 (CONTEXT_GURU_VERSION).
  • Old: setup and update installed any release from v0.3.1.
  • New: they refuse a release older than v0.7.1, because an older binary cannot list its cache strategies (context-guru-proxy strategies).
  • A proxy older than v0.7.1 that is already installed still runs. configure --show still reports the preset, and shows cache_strategy_error=strategy_table_unreadable in place of the strategy list. configure --cache-strategy X for an X other than none stops with that error and the update hint. --cache-strategy none and --preset work as before.
  • Turn it off: none needed for the latest release. Update the proxy to v0.7.1 or later.

Closes #1072.

Summary

The Bob plugin no longer keeps its own list of cache strategies. It reads the table from the proxy, as the Claude Code and Codex plugins do, and offers only the strategies that fit Bob's route. The offer stays exactly none.

What changed

Option A of the issue: a tag for the OpenAI Chat Completions route, openai-chat.

  • config/strategy.go: only the doc comment of Providers changes. It lists openai-chat (the Chat Completions route, for example IBM Bob). No row uses it yet, so the proxy's behavior does not change.
  • Why not option B (only the any rows): the tag lets a future strategy for Chat Completions reach Bob, and any other agent on that route, with no plugin change.
  • Why not the openai tag: it is the OpenAI Responses route, where the proxy pings. pi: read the cache strategies from the proxy and drop the Pi copy of the table #1062 adds more pings there that Bob cannot use.

bob-plugin/context-guru/scripts/bob_plugin.py:

  • BOB_CACHE_STRATEGIES is gone.
  • load_strategy_table is the Codex plugin's reader, with its lessons from pi: read the cache strategies from the proxy and drop the Pi copy of the table #1062:
    • the env scrub and a fresh temp directory, so an old binary that starts serving cannot open the user's databases;
    • port 0 on loopback and a 5 s time limit;
    • a clean error on bad output, and no fallback list for an older proxy.
  • offered_strategies keeps the rows tagged openai-chat or any.
  • The plugin offers only what it can apply. It writes no cache strategy into its config, so it can apply only none (plugin_applies). A name that fits the route but that the plugin cannot apply is not listed by --show, and --cache-strategy refuses it with cache_strategy_not_supported_by_plugin. A name that does not fit the route keeps cache_strategy_not_allowed_for_bob.
  • configure --show prints allowed_cache_strategies from the table. configure --cache-strategy X checks X against it, and still refuses with cache_strategy_not_allowed_for_bob.
  • configure --preset X and --cache-strategy none do not run the binary.
  • The update hint also says how to update a proxy the plugin did not install (for example with brew).
  • NO_KEEPALIVE_REASON and BOB_PRESETS are unchanged.

Docs: the cache-strategy-picker skill, the README's cache strategy section, and one sentence in the Bob plugin row of docs/data-dependence.md.

Data dependence

No change in what the plugin reads from the user. configure now runs the local proxy binary once to read the strategy table: no network, no user data.

How it was tested

  • Bob plugin suite: python3 -m unittest discover -s bob-plugin/context-guru/scripts -p 'test_*.py': 195 tests, OK.
  • go vet ./config/, go test ./config/: OK.
  • New tests (in test_bob_control.py), red first:
    • the offer is exactly none from a table with anthropic and openai rows, and stays none after a new row for another route is added;
    • a row tagged openai-chat is offered;
    • bad probe output (non-zero exit, not JSON, not UTF-8, wrong shape, no binary, an old binary that serves) gives the clean update error, and changes no file;
    • the probe scrubs the env, uses a loopback port and no config, and runs in a temp directory;
    • configure --show takes the list from the table;
    • setup and update refuse v0.7.0 and install v0.7.1 (with the existing fake release server, no download).

Open questions

  1. Setup does not check that the binary can list strategies. A v0.3.1–v0.7.0 proxy already on PATH (for example from brew) can still finish setup. Then the strategy commands give the clean error. The repo owner approved a fix on 2026-11-12: setup skips such a binary and downloads v0.7.1 or later. It comes in a separate PR.

Technical notes

  • configure reads the binary from the install record (record["binary"]), as update and doctor do: that is the binary the service runs.
  • An existing test, test_an_older_latest_is_not_a_downgrade_unless_asked, served v0.4.0, which the new minimum refuses. It now uses v0.8.0 and v0.7.1, and checks the same thing.

The Bob plugin no longer keeps its own list of cache strategies
(BOB_CACHE_STRATEGIES). configure reads the table from
`context-guru-proxy strategies`, as the Codex plugin does, and offers
the rows tagged "any" or "openai-chat". The offer stays exactly
["none"] today.

- The reader is a copy of the Codex plugin's: loopback port 0, no
  config, a scrubbed env, a fresh temp dir, a 5 s time limit. Bad
  output is a clean error (reason=strategy_table_unreadable) with the
  update hint. There is no fallback list for an older proxy.
- "openai-chat" names the OpenAI Chat Completions route. No row uses
  it yet. Bob does not filter by "openai": that is the Responses route.
- Behavior change: MINIMUM_BOB_RELEASE goes from v0.3.1 to v0.7.1,
  because an older binary cannot list strategies. Setup and update
  refuse to download a release older than v0.7.1.

Refs #1072

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[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 f00b8e60b92a blocking

Verdict: blocking

Findings

  1. bob-plugin/context-guru/scripts/bob_plugin.py:118 — configure --cache-strategy X accepts a name the plugin cannot apply, and then reports success
    • What fails: the proxy and the plugin ship separately. A later proxy adds a row tagged openai-chat (for example chat-ping). A user with this plugin runs configure --cache-strategy chat-ping. The name passes the allow check. The plugin writes no strategy. It prints result=unchanged and cache_strategy=none, exit 0. The user asked for a strategy and got a silent no-op. Before this PR the plugin refused every name except none (cache_strategy_not_allowed_for_bob). Now one proxy release, with no plugin change, removes that guard.
    • Proof: trace with --cache-strategy chat-ping, current preset lossless, no --preset:
      • line 118: chat-ping in allowed → no refusal.
      • not args.preset and current == "custom" → false.
      • preset = current → preset == current → facts(result="unchanged", preset=..., cache_strategy="none"), return 0.
      • The test test_show_takes_the_allowed_strategies_from_the_proxy_table already shows --show offers chat-ping from such a table. No test covers --cache-strategy chat-ping. The PR's open question 2 names this gap but leaves it open.
    • Fix: keep the table as the source of the offer, but refuse any offered name that the plugin cannot write. For example: if args.cache_strategy is in allowed and is not "none", refuse with a new reason such as cache_strategy_not_supported_by_plugin and the update hint for the plugin. Add a test with a with_row("chat-ping", ["openai-chat"]) table that asserts this refusal, exit 2, and no file change. Optionally also leave such a name out of allowed_cache_strategies in --show, so the skill never offers it.

Non-blocking

  • The update hint can point to a command that refuses. update_hint() says "run the context-guru-update skill". Setup accepts a proxy on PATH (for example brew) when it has --bob-upstream, so v0.3.1–v0.7.0 still pass binary_problem. For that binary, update refuses with binary_not_managed. The Codex hint also says "or remove the binary so setup downloads the latest release". Consider the same text, or say "update it the way you installed it" for an unmanaged binary.
  • Open question 1 (setup does not check strategies). I suggest yes: make find_binary skip a binary that cannot list strategies, so setup downloads v0.7.1+ instead. Else a new install can finish and then fail at the first configure --show. This is a behavior change, so it needs the human's yes too.
  • configure --cache-strategy none now fails on an old binary (exit 1). Before, it was a safe no-op. The PR header names this. I note it only so the human sees it when they approve the minimum change.
  • The new refusal tests for v0.7.0 call install_release_binary directly. No test drives setup with CONTEXT_GURU_VERSION=v0.7.0. The shared function makes this low risk.

What I checked

  • Read the full diff (5 files, 410 lines), the commit message and the PR body.
  • Compared load_strategy_table with the Codex copy (codex_plugin.py:246). The Bob copy drops only the presets check, which is correct: Bob keeps its own BOB_PRESETS and does not use the proxy presets.
  • Checked that strategies exists in cmd/context-guru-proxy/main.go at tag v0.7.1 and not at v0.7.0. So MINIMUM_BOB_RELEASE = (0, 7, 1) and STRATEGIES_RELEASE are correct.
  • Read configure, update, find_binary, binary_problem, _setup_changes. configure reads record["binary"], the binary the service runs. --preset alone does not run the probe (tested).
  • Probe safety: env scrub, DASHBOARD=0, CONFIG="", loopback port 0, temp cwd, stdin closed, 5 s limit. A served old binary gets killed at the timeout (exec sleep test). Bad output, non-UTF-8, non-zero exit, wrong shape and a missing binary all raise the clean error. No file changes on error (tested for --show and --cache-strategy none).
  • Filter: PROVIDERS = ("openai-chat", "any"). With today's table (none=any, auto/1-hour-head/others=anthropic, 30-min-ping=openai) the offer is exactly ["none"]. The Codex plugin filters on ("openai", "any") (codex_plugin.py:40), so the new openai-chat tag does not leak into the Codex offer.
  • config/strategy.go: comment only. No Go behavior change.
  • docs/data-dependence.md: the Bob row adds the probe sentence. Data dependence does not change (local binary, no network, no user data).
  • The changed downgrade test still checks the same rule with v0.8.0 installed and v0.7.1 latest.
  • Fail-open: not affected. This is plugin control code, not the request path.
  • I did not run tests (not approved; Go is not installed).

@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 1 of 2 f00b8e60b92a blocking

Verdict: blocking

Findings

  1. bob-plugin/context-guru/scripts/bob_plugin.py:952 — configure --show fails on an old proxy, so the preset picker breaks too

    • What fails: a proxy from v0.3.1 to v0.7.0 is installed. The user asks Bob "which preset runs". The preset-picker skill runs configure --show as step 1. The command now exits 1 with reason=strategy_table_unreadable, and it prints no preset= and no allowed_presets=. The user cannot see the preset, and the skill has no instruction for this result.
    • Proof:
      • bob_plugin.py:952-957: the table read runs before the --show output. On a RuntimeError it returns 1 before line 959 prints preset=.
      • skills/preset-picker/SKILL.md:11 runs configure --show. The PR changes only cache-strategy-picker/SKILL.md.
      • test_an_unreadable_table_is_a_clean_error_and_changes_nothing (test_bob_control.py:158) asserts this exit 1 for --show. So the test pins the regression.
      • The PR body says "Only configure --show and configure --cache-strategy stop". That hides that the preset view stops too. The preset does not need the table.
    • Fix: in --show, print result=ok, preset= and allowed_presets= always. On a table error, print the strategy error fields in place of allowed_cache_strategies= (for example cache_strategy_error=strategy_table_unreadable and the hint). Add a test: --show with an old binary still reports the preset. Or, at least, add the error case to the preset-picker skill.
  2. bob-plugin/context-guru/scripts/bob_plugin.py:968 — the plugin offers and accepts a strategy that it then ignores

    • What fails: a later proxy release adds a row tagged openai-chat, for example chat-ping. The proxy and the plugin release separately, so a deployed plugin reads that row. Then:
      • configure --show prints allowed_cache_strategies=none,chat-ping, but also cache_strategy=none and cache_note=Keep-alive pings do not apply to Bob.
      • configure --cache-strategy chat-ping passes the check at line 968. It then writes only the preset, and prints result=unchanged with cache_strategy=none (line 979), exit 0. The user asked for pings and silently gets none.
    • Proof: lines 968-985 never use args.cache_strategy after the allow check. write_proxy_config(port, preset) writes only a BOB_PRESETS body. test_show_takes_the_allowed_strategies_from_the_proxy_table (test_bob_control.py:152) shows that chat-ping reaches the offer. The PR says "the tag lets a future strategy … reach Bob … with no plugin change". Open question 2 says the opposite. The code follows open question 2, but nothing stops the bad state.
    • Fix: pick one, and test it.
      • Option a: configure refuses any name other than none with a clear reason (for example cache_strategy_not_supported_by_plugin), and --show lists only names it can apply. Then the guard does not depend on a future plugin change.
      • Option b: write cache: strategy: in the managed config, as the Codex plugin does with render_proxy_config, and stop hard-coding cache_strategy="none".
  3. bob-plugin/context-guru/scripts/bob_plugin.py:293 — setup accepts a proxy that cannot list strategies, and the update hint does not help that user

    • What fails: a v0.4.0 proxy installed with brew is on PATH. find_binary accepts it because binary_problem checks only --bob-upstream. Setup finishes. configure --show then says "run the context-guru-update skill". update refuses at line 1025 with binary_not_managed, because the binary is not the plugin's own copy. The user has no working path from the hint.
    • Proof: binary_problem (lines 293-301) does not test for strategies. MINIMUM_BOB_RELEASE (line 48) applies only to downloads (line 417). update_hint (line 321) names only the update skill. The Codex plugin's hint also says "or remove the binary so setup downloads the latest release". The PR names this as open question 1, but leaves it open.
    • Fix: make binary_problem also reject a binary that fails load_strategy_table, so setup skips it and downloads v0.7.1 or later. This is a behavior change and needs a human's yes. If not, at least make update_hint say how to update an unmanaged binary (for example "update it the way you installed it, for example brew").

Non-blocking

  • configure --preset off --cache-strategy none now fails on an old proxy, because the table read runs first. The preset part does not need the table. Finding 1's fix could cover this too.
  • The Codex reader also checks table["presets"]. The Bob reader does not. That is correct, because Bob writes its own pipeline body. A short comment that says why would help the next reader, since the two readers are meant to be copies.
  • README.md "Cache strategy" section still says "Only none" with no word about the table or the v0.7.1 minimum. It is still true today, but the README does not say the list now comes from the proxy.

What I checked

  • The full diff of commit f00b8e6 (5 files) and the commit message and PR body.
  • configure, update, setup, _setup_changes, find_binary and binary_problem in bob_plugin.py, around each change.
  • The Codex plugin's load_strategy_table, offered_strategies, update_hint and render_proxy_config, for a line-by-line compare. The scrub lists and the probe are the same.
  • git show v0.7.0 and v0.7.1 of cmd/context-guru-proxy/main.go: strategies is first in v0.7.1, so the new minimum is correct, and the v0.7.1 tag exists.
  • The preset-picker and cache-strategy-picker skills and the Bob README, for callers of configure --show.
  • The new and changed tests, including the changed test_an_older_latest_is_not_a_downgrade_unless_asked. I did not run them: live tests are not approved.
  • config/strategy.go and docs/data-dependence.md: only a comment and one sentence change. The data dependence stays "metadata".
  • The behavior change block at the top of the PR names who, the old and new behavior, and needs a human's yes. Finding 1 adds an effect that the block does not name.

Review fixes for PR #1093.

- Offered now means: fits Bob's route AND the plugin can apply it.
  The plugin writes no cache strategy, so plugin_applies() accepts
  only none. A name that fits the route but cannot be applied gets
  reason=cache_strategy_not_supported_by_plugin, exit 2.
- configure --show always reports the preset. A table error goes in
  cache_strategy_error and cache_strategy_detail, exit 0.
- --cache-strategy none never reads the table, so it works on an
  older proxy.
- The update hint also covers a proxy the plugin did not install.
- README and the cache-strategy-picker skill describe the new fields.

Refs #1072

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 1 replies. Fixed in c3550f1:

  1. A name the plugin cannot apply is accepted, then ignored (both reviewers, finding 1 and reviewer 2 finding 2): fixed, option a. The offer is now "fits the route" and "the plugin can apply it". The plugin writes no cache strategy into its config, so it can apply only none (plugin_applies, with a comment that says a new strategy must teach write_proxy_config first).
    • --show does not list such a name.
    • --cache-strategy chat-ping (tagged openai-chat) is refused with a new reason, cache_strategy_not_supported_by_plugin, exit 2, no file change, no restart. New test, red first (0 != 2).
    • A name that does not fit the route keeps cache_strategy_not_allowed_for_bob.
    • Option b (write the strategy, as Codex does) waits until a Chat Completions strategy exists.
  2. --show breaks the preset picker on an old proxy (reviewer 2, finding 1): fixed. --show always prints result=ok, preset=, allowed_presets=, exit 0. On a table error it prints cache_strategy_error=strategy_table_unreadable and cache_strategy_detail= in place of allowed_cache_strategies=. New test, red first (1 != 0 : result=error).
  3. --cache-strategy none fails on an old proxy (reviewer 1, non-blocking; reviewer 2, non-blocking): fixed. none is always valid on Bob, so it reads no table. New test with an old binary: --preset off --cache-strategy none works. Red first.
  4. The hint does not help an unmanaged binary (reviewer 2, finding 3; reviewer 1, non-blocking): the hint is fixed. It now says, as the Codex hint does: for a proxy the plugin did not install (for example with brew), update it the way it was installed, or remove it so setup downloads the latest release. New test, red first.
    • Not changed: setup does not skip an old binary on PATH. That is a behavior change, so it is an open question for the repo owner in the PR body.
  5. No setup test with CONTEXT_GURU_VERSION=v0.7.0 (reviewer 1, non-blocking): no change. Setup and update both call install_release_binary, which the tests cover.
  6. Why no table["presets"] check (reviewer 2): a comment now says why. Bob writes its own pipeline body.
  7. README (reviewer 2): fixed. The cache strategy section says the offer comes from the proxy's table (v0.7.1 or later), and that today it is only none.

Checks: the whole Bob suite, 199 tests, OK.

@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 2 of 2 c3550f11f930 approve

Verdict: approve

Findings

None.

Earlier findings

  • Reviewer 2, finding 1 (--show breaks the preset picker on an old proxy): fixed.
    • configure (bob_plugin.py, the if args.show: block) now catches the table error. It always prints result=ok, preset= and allowed_presets=, and exits 0.
    • On a table error it prints cache_strategy_error= and cache_strategy_detail= in place of allowed_cache_strategies=. facts prints the error as one key=value line, because the message has no newline.
    • test_show_on_an_unreadable_table_still_reports_the_preset asserts the exact first 4 lines, exit 0, and no file change.
    • The preset-picker skill reads only preset= and allowed_presets=, so it works again with no skill change.
  • Reviewer 2, finding 2, and reviewer 1, finding 1 (a strategy is offered, accepted, then ignored): fixed, option a.
    • plugin_applies accepts only none. --show filters the offer through it.
    • --cache-strategy chat-ping from an openai-chat row now gets cache_strategy_not_supported_by_plugin, exit 2. The refusal comes before any write or restart.
    • Trace: a name other than none can no longer reach the preset == current path with exit 0. test_a_strategy_the_plugin_cannot_apply_is_refused_and_nothing_changes checks the tree and the launchctl calls.
  • Reviewer 2, finding 3 (setup accepts an old binary, and the hint does not help): hint fixed. The setup check is deferred to the repo owner.
    • update_hint now names the brew case and the "remove it so setup downloads" path, as the Codex hint does. A test pins the text.
    • A setup that skips an old binary on PATH is a behavior change. The CLAUDE.md rule says only a human decides that. The PR body lists it under Open questions. I accept this.
  • Non-blocking items (both reviewers):
    • --cache-strategy none on an old proxy: fixed. none skips the table. test_cache_strategy_none_does_not_read_the_table drives --preset off --cache-strategy none with an old binary.
    • The comment on the missing table["presets"] check: added.
    • The README: it now says the offer comes from the proxy table, v0.7.1 or later.
    • No setup test with CONTEXT_GURU_VERSION=v0.7.0 (reviewer 1): the author did not change this. Setup and update share install_release_binary, which has tests. I accept the reason.

Non-blocking

  • --cache-strategy X for any X other than none can never succeed now, because plugin_applies accepts only none. The table read on that path only selects which refusal reason to print. On an old proxy the user gets exit 1 (strategy_table_unreadable) where a refusal (exit 2) would also be true. The skill says not to run a command for another strategy, so the effect is small. The PR body names this behavior.
  • If a future table has no none row tagged any, --show prints an empty allowed_cache_strategies=. --cache-strategy none still succeeds without the table, and cache_strategy=none is still reported. This is unlikely, because none is the proxy's own fallback.

What I checked

  • Last review: round 1, f00b8e6, 2026-11-11T16:01:24Z
  • New commits read: 1 — c3550f11 fix(bob): offer only strategies the plugin can apply (4 files, +96 −31)
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files)
  • New items since my last review:
    • Comment by vz-ibm at 2026-11-11T16:12:28Z (the round-1 replies, items 1–7). I checked each reply against the code and the tests above.
    • Reviewer 1's round-1 review (16:01:20Z) is older than my review time, but I read it now for the first time. Its finding 1 is the same as my finding 2, and it is fixed. I checked its non-blocking items above.
    • No comment from a person other than the author's replies.
  • The full configure function at the new head, update_hint, plugin_applies, offered_strategies, load_strategy_table and facts.
  • The new and changed tests in test_bob_control.py: each one asserts specific output, the exit code, and no file change where it matters.
  • The cache-strategy-picker and preset-picker skills, and the README "Cache strategy" section.
  • The updated PR body: the behavior change block now says --show still reports the preset, and --cache-strategy none and --preset work as before. That matches the code.
  • I did not run the tests: live tests are not approved.

@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 c3550f11f930 approve

Verdict: approve

Findings

None.

Status of earlier findings

  • Reviewer 1, finding 1 (a name the plugin cannot apply is accepted, then ignored): fixed.
    • plugin_applies accepts only none.
    • --show filters the offer through it. The test test_show_lists_only_strategies_that_fit_the_route_and_the_plugin_applies uses a chat-ping row tagged openai-chat and asserts allowed_cache_strategies=none.
    • --cache-strategy chat-ping now gets cache_strategy_not_supported_by_plugin, exit 2. It changes no file and makes no launchctl call (test_a_strategy_the_plugin_cannot_apply_is_refused_and_nothing_changes).
    • Trace: line 86 → table read → chat-ping in fits → plugin_applies false → refusal. A name for another route still gets cache_strategy_not_allowed_for_bob.
  • Reviewer 2, finding 1 (--show breaks the preset picker on an old proxy): fixed.
    • --show always prints result=ok, preset= and allowed_presets=, exit 0.
    • On a table error it prints cache_strategy_error= and cache_strategy_detail= in place of the list.
    • facts prints the RuntimeError with str(). The message has no newline, so the key=value output stays valid.
    • The test test_show_on_an_unreadable_table_still_reports_the_preset asserts the exact order of the first lines.
  • Reviewer 2, finding 2: fixed. It is the same defect as my finding 1. See above.
  • Reviewer 2, finding 3 (setup accepts an old proxy on PATH; the hint does not help): partly fixed. I accept the open part.
    • The hint now covers a proxy that the plugin did not install. This matches the Codex hint. A test covers it.
    • Setup still accepts an old binary on PATH. That change would be a behavior change, so the author put it under the PR's open question 1 for the owner. That follows the repo rule.
  • My non-blocking points:
    • Old hint: fixed.
    • Setup check: open question for the owner. Accepted.
    • --cache-strategy none on an old proxy: fixed. none reads no table (test_cache_strategy_none_does_not_read_the_table, with --preset off too).
    • No setup test with a pinned v0.7.0: the author rejected it because setup and update share install_release_binary, which is tested. The reason is correct. Accepted.
  • Reviewer 2, non-blocking points:
    • --preset off --cache-strategy none: fixed, as above.
    • Comment on why there is no presets check: added at load_strategy_table.
    • README: fixed. It now says the offer comes from the proxy table (v0.7.1 or later) and is only none today.

Non-blocking

  • On an old proxy, configure --cache-strategy 5-min-ping now gives strategy_table_unreadable, exit 1. Before this PR it gave cache_strategy_not_allowed_for_bob with NO_KEEPALIVE_REASON, exit 2. The skill says not to run a command for another strategy, so the risk is low. The PR header names this case ("for an X other than none stops with that error").
  • The PR header's behavior-change block is up to date with the new --show and none behavior. It still needs the human's yes before merge, as the block says.

What I checked

  • Last review: round 1, f00b8e6, 2026-11-11T16:01:20Z
  • New commits read: 1 (c3550f1 fix(bob): offer only strategies the plugin can apply)
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files)
  • New items since my last review:
    • Reviewer 2's round-1 review (16:01:24Z): I read all three findings and the non-blocking points. I checked each fix above.
    • vz-ibm's reply comment (16:12:28Z), items 1–7: I checked each claim against the diff and the tests. All are true. I accept the two items with no code change (setup check, setup test), with the reasons above.
  • The whole diff f00b8e6..c3550f1 (4 files, 223 lines): bob_plugin.py (update_hint, load_strategy_table comment, plugin_applies, configure), test_bob_control.py, SKILL.md, README.md.
  • I read configure in full after the change, and facts. The --preset path, the custom path and the restart path did not change.
  • The current PR body: the behavior-change block and open question 1 match the code.
  • I did not run tests (not approved; Go is not installed).

@vz-ibm

vz-ibm commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

The repo owner (@vz-ibm) approved both behavior changes on 2026-11-12:

  1. The minimum proxy version for Bob goes from v0.3.1 to v0.7.1 (this PR).
  2. Setup skips a proxy on PATH that cannot list its strategies, and downloads v0.7.1 or later. That comes in a separate PR.

Both round-2 reviews approve. This PR is ready to merge.

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]>
@vz-ibm

vz-ibm commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Merged main in d63d3b7, to fix the conflict with #973 (the bob-ultrahigh preset) and #1090 (one file per data-dependence row).

  • Kept all of feat(bob-plugin): add the bob-ultrahigh preset (replaces lossless-defer) #973: the 3 presets, bob-ultrahigh as the default, PRICED_PRESETS, PRESET_MINIMUM_RELEASE and its proxy_too_old check, which runs before the strategy check in configure.
  • Kept all of this PR: the table reader, plugin_applies, --show always reporting the preset, --cache-strategy none without the table, MINIMUM_BOB_RELEASE = (0, 7, 1).
  • Removed BOB_CACHE_STRATEGIES, which main still had.
  • The data-dependence sentence moved into docs/data-dependence/features/bob-plugin.md, and the page was rebuilt with make datadep.

Checks: the whole Bob suite, 216 tests, OK; go test ./config/ ./components/all/ OK.

The repo owner granted 1 more review round (round 3) for this merge. The setup change is #1111, stacked on this PR.

@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 d63d3b79e384 approve

Verdict: approve

Findings

None.

Status of earlier findings

  • All findings from rounds 1 and 2 (both reviewers) were fixed or accepted at c3550f1. The merge keeps every fix:
    • plugin_applies and the cache_strategy_not_supported_by_plugin refusal are still in configure.
    • --show still reports the preset on a table error.
    • --cache-strategy none still reads no table.
    • update_hint still covers a proxy that the plugin did not install.
  • The setup check for an old proxy on PATH: the owner (@vz-ibm, a human) approved it on 2026-11-12. It moves to #1111. Accepted.

Non-blocking

  • This comes from main (#973), not from this PR. MINIMUM_BOB_RELEASE is v0.7.1, but the default preset bob-ultrahigh needs v0.7.2 (PRESET_MINIMUM_RELEASE). A setup pinned with CONTEXT_GURU_VERSION=v0.7.1 can download a proxy that the default preset does not fit. The restart check in change_and_restart is the guard for that case. A future change could set the minimum to the default preset's need.

What I checked

  • Last review: round 2, c3550f1, 2026-11-11T16:13:57Z
  • New commits read: 1 (d63d3b7 chore: merge main into feat/bob-strategies-from-proxy)
  • Read in full: 4 reviews, 3 comments, 0 inline comments (from the three files)
  • New items since my last review:
    • Reviewer 2's round-2 review (16:13:56Z, approve). I read it. Its two non-blocking points match my round-2 note. No new action.
    • vz-ibm's comment (2026-11-12T06:10:32Z): the owner approves both behavior changes. The setup change goes to a separate PR. This settles the PR's behavior-change block and open question 1.
    • vz-ibm's comment (2026-11-12T06:35:21Z): the merge notes, and a grant of round 3. I checked each claim against git show --cc d63d3b79. All are true.
  • The merge resolution (git show --cc, 320 lines):
    • bob_plugin.py constants: #973's 3 presets, DEFAULT_PRESET = "bob-ultrahigh", PRESET_EFFECTS, PRICED_PRESETS, PRESET_MINIMUM_RELEASE and PRICES_SOURCE sit next to this PR's MINIMUM_BOB_RELEASE = (0, 7, 1), STRATEGIES_RELEASE, PROVIDERS and the probe scrub lists. BOB_CACHE_STRATEGIES is gone (grep finds nothing).
    • configure at the new head (lines ~1040–1100), read in full: --show → preset allow check → proxy_too_old check → strategy check → custom → write and restart. The proxy_too_old check only reads --version, so it does not depend on the strategy table. The order is correct.
    • Tests: ConfigureTest.setUp points the record at the fake table binary. Its --version output does not parse, so proxy_too_old stays false, as for a dev build. test_bob_ultrahigh_is_refused_on_a_proxy_older_than_its_settings mocks binary_version, so it does not depend on that fake. The merged --show test asserts preset=bob-ultrahigh and allowed_presets=off,lossless,bob-ultrahigh, which matches BOB_PRESETS order.
  • Data dependence (#1090 row files):
    • git diff c4b284e2..HEAD changes only one body line in docs/data-dependence/features/bob-plugin.md and one row in docs/data-dependence.md. The new sentence is "To list the cache strategies, configure runs the local proxy binary once …".
    • I checked with a Python script that the row file body is in the page exactly. So the page matches the row file. I could not run go run ./cmd/gen-datadep (Go is not installed). Kind (metadata) and the three levels do not change.
  • The full PR diff against the new base (git diff --stat c4b284e2..HEAD): 7 files. They are the same files as before, plus the row file.
  • I did not run tests (not approved; Go is not installed).

@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 d63d3b79e384 approve

Verdict: approve

Findings

None.

Earlier findings

  • All findings from rounds 1 and 2 stay fixed after the merge. I read the net diff against the new base (c4b284e2..d63d3b79), not only the merge commit.
    • Reviewer 2, finding 1 (--show and the preset picker): fixed. --show still catches the table error and always prints preset= and allowed_presets=. The test now expects preset=bob-ultrahigh and allowed_presets=off,lossless,bob-ultrahigh, which matches #973.
    • Reviewer 2, finding 2, and reviewer 1, finding 1 (a strategy is offered, then ignored): fixed. plugin_applies and the cache_strategy_not_supported_by_plugin refusal are in place.
    • Reviewer 2, finding 3 (setup accepts an old proxy): the hint is fixed. The owner's comment of 2026-11-12T06:10:32Z moves the setup check to a separate PR (#1111). I accept this.
  • My two round-2 non-blocking points are unchanged. They stay non-blocking.

Non-blocking

  • PRESET_MINIMUM_RELEASE["bob-ultrahigh"] is v0.7.2, but MINIMUM_BOB_RELEASE is v0.7.1. So CONTEXT_GURU_VERSION=v0.7.1 lets setup download v0.7.1, and setup then writes the default bob-ultrahigh. The proxy_too_old check runs only in configure --preset. This comes from #973, not from this PR, and this PR makes the gap smaller (it was v0.3.1). #1111 or a follow-up could make the download floor the larger of the two.
  • In ConfigureTest, the record binary is now the fake table script. That script prints the JSON table for any argument, also for --version. So binary_version returns "auto", and the proxy_too_old check counts it as "no version". The bob-ultrahigh version tests mock binary_version, so they still test the real rule. A test that does not mock it would pass for the wrong reason. A --version branch in the fake script would make this explicit.

What I checked

  • Last review: round 2, c3550f1, 2026-11-11T16:13:56Z
  • New commits read: 1 — d63d3b79 chore: merge main into feat/bob-strategies-from-proxy (a merge of c4b284e2; it resolves conflicts with #973 and #1090)
  • Read in full: 4 reviews, 3 comments, 0 inline comments (from the three files)
  • New items since my last review:
    • Reviewer 1's round-2 review (2026-11-11T16:13:57Z): approve. Its one new non-blocking point is the same as my round-2 point on exit 1 and exit 2. Nothing new to do.
    • Comment by vz-ibm at 2026-11-12T06:10:32Z: the owner approves the v0.7.1 minimum, and moves the setup check to a separate PR. The comment comes from the owner's account. This satisfies the behavior-change rule for this PR.
    • Comment by vz-ibm at 2026-11-12T06:35:21Z: the merge notes. I checked each claim:
      • All of #973 kept: the 3 presets, the bob-ultrahigh default, PRICED_PRESETS, and PRESET_MINIMUM_RELEASE with proxy_too_old. That check runs before the strategy check in configure. True.
      • All of this PR kept: the table reader, plugin_applies, --show, none without the table, and MINIMUM_BOB_RELEASE = (0, 7, 1). True.
      • BOB_CACHE_STRATEGIES removed: true. grep finds no use of it left in the repo.
      • Data dependence: the sentence is in docs/data-dependence/features/bob-plugin.md. The generated docs/data-dependence.md changes only that row, and the row text is the same as the row file body (I compared them with a script). The Kind and the levels do not change. No hand edit.
  • I read the full net diff c4b284e2..HEAD (7 files, 518 lines) and the whole configure function at the new head.
  • The preset-picker and cache-strategy-picker skills at the new head. Both still run configure --show, and both work with the new output.
  • binary_version, and the #973 tests near the strategy tests (proxy_too_old, and bob-ultrahigh on new or unnumbered versions).
  • I did not run the tests: live tests are not approved.

@amiddavid
amiddavid merged commit cfe8d6f into main Nov 12, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 12, 2026
vz-ibm added a commit that referenced this pull request Nov 12, 2026
main now has #1093 (merged as one commit), so this branch moves its base
to main. The 2 conflicts were the same #1093 text on both sides; this
branch keeps its own version, which adds the setup check.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
amiddavid added a commit that referenced this pull request Nov 12, 2026
… picker texts generic (#1115)

The proxy's strategy table tags auto, 1-ping and 2-ping for Anthropic
and OpenAI: the same keys drive the OpenAI keep-alive. 1-hour-head
stays Anthropic only; none stays any. The picker texts (desc) are
generic, for every provider a strategy serves. The Codex filter now
offers a row only when its providers are exactly openai or any, so
Codex keeps offering none and 30-min-ping (owner decision, 2026-11-11).

Offers after the change: Claude Code unchanged; Codex unchanged;
OpenCode on Anthropic unchanged; Pi (#1113) none, auto, 1-ping, 2-ping;
Bob (#1093) still none only.

Behavior change: OpenCode setups that route only OpenAI. Old: none and
30-min-ping, default none. New: none, auto, 1-ping, 2-ping and
30-min-ping, default auto, so these setups now get keep-alive pings
on the user's OpenAI quota. Turn it off: pick none.
Owner's yes, 2026-11-12, in the integrator session: "1115 I agree with
the behavior change".

Data dependence: none.

Refs #1062.

Reviews: 1 offload review round (GLM): both approve at 67d208d. After
it: a merge of main whose only hand resolution is the Providers comment
in config/strategy.go (comment lines only; #1093's openai-chat text
kept).

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
amiddavid pushed a commit that referenced this pull request Nov 12, 2026
Bob setup skips a context-guru-proxy that cannot serve the preset it
writes: older than v0.7.1 (cannot list its cache strategies), or older
than v0.7.2 for the default preset bob-ultrahigh. Setup then downloads
the latest release, so a Mac with an old proxy on PATH (for example
from brew) still installs cleanly.

Behavior change: Bob users who run setup with such an old proxy on
PATH or in the plugin's own path. Old: setup used it, and the cache
strategy commands then failed with the update error. New: setup skips
it and downloads the latest release.
Owner's yes, 2026-11-12, in the integrator session: "1111 approve".

Data dependence: none.

Reviews: 3 offload review rounds (Claude backend). Round 3: both
approve at f9108e6, which is the PR head (a merge of main after #1093
and #1105).

Signed-off-by: Vitaly Zabershinsky <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
amiddavid added a commit that referenced this pull request Nov 12, 2026
…py of the table (#1113)

The Pi package reads the cache strategies from the proxy's table
(`context-guru-proxy strategies`) and keeps no copy, like the Claude
Code (#1055), Codex (#1051), OpenCode and Bob (#1093) plugins.

- STRATEGIES is removed from pi_plugin.py; the TypeScript extension
  gets its list from `configure --list`. The consent question uses the
  proxy's text.
- The probe follows #1055/#1051: a 5-second limit, the scrubbed
  environment, DASHBOARD=0, LISTEN_ADDR=127.0.0.1:0, an empty CONFIG,
  closed stdin and a fresh temp cwd. Bad output gives a clean error.
- Pi offers a strategy only when it serves both providers it routes
  (tagged any, or anthropic and openai). A proxy older than v0.7.1 gets
  the update hint; none always works.
- pi-package/strategies_test.go is gone: Pi has no table to pin.

Behavior change: Pi users. Old: the package used its own table. New: it
reads the proxy's table. With the tag fix (#1115), Pi offers none,
auto, 1-ping and 2-ping on a v0.7.4 proxy. Owner's decisions,
2026-11-11 (issue #1062: no fallback, provider tags, generic texts) and
2026-11-12, in the integrator session: "since Pi is new and there is
no user base, u can just do a, u dont even need to require it. just
assume that this is the defacto" (no version gate; ships with #1115).

Data dependence: none. Row:
docs/data-dependence/features/pi-proxy-check.md.

Fixes #1062.

Reviews: 3 offload review rounds (GLM). Round 3: both approve at
cc6e1bc, which is the PR head. It covers the merge of main (only the
generated docs/data-dependence.md, rebuilt with cmd/gen-datadep) and
the fix for a CI-only failure: the consent question printed an empty
"What it does, from the proxy:" when no proxy binary was found.

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
amiddavid added a commit that referenced this pull request Nov 19, 2026
Plugin versions for v0.7.4:
- Claude Code plugin 0.7.3 -> 0.7.4 (#1096, #1135, #1174, #1177, #1199,
  #1216).
- Codex plugin 0.2.12 -> 0.2.13 (#1115, #1135).
- Pi package 0.1.1 -> 0.1.2 (#1113).
- Bob plugin 0.1.1 -> 0.1.2 (#1093, #1111, #1118, #1124, #1126, #1127).
  The owner's Bob hold (#1221) covers release tests only.
- OpenCode: PINNED_VERSION v0.7.3 -> v0.7.4 in opencode-plugin/index.js,
  its README, docs/how-to/install-opencode-plugin.md and 3 tests.

Behavior change: the version numbers; the OpenCode plugin's first start
downloads proxy v0.7.4. Release bumps are approved by the owner ("I
approve version bumps").

Data dependence: none.

Reviews: 2 offload review rounds (GLM): both approve at ab79001. After
it: 1422093, a merge of main with no hand resolution (remerge-diff 0;
approval-still-valid: SAME CHANGE).

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5 <[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.

bob: take the cache strategy choice from the proxy table instead of BOB_CACHE_STRATEGIES

2 participants