Skip to content

feat(android): bind the BB conversation target to its configured provider, codex or claude-code - #1046

Open
egerev wants to merge 3 commits into
mainfrom
bb/android-provider-binding-thr_h748zsv2mq
Open

egerev wants to merge 3 commits into
mainfrom
bb/android-provider-binding-thr_h748zsv2mq

Conversation

@egerev

@egerev egerev commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Problem (DK-6): owner, relayed 2026-11-18 (translated): "let's try running a Claude Code session there as a replacement for Codex for executing tasks, and for now temporarily route Grok there through Claude Code". The Android android_task BB conversation target accepted only a thread reporting providerId == 'codex', so a configured Claude Code thread could never bind.

Expected: bb_conversation.provider in the private admin config: codex (the default when absent) or claude-code. The metadata check compares the thread's providerId with that setting, so neither provider is ever accepted indiscriminately. Null, other spellings and other providers refuse the configuration. A caller cannot choose the provider. Every other check stays: thread, project, environment, host, workspace, CLI hash, principal, device and android:control. Native engines, default_engine and model pins are unchanged; there is no new engine, queue or executor.

Change:

  • config.py: one optional Literal['codex', 'claude-code'] field.
  • bb_conversation.py: one comparison.
  • docs/android-bb-conversation.md: the config example, plus the default, the explicit Claude Code switch and rollback.

Proof: new services/android/tests/test_bb_conversation_provider.py (29 cases, # spec: ANYM-993) runs the real HTTP app and strict config with a synthetic BB CLI. No phone, ADB, model or real BB call.

  • Failing-first on main: 27 fail. The strict config refuses the provider key, so a Claude Code target can't be configured and every claude-code-configured guard case fails with it. The 2 that pass are today's behaviour: the default Codex target, and the default refusing a Claude Code thread.
  • With the change: 29/29 pass.
  • Cases covered:
    • Claude Code message, status, result and receipt in its one thread, with repeat, receipt and one thread tell;
    • default and explicit Codex, unchanged;
    • a mismatch in both directions, a missing provider and a different spelling, refused after one metadata read with nothing sent;
    • each other reported identity, principal, device and permission, and the CLI hash;
    • invalid config values refused at start and mid-run;
    • a caller-supplied provider refused, with discovery staying BB-free;
    • unknown delivery and switch/rollback receipts, never resent.
  • Local run, once: the full Android suite (1089 passed, 5 skipped for missing Tesseract and Apple Vision) and Ruff.

Not claimed: installing the package, swapping the paired config on the phone host (only with no work in either thread, with the UTC switch and rollback recorded), Grok routing, and any real model, phone or order run. All of that is root-owned runtime acceptance after green main, and there's no agent-feature live comparison from source checks. Tiden: the provider rule is the new story ANYM-1003 on the intent branch below, under ANYM-967. ANYM-993's main text is unchanged, because its BB-conversation text is pending on the open intent/2026-11-17-anym-993-android-observation-is. The tests keep the ANYM-993 marker that the existing BB-conversation tests use, because the PR check resolves only main and proposal//review/ branches.

Tiden intent branch: intent/2026-11-18-the-android-bb-conversation
Spec: ANYM-993
Change path: AUTO (owner-requested provider choice in an optional admin config; no grants, authentication or reserved-decision change; signal words are synthetic test principals' existing permission lists)
Review record: none (owner 11-11: no reviews)

🤖 Generated with Claude Code

…ider, codex or claude-code

The Android BB conversation target accepted only a thread that reports
provider codex. Its private admin config now takes an optional provider,
codex by default or claude-code; any other value refuses the
configuration. The metadata check compares the thread's providerId with
that setting, so a target configured for one provider never binds a
thread of the other. Every other check stays: thread, project,
environment, host, workspace, CLI hash, principal, device and control.
A caller cannot choose the provider, and the native engines, default
engine and model pins are unchanged.

Spec: ANYM-993

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: egerev <egor@gosync.ai>
@egerev egerev added the ship Small-fix rule: orchestrator Diff read at head; merge-keeper may enqueue label Nov 18, 2026
@egerev
egerev enabled auto-merge November 18, 2026 11:54
egerev and others added 2 commits November 18, 2026 19:56
… Codex request

After the switch the unknown Codex request is refused under its original
ID with either text, its receipt file stays byte-identical, and rollback
reads it back still unknown; one send in total.

Spec: ANYM-993

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: egerev <egor@gosync.ai>
…he BB conversation guide

The opening and the end-to-end check now name the configured existing
conversation of the selected provider (Codex by default, Claude Code when
configured). The first activation and its undo are kept apart from a
provider switch, whose undo restores thread_id and provider together in
the existing object.

Spec: ANYM-993

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: egerev <egor@gosync.ai>
@egerev
egerev disabled auto-merge November 18, 2026 12:04
@egerev egerev removed the ship Small-fix rule: orchestrator Diff read at head; merge-keeper may enqueue label Nov 18, 2026

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant