You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 963a8ea
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(setup): route SetupSteps WSL quoting through WslShellQuoting
Migrate SetupSteps.cs off three divergent private ShellEscape helpers onto
the shared WslShellQuoting contract (added in PR 2), then delete the
duplicates. Behavior-preserving: generated scripts are byte-identical.
- InstallCliStep (escape-only, caller supplies its own outer quotes) ->
WslShellQuoting.EscapePosixSingleQuoteInner.
- ConfigureGatewayStep + WindowsNodeBootstrapContextStep (standalone
fully-wrapped tokens) -> WslShellQuoting.QuotePosixSingleQuote.
- Delete all three private ShellEscape methods.
WslShellQuoting stays internal, reachable via the existing
InternalsVisibleTo("OpenClaw.SetupEngine").
Add characterization tests pinning generated command/script output for
embedded-quote inputs, and a source-shape ledger guard
(setup-shellescape-closed) that fails CI if a local ShellEscape reappears
in SetupSteps.cs.
Co-authored-by: Copilot App <[email protected]>
|`src/OpenClaw.SetupEngine/SetupSteps.cs`| one file per step; `WslShellClient`, `WslShellQuoting`, `GatewayConfigScriptBuilder`, `KeepaliveProcessManager`|
77
+
|`src/OpenClaw.SetupEngine/SetupSteps.cs`| one file per step; `WslShellClient`, `GatewayConfigScriptBuilder`, `KeepaliveProcessManager`. WSL/POSIX quoting is done — use `WslShellQuoting`, never a local `ShellEscape`.|
78
78
| Any test hand-rolling a temp dir / env save-restore / CLI capture |`OpenClaw.TestSupport` fixtures |
79
79
80
80
## Ledger
@@ -108,7 +108,8 @@ leading and trailing pipe. Columns, in order:
108
108
| test-gateway-builder | authoritative | OpenClaw.Connection.Tests | per-file MakeRecord(id,url) helpers | OpenClaw.Connection.Tests.GatewayRecordBuilder | pre-existing MakeRecord until migrated | gateway record test data has one builder | TestSupportFixtureTests.GatewayRecordBuilder_BuildsRecord | behavioral | when MakeRecord helpers are removed |
109
109
| test-settings-builder | authoritative | scattered test files | ad hoc SettingsData construction in migrated tests | OpenClaw.TestSupport.SettingsDataBuilder | pre-existing un-migrated tests until adopted | settings test data starts from production defaults | TestSupportFixtureTests.SettingsDataBuilder_StartsFromDefaults | behavioral | when settings tests adopt the builder |
110
110
| json-read-helpers | authoritative | OpenClaw.Shared (multiple files) | duplicate non-nullable fallback-returning JsonElement getters | JsonReadHelpers | null-sentinel / non-negative / whitespace-absent / trimming variants stay separate | canonical non-nullable fallback JSON coercion; divergent-contract helpers are not blindly routed here | JsonReadHelpersTests.GetString_ReturnsNull_WhenPropertyMissing | behavioral | when the non-nullable fallback getters are all routed here |
111
-
| wsl-posix-quoting | authoritative | OpenClaw.SetupEngine/SetupSteps.cs | ad hoc ShellEscape with divergent wrap semantics | WslShellQuoting | SetupSteps ShellEscape until PR 3 migration | WSL scripts use POSIX quoting not cmd/PowerShell quoting | WslShellQuotingTests.QuotePosixSingleQuote_WrapsAndEscapesEmbeddedQuote | behavioral | when SetupSteps call sites use WslShellQuoting |
111
+
| wsl-posix-quoting | authoritative | OpenClaw.SetupEngine/SetupSteps.cs | ad hoc ShellEscape with divergent wrap semantics | WslShellQuoting | - | WSL command lines use POSIX single-quote quoting via WslShellQuoting not cmd/PowerShell quoting | WslShellQuotingTests.QuotePosixSingleQuote_WrapsAndEscapesEmbeddedQuote | behavioral | when no code builds WSL command lines outside WslShellQuoting |
112
+
| setup-shellescape-closed | closed | src/OpenClaw.SetupEngine/SetupSteps.cs | private ShellEscape helpers with divergent wrap semantics | WslShellQuoting | - | SetupSteps builds WSL command lines only via WslShellQuoting; no local ShellEscape helper | SetupStepsShellEscapeClosureTests.SetupSteps_DoesNotReintroduce_PrivateShellEscape | source-shape | when SetupSteps.cs no longer builds any WSL command strings |
112
113
| app-window-manager | planned | src/OpenClaw.Tray.WinUI/App.xaml.cs | window creation/show/hide/shutdown | IWindowManager | composition/delegation only | startup/shutdown ordering deterministic; disposed once | none | review-only | extracted in Phase 3 |
0 commit comments