Skip to content

test(site): run siterig/short for every PR on the control path - #1906

Merged
frahlg merged 2 commits into
masterfrom
runner-rig-covers-control-loop
Oct 27, 2026
Merged

frahlg merged 2 commits into
masterfrom
runner-rig-covers-control-loop

Conversation

@frahlg

@frahlg frahlg commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Implements the runner step of the fuse-at-rating plan (owner rule of 27 Oct). It is a separate PR from master and does not stack on another PR.

Problem

The siterig runner posts siterig/short only on PRs that touch go/internal/{control,loadpoint,ocpp,telemetry} or go/test/site. Core behaviour also lives elsewhere: the control tick wiring in go/cmd/ftw, the driver host and its command deadlines, plans (mpc, optimizercontract), limits (config, configreload), cars, sitepower, the bundled drivers/ snapshot and optimizer/native/bundle. A PR in those paths could change what the box does on a site and get no rig run before merge. The fuse-at-rating PRs touch config and configreload.

The README also had wrong install steps. It cloned to ~/siterig/src, but main.go keeps its clone in ~/siterig/ftw. It had no Linux user-service option, and its timing note was from 22 Oct.

Change

  • runner.go: watchedPaths now also covers go/cmd/ftw/, go/internal/{drivers,mpc,optimizercontract,config,configreload,cars,sitepower}/, drivers/ and optimizer/native/bundle/. It also covers every internal package those control packages import: units (charge-step limits for loadpoint, OCPP and dispatch), gridcost, forecasting, sunpos, events, state and mdnsresolve.
  • runner_test.go: TestWatchedPathsCoverImports runs go list -deps on the control packages and fails when one imports an internal package that is not watched. go/cmd/ftw is left out of that check because it imports everything, the API and UI among them; only its own files are watched.
  • runner_test.go: a new TestTouchesWatched table pins each watched path. It also checks near misses that must not match: go/internal/driverrepo, go/internal/configx, go/cmd/ftwctl, web/drivers/ and optimizer/native/src.
  • README:
    • It lists the watched paths and says that a change to the API or UI alone does not run the rig.
    • It clones to ~/siterig/ftw, the path the runner uses, and builds from that clone.
    • It adds rebuild steps and a Linux user service (systemctl --user, loginctl enable-linger).
    • It explains the port range: lane k uses port-base + 100k, make siterig shares the 18700 default, and a second runner needs its own -port-base and -work.
    • The timing note now says the full set took about 2 h 20 min in three lanes on an M5 MacBook on 27 Oct.
  • main.go doc comment and the system unit's header comment follow.

This PR has no changeset. The runner is a test tool that does not ship to boxes. #1797, which added it, used the no-changeset label.

Tests

  • go test -race -count=1 ./test/site/runner/ passes.
  • go vet ./... and go build ./... from go/ pass.
  • I checked the user-unit sed command by hand on the unit file. It drops User=, fills in the user name and switches to default.target.

Risk

Low. More PRs now get the short set, so the runner's queue grows. A full set takes about 2 h 20 min and the short set less, so PRs on these paths wait longer for siterig/short. Nothing on the box changes.

🤖 Generated with Claude Code

The runner only ran the short set for PRs touching control, loadpoint,
OCPP, telemetry or the rig. Core behaviour also lives in the control tick
wiring, the driver host, plans, config limits, cars, sitepower, the
bundled drivers and the solver bundle. Watch those too, pin the list in a
test table, and fix the README: the runner's clone is ~/siterig/ftw, add a
Linux user-service variant, explain the port range, and record the
27 October timing for the full set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frahlg frahlg added the no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping) label Oct 27, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T16:34:53.550144Z 0d16d87 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

units.LimitChargeSteps limits charger steps for loadpoint, OCPP and
dispatch, yet a PR that changed only go/internal/units got no
siterig/short. Watch units and the other internal packages the control
packages import (gridcost, forecasting, sunpos, events, state,
mdnsresolve). TestWatchedPathsCoverImports runs go list -deps on the
control packages and fails when one of them imports an unwatched
internal package. The README now says what the list covers and that a
change to the API or UI alone does not run the rig.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frahlg
frahlg merged commit 58c6a6c into master Oct 27, 2026
22 checks passed
frahlg added a commit that referenced this pull request Oct 27, 2026
Brings in master's #1876 (7840c33) and #1906 through #1910. The merge
has no text conflict, but #1876's blockedDischargeKeepW called the old
six-argument fuseReliefFromSnapshot and did not build.

Resolution: blockedDischargeKeepW now passes the live phase sample to
fuseReliefFromSnapshot, which already reads the phases as the stop
leaves them. stopPhaseReliefW duplicated that math and is gone. Its live
reads move into phaseSample.moveW: each battery's raw power comes from
Store.OnlineRawW and must be the reading the decision used, so an
offline battery, a battery that moved on to a newer reading, or a target
with no reading gives no phase relief. #1876's test now runs through
phaseReliefForTargets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant