Repository navigation
test(site): judge s18 own commands by the fuse heat model - #1944
Merged
Merged
Conversation
At margin 0 Core holds the phases at the 16 A line, and simulator jitter put one reading at 16.011 A against the fixed 16.01 A bound. Own-command readings over the fuse now fail only while the 60 s heat is over the fuse too, or at once over 1.2 x the fuse (heatOver), as the owner rule says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On master 575152e (beta v0.157.3-beta.1) the local rig short set failed
s18-16(s18-car-first-battery-charge-16A) on one criterion, "own commands stay inside the rated fuse":max_i_own_commands16.011 A against the judge's fixed bound of 16.01 A (16 A fuse, safety margin 0 since fix(config): fuse safety_margin_a defaults to 0 #1914).At margin 0 Core holds the phases at the 16 A line, so readings jitter a few mA either side of it. A fixed bound 0.01 A over the fuse fails on that jitter. That bound also breaks the owner rule (27 Oct 2026): the working limit is the fuse rating, readings between In and 1.2 x In are judged by the I²t heat model (tau 60 s), and anything over 1.2 x In fails at once.
Change
judgeS18(go/test/site/ev_battery_priority_test.go) now judges own-command readings with the sharedwarm()/heatOver()helpers that the random and R5a judges already use. A reading fails only when it is over the fuse while its phase's 60 s heat is also over the fuse, or when it is over 1.2 x the fuse. The fuse comes from the run's meta, not a literal. The 10 s skip after the house's 0.1 A step stays: that stretch belongs to the house, not to Core. The new metricown_commands_over_fuse_heat_samplescounts the failing readings, andmax_i_own_commandsstays as a metric.Tests
TestS18OwnCommandsJudgedByHeat:TestS18OwnCommandsSkipTheHouseStepstill passes, now with the fuse in meta. Its phases sit at the fuse from the start, so the heat is at the fuse and 16.1 A outside the house step still fails.FTW_SITE_JUDGE=<copy> go test -run '^TestJudge$' ./test/site/. The result iss18-16: pass, withmax_i_own_commands16.011 andown_commands_over_fuse_heat_samples0.go test -race ./test/site/(unit only),go vet ./test/site/andgofmt -lare clean.Test-only change, so it carries
no-changeset.🤖 Generated with Claude Code