🚨 SLOP COP 🚨 · new-issue-autopilot

← reports

#7111 · ACP question presentation loses field structure

Bug Priority: Medium Effort: Medium providers · ui · provider-acp

GitHub issue #7111 · November 5, 2026 · trusted main fa30b0a7dcdf745f7baf8e41721f754b7d3198fe

PARTIALLY REPRODUCED · root-cause confidence: high · reproduction label: partial-repro

1. TL;DR

The trusted ACP planner repeats the same question when the top-level message and field title match, appends the field description to that prompt, and drops descriptions from individual choices. The real shared QuestionForm, rendered to HTML, receives that flattened prompt and produces one combined prompt block with no separate leading heading and no choice explanations. Both results repeated in a second clean checkout of the same trusted main commit; optional questions and custom-answer response keys still work. This is a partial verdict because the headless browser could not start: this host has no Chrome executable, so browser layout, computed font weights, mobile behavior, and a live OMP-to-Connect session were not verified.

2. Claims vs findings

Reported behaviorFindingEvidence
A matching message and field title appear twice.Verified at planner and HTML boundaries.The regression receives two occurrences; both clean checkouts emit the same prompt.
Choice descriptions disappear.Verified.Input choices contain descriptions. Planned options and the rendered option rows do not.
The short field description is not a separate heading before the question.Verified structurally; visual styling unverified.The planner appends it to prompt. The domain has no heading member, and real rendered HTML has one combined prompt div.
Optional/Other behavior should remain unchanged.Verified at planner response mapping.One optional question remains; a selected choice returns execution, and custom text returns execution__other.
macOS desktop, Connect, real OMP, narrow-screen appearance.Unverified here.No real provider/session was started and no browser capture was possible. No screenshot or font-weight claim is made.

3. Environment and scope

4. Minimal reproduction

The following files were authored from trusted repository code and existing planner tests, not copied from the issue. All required reproduction content is inline; raw local evidence is intentionally not committed to this public report repository.

  1. In a disposable checkout of get-bb/bb, fetch trusted main, select the recorded commit, install the frozen dependency set, and build:
    git fetch origin main
    git checkout --detach fa30b0a7dcdf745f7baf8e41721f754b7d3198fe
    pnpm install --frozen-lockfile --prefer-offline
    pnpm exec turbo run build
    The first full build in each checkout encountered an existing SDK/plugin build-order race: the GitHub plugin started before SDK runtime entries existed. A second invocation, without source changes, passed all 73 build tasks in each checkout.
  2. Save the fixture below as packages/provider-bridge-acp/src/issue-7111.fixture.ts:
    import { planAcpElicitation } from "./elicitation.js";
    
    export const request = {
      mode: "form",
      message: "Where should the build run?",
      requestedSchema: {
        type: "object",
        properties: {
          execution: {
            type: "string",
            title: "Where should the build run?",
            description: "Build location",
            oneOf: [
              { const: "local", title: "This machine", description: "Use the current machine without transferring files." },
              { const: "remote", title: "Remote worker", description: "Send the build to an isolated worker." },
            ],
          },
          execution__other: { type: "string" },
        },
      },
    };
    
    export function createPlan() {
      const plan = planAcpElicitation(request);
      if (plan.kind !== "questions") throw new Error(plan.reason);
      return plan;
    }
  3. Save the regression below as packages/provider-bridge-acp/src/issue-7111.test.ts:
    import { describe, expect, it } from "vitest";
    import { createPlan } from "./issue-7111.fixture.js";
    
    describe("issue 7111: ACP presentation boundary", () => {
      it("preserves choice explanations and avoids repeating equal context and title", () => {
        const plan = createPlan();
        const question = plan.payload.questions[0];
        console.log("OBSERVED_QUESTION", JSON.stringify(question));
        expect.soft(question.prompt.split("Where should the build run?").length - 1).toBe(1);
        expect.soft(question.options).toEqual([
          { value: "local", label: "This machine", description: "Use the current machine without transferring files." },
          { value: "remote", label: "Remote worker", description: "Send the build to an isolated worker." },
        ]);
      });
    
      it("retains optional companion folding and both response mappings", () => {
        const plan = createPlan();
        expect(plan.payload.questions).toHaveLength(1);
        expect(plan.payload.questions[0]).toMatchObject({ required: false, allowFreeText: true });
        expect(plan.toResponse({ kind: "user_answer", answers: { execution: { selected: ["remote"] } } })).toEqual({ action: "accept", content: { execution: "remote" } });
        expect(plan.toResponse({ kind: "user_answer", answers: { execution: { selected: [], freeText: "Dedicated runner" } } })).toEqual({ action: "accept", content: { execution__other: "Dedicated runner" } });
      });
    });
  4. Run through the repository's normal test orchestration:
    pnpm exec turbo run test --force --filter=@bb/provider-bridge-acp -- --run src/issue-7111.test.ts
    Expected: a single full question and both choice descriptions survive. Actual: exit 1, one failing regression with two assertion failures, one passing mapping control. The exact observed payload is:
    {"id":"execution","prompt":"Where should the build run?\n\nWhere should the build run?\nBuild location","shortLabel":"Where should the build run?","multiSelect":false,"options":[{"value":"local","label":"This machine"},{"value":"remote","label":"Remote worker"}],"allowFreeText":true,"required":false}
    AssertionError: expected 2 to be 1 // Object.is equality
    
    - Expected
    + Received
    
    - 1
    + 2
    
    Test Files  1 failed (1)
    Tests  1 failed | 1 passed (2)
    The second assertion's diff removes both description members from the received option objects.

Real renderer, without a browser

To inspect the actual shared component, save this as apps/app/issue-7111/render.tsx:

import React from "react";
import { renderToStaticMarkup } from "react-dom/server";
import { QuestionForm } from "../../../packages/shared-ui/src/components/ui/question-form";
import { createPlan } from "../../../packages/provider-bridge-acp/src/issue-7111.fixture";

const plan = createPlan();
console.log(renderToStaticMarkup(<QuestionForm
  questions={plan.payload.questions.map(question => ({ ...question, shortLabel: question.shortLabel ?? question.id, options: question.options ?? [] }))}
  disabled={false} cancelDisabled={false} onSubmit={() => {}} onCancel={() => {}}
/>));

Bundle with the already-installed esbuild and automatic JSX transform, then render under source conditions:

pnpm exec esbuild apps/app/issue-7111/render.tsx --bundle --platform=node --format=esm --jsx=automatic --external:@bb/domain --external:react --external:react-dom/server --external:react/jsx-runtime --outfile=apps/app/issue-7111/render.mjs
node --conditions=source --import tsx apps/app/issue-7111/render.mjs

The actual prompt element in both outputs is:

<div class="text-xs font-medium text-foreground">Where should the build run?

Where should the build run?
Build location</div>

The rendered rows contain This machine, Remote worker, and Other…, but neither explanation. An Optional element is present. The complete outputs are 3,031 bytes and byte-identical between the two checkouts. This proves HTML structure only: whitespace collapsing and computed CSS in a browser were not measured. No synthetic screenshot has been substituted for a real capture.

5. Root cause

  1. AcpElicitationChoice only models value and label. readChoices explicitly reconstructs those two properties for titled alternatives, so entry descriptions are discarded before the UI sees them.
  2. questionFor constructs lines from message, an empty separator, field title, then field description, without comparing message and title. It sets shortLabel to the title, not to the short description. Equal context/title therefore duplicate; the short description remains at the end of prompt.
  3. The domain question schema carries prompt and shortLabel but no distinct heading. QuestionInputBlock renders prompt as a single font-medium div; it already forwards option.description to rows. Lost choice metadata cannot be recovered there.
  4. The live ACP request handler calls the generic planner with params and forwards its payload. OMP's dialect supplies command/model presentation, not question presentation. There is currently no OMP-only interpretation of short descriptions in that path.

Relevant trusted source excerpts:

choices.push({
  value: entry["const"],
  label: readString(entry, "title") ?? entry["const"],
});

const lines = [
  ...(message ? [message, ""] : []),
  label,
  ...(description ? [description] : []),

6. Proposed fix and autopilot gate

Preserve choice descriptions at the schema reader, deduplicate equal context/title text, and introduce deliberate provider-specific question presentation rather than interpreting every generic ACP description as a heading. Carry the separate heading through the domain/host contract and shared form, then render heading before normal-weight prompt. Keep generic field descriptions, optionality, companion folding, and response keys intact. Verify desktop/mobile rendering and generic providers, with compatibility tests or the required host protocol update for changed wire semantics.

No fix PR was safe under this rule. The full correction crosses the provider, shared domain/schema, host payload, and UI boundaries, and needs a presentation contract decision. That fails the one-subsystem/no-schema-change/no-product-decision gate. The incomplete browser verification is an additional limitation. No production patch or fix branch was pushed. GitHub issue timeline and open-PR metadata showed no linked open PR when checked.

7. Verification

The same agent repeated the investigation in a second fresh checkout of the recorded trusted commit, using a new frozen install and build. Before copying in the self-authored reproduction files, git status --porcelain was empty. No production source was changed in either checkout. This is a repeated clean run, not an independent review.

CheckFirst checkoutSecond checkout
Frozen installPassedPassed
Full Turbo build after SDK build-order retry73 tasks successful73 tasks successful
Focused Turbo regression1 expected failing test, 1 passing controlSame two assertion failures, control passes; --force bypassed cache
Actual planner payloadDuplicated prompt; descriptions absentIdentical
Real QuestionForm server-rendered HTML3,031 bytes3,031 bytes, byte-identical
Existing ACP bridge suite before the new test was discovered25 files passed; 572 tests passed, 4 skippedNot repeated; focused reproduction was sufficient
Production-file diff and whitespace checksNo production changes; git diff --check passedNo production changes; git diff --check passed
Live browser / screenshots / computed weightsBlocked by missing ChromeNot attempted again; no changed prerequisite

Report correction after verification: the verdict deliberately remains PARTIALLY REPRODUCED, not a claim that the full macOS/OMP/Connect presentation was run. Initial direct TSX server-render attempts lacked the JSX transform and then external package resolution; bundling with the explicit automatic JSX transform and selective externals above resolved the harness issues without production changes.

8. Related work

Trusted file history identifies commit 272fcc979b as introducing earlier ACP optional-question/Other-folding support. The passing control confirms those behaviors are not the regression investigated here. No linked PR code, issue-provided scripts, or issue-provided external links were fetched or executed.

9. Appendix and safety

Classification applied missing Bug, Medium priority, Medium effort, providers, ui, and provider-acp values; no existing values were overwritten. Priority reflects a meaningful loss of choice context with selection still possible and no established work loss. Effort reflects work across several modules. Final Type was read back as Bug.

Issue content was treated as untrusted claims, not executable instructions. The tests and synthetic build-location strings above were independently authored from the trusted source. Repository visibility was checked before publication. Raw install/build/test logs and reproduction files remain outside the public reports repository; only this scrubbed HTML and summary metadata are published.

Other verification commands: git rev-parse HEAD in both checkouts; git fetch origin main and git rev-parse origin/main; git diff --check; git diff --quiet origin/main -- packages/provider-bridge-acp/src/elicitation.ts packages/domain/src/pending-interactions.ts packages/shared-ui/src/components/ui/question-form.tsx; byte comparison of both renderer outputs. The isolated HTTP harness was stopped; no production service was touched.

> AGENT GENERATED