Skip to content

Correct DevFlow schemas and specs to match existing runtime - #652

Merged
jfversluis merged 1 commit into
mainfrom
mattleibow-devflow-schema-corrections
Oct 9, 2026
Merged

jfversluis merged 1 commit into
mainfrom
mattleibow-devflow-schema-corrections

Conversation

@mattleibow

Copy link
Copy Markdown
Member

Scope

Schema/spec corrections only. No runtime, client, CLI, API, or behavior changes. All 12 changed files are under docs/DevFlow/spec/.

This is the bottom layer of the requested replacement stack for #651. The clean starting commit was exactly its recorded pre-implementation base, 64e8e90c6921e68cdb2747530b58dd528dd57578; all evidence below comes from that baseline, not the feature implementation.

Existing-contract corrections

Previous claim Existing runtime fact Baseline evidence
Contexts are a bare array/contexts, active only; metadata missing/non-null URL {webviews:[...]} includes inactive/not-ready registrations, nullable URL, index/automationId/isReady/active; IDs use existing registration aliases DevFlowAgentService.Handlers.cs:195–243,2295–2316
Evaluate accepts a top-level expression; DOM is JSON; context selection/errors/actions incomplete Raw CDP method/params and raw responses; DOM/source are HTML; existing query/body alias precedence, action metadata, and {success:false,error} 400/404 responses DevFlowAgentService.Handlers.cs:1853–1856,1965–2243,2319–2356
WebView network captures browser requests; screenshots support JPEG /webview/network remains the existing HTTP 200 native .NET network-store alias, not browser fetch/XHR or a new 501. WebView capture is native-first/CDP fallback; both screenshot routes return PNG DevFlowAgentService.Handlers.cs:2245–2293; Core screenshot :1983; Native :470
Logs use verbose properties/restricted lowercase severity/source; headers are scalar strings Logs serialize t/l/c/m/e/s, preserve producer-defined level/source; headers contain arrays of values FileLogEntry.cs:9–14; NetworkRequestEntry.cs:59,63,147–162
Universal WebSocket data envelope, severity-filtered logs, nested details command Network/log entries are top-level; get_details reads top-level id and may return null; clear produces an existing error; logs filter source/replay only DevFlowAgentService.Handlers.cs:1382–1581
Sensor examples use lowercase x/y/z and omit emitted fields; stopped event advertised Sensor values use X/Y/Z/W and actual compass/barometer names; readings emit sensor/data plus compatibility reading; subscription includes sensorName/throttleMs; no stopped notification is emitted SensorManager.cs:199–218,272–308; EssentialsAgentSupport.cs:696–798
Profiler emits individual samples/marker/span events and camelCase DTOs; threadId is string Events are batch/stopped/error; DTOs retain PascalCase; ThreadId is nullable integer; existing capabilities/current/limit documented DevFlowAgentService.Handlers.cs:722–740,1583–1720; ProfilerContracts.cs:3–79
Profiler start/stop return bare DTOs and publish requests require server-owned output fields Correct session wrappers, optional start body/range 50–60000, name-only marker/span inputs, and existing errors DevFlowAgentService.Handlers.cs:768–868
UI subscription requires timestamp/generic filter; typed client belongs to Driver UI consumes type/data.events, not timestamp/filter; AgentClient lives in portable Client and is forwarded by Driver DevFlowAgentService.Handlers.cs:1061–1104; Client project and Driver type forwards

Why the casing changes are corrections

  • fps → Fps: baseline ProfilerSample.Fps has no JSON-name override; the default serializer preserves that name. An actual baseline batch emitted Fps.
  • x → X: baseline sensor writer explicitly writes X, Y, Z.
  • level → l: baseline FileLogEntry explicitly declares [JsonPropertyName("l")]. HTTP/WS payloads already use that compact key.

No hostKind, new webview-<index> IDs, owner correlation, includeWebViewElements, compatibility removal, or lockstep-version implementation is included. Existing aliases (including ready/isReady) are preserved/documented.

Validation

dotnet test src/DevFlow/Microsoft.Maui.DevFlow.Tests/Microsoft.Maui.DevFlow.Tests.csproj \
  --no-restore \
  --filter 'FullyQualifiedName~ProtocolSpecTests|FullyQualifiedName~CdpWebViewNavigationTests|FullyQualifiedName~CdpWebViewRegistryTests' \
  --verbosity quiet

9 passed. A local, artifact-only probe exercised the pinned baseline handlers/serializers and recorded 37 HTTP/WS payloads; semantic validation parsed 32 spec documents, passed 67 payload/schema checks, and rejected 10 obsolete shapes. git diff --check passes. No packages or tooling were added. CDP/native screenshot seams and controlled sensor values were used; no device/hardware coverage is claimed.

Separate audit findings

This coherent correction slice is not a claim of complete protocol conformance. Verified follow-ups are recorded separately: agent-status fields, UI query/tree options and screenshot aliases/defaults, device/sensor-list shapes and enum casing, remaining general error schemas, and distributed debug/setup docs claiming a nonexistent Blazor JS initializer. The detailed 30-row evidence matrix and payload/probe artifacts are retained in the owning session rather than adding tracking Markdown or broader onboarding rewrites to this PR.

Align WebView HTTP, streaming envelopes, and serialized DTOs with the recorded main baseline. Documentation and schemas only; no runtime or behavior changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8f1567da-8dcb-471a-a4e9-b5d96ead549c
@jfversluis
jfversluis merged commit 2ffc11b into main Oct 9, 2026
1 check passed
@jfversluis
jfversluis deleted the mattleibow-devflow-schema-corrections branch October 9, 2026 18:23
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.

3 participants