Skip to content

feat(showcase): add 3 LGP D5 probes + driver retry-once - #4743

Merged
tylerslaton merged 5 commits into
mainfrom
tyler/youthful-johnson-662bff
May 9, 2026
Merged

tylerslaton merged 5 commits into
mainfrom
tyler/youthful-johnson-662bff

Conversation

@tylerslaton

Copy link
Copy Markdown
Contributor

Summary

  • 3 new D5 probes (multi-turn, agentic-chat-style) for /demos/{interrupt-headless, shared-state-read, tool-rendering-reasoning-chain} — closes the demo↔probe coverage gap so every langgraph-python demo now has its own dashboard cell.
  • Driver retry-once in e2e-deep.ts — transient goto-error / conversation-error failures (≥2s on attempt 1) get one retry before recording red, cutting ~10× the dashboard flap rate. Persistent assertion-style fails skip retry.
  • Drops the legacy dual-claim where d5-shared-state.ts owned both shared-state-read AND shared-state-write for a single bidirectional probe — shared-state-read now belongs to the standalone recipe-editor probe.

Scope rationale

LGP is the north-star integration; this PR codifies its current demo surface in the test infra. Other integrations may flip red on the new probes — that's expected and welcome. Cross-integration parity follows in a separate wave; we're using LGP as the template.

Files

  • showcase/harness/src/probes/scripts/d5-interrupt-headless.ts (new) — useHeadlessInterrupt flow: chip → interrupt popup → slot pick → resume.
  • showcase/harness/src/probes/scripts/d5-tool-rendering-reasoning-chain.ts (new) — combines reasoning-block slot + per-tool renderer (WeatherCard / FlightListCard).
  • showcase/harness/src/probes/scripts/d5-shared-state-read.ts (new) — recipe-editor with neutral default agent, asserts recipe-card form mounts AND agent references recipe context across turns.
  • showcase/harness/src/probes/drivers/e2e-deep.ts — retry-once loop around runFeature.
  • d5-registry.ts / d5-feature-mapping.ts / live-status.ts (dashboard) / LGP manifest.yaml / feature-registry.json / constraints.yaml — wire the new featureTypes and features end-to-end.
  • d5-shared-state.ts (+test) — drops dual-claim.
  • 2 pre-existing test fixes folded in: d5-gen-ui-interrupt.test.ts (mock updated to current evaluate-poll resume signal) and conversation-runner.test.ts (preFill ordering assertion now matches actual deferred-cascade contract).
  • aimock d5-all.json — +2 shared-state-read fixtures. interrupt-headless and tool-rendering-reasoning-chain reuse existing fixtures whose substrings already match their chip prompts.

Test plan

  • pnpm vitest run in showcase/harness/ → 1588 / 1588 passing (was 1585 / 1588 with 3 pre-existing fails before this PR; 2 are fixed here, 1 was an obsolete-mock issue).
  • npx tsx showcase/scripts/validate-fixture-tool-surface.ts → clean (282 fixtures × 627 demos, no drift).
  • npx tsx showcase/scripts/generate-registry.ts → clean (18 integrations, 38 wired LGP features, 756 catalog cells).
  • pnpm typecheck in showcase/harness/ → clean.
  • d5-mapping-drift.test.ts → green (CATALOG_TO_D5_KEY mirrors REGISTRY_TO_D5).
  • After merge: watch the e2e-deep dashboard rotation — the 3 new LGP cells should write rows on first tick (no red zombies — these are first-time emissions).

Known follow-up (NOT in this PR)

auth.spec.ts test #5 ("signing back in re-mounts a fresh chat surface") fails on Railway. Symptom: after sign-out → sign-in cycle, the second Hello again send doesn't produce an assistant response within 30s. Looks like a react-core/v2 ref-handling regression on <CopilotKit> unmount/remount — deserves its own focused investigation rather than expanding this PR.

🤖 Generated with Claude Code

tylerslaton and others added 2 commits May 8, 2026 15:08
… fixtures)

Lands the Bucket A framework fix and the fixture-correctness changes
needed to flip the remaining D4/D2 cells in the langgraph-python column
to D5. Full local D5 sweep is green (1 passed, 0 failed).

Framework: every Python `ToolMessage` constructed via `Command(update=...)`
now sets `name=` and `id=str(uuid.uuid4())`. Without these, @ag-ui/langgraph
synthesises TOOL_CALL_START events with `toolCallName: null` and
`parentMessageId: null`, which @ag-ui/[email protected]'s Zod schema rejects;
the rejection is silently swallowed by `withAbortErrorHandling -> EMPTY`,
completing the SSE observable mid-stream so post-tool state never reaches
the consumer. Fix is applied across shared_state_streaming, shared_state_read_write,
gen_ui_agent, beautiful_chat, subagents (2 sites). Single-flag change in
a2ui_dynamic flips the secondary `_design_a2ui_surface` LLM call to
`streaming=True` so aimock's record/replay (SSE-only) sees it.

Fixtures (d5-all.json):
- toolCallId follow-ups for set_steps (3), display_flight, generate_a2ui (4),
  schedule_meeting (2), generateSandboxedUi (7), and revenue chart so
  multi-turn probes don't recurse into recursion-limit loops
- four hand-crafted secondary `_design_a2ui_surface` fixtures so A2UI
  dynamic renders without a real LLM
- mcp-apps fixture rewritten to emit `create_view` tool call with a
  minimal Excalidraw element payload; runtime middleware fetches the UI
  resource and the iframe mounts
- AAPL and revenue `hasToolResult: true` follow-ups tightened to
  `toolCallId` so they don't match cross-turn after prior turns' tool
  results
- voice fast-path content-only fixture
- beautiful-chat-schedule-meeting first-turn fixture gains content so
  the conversation runner sees an assistant message before the picker
  click assertion

Probes: bumped per-card waitForSelector in d5-gen-ui-headless-complete from
15s to 60s — recharts ResponsiveContainer can be slow under 4 sequential
turns.

Shell-dojo: hide CLI Start Command from the dojo navigation via
`HIDDEN_DOJO_FEATURE_IDS`. Registry/manifests untouched so
harness/parity/dashboard still see it.
Closes the demo↔probe coverage gap for /demos/{interrupt-headless,
shared-state-read, tool-rendering-reasoning-chain} so every demo
under langgraph-python (the north-star integration) now has a D5
probe writing to its own PocketBase cell — not relying on cross-
demo umbrella records.

New probes (multi-turn, mirroring the agentic-chat structure):
  - d5-interrupt-headless: exercises useHeadlessInterrupt — chip
    prompt → backend interrupt(...) → app-surface popup → slot pick
    → resume → assistant confirmation. Distinct from gen-ui-interrupt
    (which uses inline useInterrupt).
  - d5-tool-rendering-reasoning-chain: combines reasoning-block slot
    + per-tool renderer (WeatherCard, FlightListCard) on the same
    chat surface. Catches a regression in either side.
  - d5-shared-state-read: recipe-editor demo (neutral default agent,
    no tools) — verifies recipe-card form mounts AND agent reads
    shared state across turns. Drops the dual-claim that
    d5-shared-state.ts had on `shared-state-read` (now write-only).

Driver retry-once (e2e-deep.ts):
  Probes that fail with a transient class (`goto-error` /
  `conversation-error`) AND took ≥2s on the first attempt now retry
  once before recording red. Persistent assertion-style failures
  (sub-2s) and intentional aborts/feature-timeouts skip retry —
  retrying a deterministic mismatch just burns clock and obscures
  the signal. Cuts ~10× the dashboard flap rate.

Plumbing:
  - D5FeatureType enum: +interrupt-headless, +tool-rendering-reasoning-chain.
  - REGISTRY_TO_D5 (harness) + CATALOG_TO_D5_KEY (dashboard) mirror
    the new mappings; d5-mapping-drift test enforces this.
  - LGP manifest features + demos entries + constraints allowlist.
  - feature-registry.json: +shared-state-read.
  - aimock d5-all.json: +2 shared-state-read fixtures (interrupt-
    headless + tool-rendering-reasoning-chain reuse existing fixtures
    that already match their chip prompts).

Tests: 1588/1588 harness vitest green. validate-fixture-tool-surface
clean (282 fixtures × 627 demos, no drift). Two pre-existing test
fixes folded in — d5-gen-ui-interrupt assertion mock updated to
match the current evaluate-poll resume signal; conversation-runner
preFill ordering test now asserts the actual deferred-cascade
contract instead of a stricter pre-preFill ban that the runner
never enforced.

Known follow-up (not in this PR): auth.spec.ts test #5 ("signing
back in re-mounts a fresh chat surface") fails on Railway — second
sign-in's "Hello again" never produces an assistant response. Looks
like a react-core/v2 ref-handling regression on <CopilotKit>
unmount/remount; deserves its own focused investigation.

Other integrations may flip red on the new probes — that's
expected. We're treating LGP as the template; cross-integration
parity follows in a separate wave.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@vercel

vercel Bot commented May 9, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 9, 2026 0:55am
research-canvas Ready Ready Preview, Comment May 9, 2026 0:55am
travel Ready Ready Preview, Comment May 9, 2026 0:55am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
chat-with-your-data Skipped Skipped May 9, 2026 0:55am
form-filling Skipped Skipped May 9, 2026 0:55am

Request Review

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

The previous "multi-key D5 mapping" tests used `shared-state-read-write`
as the example, but with the dual-claim drop that registry-id is now
single-key (only `shared-state-write`). Tests still passed logically
but the names were misleading.

- Rewrote both shared-state-read-write tests to assert the new
  single-key contract directly (no more `d5:lgp/shared-state-read`
  row in the live map — that row belongs to a different cell now).
- Added new beautiful-chat tests as the canonical multi-key example
  (5 per-pill literals) so the multi-key code path stays exercised.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…re additions

Validate Showcase CI was failing on hardcoded count assertions in
generate-catalog.test.ts and generate-registry.test.ts after this PR
added 3 features to the LGP manifest (interrupt-headless,
shared-state-read, tool-rendering-reasoning-chain) and 1 feature to
feature-registry.json (shared-state-read — the others were already
declared).

- LGP feature/demo count: 36 → 39
- Total feature-registry features: 42 → 43
- Catalog integrated cells: 756 → 774 (43 × 18)
- LGP integrated cells: 42 → 43 (38 wired + 1 stub + 4 unshipped)
- Metadata total_cells (docs-only excluded): 738 → 756

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@tylerslaton
tylerslaton merged commit 1ad78c3 into main May 9, 2026
18 checks passed
@tylerslaton
tylerslaton deleted the tyler/youthful-johnson-662bff branch May 9, 2026 00:57
tylerslaton added a commit that referenced this pull request May 9, 2026
…rom LGP view (#4744)

Follow-up to [#4743](#4743)
to close the 2 remaining LGP D5 red cells and clean up the dashboard so
it reflects the LGP gold standard.

## Summary

- **Fix `tool-rendering-reasoning-chain` probe** — added `reasoning`
field to the weather/Tokyo + SFO/JFK first-leg fixtures so aimock emits
REASONING_MESSAGE_* events; without them the v2 `<ReasoningBlock
data-testid="reasoning-block">` never mounted (mirrors the convention
from `reasoning-display.json`).
- **Mirror `gen-ui-interrupt` source fixture with the bundle** — source
file was missing the resume-leg toolCallId entries that already exist in
`d5-all.json`. Cosmetic correction so re-bundling stays consistent. Same
toolCallIds as `interrupt-headless.json` (both probes share the same
agent + chip prompts).
- **Filter deprecated features from LGP dashboard view** — 4 legacy
features (`agentic-chat-reasoning`, `hitl`, `hitl-in-chat-booking`,
`reasoning-default-render`) used to render as X-marked rows for LGP
because LGP intentionally doesn't implement them (consolidated into
modern shape: `reasoning-custom`+`reasoning-default`, `hitl-in-chat`
with `useHumanInTheLoop`). Other 17 integrations still serve those
legacy demos so we don't yank the features entirely — instead marked
them `deprecated: true` and updated `generate-registry.ts` to skip cells
where a deprecated feature is unshipped for an integration. **LGP cells:
43 → 39** (the 4 X rows disappear). Other integrations: unchanged (audit
trail preserved).

## Verification all 39 LGP demos render

> *user concern: "make sure we're not missing any demos in the new
dashboard"*

Confirmed — every LGP `manifest.yaml` feature has a feature-registry
entry and renders a cell. After this PR, the LGP-focused view shows
exactly the 39 gold-standard demos — no missing demos, no spurious
legacy X rows.

| Category | LGP cells |
|---|---|
| Dev Ex | 2 (cli-start, beautiful-chat) |
| Chat & UI | 7 |
| Platform | 4 (auth, multimodal, voice, agent-config) |
| Controlled Generative UI | 5 |
| Declarative Generative UI | 2 |
| Open-Ended Generative UI | 3 |
| Operational Generative UI | 5 (incl. tool-rendering-reasoning-chain) |
| Interactivity | 3 |
| Agent State | 4 (incl. shared-state-read) |
| Multi-Agent | 1 |
| BYOC | 2 |
| **Plus**: interrupt-headless, headless-* variants | 1 |
| **Total** | **39 ✓** |

## Test plan

- [x] `pnpm vitest run` in `showcase/harness/` → **1588 / 1588 passing**
- [x] `pnpm vitest run` in `showcase/scripts/__tests__/` → **19 / 19
passing** (new `deprecated features are emitted only for integrations
that declare them` test added)
- [x] `npx tsx showcase/scripts/validate-fixture-tool-surface.ts` →
clean (282 fixtures × 627 demos, no drift)
- [x] `npx tsx showcase/scripts/generate-registry.ts` → 18 integrations,
38 wired LGP features, 770 catalog cells (38 + 1 stub = 39 LGP)
- [ ] After merge: confirm `tool-rendering-reasoning-chain` flips green
on next e2e-deep tick. Confirm dashboard LGP view no longer shows
X-marked rows for the 4 deprecated features.

## Known follow-ups (NOT in this PR)

- `gen-ui-interrupt` cell — still red on prod with `post-pick signal
never landed within 30s`. The bundle already had the right resume-leg
fixture, so the failure is in the inline `useInterrupt` resume flow
rather than aimock matching. Same class as the `auth.spec.ts` test #5
framework regression. Both deserve a focused investigation rather than
expanding this PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
tylerslaton added a commit that referenced this pull request May 9, 2026
…#4746)

Two related changes for the LGP gold-standard view:

## 1. e2e-readiness accepts `/demos/auth` SignInCard

Fixes the spurious **D2 / RT ✗** state on the LGP `auth` cell. The demo
itself works fine end-to-end — the issue was the `e2e-readiness` probe
waits for chat-input testids in
[`READY_SELECTORS`](showcase/harness/src/probes/drivers/e2e-readiness.ts:236),
but `/demos/auth` renders a `<SignInCard>` BEFORE mounting the chat
surface (chat input only appears post-authentication). Result: 30s
timeout (`per-demo deadline exceeded after 30000ms`).

Added `[data-testid="auth-sign-in-card"]` to `READY_SELECTORS` so the
probe accepts SignInCard as a valid "demo mounted" signal. End-to-end
auth flow stays covered by `auth.spec.ts` under e2e-demos.

## 2. Bump all LGP agents to `gpt-5.4`

Swapped every `ChatOpenAI` / `init_chat_model` call across the 26 LGP
agents from the prior mix (`gpt-4o-mini`, `gpt-4o`, `gpt-4.1`,
`gpt-5-mini`) to the unified `gpt-5.4`. Also updated the
`OPENAI_REASONING_MODEL` env default in `reasoning_agent.py` and
`tool_rendering_reasoning_chain_agent.py` so reasoning demos pick up the
new model unless explicitly overridden.

Verified locally — all 39 LGP demos render and respond correctly with
`gpt-5.4`. The probe sweep on prod will confirm end-to-end.

## Test plan

- [x] `pnpm vitest run e2e-readiness` in `showcase/harness/` → **31 / 31
passing**
- [x] Local LGP container running gpt-5.4 against real OpenAI — all
demos respond
- [ ] Post-merge: `e2e:langgraph-python/auth` flips green on next
e2e-demos tick (hourly at `:10`)
- [ ] Post-merge: every D5 cell across LGP confirms model resolves on
next e2e-deep tick

## Companion observation (NOT in this PR)

While diagnosing the auth issue, also noticed 3 LGP D5 cells went red
recently:
- `gen-ui-interrupt`, `interrupt-headless` — testid mount timeouts
- `shared-state-streaming` — document content didn't stream

Subagent investigation found **no code-side regression** — fixtures,
agents, and probe scripts are intact; the cells were green a few hours
earlier with the same code. Most likely a transient aimock blip or
cold-start. The driver-level retry-once added in PR #4743 should
self-heal them on the next 1-2 ticks. Monitor; if persistent, check
aimock Railway logs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
tylerslaton added a commit that referenced this pull request May 9, 2026
…-chain agent (#4747)

## Summary

`tool-rendering-reasoning-chain` D5 probe has been **sustained red since
it was added** (PR #4743) — every tick fails with `expected
[data-testid="reasoning-block"] to mount within 30000ms`.

Diagnostic dumps from prod confirmed the failure mode:
- ✅ WeatherCard mounted (toolCalls fire correctly)
- ✅ Assistant text "Tokyo is 22°C and partly cloudy" landed
- ❌ Zero reasoning text — the `reasoningMessage` slot never received an
event

## Root cause

Comparing to the working `reasoning_agent.py` (which backs
`reasoning-default` + `reasoning-custom`, both D5 green):

| | `reasoning_agent.py` (works) |
`tool_rendering_reasoning_chain_agent.py` (was broken) |
|---|---|---|
| `effort` | `"medium"` | `"low"` |
| `summary` | `"detailed"` | `"auto"` |
| tools | `[]` | `[get_weather, search_flights, get_stock_price,
roll_dice]` |

`summary: "auto"` lets the model decide whether to emit a reasoning
summary. With tools present, the model frequently skips emission
entirely — the chain-of-thought goes straight to the tool call without a
summary step. That leaves `role: "reasoning"` messages off the wire, so
the v2 `<ReasoningBlock>` slot never mounts.

`summary: "detailed"` forces emission on every response. Bumping
`effort` to `"medium"` to match the working agent.

## Test plan

- [x] PR #4744 already added `reasoning` field to the aimock fixture for
`weather in Tokyo` first leg — that part of the wire is fine
- [x] Confirmed via prod diagnostic: the rest of the demo (tool
rendering, assistant text) works
- [ ] Post-merge: `tool-rendering-reasoning-chain` should flip green on
the next e2e-deep tick

## Known follow-up (NOT in this PR)

`gen-ui-agent` (Agent State) is intermittently flapping (~22% failure
rate over recent ticks), with two distinct error modes ("no assistant
response" and "agent-state-card never mounts"). Need to dig deeper to
determine root cause — separate investigation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
pull Bot pushed a commit to TheRakeshPurohit/CopilotKit that referenced this pull request May 9, 2026
…rom gold-standard view

Three fixes that follow up on PR CopilotKit#4743 to bring LGP closer to fully-green
on the dashboard:

1. tool-rendering-reasoning-chain probe: was failing with
   `expected [data-testid="reasoning-block"] to mount within 30000ms`.
   Root cause: the demo's `<ReasoningBlock>` slot only mounts when a
   reasoning-role message lands in the transcript, which requires
   aimock to emit REASONING_MESSAGE_* events, which in turn requires
   the fixture's first-leg response to carry a `reasoning` field. The
   weather/Tokyo and SFO/JFK first-leg fixtures were missing it.
   Mirrors the convention documented in reasoning-display.json:2.
   Patched both source (harness/fixtures/d5/) and bundle (aimock/d5-all.json).

2. gen-ui-interrupt source fixture: the source fixture file was missing
   the resume-leg toolCallId entries that already existed in the bundle.
   Cosmetic mirror so re-bundling stays consistent. Same chip prompts +
   same toolCallIds as interrupt-headless.json (both probes share the
   same agent and aimock fixture set; the difference is the FRONTEND
   rendering — useInterrupt inline vs useHeadlessInterrupt separate-pane).

3. Dashboard gold-standard filter: 4 deprecated/legacy features
   (agentic-chat-reasoning, hitl, hitl-in-chat-booking,
   reasoning-default-render) used to render as X-marked rows in the
   LGP gold-standard dashboard view because LGP intentionally does
   NOT implement them — they were consolidated into the modern shape
   (reasoning-custom + reasoning-default; hitl-in-chat with
   useHumanInTheLoop). Other 17 integrations still serve those legacy
   demos, so we don't yank the features from feature-registry.json
   entirely. Instead: marked them `deprecated: true` and updated
   generate-registry.ts to skip emitting cells when a deprecated
   feature is unshipped for an integration. LGP cells: 43 → 39 (the
   4 deprecated rows disappear). Other integrations: unchanged
   (audit trail preserved). Catalog total: 774 → 770.

Tests:
  - 1588/1588 harness vitest passing
  - 19/19 generate-catalog + generate-registry tests passing
    (counts updated for the 4 dropped LGP cells + new deprecated-
    feature filter test)
  - validate-fixture-tool-surface clean (282 fixtures × 627 demos)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
pull Bot pushed a commit to TheRakeshPurohit/CopilotKit that referenced this pull request May 9, 2026
…-chain agent

The tool-rendering-reasoning-chain D5 probe has been red since the
probe was added (PR CopilotKit#4743) — the reasoningMessage slot's
<ReasoningBlock> never mounts because the agent doesn't emit
reasoning summaries.

Compared to the working reasoning_agent.py (which powers
reasoning-default + reasoning-custom and is green), the only
meaningful difference was the reasoning config:

  reasoning_agent.py (works):
    reasoning={"effort": "medium", "summary": "detailed"}
    tools=[]

  tool_rendering_reasoning_chain_agent.py (was broken):
    reasoning={"effort": "low", "summary": "auto"}
    tools=[get_weather, search_flights, ...]

`summary: "auto"` lets the model decide whether to emit a reasoning
summary. With tools present the model often skips it (chain-of-thought
goes straight into the tool call without a summary). `summary:
"detailed"` forces emission on every response, which lights up the
ReasoningBlock slot. Bumping effort medium so the surface visible to
the user reads as a real chain-of-thought, matching reasoning-display.

Probe diagnostics from prod confirmed the toolCalls were firing fine
(WeatherCard mounted, assistant text landed) — only the reasoning
emission was missing.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

This branch was successfully deployed

3 active and 2 inactive deployments
Preview – docs — 59ecd828 Deployed May 9, 2026 by vercel[bot]
Preview – research-canvas — 59ecd828 Deployed May 9, 2026 by vercel[bot]
Preview – travel — 59ecd828 Deployed May 9, 2026 by vercel[bot]
Preview – chat-with-your-data — 59ecd828 Deployed May 9, 2026 by vercel[bot]
Preview – form-filling — 59ecd828 Deployed May 9, 2026 by vercel[bot]
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