Skip to content

Commit 05c2306

Browse files
atulmguptaCopilot
andcommitted
fix(ci): allow Tesla proto wire names and race-test on ubuntu
SI gate was flagging Tesla-owned Field identifiers such as NominalFullPackEnergyKwh. Codec coverage used -race on arc-runner which has no CGO/gcc. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fd449dd commit 05c2306

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/scripts/si_canonical_gate.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@
5050
"web/src/hooks/useSettings.test.ts",
5151
}
5252

53+
# Tesla Fleet Telemetry Field enum identifiers are upstream-owned (ADR-004 R2).
54+
# Wire names may contain Kwh/Mph even though TeslaSync stores SI (Wh, m/s).
55+
TESLA_PROTO_FIELD_ALLOWLIST = (
56+
"NominalFullPackEnergyKwh",
57+
"LifetimeEnergyChargedKwh",
58+
"MaxSpeedToReachDestinationMph",
59+
"SemiCruiseSpeedLimitMph",
60+
"ChargeRateMilePerHour",
61+
)
62+
5363

5464
def iter_added_lines(diff_text: str):
5565
current_file = None
@@ -77,6 +87,8 @@ def check_go(diff_text: str) -> list[str]:
7787
s = added.lstrip()
7888
if s.startswith("//") or s.startswith("#") or s.startswith("--"):
7989
continue
90+
if any(name in added for name in TESLA_PROTO_FIELD_ALLOWLIST):
91+
continue
8092
for pat in BANNED:
8193
if pat.search(added):
8294
violations.append(f"{current_file}: {added.rstrip()}")

.github/workflows/codec-coverage-gate.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ permissions:
4646
jobs:
4747
routing-coverage:
4848
name: TestRoutingCoverage (every proto field is routed)
49-
runs-on: ${{ inputs.runner || 'arc-runner' }}
49+
# ubuntu-latest: `go test -race` needs CGO/gcc. arc-runner does not ship gcc
50+
# (same pin as CI "Backend (lint + test + build)").
51+
runs-on: ${{ github.event_name == 'workflow_dispatch' && inputs.runner || 'ubuntu-latest' }}
5052
steps:
5153
- uses: actions/checkout@v4
5254

0 commit comments

Comments
 (0)