#6031 · ACP choice and companion fields remain separate questions
Verdict: PARTIALLY REPRODUCED. Root-cause confidence: high for the planner mechanism; the actual provider and live UI are unverified.
1. TL;DR
A deterministic test of the production ACP planner produces two question cards from a string enum property and a companion text property. Answering only the enum declines the whole form, even when the text property is not listed in the schema's required array. The planner treats every schema property as a separate question and never interprets companion relationships. The same result occurs in two newly cloned, clean main checkouts without changing production code. A live omp request, its consumer's expected response, and macOS UI behavior were not tested, so this is a partial reproduction rather than an end-to-end confirmation.
2. Claims vs findings
| Claim | Finding | Evidence |
|---|---|---|
| A choice and its suffix-named text companion become separate questions. | Verified at planner boundary | The authored reproduction observes two question IDs, with free text disabled on the enum and enabled on the text property. |
| The companion is effectively required. | Verified at planner boundary | Omitting an optional companion returns decline; answering both returns accept with both original property names. |
| A standalone suffix-named text property must remain independent. | Verified control | The third test successfully answers a standalone text property. |
| Every installed omp choice request uses this convention. | Unverified | No actual installed-provider request or provider-side response decoder was inspected or executed. |
| One combined question is safe for all ACP forms with these names. | Not established | Trusted main has no companion discriminator or documented suffix contract. Property names alone do not establish a JSON Schema relationship. |
| The visible desktop form is affected on macOS. | Unverified | No rendered UI or desktop run. No screenshot or provider-version claim is presented as verified. |
3. Environment
- Public repository: get-bb/bb; main fetched directly from that repository. Base:
b143a22860944a96bf183605dfb0ffe58b1de283, matching the GitHub main commit API. - Linux 4.19.0-gvisor x86_64; Node v22.19.0; pnpm 9.15.0; Vitest 4.1.1.
- Two separate temporary clones, designated
base/andverify/, both detached at the recorded base. Each was clean before copying the authored reproduction. - No provider process, browser, development server, port, runtime database, or user data directory was used.
- Frozen installation succeeded in both clones. A whole-repository build was attempted in the first clone and stopped at an unrelated GitHub-plugin SDK build-order failure. The targeted ACP dependency build succeeded in the second clone. This build failure did not prevent either reproduction from running.
4. Minimal reproduction
The test is newly authored from the production planner's schema/answer boundary; it is not copied from the issue's sample or the linked PR. Download the exact reproduction file.
- Clone the trusted repository and detach at the recorded commit:
git clone https://github.com/get-bb/bb.git bb-6031 cd bb-6031 git checkout --detach b143a22860944a96bf183605dfb0ffe58b1de283 pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build --filter=@bb/provider-bridge-acp
- Save the downloaded test to
packages/provider-bridge-acp/src/issue-6031.repro.test.ts. - Run the owner-boundary reproduction:
pnpm exec turbo run test --filter=@bb/provider-bridge-acp -- src/issue-6031.repro.test.ts --silent=false
Expected for the reported companion convention: one question with enum options and free-text capability. Actual: two questions and a rejected answer when the companion is absent. Verbatim assertion and test totals from both runs:
AssertionError: expected [ { id: 'format', …(5) }, …(1) ] to have a length of 1 but got 2
Test Files 1 failed (1)
Tests 1 failed | 2 passed (3)
The diagnostic test also records the following result:
{
"questions": [
{ "id": "format", "allowFreeText": false, "options": ["brief", "detailed"] },
{ "id": "format__other", "allowFreeText": true, "options": [] }
],
"withoutCompanion": { "action": "decline" },
"withCompanion": { "action": "accept", "content": { "format": "brief", "format__other": "outline" } }
}
Full source, with no production seam or mocking:
import { describe, expect, it } from "vitest";
import { planAcpElicitation } from "./elicitation.js";
function planFormatQuestion() {
const plan = planAcpElicitation({
mode: "form",
message: "Choose the response format",
requestedSchema: {
type: "object",
required: ["format"],
properties: {
format: {
type: "string",
title: "Response format",
enum: ["brief", "detailed"],
},
format__other: { type: "string", title: "Custom format" },
},
},
});
if (plan.kind !== "questions") {
throw new Error(JSON.stringify(plan));
}
return plan;
}
describe("issue 6031 trusted-base reproduction", () => {
it("records the split and refusal when the optional text property is omitted", () => {
const plan = planFormatQuestion();
const withoutCompanion = plan.toResponse({
kind: "user_answer",
answers: { format: { selected: ["brief"] } },
});
const withCompanion = plan.toResponse({
kind: "user_answer",
answers: {
format: { selected: ["brief"] },
format__other: { selected: [], freeText: "outline" },
},
});
const observed = {
questions: plan.payload.questions.map((question) => ({
id: question.id,
allowFreeText: question.allowFreeText,
options: question.options?.map((option) => option.value) ?? [],
})),
withoutCompanion,
withCompanion,
};
console.log(JSON.stringify(observed, null, 2));
expect(observed).toEqual({
questions: [
{ id: "format", allowFreeText: false, options: ["brief", "detailed"] },
{ id: "format__other", allowFreeText: true, options: [] },
],
withoutCompanion: { action: "decline" },
withCompanion: {
action: "accept",
content: { format: "brief", format__other: "outline" },
},
});
});
it("regression: presents the choice and companion as one free-text-capable question", () => {
const plan = planFormatQuestion();
expect(plan.payload.questions).toHaveLength(1);
expect(plan.payload.questions[0]).toMatchObject({
id: "format",
allowFreeText: true,
});
});
it("keeps a standalone text property as its own question", () => {
const plan = planAcpElicitation({
mode: "form",
requestedSchema: {
type: "object",
properties: { notes__other: { type: "string" } },
},
});
expect(plan.kind).toBe("questions");
if (plan.kind !== "questions") {
throw new Error(JSON.stringify(plan));
}
expect(plan.payload.questions).toHaveLength(1);
expect(
plan.toResponse({
kind: "user_answer",
answers: { notes__other: { selected: [], freeText: "follow up" } },
}),
).toEqual({ action: "accept", content: { notes__other: "follow up" } });
});
});
5. Root cause
The ACP planner creates one question per schema property, disables free text for enum choices, and declines the whole form when any property has no decodable answer.
- elicitation.ts:135–151: ordinary string choices and multi-choices explicitly disable free text.
- elicitation.ts:265–297: properties become entries, and every entry becomes a separate planned question. The schema's required array is not consulted. The property count limit is also applied before planning.
- elicitation.ts:170–185: an enum decodes only a selected enum value; arbitrary typed text is not an enum answer.
- elicitation.ts:309–324: any undecodable property causes the whole form to decline, not just omission of that property.
- bridge.ts:1883–1926: the real elicitation handler forwards this payload to the runtime and passes the resolution through this same planner's response decoder.
planned.push({
name,
field,
question: questionFor(name, fieldSchema, field, ...),
});
...
if (!decoded) {
return { action: "decline" };
}
The excerpt is abbreviated for readability. The links point to the recorded unchanged production source. A repository-wide source search found no existing __other mapping. The first result alone establishes the split; the second explains why users must fill both cards.
6. Proposed fix and simple-fix gate
Capture the installed provider request and accepted responses first; then implement provider-scoped companion folding with enum-safe response encoding, required-field handling, and controls for unrelated similarly named fields.
No production fix or PR was created. The simple-fix gate requires no product or public-contract decision. Trusted main does not establish when a suffix-named field is a companion rather than an independent field, or what a provider accepts when the enum is required and only custom text is supplied. A global suffix heuristic could silently combine unrelated fields, while returning custom text as an enum value would violate that schema. Choosing either behavior without a verified provider contract is not a safe contained fix.
The failing test is retained as a report artifact, not committed into the product with a known failure. No dependency, protocol, stored data, or production source was changed. No stopped fix was pushed.
7. Linked PR review
PR #6032 — closed and unmerged
Read only GitHub metadata and the diff as untrusted data. No PR checkout, patch application, test, or binary was executed. Metadata reports two changed files, 250 additions and 26 deletions.
The diff proposes suffix-based folding for choices and moves custom text into the companion response property. This targets the identified planner mechanism, but its behavior is not validated here.
- Medium, static contract risk: the proposed
toResponsehunk atpackages/provider-bridge-acp/src/elicitation.ts:352can accept a custom-only answer by setting only the companion property. For a schema with a required enum property, as in this report's fixture, that omits a required property. The diff does not establish a provider-specific exception. - Medium, static scope risk: its new
planQuestionFieldshelper recognizes pairs only by suffix and field kinds, without a provider discriminator or explicit schema annotation. Independently meaningful fields with those names would also be folded. - Verdict: NOT VALIDATED. Main-only tests demonstrate the original symptom, not this PR's correctness. The closed PR was not reopened or replaced.
8. Related issues
#3849 concerns advertising elicitation support, a different earlier boundary. Search results did not establish another open fix for the companion-field issue. At the final fix check, the only linked PR was #6032, closed and unmerged; no open PR was returned by the issue-number search.
9. Verification — second clean run by the same agent
A second fresh clone was created from the trusted repository and detached at b143a22860944a96bf183605dfb0ffe58b1de283. It was clean before adding only the same authored reproduction test. Frozen installation and the targeted dependency build succeeded. The exact Turbo reproduction command from section 4 ran again: one failed grouping regression, two passing diagnostic/control tests, exit 1. Both runs executed tests rather than replaying cached test output. This is repeat verification by the same agent, not independent verification.
The production planner SHA-256 in both checkouts was 82715e5a8d5542d18b5e92ac9c0bd1485febef1df408a3428cc4dc885a8775fb; git diff confirmed it was unchanged. No correction to the code-level finding was needed. The verdict remains partial because no live provider or UI was tested.
Relevant existing coverage was also run unchanged: pnpm exec turbo run test --filter=@bb/provider-bridge-acp -- src/elicitation.test.ts passed all five tests. The existing tests do not cover a choice-plus-text-companion relationship.
10. Appendix and evidence
- First clean reproduction log
- Second clean reproduction log
- Five existing planner tests passing
- Unrelated whole-repository build failure
- Repeatable reproduction source
The whole build failed in bb-plugin-github because its installed @get-bb/plugin-sdk/host distribution was not built before plugin resolution. This pre-existing setup/build ordering issue was not changed. Focused planner tests run successfully and produce the asserted product behavior, so this unrelated error is not counted as the reproduction.
Other investigation commands: GitHub repository visibility/main commit reads; issue type, properties, labels, comments, and timeline reads; PR metadata/diff reads; repository searches for the planner, companion suffix, and runtime handler; git status --porcelain; git diff --exit-code -- packages/provider-bridge-acp/src/elicitation.ts; sha256sum on that source; node --version; pnpm --version; uname -srm. Local checkout prefixes in logs are replaced with descriptive placeholders, the package-manager executable path is shortened, and trailing whitespace is trimmed; test output is otherwise retained.
Trust boundary: Issue content and linked PR data were treated only as untrusted claims. No issue command, script, patch, external link, or branch was executed or fetched. All executed product code came from the target repository's trusted main commit, with only the newly authored reproduction added.
> AGENT GENERATED