Repository navigation
fix(inspector): accept local dashboards and retry Learning status - #7966
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Dashboard URL safety packages/shared/src/utils/dashboard-url.ts, packages/shared/src/utils/inspector-metadata.ts, packages/shared/src/utils/inspector-metadata.test.ts |
A shared URL check rejects credentials, allows HTTPS, and allows HTTP only for loopback or .localhost hosts. Action URL validation and its tests use the updated policy. |
Learning snapshot URL validation packages/shared/src/utils/inspector-learning.ts, packages/shared/src/utils/inspector-learning.test.ts, packages/runtime/src/v2/runtime/__tests__/* |
Configured origins use the shared check. Snapshot links must match their allowed route patterns and contain no query or fragment. Runtime snapshots expect the runs link at the analysis-results route. |
Learning unavailable and retry states packages/web-inspector/src/index.ts, packages/web-inspector/src/__tests__/*, packages/web-inspector/dev/learning-status.browser.ts |
Snapshot failures show a generic unavailable status. The HUD and Home show checking or unavailable Learning with a Retry action. Tests cover failed responses and recovery after retry. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Suggested reviewers: marthakelly, onsclom
Merge Risk: 
Minimal · up to 4bf44
-
The changed Learning links and retry behavior have no established merge-blocking defect. Confirm the companion service’s deployment compatibility as part of release coordination.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 inconclusive Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 11 files. (1 skipped: 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 2
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/intelligence-langgraph
@copilotkit/intelligence-mastra
@copilotkit/learning
@copilotkit/mcp-apps-renderer
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/react-textarea
@copilotkit/react-ui
@copilotkit/runtime
@copilotkit/runtime-client-gql
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
|
Size Change: +3.04 kB (+0.16%) Total Size: 1.88 MB 📦 View Changed
ℹ️ View Unchanged
|
ba7b11d to
4bf4447
Compare
tylerslaton
left a comment
There was a problem hiding this comment.
LGTM. Moving the transport/credential policy into one isSafeDashboardUrl helper is a nice cleanup. The *.localhost label regex is stricter than the old endsWith('.localhost') (good), and it matches the Intelligence copy in #2063. The canonical path checks for learning / candidates / runs match what Intelligence main emits today (inspector-learning-store.ts projectLinks). Separating "unavailable/checking" from "not configured" is the right call; a failed read shouldn't look like "Learning is off."
Non-blocking:
- Version skew with older Intelligence. Before Intelligence
352b7f9e5(first shipped in cli-v4.13.0, ~Sept 17), the backend emittedlearning: …/learning?container=<id>andruns: …/learning?tab=runs. With the new path validation, a current runtime talking to one of those deployments rejects the whole snapshot, and the Inspector shows "Learning status unavailable" indefinitely. If self-hosted installs that old are still supported, consider nulling just the invalidcandidates/runslinks (and maybe falling back to the origin forlearning) instead of failing the snapshot. If not, ignore this. - The catch block now collapses every failure into the same "Learning status unavailable" string. The old message distinguished invalid-snapshot from network errors, and
loadOutcomeonly keeps theunsupporteddistinction. Aconsole.debugor adata-reason attribute would make field debugging easier. - On
InspectorLearningUnsupportedErrorwe no longer setlearningSupported = false, so a 404 now shows "unavailable + Retry" instead of hiding Learning. That matches the new[503, 404]test, so I assume it's intentional. Calling it out in case a runtime can advertiseinspectorLearningagainst a backend that legitimately lacks the route.
…t#7977) ## Exact-head preview and installed check — 2026-10-26 Published starter commit [`119f0e2`](MikeRyanDev/bookish-guacamole@119f0e2) contains the [installed verification record](https://github.com/MikeRyanDev/bookish-guacamole/blob/119f0e21ffd791baaa0b5e626b8573a1a125c106/docs/VERIFICATION.md#installed-candidate-on-macos-arm64). At SDK `912ed69d13cca0a0707e96ba9a8ac6364de913fc` with Intelligence `11e65d655cbd8a6b3dfcdee169e68e203af8143f`, the [SDK preview workflow 40377607700](https://github.com/CopilotKit/CopilotKit/actions/runs/40377607700), [chart candidate workflow 40378089911](https://github.com/CopilotKit/Intelligence/actions/runs/40378089911), and [CLI preview workflow 40379989285](https://github.com/CopilotKit/Intelligence/actions/runs/40379989285) passed. All 15 SDK archives and the matching CLI archive were checksum-verified; a fresh starter clone passed frozen installation and strict typecheck. All five PR heads in the two native stacks now have settled CI with no active or failed jobs. macOS ARM64 installed acceptance exercised `CopilotKitIntelligence.experimental.learning.*` through the starter: container discovery, real Learning, evidence review, Skill approval, next-turn `load_skill`, transcript replay, restart, and a post-recycle Learning run passed on a separate local stack. One generated Skill description had repeated wording, and a separate model answer misstated punctuation. Reviews, stable release gates, hosted deployment, and other platforms remain open. No shared deployment changed. --- ## Monday review update — 2026-10-26 Current head: `912ed69d13cca0a0707e96ba9a8ac6364de913fc`, based on ready-for-review CopilotKit#7966 (`4bf4447107c795c0624d4a6c0feb7a6189a22a23`). The eight server-side management methods are under `CopilotKitIntelligence.experimental.learning.*`; their public types are exported under the experimental type namespace. Direct methods and direct Learning management type exports were removed before stable publication. The built strict consumer fixture now rejects `any` response inference. Runtime build, typecheck, declaration checks, focused Learning tests, and the affected-package commit gate passed. The exact-head [SDK preview workflow](https://github.com/CopilotKit/CopilotKit/actions/runs/40377607700) passed; all 15 public SDK archives were downloaded and checksum-verified in the starter candidate. Companion Intelligence CopilotKit#2068 is at `11e65d655cbd8a6b3dfcdee169e68e203af8143f`. This PR is ready for review. Exact-head CI, required approvals, and installed acceptance remain cutover gates. The older preview and installed evidence below describe historical commits, not this current head. --- Application servers can now discover Learning containers, start manual runs, inspect proposed Skill files and source evidence, and explicitly approve or reject a proposal through `CopilotKitIntelligence`. This adds typed methods for the project-key API in [Intelligence CopilotKit#2068](CopilotKit/Intelligence#2068), reusing existing credential configuration and `PlatformRequestError`. Requests validate identifiers and responses, bound JSON bodies, support caller cancellation through body reads, and enforce a 30-second deadline. Writes do not retry automatically. The guide explains project authority, shared-container scope, queue admission versus completion, and recovery after a lost write response. Existing Skill delivery and Thread assignment behavior stays compatible. This draft depends on CopilotKit#7966 and belongs in the weekend preview stack. No upstream merge or stable publication is requested. SDK push publication run `40149647070` passed. Public archives are checksum-verified. Installed starter acceptance passed. Validation: - Regression stages failed before discovery/actions/cancellation implementation. - Intelligence platform suite: 227 tests passed across 11 files. - Runtime typecheck, build, and declaration checks passed, including Express 4/5 fixtures. - Changed-file oxlint: no warnings or errors; formatting and diff checks passed. - Commit hook passed test/publint/attw for 12 affected projects; runtime suite passed 2,983 tests in 203 files. Nx reported a historical flaky-task warning for sqlite-runner. - Documentation examples and API limits reviewed against SDK and backend source; real installed acceptance is recorded below. Native stack #7978 is registered as CopilotKit#7966 → CopilotKit#7977. Frozen SDK head: `31af02d9455bd0bd78f4da40a68661bfa9fceb63`. The follow-up exposes the backend's existing `ThreadSummary.learningContainerId` and `learningContainerIds` fields so applications can preserve conversation assignments. Its type regression failed before the fields were added; typecheck and all seven management tests pass. The commit hook reran affected package checks successfully. Published preview: Intelligence `4a801b8a843b5fcb6e171b99a1d3269774ad0580`, SDK `31af02d9455bd0bd78f4da40a68661bfa9fceb63`, chart `0.15.2-validation.4a801b8a843b`, CLI `4.30.0-pre.4a801b8`. [Chart workflow 40153678137](https://github.com/CopilotKit/Intelligence/actions/runs/40153678137) and [CLI workflow 40154623137](https://github.com/CopilotKit/Intelligence/actions/runs/40154623137) passed at the exact backend commit. Anonymous chart and eight dual-architecture image indexes, public archive checksums, embedded source identities, and frozen installs were verified. Real macOS ARM64 acceptance passed in a fresh public starter clone with the reviewed source overlay and public packages: normal setup and compatible update, workspace assignment/isolation, two real coding turns with one approved test command, UI Learn, source-evidence review, approval, published Skill display, and next-turn `load_skill` without an app restart. Changing a workspace preserved existing conversation membership and applied the new choice to a new conversation. App/stack restart preserved the transcript and Skill access; recycling the Learning service was followed by another successful run. The first Learning run `01a170ea-d0c8-7a11-8657-d8333e6cf9a8` produced candidate `01a170eb-4054-713d-a4de-7b30c246ca99`, backed by three messages in conversation `cebc2151-f65e-4fd0-bd30-5dbb3ba9191c`. The recycled-service run `01a170ef-8259-7cf2-9051-4f09cb7207d6` succeeded with no new proposals. This is local preview evidence, not hosted, AMD64 runtime, automatic-scheduler, or broad Learning-quality proof. Keep the upstream PRs unmerged; no shared deployment or stable release changed. Strict consumers exposed optional fields and lost nulls in declaration output. Explicit wire interfaces now preserve those contracts. A strict built-package consumer fixture and source-schema assignment check guard the declarations; runtime typecheck, check-dts, and seven management tests pass. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added an experimental server-side Learning Management API for listing and retrieving containers, starting and checking runs, reviewing learning candidates, and accessing evidence. * Learning requests support cancellation and deadlines, with clearer error details for failed requests. * Conversation summaries can include Learning container membership information. * **Documentation** * Added guidance for managing Learning workflows, including authorization, candidate reviews, and request handling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Monday review update — 2026-10-26
Current head:
4bf4447107c795c0624d4a6c0feb7a6189a22a23, rebased onto362cd1319c7a610137c0d84e4f74155021e561c0. This PR is ready for review. The earlier candidate and installed evidence below is historical; exact-head checks and required approvals remain cutover gates.Local Intelligence evaluations use
http://cpk.localhost, but Inspector rejected that dashboard origin. Failed Learning reads then appeared as disabled Learning.This change shares the dashboard URL policy across Inspector parsers, permits valid
.localhostnames, and keeps HTTPS mandatory for remote hosts. Learning links must match the configured origin and canonical Learning routes. Home and the launcher distinguish unavailable status from unconfigured Learning and provide Retry. A failed read keeps the Learning tab available.Companion Intelligence PR: https://github.com/CopilotKit/Intelligence/pull/2063, based on https://github.com/CopilotKit/Intelligence/pull/2041. Exact preview identities will be added during delivery. These are cross-repository companions, not one native GitHub stack.
Validation:
.localhost, invalid paths, and unavailable/retry behavior.NX_DAEMON=false pnpm nx run-many -t test,check-types,build -p @copilotkit/shared,@copilotkit/runtime,@copilotkit/web-inspectorpassed.cpk.localhost,localhost, and remote HTTPS fixtures.Keep this draft open for the weekend alpha. Do not merge or publish stable packages as part of this delivery.
Public preview run 40047907337 passed at exact head
ba7b11d624915d75df8bf377f10be6f9bfeac84a. Anonymous downloads verified all 15 SDK archives in the starter dependency tree, with SHA-256 and SHA-512 checksums recorded. Related SDK dependencies resolve to the same preview commit.Published starter acceptance: commit 5727a34. The public alpha passed fresh local setup, connection, Inspector unavailable/retry and Learning links, real Luna approvals and reload, real Learning, reviewed Skill publication and next-turn delivery, stack restart, and runtime recycling. Intelligence chart
0.15.0-validation.87d973363998, CLI4.30.0-pre.87d9733, and SDKba7b11dare pinned with verified archive integrity. Older localhost and remote HTTPS were covered by fixtures; no real HTTPS deployment was changed. Stable gates remain in the starter Monday checklist.Summary by CodeRabbit