Repository navigation
refactor(agent-harness): share ACP probe eligibility - #15481
Conversation
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS Confirm the unselectable-row claim holds in a real build: a [UX-REVIEWED] ed4533b Description read[DESCRIPTION-READ] 321a104959364ac7f5ed8acfe2fb9b566dbf8f901aebf58343a20400a3a0b022 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] ed4533b Description read[DESCRIPTION-READ] 6c47233b35cc2340249e1f24181963f8110c101d19b59e8efb7c561194f506a9 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify the Not justified as shipped
What this change shipsInventory (5 items) — 4 justifiedIntent: FIX — stop first-run setup and Settings reading the same ACP probe row by two private conventions that could drift (#14517, linked).
The rewritten [FIRST-PRINCIPLES-REVIEWED] ed4533b Description read[DESCRIPTION-READ] 9950a3361c00fd60114777007e0617c6167da1f7dbf0278adaee84f6fa3ff1c2 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
fd50ada to
fa76c83
Compare
fa76c83 to
df10fde
Compare
df10fde to
0803232
Compare
0803232 to
f3b0514
Compare
f3b0514 to
de1b8aa
Compare
de1b8aa to
0ef5bf8
Compare
…ng and Settings First-run setup and Settings > Agent Harness each read an ACP probe row's install, restart and selectable fields on their own, and agreed only by convention. Both now decide from one shared verdict in api/acpBackend.ts: - acpProbeState: unprobed / unselectable / missing / restart_required / unknown / installed, in that precedence. - acpProbeBlocksUse: a known block. Settings disables Use on these; a failed or absent check stays live. - acpProbeConfirmsUse: positive proof. First-run setup requires it, since finishing setup is durable. Onboarding keeps its host sandbox, independent_setup and KAS checks local; Settings keeps the config schema's selectable set local. No behaviour change. Closes #14517
0ef5bf8 to
ed4533b
Compare
|
Two non-blocking notes after reading this against the gateway side ( 1. if (probe.installed !== 'installed') return 'unknown'in place of the fall-through, plus one test row with an unexpected 2. The new comments say more than the probe proves. Also worth knowing, no action needed: the gateway caches each verdict for 30 seconds, and Not verified: I did not run the suites, and I did not read 🤖 AI-assisted comment 🤖 |
Problem / Motivation
Goal: First-run setup and Settings > Agent Harness always agree on what an ACP probe row says about an agent, because both read one shared verdict.
#13888 reads each
GET /api/acp-backendsrow'sinstalled,restart_requiredandselectablefields separately in the first-run gate (KiroPrerequisiteGate.tsx) and in Settings > Agent Harness (AgentBackendTab.tsx). The two agree today only by convention, so a later edit to one could make one surface offer an agent the other disables (#14517).Why it matters
A disagreement would show up as an agent that is usable in Settings but refused at setup, or the reverse, with no signal to the reader which screen is right. Setup completion is durable, so a drift in the gate's direction can record setup as finished for an agent that cannot start.
Not a goal
/api/acp-backends(suggested in the Share ACP probe eligibility between onboarding and Agent Settings #14517 comments). That is a backend API change and a separate decision.independent_setupor KAS prerequisite checks out of the gate, or Settings' config-schema selectable set out of the tab. Each stays with the surface that owns it, as Share ACP probe eligibility between onboarding and Agent Settings #14517 asks.What changed (motivation → approach → change)
Two copies of the probe-row rule → one shared state with two readings, because the surfaces deliberately differ in how much proof they need:
acpProbeState(probe)inwebsite/src/api/acpBackend.ts:unprobed/unselectable/missing/restart_required/unknown/installed, in that precedence. Mirrors the gateway's marker rule (installed != INSTALLED or restart_required).acpProbeBlocksUse(probe): a KNOWN block (unselectable,missing,restart_required). Settings disables Use on these; a failed or absent check stays live, as before.acpProbeConfirmsUse(probe): POSITIVE proof (installed). The first-run gate requires this before it lets setup finish, as before.configuredBackendCanStart(gate) andcannotUse(Settings) now call these instead of reading the fields inline. Foldingselectable: falseinto Settings'cannotUseis behaviour-neutral: an unselectable agent is either filtered out ofofferedor shown build-excluded with no Use button, so no rendered button changes state.Backwards compatibility
Compatible: frontend-only refactor; no API, config or copy changes, and every existing test on both surfaces passes unchanged.
Tests
website/src/test/acpBackend.eligibility.test.ts(new): the state table (no row, installed, missing, check failed, restart required, unselectable) for all three helpers, that no row both blocks and confirms, and the precedence order.AgentBackendTab.test.tsxandKiroPrerequisiteGate.test.tsx: the same states rendered on each surface. Settings: Use enabled for installed and check-failed, disabled for missing and restart-required, unselectable not listed. Setup: Use enabled only for installed, unselectable not listed.acpProbeBlocksUsefails at least 5 gate tests (including the new check-failed row); swapping Settings toacpProbeConfirmsUsefails at least 8 Settings tests (including the new check-failed row). Both restored.tsc, andeslinton the changed files. Not run: the full frontend suite.Manual verification
N/A — no rendered change; the rendered-state tests on both surfaces cover each probe state.
Screenshots / video
Why no screenshot: pure refactor of the eligibility check behind both screens; every state renders exactly as on #13888, which the per-surface tests pin.
Related Issues
Closes #14517. Stacked on #13888.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
N/A — placeholder pending OSPO wording.