fix(stats): elect freshest forwarding source per terminal

This commit is contained in:
lingniu
2026-07-19 17:33:53 +08:00
parent a13ee8fc30
commit 263107d47a
3 changed files with 48 additions and 4 deletions

View File

@@ -1836,7 +1836,7 @@ func TestWriterEnsuresSchemaAndUpsertsDailyMileage(t *testing.T) {
if !strings.Contains(projectCall.query, "ds.id") {
t.Fatalf("project sql should write source id: %s", projectCall.query)
}
for _, forbidden := range []string{"trusted_source_key", "trusted_phone", "trusted_source_endpoint", "first_total_mileage_km", "sample_count)"} {
for _, forbidden := range []string{"trusted_source_key", "trusted_phone", "trusted_source_endpoint", "first_total_mileage_km"} {
if strings.Contains(projectCall.query, forbidden) {
t.Fatalf("project sql should not write final-table field %q: %s", forbidden, projectCall.query)
}