Port WDXP protocol schema + wire conformance fast gate (W2)#616
Closed
nmetulev wants to merge 3 commits into
Closed
Port WDXP protocol schema + wire conformance fast gate (W2)#616nmetulev wants to merge 3 commits into
nmetulev wants to merge 3 commits into
Conversation
Land the proof-of-concept WDXP protocol (W2, the keystone contract) into winappCli under protocol/, scrubbed for public release, with its fast gate wired into CI. Scope: spec §11 phases 1-2 only (phases 3-4 are follow-ups). - protocol/: canonical schema (wdxp.v0.json - 10 domains / 32 commands / 8 events / 14 error codes / 5 risk tiers), JSON-Schema 2020-12 guard, envelope framing spec, zero-dep net10.0 generator (CLI-JSON + docs facades) and conformance suite, plus 3 golden traces. - Scrub for public release: dropped the internal agent tool-manifest facade entirely (generator emitter path, its output, and the schema mention), and neutralized internal probe labels, transport source-path refs, the runtime component name, provenance language, and internal repo names. A standing gate script enforces zero regressions. - CI: .github/workflows/protocol-conformance.yml (ubuntu-latest, net10.0) runs the conformance suite (PASS 5/5: schema-valid + Gate-3 facade-totality + 3 golden traces), a license-header check, and the public-appropriateness scan. - Gate 3 preserved after facade removal: the CLI facade gains a notifications array so command + event totality is asserted across both remaining facades. - Docs: protocol spec §11 marks phases 1-2 landed; overview W2 row + AGENTS.md updated with a protocol/ pointer. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d376fce1-8858-45ae-a496-245835e5879f
Contributor
Build Metrics ReportBinary Sizes
Test Results✅ 1611 passed, 1 skipped out of 1612 tests in 447.2s (+33.6s vs. baseline) Test Coverage❌ 18.3% line coverage, 37.3% branch coverage · ✅ no change vs. baseline CLI Startup Time41ms median (x64, Updated 2026-07-12 06:06:16 UTC · commit |
… teeth)
Fixes for the round-1 review pass on the WDXP protocol port. All hard gates
were already green; these close minor schema/doc drift and give Gate 3 real
field-level teeth.
Minor (schema/doc drift, verified against wdxp.v0.json source of truth):
- README family map: sessionEnded -> sessionClosing; treeChanged -> childrenChanged.
- README Property.ValueSource: templateBinding -> template, builtInStyle -> resource
(now exactly the schema enum: local, animation, template, style, resource,
inherited, default).
- README Outcome: normalized the whole PascalCase list to the schema-exact values
(applied, applied-inert, reloaded, needs-restart) — removes latent drift beyond
the single ReloadRequired -> reloaded the reviewer flagged.
- wdxp.schema.json $id: repointed off the personal fork URL to the
microsoft/winappCli path.
Nits:
- conformance: golden traces with an empty/missing 'messages' array now FAIL
("nothing to conform") instead of passing vacuously.
- Gate 3 now asserts field-level totality on the CLI facade (the structured
contract clients bind to): every declared param/return field must be emitted
for its command/event, and no undeclared field may be smuggled in. Success
detail reports the field tally (89 fields). README and envelope wording
tightened to state exactly what the gate asserts.
Verified locally: Release build 0 warnings; conformance PASS (5/5); negative
test (simulated field drop) makes Gate 3 FAIL with precise per-field diagnostics;
public-appropriateness scan 0 hits; license-header check green.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d376fce1-8858-45ae-a496-245835e5879f
…iewer round 2) Address the 12 remaining reviewer round-2 findings on top of cc727d8. All are inside W2 scope (schema, conformance gate, docs, golden traces, scan/CI). No runtime work built; deferred-runtime areas (W1 transport / W8 security) are softened in docs with explicit "deferred" notes rather than implemented. Tooling / gate depth: - #2 Deepen golden validation: ConformTrace now requires jsonrpc "2.0" on every message, rejects result+error together, correlates error ids (not just results) to a prior request, and validates payloads RECURSIVELY against the contract via ValidateObject/ValidateValue/ValidateScalar — nested $ref objects, enum value sets, and array element types, not just top-level names. - #4 Assert golden trace count > 0 (an empty golden dir no longer passes vacuously). - #5 gen Validator.CheckType now runs CheckField over each object type's properties, so a dangling $ref inside an object type is flagged (was silent). - #8 New golden traces 04-07 (HotReload lifecycle, Resource+Diagnostics, Selection +Security, describe/set/cancel lifecycle). New golden-coverage check requires every command+event to be exercised by at least one trace (all 40 covered). - #10 wdxp.schema.json root closed (additionalProperties:false) + $schema property; new protocol/scripts/validate-schema.py (draft 2020-12 guard) wired into CI. - #11 check-public-appropriateness.ps1 broadened to also scan specs/winapp-devtools-*.md and AGENTS.md (excludes the csproj agent's file by design). - #15 Extract shared Wdxp.Gen.SchemaPaths.FindUp; gen + conformance both call it. Schema / contract consistency: - #7 Outcome invariant narrowed to transactional apply/commit; ephemeral Property.set/setPreview return the resulting PropertyValue (schema + envelope §6 + README). - #12 Security.authenticate now returns token (+optional expiresAt) so the reconnect token param has a source; envelope §7 softened to "host-defined, finalized in W8". - #13 envelope §3/§7 document the pre-auth trust boundary (CurrentUserOnly pipe ACL) and what target binding grants before authenticate. - #14 ids pinned to string protocol-wide (envelope §2, enforced in ConformTrace); NodeHandle.handle integer -> string (decimal-encoded uint64, no >2^53 precision loss); goldens 02/03 handles updated to strings. - #6 envelope §1/§3 clarify per-target pipe vs pre-bind discovery; cross-target discovery marked W1/phase-3 deferred. - README: de-hardcode the check count, Applied->applied casing, schema-guard note. Verified: Release build 0 warnings; conformance PASS (10/10) with recursive validation + full coverage; negative tests prove teeth (missing jsonrpc, numeric id, result+error, unknown/enum field, dangling $ref, closed-root schema guard); python schema guard PASS (+rejects stray key); license headers + broadened scrub scan green. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d376fce1-8858-45ae-a496-245835e5879f
Member
Author
|
Closing again — this foundation work has moved to private tracking per the workstream coordinator. I'd reopened it earlier only because it looked accidentally closed mid-review; now that the private migration is confirmed, re-closing to match. No public pushes going forward. |
nmetulev
added a commit
that referenced
this pull request
Jul 12, 2026
specs/winapp-run-csproj.md's header linked an internal/personal planning repo (`nikolame/win-devex`) that isn't accessible to public readers of microsoft/winappCli and whose "overall plan" does not live in this repo. Ahead of #612 going public, drop that Related line (the same public-appropriateness rule #616 passed clean). Verified single occurrence: `git grep win-devex` and `git grep nikolame/` now return nothing on tracked files. Docs-only; no code, schema, generated-skill, or npm change. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b05ed756-966d-4260-a593-f507c4cb2446
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.
What this is
Ports the WDXP protocol (Workstream W2 — the keystone contract) into winappCli under a
dedicated top-level
protocol/folder, scrubbed for public release, and wires its fast conformancegate into CI. Everything in the devtools fan-out (read, hot-reload, selection, clients) binds to this
one schema, so it lands first.
Scope: spec
specs/winapp-devtools-protocol.md§11 phases 1–2 only (Port + wire the fastgate). Phases 3 (bind W1) and 4 (grow by family) are explicit follow-ups, not this PR.
Base branch:
winui-devex(notmain).What landed
protocol/— canonical schemawdxp.v0.json(10 domains / 32 commands / 8 events / 14 errorcodes / 5 risk tiers), the JSON-Schema 2020-12 guard, the
envelope.mdframing spec, a zero-depnet10.0generator (gen/, emits the CLI-JSON + docs facades) and conformance suite(
conformance/), and 3 golden traces (golden/)..github/workflows/protocol-conformance.ymlruns onubuntu-latest(proving thezero-dep portability) on every PR to
winui-devex/main: conformance suite → license-header check→ public-appropriateness scan. Runs on every relevant PR so it can be marked a required status
check in branch protection.
AGENTS.mdpointer updated.Scrub (this repo is public-bound)
The proof-of-concept carried internal-only artifacts. On port I dropped the internal agent
tool-manifest facade entirely (the generator emitter path, its generated output, and the schema
mention — only CLI-JSON + docs facades remain), and neutralized internal probe labels, transport
source-path references, the platform runtime-component name, origin/provenance language, and internal
repo names. A standing gate script (
protocol/scripts/check-public-appropriateness.ps1, wired into CI)enforces zero regressions going forward.
Gate 3 preserved after the facade removal: the CLI facade now emits a
notificationsarray(events), so command and event totality is asserted across both remaining generated facades — the
suite stays a single check and remains 5/5.
Proof — conformance PASS (5/5)
cli-commands.json,protocol-reference.md) — no dropped facade.protocol/(incl. generated output).protocol/**/*.cscarry the MIT header.dotnet build protocol/Protocol.slnx -c Release: 0 warnings, 0 errors.Definition of done
net10.0(no-windows).Follow-ups (out of scope for this PR)
WDXP.negotiate/cancel+Target.*with the daemon session/attachmodel once
run --inspectlands.W3/W5/W6/W4 implement.
Protocol Conformancea required status check is a repo-adminsetting (can't be done from the PR).