Skip to content

Fix Tentacle --role accumulation and add UAC + purge-while-running E2E

Placeholder ppxd requested to merge add-phase-3-nice-to-have-coverage into main

Summary

  • Fix RegisterCommand.ExpandShorthandArgs so repeated --role / --environment flags accumulate into one comma-joined config arg before AddCommandLine sees 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_KnownBug from bug-pinning to regression-guard; add parallel RepeatedEnvironmentFlags_* 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 / RunAs verb / powershell.exe (not pwsh.exe) as required child-args (3 tests)
  • Add WindowsServicePurgeWhileRunningE2ETests — explicit RUNNING pre-condition + 60s wall-clock bound + reinstall-after-purge test guarding against rc=1072 service marked for deletion from racy SCM cleanup (2 tests)
  • Doc fix: remove three stale rows from CLAUDE.md Known Gaps table (Variable Condition, Parallel steps, Manual skip — all implemented, source-file references included). Also fix the stale output-variable key shape: production uses Squid.Action[Step].Output.Var, not Squid.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 (RegisterCommand accumulation 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.exe polling agents simultaneously against StubSquidServer. Existing TentacleMultiInstanceCrossSafetyE2ETests already 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.IntegrationTests shape 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

Merge request reports

Loading