Skip to content

fix(control): keep slew behind meter clamp - #928

Draft
frahlg wants to merge 4 commits into
agent/release-command-outcome-safetyfrom
agent/fix-slew-monotonic-after-command-safety
Draft

fix(control): keep slew behind meter clamp#928
frahlg wants to merge 4 commits into
agent/release-command-outcome-safetyfrom
agent/fix-slew-monotonic-after-command-safety

Conversation

@frahlg

@frahlg frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member

What changed

  • Keep the final battery fleet command inside the meter clamp intent.
  • Preserve normal per-device slew where it is already safe.
  • Project mixed fleets to the aggregate safe bound without depending on driver order.
  • Add charge, discharge, mixed-fleet and ordinary-slew regression tests.

Why

The old order could reopen an upstream safety clamp. In the reported charge case, the meter clamp requested about +935 W but slew plus the command cap produced +5000 W. This change keeps the final fleet total at the safe meter intent.

Stack

This draft targets #922 and must merge after #926 and #922. It does not change either parent branch.

Closes #816.

Verification

  • focused control regressions: 100 runs
  • focused race regressions: 25 runs
  • go test -race ./internal/control ./cmd/ftw
  • full make verify
  • git diff --check

@frahlg
frahlg force-pushed the agent/release-command-outcome-safety branch 4 times, most recently from 3308127 to ab2d9ad Compare August 16, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant