Skip to content

Fix: add register --force flag to bypass already-registered skip

Placeholder ppxd requested to merge fix/register-force-flag into main

Summary

  • Production fix: register silently no-ops when Tentacle:Registered=true was previously persisted, breaking operators who re-run register to update roles / environment / api-key.
  • Fix: add opt-in --force flag. When passed, LinuxTentacleFlavor.ResolveRegistrar bypasses the skip path and actually POSTs to the server.
  • Backward compat preserved: default behavior unchanged. systemd run keeps the skip (correct for boot-time idempotency).

Why this matters

Caught by Linux C3h E2E (PR #250 iteration 3). Operator-impact: every fleet-automation pipeline that re-applies register for role updates was thinking it succeeded but the server's machine record stayed stale.

Files changed

File Change
Abstractions/TentacleFlavorModels.cs Add ForceRegistration bool to TentacleFlavorContext
Flavors/LinuxTentacle/LinuxTentacleFlavor.cs ResolveRegistrar takes forceRegistration parameter; skips the skip when true
Commands/RegisterCommand.cs Add ExtractForceFlag helper; thread --force through TentacleFlavorContext

Test plan

  • dotnet build green
  • CI: existing 172 E2E tests still pass (C3h's NoOp pin uses log-line prefix that's unchanged by my new wording)
  • Future: tighten C3h to also pin --force actually triggers a real second register (separate follow-up PR)

🤖 Generated with Claude Code

Merge request reports

Loading