Skip to content

Added C# SDK. - #5

Merged
Nikola Metulev (nmetulev) merged 11 commits into
mainfrom
alzollin/cli
Sep 15, 2025
Merged

Nikola Metulev (nmetulev) merged 11 commits into
mainfrom
alzollin/cli

Conversation

@azchohfi

Copy link
Copy Markdown
Collaborator

No description provided.

Enhance `build.yml` to publish CLI binaries for x64 and ARM64.
Remove the complete npm package build step and add a new step
to copy only the binaries. Update `package.json` with new
scripts for copying built binaries, streamlining the npm
package creation process.
Nikola Metulev (nmetulev) added a commit that referenced this pull request Mar 5, 2026
Clearly separate the two commands throughout all documentation:

- winapp run: registers a loose layout package (full folder) with
  Add-AppxPackage, simulating an MSIX install. Preferred for most
  frameworks during iterative development.

- create-debug-identity: registers a sparse package pointing to an
  existing exe via Add-AppxPackage -ExternalLocation. Use when the
  exe is separate from app code (Electron) or testing sparse scenarios.

Updated files:
- winapp.agent.md: decision tree, command refs, rule #5, recipes, glossary
- README.md: differentiated one-line descriptions
- usage.md: added cross-references between both command sections
- setup skill: updated key concepts and workflow
- identity skill: clarified sparse-only focus with when-to-use guidance
- frameworks skill: .NET quick start now uses winapp run
- troubleshoot skill: added winapp run to decision tree and prereqs table
- dotnet guide: winapp run as primary, create-debug-identity as alternative

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nikola Metulev (nmetulev) added a commit that referenced this pull request Apr 30, 2026
Code review fixes:

