Fix Tentacle --role accumulation and add UAC + purge-while-running E2E
Summary
- Fix
RegisterCommand.ExpandShorthandArgsso repeated--role/--environmentflags accumulate into one comma-joined config arg beforeAddCommandLinesees them (was silently keeping only the last value via flat-key semantics). Accumulation is opt-in per config key, so non-list flags (--server,--api-key) still behave as last-wins - Flip
RepeatedRoleFlags_OnlyLastValueWins_KnownBugfrom bug-pinning to regression-guard; add parallelRepeatedEnvironmentFlags_*E2E; add 9 focused unit cases (RegisterCommandExpandShorthandArgsTests) for diagnostics - Add
TentacleUacElevationE2ETests— wrapper-mocked capture of the UAC re-launch invocation; pins-NoProfile/-ExecutionPolicy Bypass/-File/RunAsverb /powershell.exe(notpwsh.exe) as required child-args (3 tests) - Add
WindowsServicePurgeWhileRunningE2ETests— explicitRUNNINGpre-condition + 60s wall-clock bound + reinstall-after-purge test guarding against rc=1072service marked for deletionfrom racy SCM cleanup (2 tests) - Doc fix: remove three stale rows from
CLAUDE.mdKnown Gaps table (Variable Condition, Parallel steps, Manual skip — all implemented, source-file references included). Also fix the stale output-variable key shape: production usesSquid.Action[Step].Output.Var, notSquid.Action.Step.Var
Test plan
-
dotnet build Squid.sln— 0 errors -
dotnet test --filter RegisterCommandExpandShorthandArgsTests— 9/9 pass, 8ms -
CI: Windows Tentacle E2E (UAC + purge-while-running tests need Windows runner) -
CI: Unit tests ( RegisterCommandaccumulation fix coverage)
Out of scope (deferred to follow-up PRs)
Each remaining Phase 3 item needs dedicated test infrastructure that doesn't compose into one umbrella PR — shipping them as focused individual PRs preserves review quality:
-
3.4 multi-instance concurrent polling — needs process-supervisor infra to run two
Squid.Tentacle.exepolling agents simultaneously againstStubSquidServer. ExistingTentacleMultiInstanceCrossSafetyE2ETestsalready covers register/purge isolation at the cert + registry level - 3.1 IIS metabase mutex retry / 3.2 IIS .nupkg extraction / 3.3 IIS XDT DLL missing — each needs a focused IIS test harness extension
-
3.8 IIS Integration tier — needs
Squid.IntegrationTestsshape with real Postgres + EF change tracker for handler resolution + persisted task log - 3.9 RetentionCleanupPhase E2E — needs the retention-phase fixture composed with the deployment pipeline
-
3.10 OpenClaw transport E2E — needs real OpenClaw transport setup (production code lives at
src/Squid.Core/Services/DeploymentExecution/Targets/OpenClaw/) - 3.11 Calamari mid-acquire transient feed failure / 3.12 Lifecycle event sequence — each needs Calamari-binary-aware fixture