Skip to content

Commit d493c31

Browse files
atulmguptaCopilot
andcommitted
chore(R2d.84-107): refresh archmetrics baseline + ignore fleet batch 9 in git-blame
Cherry-picked 24 subpackage carves from batch 9: R2d.84 alerts, R2d.85 analytics, R2d.86 audit, R2d.87 automation, R2d.88 battery, R2d.89 charging, R2d.90 chatbot, R2d.91 drives, R2d.92 energy, R2d.93 exports, R2d.94 fleettelemetry, R2d.95 importer, R2d.96 inboundwebhook, R2d.97 polling, R2d.98 settings, R2d.99 sleep, R2d.100 speedprofile, R2d.101 status, R2d.102 teslachargehist, R2d.103 teslachargesess, R2d.104 teslaenergyhist, R2d.105 tirepressure, R2d.106 tripplanner, R2d.107 userpref. Also drained 5 transitional symbols orphaned by batch 9 carves: - bulk_helpers.go: decodeBulkIDsRequest, decodeAutomationBulkBody, writeBulkBadRequest - helpers.go: urlParamInt64 - bulk_handlers_phase45_test.go: unused 'strings' import And deleted 2 transitional files whose only contents were now-orphaned helpers: - state_signal_helpers.go (stateToSignalMap, timelineRowsToFlat) - tesla_energy_history_truncate.go (truncateBody) Total carves shipped this branch: 92 (R2d.16-107). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c5af318 commit d493c31

8 files changed

Lines changed: 777 additions & 231 deletions

File tree

β€Ž.git-blame-ignore-revsβ€Ž

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,27 @@ c6b0d11f02e0d8bc47ce9eec705def94ef53eb70 # refactor(R2d.80): carve internal/api/
302302
b75081f38a9bbe292389caa3174faaa9596dbae9 # refactor(R2d.81): carve internal/api/safety subpackage
303303
3d083ceb5cebaf4e2fc48ea517818d2e5ae4a42b # refactor(R2d.82): carve internal/api/security subpackage
304304
c4bede836b1639ae4da4713797f5df283088be62 # refactor(R2d.83): carve internal/api/share subpackage
305+
03e8b73c882281830e1f6fed21d5f3be206160d5 # refactor(R2d.84): carve internal/api/alerts subpackage
306+
10c55263279bcce3abd3c52b3c456adf64ab8a93 # refactor(R2d.85): carve internal/api/analytics subpackage
307+
92028bc51ff6a59e1068a8d78b751ab4971ab92f # refactor(R2d.86): carve internal/api/audit subpackage
308+
68d0c89039cb63780a89d8dd1a41fa9d3498993d # refactor(R2d.87): carve internal/api/automation subpackage
309+
5d7585b869e46fe22491e9638d7b5e83bddf7f2a # refactor(R2d.88): carve internal/api/battery subpackage
310+
bfdc91bfa4f9c1b760fc2c20c62c11b6ff19319c # refactor(R2d.89): carve internal/api/charging subpackage
311+
14672a9efe31349a8854093d3342236e185d4fce # refactor(R2d.90): carve internal/api/chatbot subpackage
312+
816bf7dcd66cf7eb7e057751a02523a23002c601 # refactor(R2d.91): carve internal/api/drives subpackage
313+
a7f5219cdeda19da210fa2d4f7254af22c9b17b5 # refactor(R2d.92): carve internal/api/energy subpackage
314+
b5258ca605381a3fb79e083d1472df1bb9cdbf90 # refactor(R2d.93): carve internal/api/exports subpackage
315+
c893615e3371663d42370e2ad58485f393334ac9 # refactor(R2d.94): carve internal/api/fleettelemetry subpackage
316+
e913b4acefd285be4ab59907160c1f7145f16fbb # refactor(R2d.95): carve internal/api/importer subpackage
317+
2c41a99de3f0fe41a7f9ddff8a266f82c97eec6e # refactor(R2d.96): carve internal/api/inboundwebhook subpackage
318+
bba05d769cb1a852cbdd9572a46ee73446bd547a # refactor(R2d.97): carve internal/api/polling subpackage
319+
e18b4d8fec58760cac0f03c46adb552173b780fb # refactor(R2d.98): carve internal/api/settings subpackage
320+
1880187b11553af6ac8d2ca4a963037bb616662f # refactor(R2d.99): carve internal/api/sleep subpackage
321+
0ca2de817deb59666313975ae11e4c0ee965c2cc # refactor(R2d.100): carve internal/api/speedprofile subpackage
322+
fcbd322fa845f5b0a78e2f33c110b95330984ab6 # refactor(R2d.101): carve internal/api/status subpackage
323+
9775d72e8e8686f99d66b47887e7cd2989059b4f # refactor(R2d.102): carve internal/api/teslachargehist subpackage
324+
baf64691b4e8cad2a383069a39340a2ecd5d7862 # refactor(R2d.103): carve internal/api/teslachargesess subpackage
325+
239ee9f190ae0b3980d583c0936d9d21f677a24a # refactor(R2d.104): carve internal/api/teslaenergyhist subpackage
326+
c69adf5ec47b1a47a4103fa234e43d438fb5ae8b # refactor(R2d.105): carve internal/api/tirepressure subpackage
327+
38cd0b00e12c27f40f33afa6e65457cb3e6eb87b # refactor(R2d.106): carve internal/api/tripplanner subpackage
328+
c5af318a9a4db4e638889ac674bc4aaf1806a481 # refactor(R2d.107): carve internal/api/userpref subpackage