- Tighten gate (Copilot #1, L1): Drop the standalone WindowsPackageType=='MSIX'
  activation clause and capture _WinAppManifestPathUserSet *before* the manifest
  auto-detection runs. The gate now only counts an explicitly user-set
  WinAppManifestPath, never an auto-detected output-dir path. This eliminates
  a class of subtle false-positives where a stale bin/AppxManifest.xml from a
  prior build would activate the gate on rebuild.

- WinAppRunSupportInfo (L2): Print TargetPlatformIdentifier (raw),
  _WinAppEffectiveTargetPlatformIdentifier (used by gate), and
  _WinAppManifestPathUserSet so diagnostics mirror the actual gate inputs.

- Doc/gate semantics alignment (Copilot #5): docs/dotnet-run-support.md now
  says "EnableWinAppRunSupport is true (the default)" instead of "is not set
  to false", matching the actual gate condition (== 'true').

Tests (Copilot #3, #4, M4):

- Skip on non-Windows hosts via $IsWindows.
- Add Get-GateValue parameters: -ProjectDirManifestName (named manifest
  filename), -TargetPlatformIdentifier (explicit TPI override).
- Add new cases: project-dir Package.appxmanifest, project-dir
  AppxManifest.xml, explicit TargetPlatformIdentifier=windows on a non-windows
  TFM, explicit TargetPlatformIdentifier=android overriding a windows TFM.
- Add regression case: WindowsPackageType=MSIX with no manifest must be
  inactive (replaces the previous active case).
- Suite is now 18 tests, all passing.

CI integration (M3):

- scripts/build-cli.ps1 now invokes Invoke-Pester against
  src/winapp-NuGet/tests/NuGet.Tests.ps1 immediately after package-nuget.ps1
  succeeds (skipped if -SkipTests is passed). Honors $FailOnTestFailure.

Docs (M1, L3, M2):

- README: replace stale Version="0.1.10" pins with <latest> placeholder
  + link to nuget.org.
- README: new "Behavior changes" section explaining the
  DevelopmentDependency removal so direct consumers know to add
  PrivateAssets="all" if they don't want the package to flow into their
  own .nupkg output.
- README: new troubleshooting entry "dotnet run is not intercepted" pointing
  users at `dotnet msbuild -t:WinAppRunSupportInfo` and listing the five
  gate discriminators.

CI failures on PR #513 (build-and-package, electron) were pre-existing on
main (E2E_DotNetApp_PackageShouldIncludeRuntimeDependency) or flaky/unrelated
(electron C# native addon build) and are not caused by this PR. The four
.NET-using sample jobs (dotnet-app, wpf-app, cpp-app, packaging-cli) all pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nikola Metulev (nmetulev) added a commit that referenced this pull request Jul 12, 2026
…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
Nikola Metulev (nmetulev) added a commit that referenced this pull request Jul 14, 2026
…ndependent multi-model (#613)

## What & why

Evidence-driven improvements to the hand-written `pr-review` skill
(`.github/skills/pr-review/`). Grounded in **5 real past pr-review
runs** mined
from the local session store — in every one the user had to *separately*
ask for
real testing, simplicity/necessity, or a genuine second-model opinion,
and the
skill's own rules ("No build/test execution", "no fixes", "stdout only")
fought
that intent. Concrete signals these changes address:

- **pester5 (`fix/pester5-count`)** — confidence in the missing `exit 1`
only
came from *running* Pester 5.7.1, not from reading the diff; it also
surfaced a
  GH Actions vs Azure DevOps `$ErrorActionPreference` divergence and a
  "will this regress?" question a static pass couldn't answer.
- **UI-input verbs (#599–603)** — hands-on found #602's streaming watch
writing a
**completely empty output file** mid-run, and the user explicitly asked
whether
a new verb "earns its complexity over just improving `wait-for`" ("can
merge" ≠
"should merge"). Turn 1 also hit a **"Policy hook failed"** sub-agent
abort.
- **crash-stacks (`zt/549`)** — the **JsProvider cold-cache version
drift** was
invisible to unit tests and only showed up for a freshly-installed user;
found
  via E2E + red-team, not diff review.

This is a **DRAFT** for review — no behavior in the repo build/tests
changes
(the skill is hand-written and not in any auto-generation pipeline).

## The 9 changes

1. **New "Validate findings for real" phase** (SKILL.md step 6, before
Report):
build the branch, install/run the CLI **as a user would** (npm
pack+install,
built MSIX, or global tool — explicitly *not* `dotnet run`/dev mode),
scaffold
a throwaway app (may delegate to `winui-dev`), exercise each changed
command,
then **confirm or drop** each critical/high finding with runtime
evidence and
record what couldn't be validated. Replaces the old "No build/test
execution"
   rule. Every finding is tagged **validated** vs **static-only**.
2. **New `necessity-and-simplicity` dimension** (#5): does it earn its
complexity? in scope for winapp's mission? smaller / fewer commands /
staged?
pros & cons of shipping vs *not*. Uses the real "can merge ≠ should
merge",
"earns its complexity", and "fills a need" framings. Registered
everywhere.
3. **Strengthened `alternative-solution`**: require ≥1 **concrete named
alternative** (in-repo helper *or* ecosystem tool/pattern/API) with a
tradeoff,
   backed by a quick search — and softened the guidance that suppressed
   out-of-scope/necessity critiques.
4. **Reworked `multi-model`**: independent pass from the **raw diff +
actual code
files** (not the consolidated findings, which anchored it into a
rubber-stamp),
**records which model family ran**, and supports 2–3 families
(opus/gemini/gpt)
   for high-risk PRs.
5. **Regression + threat-model rigor**: explicit **regression** analysis
in
`correctness` (defect vs test-gap vs intended change); a **threat-model
checklist** + red-team in `security` (input-injection /
process-invocation /
credentials-secrets / signing / supply-chain); static-only findings
tagged
   "needs runtime confirmation".
6. **Multi-PR / multi-target mode** (trackable sub-agent per PR) +
**sub-agent
fault-tolerance** — a blocked/policy tool call must not abort the
sub-agent,
and the orchestrator retries a dead one (from the real "Policy hook
failed"
   incident).
7. **Opt-in follow-through**: AI-**labelled** PR review comment, a
test-setup /
prerequisites handoff checklist, and (only on explicit request) a
follow-up
   fix PR. **Default stays stdout-only / no-fix.**
8. **Contract + report format**: findings carry a **Validation** status;
the
   Coverage block gains the new dimension, a **regression** line, and a
   **validation** line.
9. **Internal consistency**: dimension counts, tables, fan-out list, and
both
   examples all reflect **9 dimensions + the Validate phase**.

## Files

- `SKILL.md` — new Validate phase, multi-PR mode, fault-tolerance,
opt-in
follow-through, updated rules/report/coverage/examples, renumbered to 9
dims.
- `dimensions/necessity-and-simplicity.md` — new.
- `dimensions/alternative-solution.md`, `multi-model.md`,
`correctness.md`,
  `security.md`, `_shared-contract.md` — updated per above.

All changes are confined to `.github/skills/pr-review/`.

---------

Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Jul 15, 2026
Fixes the 6 confirmed findings from the auto-review bot, touching only the
files needed:

- #1 (BLOCKING, machine-mutating test): add an internal SymbolCacheDirectory
  seam to CrashDumpService (defaults to the real %TEMP%\symbols). The workflow
  test now points it at an isolated _tempDir\symbols instead of recursively
  deleting the developer's/CI's shared symbol cache.
- #2 (product memory regression): restore origin/main streaming for symbol
  downloads. The SymbolFileDownloader seam becomes Func<url, destPath, bool>;
  DefaultDownloadSymbolFile streams the response straight to the destination
  file (constant memory), and DownloadSymbolsForModules no longer materializes
  the whole PDB via MemoryStream/File.WriteAllBytes.
- #3/#4 (test-helper deadlock): TestProcessDump.WaitForExitDrainingPipes drains
  stdout and stderr concurrently before WaitForExit (was sequential ReadToEnd),
  killing the process tree on timeout. Both call sites rewired.
- #5/#6 (env-dependent tests): the two bogus-provider XamlTriageRunner tests now
  treat a host-dependent `.load` failure as inconclusive instead of asserting on
  output that only appears when the full command sequence runs.

Also reconciles the CrashDumpService coverage-ceiling <remarks> line numbers to
the current source (91.3% Debug, 68 honestly-uncovered native/DAC/network/PDB
boundary lines; the streaming restoration adds one line to the network boundary).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Nikola Metulev (nmetulev) added a commit that referenced this pull request Nov 19, 2026
Docs-only PRs and merge groups run only the docs port tests. docs/npm-usage.md, plugins and every non-markdown file still run the full build. build-and-package and test-samples-result accept the skipped lanes only when the change is docs-only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Nikola Metulev (nmetulev) added a commit that referenced this pull request Nov 19, 2026
Docs-only PRs and merge groups run only the docs port tests. docs/npm-usage.md, plugins and every non-markdown file still run the full build. build-and-package and test-samples-result accept the skipped lanes only when the change is docs-only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

2 participants