Repository navigation
Fix CLI, WMI and designer bugs from the October audit - #794
Merged
Merged
Conversation
- forEach parallelism 0 is saved as 0 instead of 1 (#602). - WMI method arguments are converted to the declared CIM types, so a UInt32 above Int32.MaxValue works; out-of-range values fail with the argument name (#616). - np auth login --password-stdin keeps leading and trailing spaces (#617). - np backup manifest/preview/restore honour -o json and -o yaml (#618). - np machine create --ssl and the MCP create_machine tool default to port 5986 with SSL (#619). - The CLI YAML output reads back unchanged: escaped multiline strings, [] and {}, quoted null-like words (#621). - Clipboard copy and server export share one redaction fixture (#574). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| { | ||
| version = 2, name = "null", description = "", | ||
| definitionJson = definition, createdAt = "2026-11-04T10:00:00Z", createdBy = "admin", | ||
| changeNote = (string?)null, isCurrent = false, |
| StubLogin(h); | ||
|
|
||
| var originalIn = Console.In; | ||
| Console.SetIn(new StringReader(password + "\r\n")); |
| public static string ToJson(string yaml) | ||
| { | ||
| var stream = new YamlStream(); | ||
| stream.Load(new StringReader(yaml)); |
| "- item", "? key", "a: b", "#hash", "@at", " leading", "trailing ", "plain text", | ||
| "bell" + (char)7, "line" + (char)0x2028 + "break", | ||
| }, | ||
| Missing = (string?)null, |
| Cfg("{\"mode\": \"invokeMethod\", \"className\": \"Win32_Process\", \"methodName\": \"Create\", \"arguments\": {\"CommandLine\": \"notepad.exe\", \"Priority\": 32, \"ShowWindow\": true}}"), | ||
| CancellationToken.None); | ||
| _capturedScript.Should().Contain("-Arguments @{"); | ||
| _capturedScript.Should().Contain("$__npArgs = @{"); |
| .RespondWith(Response.Create().WithStatusCode(201).WithBodyAsJson(new | ||
| { | ||
| id = Guid.NewGuid(), name = "WEB01", hostname = "web01", winRmPort = expectedPort, useSsl, | ||
| defaultCredentialId = (Guid?)null, tags = (string?)null, lastConnectivityCheck = (DateTime?)null, |
| .RespondWith(Response.Create().WithStatusCode(201).WithBodyAsJson(new | ||
| { | ||
| id = Guid.NewGuid(), name = "WEB01", hostname = "web01", winRmPort = expectedPort, useSsl, | ||
| defaultCredentialId = (Guid?)null, tags = (string?)null, lastConnectivityCheck = (DateTime?)null, |
| .RespondWith(Response.Create().WithStatusCode(201).WithBodyAsJson(new | ||
| { | ||
| id = Guid.NewGuid(), name = "WEB01", hostname = "web01", winRmPort = expectedPort, useSsl, | ||
| defaultCredentialId = (Guid?)null, tags = (string?)null, lastConnectivityCheck = (DateTime?)null, |
| private static IEnumerable<JsonNode> SharingContractCases() | ||
| { | ||
| var dir = new DirectoryInfo(AppContext.BaseDirectory); | ||
| while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "NodePilot.slnx"))) |
| while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "NodePilot.slnx"))) | ||
| dir = dir.Parent; | ||
| if (dir is null) throw new InvalidOperationException($"NodePilot.slnx not found above {AppContext.BaseDirectory}"); | ||
| var path = Path.Combine(dir.FullName, "src", "nodepilot-ui", "src", "__tests__", "fixtures", "workflow-sharing-redaction.json"); |
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.
Small bugs from the October audit, plus the shared redaction fixture for #574.
Changes
0(parallel up to the engine limit) is saved as0. Before,parseInt(...) || 1turned it into1.Invoke-CimMethod -CimClass, which converts them to the declared CIM types. Instance methods already worked that way.StdRegProv.EnumKeywithhDefKey=2147483649works now. A value outside the declared integer range fails and names the argument and the allowed range.np auth login --password-stdinno longer trims the password.np backup manifest,previewandrestorewrite their result through the shared output writer, so-o jsonand-o yamlwork. Info and warning lines stay on stderr.np machine create --sslwithout--portuses 5986. The MCP toolcreate_machinehad the same default and is fixed as well.[]and{};src/nodepilot-ui/src/__tests__/fixtures/workflow-sharing-redaction.jsonis read by bothworkflowFragment.test.ts(clipboard) andWorkflowSecretRedactorTests(export). It lists the values both surfaces mask (a script password, a secret config key, a token in a condition literal and in a string array), the values only the export masks, and the values both keep.***: the branch would silently never run.MetricsExporterContractTestscovers the CPU queries, so there is no change here.The CLI test project now references YamlDotNet for the round-trip tests. It is already pinned in
Directory.Packages.propsand used by the engine. The CLI itself doesn't use it.Tests run
WmiQueryActivityTests: 42 passed, including two[WindowsFact]tests that make a read-only localStdRegProvcallOutputFormatTests|CommandIntegrationTests|CommandIntegrationResourcesTests|CommandIntegrationCoverageTests: 175 passedWorkflowSecretRedactorTests: 85 passedMoreToolsCoverageTests|DocumentationCounts: 38 passedpropertyConfigs.activities.test.tsx(104) and thesharingContractcases inworkflowFragment.test.ts(5) passed; tsc and ESLint cleanCloses #602
Closes #616
Closes #617
Closes #618
Closes #619
Closes #621
Closes #625
Closes #574
🤖 Generated with Claude Code