β€Žinternal/api/bulk_handlers_phase45_test.goβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"net/http"
66
"net/http/httptest"
7-
"strings"
87
"testing"
98

109
apigeo "github.com/ev-dev-labs/teslasync/internal/api/geofence"

β€Žinternal/api/bulk_helpers.goβ€Ž

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package api
22

33
import (
4-
"net/http"
5-
64
"github.com/ev-dev-labs/teslasync/internal/api/apibulk"
75
)
86

@@ -47,18 +45,6 @@ var (
4745
errBulkIDsTooMany = apibulk.ErrIDsTooMany
4846
)
4947

50-
// decodeBulkIDsRequest is a 1-line wrapper around apibulk.DecodeIDsRequest.
51-
func decodeBulkIDsRequest(r *http.Request) ([]int64, error) {
52-
return apibulk.DecodeIDsRequest(r)
53-
}
54-
55-
// decodeAutomationBulkBody is a 1-line wrapper around apibulk.DecodeOpBody.
56-
// The historic parent name is retained for the bridge era; new code
57-
// should call apibulk.DecodeOpBody directly.
58-
func decodeAutomationBulkBody(r *http.Request) (automationBulkBody, error) {
59-
return apibulk.DecodeOpBody(r)
60-
}
61-
6248
// dedupeInt64s is a 1-line wrapper around apibulk.DedupeInt64s.
6349
func dedupeInt64s(in []int64) []int64 {
6450
return apibulk.DedupeInt64s(in)
@@ -68,8 +54,3 @@ func dedupeInt64s(in []int64) []int64 {
6854
func computeMissingIDs(requested, existing []int64) []bulkFailedID {
6955
return apibulk.ComputeMissingIDs(requested, existing)
7056
}
71-
72-
// writeBulkBadRequest is a 1-line wrapper around apibulk.WriteBadRequest.
73-
func writeBulkBadRequest(w http.ResponseWriter, err error) {
74-
apibulk.WriteBadRequest(w, err)
75-
}

β€Žinternal/api/helpers.goβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ func pagination(r *http.Request) (limit, offset int) {
6161
return apiparams.Pagination(r)
6262
}
6363

64-
// urlParamInt64 is a transitional wrapper around apiparams.URLParamInt64.
65-
// See pagination for the broader transitional plan.
66-
func urlParamInt64(r *http.Request, key string) (int64, error) {
67-
return apiparams.URLParamInt64(r, key)
68-
}
64+
// urlParamInt64 was a transitional wrapper around apiparams.URLParamInt64.
65+
// Removed in R2d batch 9: every parent-package caller has been carved
66+
// into a resource subpackage that imports apiparams directly. Add a new
67+
// caller? Use apiparams.URLParamInt64 instead β€” do not reintroduce this
68+
// wrapper.
6969

7070
// parseDateRange is a transitional wrapper around apiparams.ParseDateRange.
7171
// See pagination for the broader transitional plan + the detailed

β€Žinternal/api/state_signal_helpers.goβ€Ž

Lines changed: 0 additions & 31 deletions
This file was deleted.

β€Žinternal/api/tesla_energy_history_truncate.goβ€Ž

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
Β (0)