Repository navigation
autosuggestions - #8
Merged
Merged
Conversation
wip - double counting before text wip middle sort of working wip pre select text seems to be consistent across the standard edge cases! (newlines, middle of node, between nodes, etc.)
shaneholloman
pushed a commit
to shaneholloman/copilotkit
that referenced
this pull request
Apr 21, 2026
…null-alt filter, registry-gated landing cards - Reject RESERVED_ROUTE_SLUGS at the handler as defense-in-depth. Next.js already prefers exact-match top-level routes over this catch-all, so /docs, /ag-ui, etc. never reach here under normal routing — but if the registry ever ships an integration whose slug collides with a reserved segment, the handler now short-circuits with notFound() rather than rendering garbage (finding CopilotKit#6). - Import the shared findFrameworksWithCell helper instead of a duplicated local copy (finding CopilotKit#3 follow-through). - Filter out unresolved alternative-framework slugs BEFORE mapping to React fragments so the ", " separator aligns with the final rendered count. The pre-filter index previously emitted stray commas when an entry dropped to null mid-sequence (finding CopilotKit#7). - FrameworkLandingPage's four hardcoded LandingCards are now gated by registry integration.features presence: strands (no HITL support) no longer shows a dead "Human-in-the-Loop" card. The card definitions are hoisted into a module-level constant with a TODO pointing at the eventual feature-id → doc-slug mapping (finding CopilotKit#8). - Declare export const dynamicParams = true explicitly so a future migration to output: "export" fails loudly here (under static export dynamicParams must be false) rather than silently 404ing every /<framework>/<slug> URL (finding CopilotKit#9).
AlemTuzlak
added a commit
that referenced
this pull request
Apr 22, 2026
## CI hygiene fixes Four direct-fix items surfaced during the 2026-04-16 QA/E2E blitz, bundled as one PR with one commit per fix: 1. **`test_unit.yml` paths-ignore** — add `showcase/**` + `sdk-python/**` (prevents spurious TS unit matrix runs on showcase-only or sdk-python-only PRs). `sdk-python-old/**` was mentioned in the plan but doesn't exist on main; only the two existing dirs are added. 2. **`test_doc-examples.yml`** — scope PR trigger to `branches: [main]` (matches convention of other workflows). 3. **`e2e_dojo.yml`** — symmetric `.changeset` path filter on push+PR (was asymmetric — already in the `dorny/paths-filter` step's `ts:` list, so this aligns the trigger). 4. **`starter-smoke.yml`** — rename internal job id (`starter-smoke` → `smoke-starter`) and artifact name pattern (cosmetic; matches the new `test_<layer>-<target>` / `smoke-<layer>` naming convention; no external consumers). ### Fix skipped **`showcase_smoke-monitor.yml` slug normalization** (item #10 in the Notion page) — inspecting the file, it already uses the `showcase/packages/` slug convention (`ms-agent-python`, `ms-agent-dotnet`, `strands`). The apparent inconsistency is actually in `starter-smoke.yml`, whose matrix keys must stay as `ms-agent-framework-*` / `strands-python` because they are literal directory names in `examples/integrations/` (used as `working-directory: examples/integrations/${{ matrix.starter }}`). So there is no actionable change here — the two files use different slug conventions *by necessity*, because they target different directories (deployed `showcase/packages/*` vs. local `examples/integrations/*`). Flagging for the author of the blitz notes in case the actual concern was something else. Refs: [Bugs Found During Blitz](https://www.notion.so/3443aa381852812fb595c5118dd68818) items #3, #8, #9, #12.
jpr5
added a commit
that referenced
this pull request
Jun 12, 2026
…y-invariant rejection — the worker still holds the job (CF7 #8) The finally's unconditional eviction also fired on the malformed-input refusal thrown BEFORE the release CAS, dropping the assumed-live lease the indeterminate-renew containment depends on and killing the heartbeat of a live job. The eviction is now scoped; the 'DONE either way' header claim is corrected.
huangyingting
pushed a commit
to repomesh/CopilotKit
that referenced
this pull request
Jun 12, 2026
…-side parity (SU7-F1/F2/F3)
SU7-F1 — backend host pattern hardening:
- F1.1 Reject bare trailing ?/# in the backend host pattern
- F1.2 Strip internal tab/CR/LF from the backend host pattern
- F1.3 Warn when ignoring an empty-string local backend override
- F1.4 Reject empty-userinfo @ in the backend host pattern authority
- F1.5 Keep __proto__ keys as data in local-backend maps
- F1.6 Commit the local-backends memo key only after the value computes
- F1.7 Trim local backend overrides before validation and name the real
rejection
- F1.8 Honest FATAL when the pattern host is a stray scheme fragment
- F1.9 Canonicalize the pattern authority for parity with the override
path
- F1.10 Acknowledge the staging-to-prod fail-open in the pattern fallback
- F1.11 Harden backend-url/local-backends-env test hygiene
SU7-F2 — runtime-config & client-config edge cases:
- F2.1 Branch POSTHOG_HOST rejection reasons (scheme/degenerate/parse-
failure) instead of the catch-all mislabel
- F2.2 Reject loopback BASE_URL/DOCS_HOST in production instead of the
silent http:// prepend
- F2.3 Key the DOCS_HOST fallback once-guard on (mode, shellHost, value)
and mode-prefix all value-only guard keys
- F2.4 Reject a present-but-empty posthogKey in the client config reader
- F2.5 Drop the trailing slash from SSR_PLACEHOLDER_URL for structural
parity with server values
- F2.6 Attribute the DOCS_HOST slash-strip to readDocsHost itself
- F2.7 Normalize trailing-dot FQDN spellings in the docs self-host loop
guard (both compare sides)
- F2.8 Harden console spies to capture all log args; pin the full all-env
config shape; converge SSR simulation on vi.stubGlobal
SU7-F3 — script-side parity, table classification & test isolation:
- F3 CopilotKit#1 Handle a missing reference integration per the error contract
- F3 CopilotKit#2 Port the runtime backend-host-pattern normalization into the
generator — scheme/trailing-slash strip, degenerate fallback,
NEXT_PUBLIC fallback
- F3 CopilotKit#3 Treat non-mapping manifest parses (empty/null/scalar/array YAML)
as validation errors, not TypeErrors
- F3 CopilotKit#4 Label a missing/unreadable constraints.yaml per the stderr+exit(1)
error contract
- F3 CopilotKit#5 Align atomic-write tmp naming with the test harness straggler-
sweep convention; guard main() on direct invocation
- F3 CopilotKit#6 Correct the determineCellStatus unshipped docstring; replace
stale hardcoded cell counts with formulas
- F3 CopilotKit#7 Isolate the pattern suite on a per-suite tmpdir harness; snapshot
the generator's full write set
- F3 CopilotKit#8 Classify discarded duplicate wildcards as duplicates — hoist the
owner check above the destination warns
- F3 CopilotKit#9 Reject a root ("/") EXACT seo-redirect source — homepage-hijack
twin of the root-wildcard guard
- F3 CopilotKit#10 Reject seo-redirect entries with non-printable-ASCII source/
destination — close the silent-dead-entry class
- F3 CopilotKit#11 Strip trailing slashes in normalizePosthogHost before the scheme
test
- F3 CopilotKit#12 Message-filter the empty-slug-set error count; pin the single
matcher entry
6 tasks done
jpr5
added a commit
that referenced
this pull request
Jun 18, 2026
…0 reservation, bin/showcase slots) (#5543) ## Summary Fixes the `--isolate` slot picker in `showcase/scripts/cli/_common.sh` and adds a new `bin/showcase slots` inspector subcommand. Resolves five compounding bugs that made multi-agent local testing unreliable. ## Bugs fixed 1. **`SHOWCASE_ISO_SLOT=<N>` env var was ignored.** The picker walked 0→N regardless. Now: validates input (positive integer, `1 ≤ N ≤ 45`, slot 0 rejected as base stack), tries exactly that slot, fails loudly on conflict. 2. **No port-probe before commit.** Picker `mkdir`'d a slot dir without checking whether the slot's host ports were free. A slot whose dir was absent but whose ports were taken (foreign Docker project, host service like macOS AirPlay on 5000) was picked then failed at `docker compose up`. Now: `lsof`-probe every candidate port before committing the claim; rmdir + try next on conflict. 3. **Slot 8 / port 5000 collision on macOS.** Base dashboard port `3200` + slot 8 offset `+1800` = `5000`, permanently bound by macOS Control Center's AirPlay Receiver. Shifted dashboard base port `3200 → 3210` across `docker-compose.local.yml` and `showcase/harness/src/cli/*.ts` so slot 8 → port `5010` (free). 4. **Slot ownership desync across 3+ independent owners.** Picker checked only the dir; sweeper checked dir+pid+containers; neither checked foreign ports. New unified `_slot_state` returns all 4 axes (dir/pid/liveness/ports/offset/project); new `bin/showcase slots` exposes the state via table / `--json` / `--free --brief` filters. 5. **Parallel pre-claim deadlock dissolved** by bugs 1+2+4 — per-session pinning via env var + accurate port-probe + atomic `mkdir` lock self-resolves contention. ## Implementation - New helpers in `_common.sh`: `_slot_offset_ports`, `_slot_liveness` (extracted from sweeper), `_slot_ports_free` (with own-project docker-listener filter), `_slot_state` (composite axis report). - Rewritten `_claim_isolate_slot`: pinned-path (validate / try / die loudly) and auto-pick-path (1..MAX_SLOT, rmdir + skip on port-held). Slot 0 reserved with explicit die message. - `ISOLATE_MAX_SLOT=45` centralized as a constant. - Dashboard host port shift `3200 → 3210` across 6 files (compose + 4 harness TS + comment updates). - New `cmd-slots.sh` plugin (auto-discovered by `bin/showcase`): default table, `--json` (JSONL), `--free` (filter to claimable slots), `--brief` (numeric IDs only). ## Tests **Bats — 54/54 GREEN** in `showcase/scripts/__tests__/isolate.bats`: - 12 pre-existing tests updated for slot-0-reservation contract (reap-evidence assertions preserved; only slot-number / port-offset expectations updated). - 11 new tests added: - lsof stub + foundation smoke (test #0) - Pinning behavior tests #1-3 (success, live-die, validation incl. 0/foo/99) - Port-probe tests #4-7 (stale-reap, `_slot_offset_ports 8 → 5010 ≠ 5000`, foreign-process skip, own-project no-skip) - Composite tests #8-10 (`_slot_state` 5 axes, `bin/showcase slots` output, concurrent claim distinct slots) - lsof-graceful test (#54): `_slot_state emits ports=? when lsof is unavailable` **Vitest — 17/17 GREEN** in `showcase/harness/src/cli/control-plane-run.test.ts` (port-shift stub consistency). **Value-test (live local, plan §6 scenarios) — all 3 PASS:** - **Scenario A:** On the test host Docker was holding slot 9's ports, so the picker correctly REFUSED `SHOWCASE_ISO_SLOT=9` with per-port diagnostics (proving the fail-loud half of the contract). Re-ran with `SHOWCASE_ISO_SLOT=15` (first free slot) and the pin was honored cleanly: `ISOLATE_SLOT=15`, `OFFSET=3200`. Both halves of the pin contract verified. - **Scenario B:** Slots 1-7 pre-occupied with live pids + Python listener on `127.0.0.1:5010` (slot 8's dashboard port) → picker logged "Slot N ports held" + "trying next" for each conflict, walked past 9..13 (Docker-held), and landed on slot 14 with `OFFSET=3000`. No silent collision. - **Scenario C:** `bin/showcase slots` matches reality: slot 0 → `OFFSET=+0 PROJECT=showcase (base)`; pre-claimed slot 5 → `DIR=present PID=<pid> LIVE=live PORTS=held OFFSET=+1200 PROJECT=showcase-iso5-test`. `--free --brief` outputs only fully-claimable slot IDs (44 in this run, slot 5 excluded). ## Code review Full 7-agent cr-loop with `pr-review-toolkit` reviewers (Round 1 + confirmation round). 4 subject-scope load-bearing findings fixed: - `_reap_isolate_slot` arg shape in pinned-path retry - `_slot_state` base-stack offset (slot 0 → `+0`, not `+200`) - TESTING.md item 8/9 column-name accuracy (matches actual `SLOT DIR PID LIVE PORTS OFFSET PROJECT` header) - `bin/showcase slots` lsof-graceful degradation (inspector reports `PORTS=?` instead of dying when `lsof` is missing) Plus 1 trivial comment-phrasing fix (race-comment wording). ~50 pre-existing harness/compose findings partitioned out-of-subject and deferred to follow-up PRs (see below). Procedure 3 bucket-(c) promotion audit returned zero PROMOTE_TO_A items — full convergence. ## Follow-up PRs (out-of-subject, separate subjects) These coherent subjects surfaced during CR but belong to distinct PRs (the diff merely brushed against them for the `3200→3210` shift): - **d1** — Harness `up()` / `doctor` should health-check `harness-control-plane` (port 8081). `_slot_offset_ports` includes 8081; `INFRA_PORTS` in `doctor.ts` / `lifecycle.ts` does not. - **d2** — `doctor.ts` port + image diagnostic loud-failure pass (`checkStaleImages`, `checkPorts`, `isPortListening`, `checkDepotInterception` swallow errors). - **d3** — `lifecycle.ts` error-surfacing pass (broad catches in `loadPortsFile`, `isRunning`, `compose`, `healthCheck`, `diffLogs`, etc.). - **d4** — `docker-compose.local.yml` healthcheck error visibility (`.catch(() => process.exit(1))` swallows; dashboard `/` returns 307). - **d5** — `apply_isolation` Python rewriter fail-loud pass (no `re.subn` count checks, hand-rolled YAML demos parser). - **d6** — Centralize infra port literals (currently duplicated in 4 places). - **d7** — `lifecycle.ts:11-13` stale `ops/` path comment (file lives at `harness/`). - **d8** — `cmd_slots --json` `pid` field typing (string vs number) — settle when first JSON consumer appears. ## Test plan - [x] `bats showcase/scripts/__tests__/isolate.bats` → 54/0 - [x] `pnpm vitest run src/cli/control-plane-run.test.ts` (in `showcase/harness/`) → 17/0 - [x] `pnpm exec tsc --noEmit` (in `showcase/harness/`) → clean - [x] `oxfmt --check showcase/` → clean - [x] `docker compose -f showcase/docker-compose.local.yml config` → valid YAML - [x] Local value-test scenarios A/B/C from plan §6 → PASS
huangyingting
pushed a commit
to repomesh/CopilotKit
that referenced
this pull request
Jun 18, 2026
…command, and lsof-graceful inspector - Update 12 slot-0-assumption tests for slot-0 reservation contract - Add lsof stub and foundation smoke for isolate.bats - Tests CopilotKit#1-CopilotKit#3: slot pinning behavior - Tests CopilotKit#4-CopilotKit#7: port-probe and stale-reap behavior - Tests CopilotKit#8-CopilotKit#10: slot state, slots subcommand, concurrent claim - New test for _slot_state ports=? when lsof unavailable
lukasmoschitz
added a commit
that referenced
this pull request
Jul 28, 2026
… (OSS-582) (#6184) ## Summary Aligns the **langgraph-fastapi** showcase integration to the north-star **langgraph-python** (OSS-582 — "Align LangGraph (FastAPI) Showcase demos and code"). Moves the integration onto the product-centric demo set: backend agent graphs, runtime wiring, frontend chrome, the demo-browser overview (`manifest.yaml`), and aimock fixtures. Linear: OSS-582. ## What changed **Backend agents (`src/agents/src/`)** - Ported the missing dedicated graphs: `agentic_chat`, `gen_ui_agent`, `gen_ui_tool_based`, `shared_state_streaming`. - v2 `create_agent` ports + config alignment for `agent_config_agent`, `headless_complete`, `reasoning_agent`, `tool_rendering_agent`, `tool_rendering_reasoning_chain_agent`, `a2ui_dynamic`. **Runtime wiring** - `route.ts`: wired the canonical demos to their dedicated graphs and removed them from the generic `sample_agent` fallthrough loop (this is what made several demos behave correctly against a real LLM — see below); added `recursion_limit`. - `langgraph.json`: registered the 3 new graphs. - Renamed the dedicated API routes `copilotkit-byoc-{hashbrown,json-render}` → `copilotkit-declarative-{hashbrown,json-render}`. **Overview / content** - `manifest.yaml`: demos + features aligned to LGP (names, descriptions, tags, order, canonical ids; deprecated aliases migrated; phantom `hitl-in-chat-booking` removed; `shared-state-streaming` un-quarantined now that it works). Integration identity (name/slug/logo) preserved. The demo-browser overview is now card-for-card identical to langgraph-python. - Restored two missing `@region` markers (factory-automation snippet extraction). **Frontend chrome** - `globals.css`, `layout.tsx`, `middleware.ts` (was missing), `declarative-gen-ui/*` + `sales-context.ts`, `beautiful-chat`; `Dockerfile` now copies `manifest.yaml` (fixed an RSC crash on every `/demos/*`). **aimock fixtures (`aimock/d4|d6/langgraph-fastapi/`)** - D6 fixture fixes for the previously-red cells (stale `turnIndex` gates, cross-file substring shadowing, missing `chunkSize`, prompt narrowing). **Showcase tooling / docs** - Fixed harness services racing on a shared image tag (`docker-compose.local.yml`). - `GOTCHAS.md` #8: documents that aimock D6 can be green while a demo is broken against a real LLM (fixtures replay scripted tool calls regardless of which graph ran), plus how to catch it. - `PARITY_NOTES.md`: sanctioned divergences (a2ui-recovery per-slug prompt isolation; declarative-json-render scoped-test divergence). ## Verification - **D6 sweep: 38 green / 1 red.** The single red is **a2ui-recovery**, which reproduces **identically on the north star** (shared Python `ag_ui_langgraph` recovery loop; mastra's TS impl is green). It is not a fastapi defect and is tracked as a separate PR against the north star. Documented in `PARITY_NOTES.md`. - `validate-manifests` (manifest → registry, all 20 integrations) — green. - `validate-routes --all` (runtime-route wiring) — green. - Build + TypeScript typecheck (`next build` via the Docker image build) — green. - `@region` audit — all region pairs balanced and LGP-consistent (0 orphans/typos/mismatches). - Live manual QA against real OpenAI (`:3102` vs `:3100`) confirmed the key demos (reasoning-custom, shared-state-streaming, gen-ui-tool-based, agentic-chat). ## Notable finding Several demos were D6-green but broke against a real model because they fell back to the generic `sample_agent` instead of their dedicated graph — the aimock fixture masked the wiring bug by replaying scripted tool calls. This PR fixes the wiring and documents the gap (GOTCHAS #8). D6-green is necessary but not sufficient for graph/tool-dependent demos; a real-LLM click-through is required. ## Deferred / follow-ups - **a2ui-recovery** — shared north-star defect in the Python `ag_ui_langgraph` recovery loop; separate PR against the north star. - **d5-byoc probe** — always sends the hashbrown pill even on the json-render page (fleet-wide harness limitation); tracked as a follow-up. The gating `byoc` grid cell is green. ## Scope note Only `langgraph-fastapi` integration code, its aimock fixtures, and showcase tooling/docs changed. **langgraph-python (the north star) was not touched.**
AlemTuzlak
added a commit
that referenced
this pull request
Jul 28, 2026
…ing (#6200) Six defects reported on staging. All six reproduce; five share one cause. ## The shared cause `built-in-agent/src/app/api/copilotkit/route.ts` maps **~20 demos to the same prompt-less `createBuiltInAgent()`**. The reference wires each to its own graph **and its own system prompt** (28 graphs in `langgraph-python/langgraph.json`). aimock replays a scripted tool-call sequence keyed on `userMessage` + `context`, so D6 is green whether or not the model could have reasoned its way there. This is `showcase/GOTCHAS.md` #8 verbatim — including its stated "structural tell": *grep the integration's `route.ts` for demos left in the generic fallthrough that LGP wires to a dedicated graph.* ## Per-defect | Demo | Symptom | Root cause | |---|---|---| | `gen-ui-tool-based` | charts plot zeros | No prompt. The assistant says so itself: *"I used placeholder values since no sales figures were provided."* Nondeterministic — one run gave a real 0..220 axis, the next `0 1 2 3 4` with no bars, which is how it passed review. | | `gen-ui-agent` | wall of text, steps frozen at "step 1 of 4" | `set_steps` + its `/steps` STATE_DELTA already worked; nothing told the model to *walk* pending→in_progress→completed. | | `subagents` | left panel always empty | `grep -rn delegations src/ \| grep -v demos/subagents` → **no output**. Frontend reads `agent.state.delegations`; the converter handles `/steps` and `/notes` and has no `delegations` case. Chat works because the tools do run. | | `declarative-json-render` | raw JSON for pills 2 & 3 | Intercepted the SSE: **the wire is already one closing brace short** — nothing is dropped in transport, and the client parser correctly requires a balanced object. Pill 1 only works because the model copies the prompt's worked example verbatim (`\$1.24M`, `+18% vs Q2`). Model-level JSON enforcement had been removed with the note *"the system prompt already enforces JSON-only output"* — it does not. | | `a2ui-recovery` | 5 identical cards | Reuses declarative-gen-ui's prompt with no "call once" constraint, while the pills literally ask it to *"self-correct a malformed first attempt"*. The retry loop is **inside** the tool and returns on first valid pass, so every supervisor retry is pure duplication. | | `declarative-gen-ui` | D4 though it works live | **The inverse case.** Badges: `UI ✓ BE ✓ 1P ✗ D6 —` (*"gated — blocked by a lower rung"*). Not a live bug — a fixture bug. See below. | ## The D4 cap (`declarative-gen-ui`, `a2ui-recovery`) Both demos' secondary design-call fixtures gated on `match.responseFormat: \"json_object\"`. That matcher **can never match this backend**: - The agent talks to the OpenAI *Responses* API, where JSON mode is `text.format`. - aimock has **no `text.format` handling at all** — `responsesToCompletionRequest` forwards only a top-level `response_format` (absent in 1.19.1, forwarded in 1.37.4), a key the Responses API doesn't accept and this client doesn't send. - So `effective.response_format?.type` is always `undefined` and `router.ts` skips the fixture → the design call never matched → surface never painted → D5 red, D6 never ran. Re-keyed onto `match.toolName`, which aimock *does* normalize out of a Responses request (`responsesToolsToCompletionsTools`): the outer call declares `generate_a2ui`, the in-tool design call declares nothing. Tool-less secondary fixtures moved last, because several pills' brief is a substring of the pill text (`\"Build my Q2 revenue summary …\"` contains `\"Q2 revenue summary\"`) and would otherwise win the outer request. ## Verification **Reproduced live** (staging, real LLM): the zero-axis chart plus its self-incriminating message, the unbalanced JSON on the wire, and the reference rendering the *same pill* correctly for contrast. **Two mutation-verified test suites** — both fail with the fix reverted: - `aimock-a2ui-routing.test.ts` drives aimock's **real `matchFixture`**. On the old fixtures 14/16 cases fail with `no fixture matched the secondary design call for brief \"…\"` — the D5 red, reproduced as a unit test. - `tanstack-factory.test.ts` covers the `/delegations` and `/steps` deltas (3 delegation tests fail with the branch disabled; the 2 controls still pass). **No regressions:** `tsc --noEmit` is 61 errors before *and* after (all pre-existing — `gpt-5.4` missing from the adapter's model union, zod v3/v4 skew); oxlint clean on changed files; the repo-wide fixture validator passes (858 assertions). `text.format` was verified by reading the request mapping in the **pinned** `@tanstack/[email protected]` → `@tanstack/[email protected]`: `modelOptions` is spread straight into `responses.create()`, `validateTextProviderOptions` only inspects `metadata`/`conversation`/`previous_response_id`, and the adapter sets `text.format` itself only when an `outputSchema` is passed (none here, so nothing is clobbered). ## What is NOT verified **The four prompt/`text.format` changes have not had a real-LLM click-through** — that needs an OpenAI key this environment doesn't have, and D6/aimock cannot verify them by construction (that's the whole point of gotcha #8). Reasoning is documented inline at each site. This area has burned the repo before: a previous `response_format` attempt made the call return an empty string "verified against real OpenAI", which is why `text.format` — the Responses API's own param — is used instead. **Worth a live click-through on the staging deploy before this is considered closed.** ## Deliberate non-goals - **`a2ui-recovery` only demonstrates recovery under aimock.** The heal/exhaust branches need a designer LLM that emits invalid surfaces on demand; a real one succeeds on attempt 1. The single-call constraint fixes the 5-card bug and makes it honest; making recovery visible live needs deliberate fault injection — a product decision, recorded in `PARITY_NOTES.md`. - **The reference pins `openai:gpt-4o-mini`** (`gen_ui_agent.py:92`). Flagged, not touched. ## Docs `GOTCHAS.md` gains built-in-agent as a second worked instance of #8 (including that the masking runs *both* ways, and that `1P ✗ D6 —` means gated, not failing), plus the `text.format` and dead-`responseFormat` traps. `PARITY_NOTES.md` records that the named-agent registry is **not** prompt-neutral, and that any new `state.<slot>` needs a converter branch.
adrienplg
pushed a commit
to adrienplg/CopilotKit
that referenced
this pull request
Jul 28, 2026
…o broken against a real LLM aimock replays scripted tool calls keyed on userMessage+context regardless of which graph ran or its tool set, so a demo mis-wired to the sample_agent fallback passes D6 green while breaking against a real model (OSS-582: gen-ui-tool-based looped on query_data; shared-state-streaming wrote only to chat; agentic-chat ran with the wrong tool set). Document that D6-green is necessary but not sufficient, the real-LLM live click-through procedure, and the structural tell (route.ts fallthrough loop vs LGP's dedicated wiring).
adrienplg
pushed a commit
to adrienplg/CopilotKit
that referenced
this pull request
Jul 28, 2026
Every affected cell was D6-green (or D4-gated) while the deployed demo was visibly broken. The common cause is GOTCHAS CopilotKit#8: aimock replays a scripted tool-call sequence keyed on userMessage + context, so the fixture answers a question the model was never asked. Prompt gaps — ~20 demos shared one prompt-less `createBuiltInAgent()` where the reference wires each to its own graph AND its own system prompt. Adds `createBuiltInAgent({ systemPrompt })` + `demo-prompts.ts`, ported from the reference graphs: - gen-ui-tool-based plotted zeros; the assistant said "I used placeholder values since no sales figures were provided". Nondeterministic — some runs invented real values, which is how it passed review. - gen-ui-agent published its plan once then narrated, freezing the progress card on step 1 of 4. - a2ui-recovery painted five identical cards: nothing constrained the supervisor to one `generate_a2ui` call, and the pills literally ask it to "self-correct". The retry loop lives inside the tool, so supervisor retries are duplication. subagents' delegation panel was permanently empty — the frontend reads `agent.state.delegations` and no code emitted that slot. The converter now emits a `/delegations` delta per sub-agent result (whole-array `add`, since initial state is `{}` and strict fast-json-patch rejects unresolvable paths while @ag-ui/client swallows the throw), and ports the reference's `_MAX_CRITIQUE_ITERATIONS = 1` cap. declarative-json-render dumped raw JSON for any prompt the model couldn't crib from the worked example. Captured the SSE: the wire is already one closing brace short, so nothing is dropped in transport — model-level enforcement had been removed on the grounds that "the system prompt already enforces JSON-only output". It does not. Restores it via the Responses API's `text.format`, the param the removed `response_format` maps to, verified against the pinned @tanstack/[email protected] -> @tanstack/[email protected] request mapping. declarative-gen-ui and a2ui-recovery were the inverse: capped at D4 (UI ✓ BE ✓ 1P ✗ D6 gated) while working live. Their secondary design-call fixtures gated on `match.responseFormat`, which aimock can never satisfy here — it has no `text.format` handling and only forwards a top-level `response_format` the Responses API doesn't accept. Re-keyed onto `match.toolName` (the outer call declares `generate_a2ui`, the in-tool design call declares nothing) with the tool-less fixtures moved last, since several pills' brief is a substring of the pill text. Tests (both mutation-verified — they fail with the fix reverted): - aimock-a2ui-routing.test.ts drives aimock's real `matchFixture`; 14/16 cases fail on the old fixtures with "no fixture matched the secondary design call". - tanstack-factory.test.ts covers the `/delegations` and `/steps` deltas. Typecheck unchanged at 61 pre-existing errors; oxlint clean on changed files. NOT verified live: the four prompt/`text.format` changes need a real-LLM click-through, which needs a key this environment doesn't have. Reasoning and the exact request mapping are documented inline.
lukasmoschitz
added a commit
that referenced
this pull request
Jul 29, 2026
…es + fleet follow-ups Record the durable findings from OSS-583: - langgraph-typescript per-framework notes: langchain-js streaming-reassembly bugs (reasoning index-collision -> disableStreaming; tool-call+content reassembly -> normalizeAssistantMessage), a2ui-recovery inner-render header forwarding via ALS/wrapToolCall (mirrors mastra), and multimodal's LFS-asset build requirement. - 'What Was Green But Still Wrong' #8: single-pass sweeps hide flaky cells and aimock-green can mask a real backend bug -> re-run for stability + verify the right graph runs. - Known fleet-wide follow-ups: the frontend-tools-async stale turnIndex fixture reds the north star too (needs the same deletion in langgraph-python); image builds must git lfs pull so multimodal ships real assets not LFS pointers.
2 of 9 tasks
AlemTuzlak
added a commit
that referenced
this pull request
Jul 29, 2026
## Summary Fixes staging click-through failures on **ms-agent-dotnet** and **ms-agent-harness-dotnet** demos. Same class of bug as #6200 (GOTCHAS #8): aimock D6 was green while real LLMs failed. ### Root causes & fixes | Demo | Symptom | Fix | |------|---------|-----| | beautiful-chat Sales Dashboard | `Catalog not found: sales_dashboard` | Force page-registered `catalogId`; stronger secondary design prompt | | declarative-gen-ui KPI / pie / bar / status | Loader never resolves; `without a type`; `SummaryCard` missing `id` | Sanitize + normalize flat A2UI components; drop invalid entries; force `declarative-gen-ui-catalog` | | shared-state-read-write Remember something | Notes panel never updates | AsyncLocal store write misses (tool EC); mirror writes + read fallback; wire dead deterministic reply path for the pill | | subagents left panel | Chat works, side UI empty | Same AsyncLocal store bug for `state.delegations` | | open-gen-ui-advanced calculator / ping host | Form/input calculator; ping no-ops | System prompt for clickable keypad + `notifyHost` / `evaluateExpression` wiring | | beautiful-chat calculator | Buttons do nothing | OGUI guidance: `type=button`, no `form`, click handlers | ### Voice auth error Not a code defect in the voice route: `GuardedOpenAITranscriptionService` correctly fails when `OPENAI_API_KEY` is missing on the **Next.js** process. Staging needs that env var on the showcase frontend service (transcription hits real OpenAI, not aimock). ### MCP Excalidraw empty iframe Left as follow-up — likely external MCP host / sandbox CSP; no agent-side bug found in wiring. ## Test plan - [x] `dotnet test` ms-agent-dotnet (79/79) in Docker SDK 9 — includes new A2UI force-catalog / type-as-key / drop-invalid tests - [x] harness agent build + cvdiag tests (5/5) - [ ] Staging click-through after deploy: - [ ] `/react/ms-agent-dotnet/beautiful-chat` — Sales Dashboard paints; calculator interactive - [ ] `/react/ms-agent-harness-dotnet/declarative-gen-ui` — all four pills paint without A2UI errors - [ ] `/react/ms-agent-harness-dotnet/shared-state-read-write` — Remember something updates notes - [ ] `/react/ms-agent-harness-dotnet/subagents` — left panel shows running/completed delegations - [ ] `/react/ms-agent-harness-dotnet/open-gen-ui-advanced` — calculator keypad + ping host - [ ] Voice: confirm `OPENAI_API_KEY` present on staging frontend, then mic works
3 tasks done
AlemTuzlak
added a commit
that referenced
this pull request
Jul 29, 2026
…real LLM (#6228) ## What does this PR do? Two `built-in-agent` demos were broken against a real model while their D5/D6 rows stayed **green** — `d5:built-in-agent/gen-ui-agent`, `d5:built-in-agent/byoc` and both `e2e:` rows all pass. Neither failure is reachable under aimock, so the fixtures could never have caught them (`showcase/GOTCHAS.md` #8). Both root causes were confirmed against the live OpenAI API. ### 1. `gen-ui-agent` stopped mid-plan on every run `@tanstack/ai`'s `chat()` applies `maxIterations(5)` when no `agentLoopStrategy` is passed (`@tanstack/[email protected]`, `src/activities/chat/index.ts`: `config.params.agentLoopStrategy || maxIterationsStrategy(5)`). Nothing errors when the budget runs out — the run just ends. `GEN_UI_AGENT_PROMPT` scripts **7** `set_steps` calls (1 initial + in_progress/completed per step × 3) plus a closing message, so the walk died two calls short with the last step pinned at `pending` and no narration. Captured from the staging SSE stream: ``` TOOL_CALL_START: 5, STATE_DELTA: 5, TEXT_MESSAGE_*: 0 call 5 (final): step1 completed, step2 completed, step3 pending ``` Reproduced locally with the real model, the real prompt and the real `set_steps` tool: | budget | `set_steps` calls | final statuses | narration | |---|---|---|---| | default (5) | 5 | `completed, completed, pending` | **none** | | `maxIterations(25)` | 7 | `completed, completed, completed` | 333 chars | Every demo factory now passes the shared `DEMO_AGENT_LOOP_STRATEGY` (25 — several times the longest scripted walk, still bounded, since each iteration is a model call). The two non-streaming tool-free `chat()` calls (`subagent-tools`, `a2ui-factory`'s secondary designer) keep the default: they have no loop to exhaust. ### 2. `declarative-json-render` rendered nothing at all `RUN_STARTED` → `RUN_FINISHED`, zero events between, no console error, no error banner. `text.format: { type: "json_object" }` has a server-side precondition that the word "json" appear in the request's `input`. The adapter sends `systemPrompts` as `instructions` and only `messages` as `input`, so with the JSON directive living solely in `SYSTEM_PROMPT` the API rejected every single run: ``` 400 Response input messages must contain the word 'json' in some form to use 'text.format' of type 'json_object'. (param: input) ``` The directive now rides in `messages` — as `role: "user"`, because `TanStackChatMessage` admits only `user | assistant | tool` and the runtime deliberately hoists system messages into `systemPrompts`, the very half that is not input. It is invisible in the UI (the chat renders from AG-UI events, not from what the backend sends the model). `json_object` enforcement is kept; verified live that the run then streams a complete, `JSON.parse`-able spec. That 400 was **invisible** because the hand-rolled converters forward a whitelist of chunk types and dropped `RUN_ERROR` — every one except `reasoning-factory`. The `type: "tanstack"` factories were already fine (the runtime's `convertTanStackStream` rethrows, `tanstack.ts:419`), so the four `type: "custom"` converters now call the shared `throwOnRunError`. This is why a fleet-wide silent failure went unnoticed, and it is fixed independently of the JSON-mode bug. ### 3. The progress card stopped claiming completion it doesn't have `InlineAgentStateCard` printed `All ${total} steps complete` whenever `status === "complete"`, ignoring the step data — so a truncated run announced completion above a list that visibly showed step 3 unstarted, which is what made an agent stopping early read as a UI glitch. The wording now derives from the steps (`describeProgress`, extracted as a pure function so it is testable without a DOM), a stalled run says so, and the check-mark icon is gated on the data too. ## Verification - 18 new unit tests, all green: agent-loop budget sized off the prompt itself, `throwOnRunError`, the `json_object` input precondition + converter behaviour, and the card's wording across running / done / stalled / empty - `oxlint` 0 warnings 0 errors on the changed dirs; `oxfmt` clean - Live end-to-end runs against real OpenAI for both root causes (tables above) - Pre-existing and unrelated: this integration is not a pnpm-workspace member, so `tsc --noEmit` here reports 73 errors from version skew in a standalone install (`gpt-5.4` outside the pinned adapter's model union, `@ag-ui/client` not exposed as a direct dep). Both hit untouched files and untouched lines; my two real type errors were fixed. CI runs vitest only in `showcase/scripts` and `showcase/harness`, so these tests are developer-local, same as the pre-existing `tanstack-factory.test.ts` beside them. ## Related PRs and Issues - Sibling real-LLM-vs-aimock fix: #6226 - Same class as #6224 (ms-agent .NET real-LLM demo defects) ## Checklist - [x] I have read the Contribution Guide - [x] If the PR changes or adds functionality, I have updated the relevant documentation (`showcase/GOTCHAS.md` — two new entries) - [x] "Allow edits by maintainers" is checked 🤖 Generated with [Claude Code](https://claude.com/claude-code)
adrienplg
pushed a commit
to adrienplg/CopilotKit
that referenced
this pull request
Jul 29, 2026
Staging click-through on ms-agent-dotnet / ms-agent-harness-dotnet hit several GOTCHAS CopilotKit#8 defects: aimock D6 was green while live LLMs failed. A2UI (beautiful-chat sales dashboard, declarative-gen-ui pills): - Force the page-registered catalogId (models invent "sales_dashboard"). - Sanitize/normalize flat components; salvage type-as-key nests; drop entries missing id/component (SummaryCard without id, charts without type). - Strengthen secondary design prompts with the flat catalog contract. Shared state + subagents side panels: - Tool invocation drops AsyncLocal set by SetActiveThread, so writes landed in the global slot while snapshots keyed by AgentSession/AgentThread. Mirror writes and fall back on read (same pattern as D5ParityAgents). - Wire the dead TryBuildDeterministicReply path for the "Remember something" pill so notes update without relying on the model calling set_notes. Open generative UI advanced + beautiful-chat calculator: - Prompt for clickable keypad (not form/submit) and notifyHost ping wiring. Verified: ms-agent-dotnet unit suite 79/79 green in Docker SDK 9; harness agent builds clean and cvdiag tests 5/5.
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
…null-alt filter, registry-gated landing cards - Reject RESERVED_ROUTE_SLUGS at the handler as defense-in-depth. Next.js already prefers exact-match top-level routes over this catch-all, so /docs, /ag-ui, etc. never reach here under normal routing — but if the registry ever ships an integration whose slug collides with a reserved segment, the handler now short-circuits with notFound() rather than rendering garbage (finding CopilotKit#6). - Import the shared findFrameworksWithCell helper instead of a duplicated local copy (finding CopilotKit#3 follow-through). - Filter out unresolved alternative-framework slugs BEFORE mapping to React fragments so the ", " separator aligns with the final rendered count. The pre-filter index previously emitted stray commas when an entry dropped to null mid-sequence (finding CopilotKit#7). - FrameworkLandingPage's four hardcoded LandingCards are now gated by registry integration.features presence: strands (no HITL support) no longer shows a dead "Human-in-the-Loop" card. The card definitions are hoisted into a module-level constant with a TODO pointing at the eventual feature-id → doc-slug mapping (finding CopilotKit#8). - Declare export const dynamicParams = true explicitly so a future migration to output: "export" fails loudly here (under static export dynamicParams must be false) rather than silently 404ing every /<framework>/<slug> URL (finding CopilotKit#9).
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
## CI hygiene fixes Four direct-fix items surfaced during the 2026-04-16 QA/E2E blitz, bundled as one PR with one commit per fix: 1. **`test_unit.yml` paths-ignore** — add `showcase/**` + `sdk-python/**` (prevents spurious TS unit matrix runs on showcase-only or sdk-python-only PRs). `sdk-python-old/**` was mentioned in the plan but doesn't exist on main; only the two existing dirs are added. 2. **`test_doc-examples.yml`** — scope PR trigger to `branches: [main]` (matches convention of other workflows). 3. **`e2e_dojo.yml`** — symmetric `.changeset` path filter on push+PR (was asymmetric — already in the `dorny/paths-filter` step's `ts:` list, so this aligns the trigger). 4. **`starter-smoke.yml`** — rename internal job id (`starter-smoke` → `smoke-starter`) and artifact name pattern (cosmetic; matches the new `test_<layer>-<target>` / `smoke-<layer>` naming convention; no external consumers). ### Fix skipped **`showcase_smoke-monitor.yml` slug normalization** (item CopilotKit#10 in the Notion page) — inspecting the file, it already uses the `showcase/packages/` slug convention (`ms-agent-python`, `ms-agent-dotnet`, `strands`). The apparent inconsistency is actually in `starter-smoke.yml`, whose matrix keys must stay as `ms-agent-framework-*` / `strands-python` because they are literal directory names in `examples/integrations/` (used as `working-directory: examples/integrations/${{ matrix.starter }}`). So there is no actionable change here — the two files use different slug conventions *by necessity*, because they target different directories (deployed `showcase/packages/*` vs. local `examples/integrations/*`). Flagging for the author of the blitz notes in case the actual concern was something else. Refs: [Bugs Found During Blitz](https://www.notion.so/3443aa381852812fb595c5118dd68818) items CopilotKit#3, CopilotKit#8, CopilotKit#9, CopilotKit#12.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.