mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
chore(repolint): stop measuring generated bindings, then resync the baseline (#8503)
repolint reported 4812 lines of file-size debt against desktop/frontend/wailsjs/go/models.ts and, through it, a repo total above the ceiling — the two findings that made every run look dirty and that the recent struct-state work had to route around by hand-editing baseline numbers. That directory is Wails-generated Go bindings and is gitignored (.gitignore:32). It is not anyone's debt, cannot be edited, and is present only if a desktop build has run on that machine, so its size also varied by workspace. wailsjs joins skipDirs beside node_modules and vendor. With the noise gone the whole ceiling problem goes with it: 113412 - 4812 = 108600, under the recorded 108761. The repo total was never over budget; one build product was being counted. That left the real drift, which -update now records. Every limit moves down — complexity -1, essay -13, file-size -161, function-size -4, test-file-size -60 — and no per-file entry loosens, verified field by field against the previous baseline. The tree had simply improved faster than the baseline was refreshed, so the recorded budgets were more generous than the code needed. A test pins the skip: removing wailsjs from skipDirs turns it red.
This commit is contained in:
3 files changed
+68
-21
No files matched your search
@@ -2,15 +2,15 @@
|
||||
"limits": {
|
||||
"banner": 15,
|
||||
"commented-code": 0,
|
||||
"complexity": 2087,
|
||||
"essay": 4046,
|
||||
"file-size": 108761,
|
||||
"function-size": 8890,
|
||||
"complexity": 2086,
|
||||
"essay": 4033,
|
||||
"file-size": 108600,
|
||||
"function-size": 8886,
|
||||
"layering": 1,
|
||||
"marker": 0,
|
||||
"narrative": 64,
|
||||
"struct-state": 132,
|
||||
"test-file-size": 69298
|
||||
"test-file-size": 69238
|
||||
},
|
||||
"files": {
|
||||
"cmd/e2ebench/main.go": {
|
||||
@@ -29,7 +29,7 @@
|
||||
"desktop/app.go": {
|
||||
"complexity": 63,
|
||||
"essay": 96,
|
||||
"file-size": 11341,
|
||||
"file-size": 11338,
|
||||
"function-size": 371,
|
||||
"struct-state": 15
|
||||
},
|
||||
@@ -236,7 +236,7 @@
|
||||
"essay": 4
|
||||
},
|
||||
"desktop/recovery_gc.go": {
|
||||
"essay": 2
|
||||
"essay": 1
|
||||
},
|
||||
"desktop/recovery_gc_test.go": {
|
||||
"essay": 1
|
||||
@@ -451,8 +451,8 @@
|
||||
},
|
||||
"internal/agent/agent.go": {
|
||||
"complexity": 37,
|
||||
"essay": 85,
|
||||
"file-size": 2286,
|
||||
"essay": 81,
|
||||
"file-size": 2276,
|
||||
"function-size": 102,
|
||||
"struct-state": 20
|
||||
},
|
||||
@@ -506,7 +506,7 @@
|
||||
},
|
||||
"internal/agent/execute_batch.go": {
|
||||
"complexity": 44,
|
||||
"function-size": 208
|
||||
"function-size": 207
|
||||
},
|
||||
"internal/agent/execute_one.go": {
|
||||
"complexity": 11,
|
||||
@@ -575,7 +575,7 @@
|
||||
"essay": 8
|
||||
},
|
||||
"internal/agent/recovery_gc.go": {
|
||||
"essay": 19
|
||||
"essay": 17
|
||||
},
|
||||
"internal/agent/recovery_gc_test.go": {
|
||||
"essay": 1
|
||||
@@ -1118,14 +1118,13 @@
|
||||
"narrative": 2
|
||||
},
|
||||
"internal/control/goal.go": {
|
||||
"complexity": 3,
|
||||
"essay": 11,
|
||||
"file-size": 277,
|
||||
"function-size": 1,
|
||||
"complexity": 2,
|
||||
"essay": 7,
|
||||
"file-size": 276,
|
||||
"struct-state": 10
|
||||
},
|
||||
"internal/control/goal_test.go": {
|
||||
"test-file-size": 249
|
||||
"test-file-size": 220
|
||||
},
|
||||
"internal/control/goalusage.go": {
|
||||
"essay": 2
|
||||
@@ -1138,7 +1137,7 @@
|
||||
},
|
||||
"internal/control/input_test.go": {
|
||||
"essay": 4,
|
||||
"test-file-size": 773
|
||||
"test-file-size": 745
|
||||
},
|
||||
"internal/control/mcp.go": {
|
||||
"essay": 7
|
||||
@@ -1190,12 +1189,12 @@
|
||||
},
|
||||
"internal/control/turn_orchestrator.go": {
|
||||
"complexity": 1,
|
||||
"essay": 13,
|
||||
"function-size": 55
|
||||
"essay": 11,
|
||||
"function-size": 53
|
||||
},
|
||||
"internal/control/turn_orchestrator_test.go": {
|
||||
"essay": 1,
|
||||
"test-file-size": 439
|
||||
"test-file-size": 436
|
||||
},
|
||||
"internal/control/yolo_test.go": {
|
||||
"test-file-size": 473
|
||||
@@ -1587,7 +1586,7 @@
|
||||
},
|
||||
"internal/provider/provider.go": {
|
||||
"essay": 51,
|
||||
"file-size": 357
|
||||
"file-size": 324
|
||||
},
|
||||
"internal/provider/responses/responses.go": {
|
||||
"complexity": 54,
|
||||
|
||||
@@ -13,6 +13,9 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// wailsjs holds Wails-generated Go bindings and is gitignored: measuring it
|
||||
// reports debt against a build product nobody can edit, and its presence
|
||||
// depends on whether a desktop build has run locally.
|
||||
var skipDirs = map[string]bool{
|
||||
"node_modules": true,
|
||||
"third_party": true,
|
||||
@@ -20,6 +23,7 @@ var skipDirs = map[string]bool{
|
||||
"testdata": true,
|
||||
"dist": true,
|
||||
"bin": true,
|
||||
"wailsjs": true,
|
||||
}
|
||||
|
||||
var generatedRe = regexp.MustCompile(`^// Code generated .* DO NOT EDIT\.$`)
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// wailsjs is gitignored and regenerated by a desktop build, so its size is
|
||||
// neither anyone's debt nor stable across machines. Measuring it once reported
|
||||
// 4812 lines of file-size debt and pushed the repo total past its ceiling,
|
||||
// which made every unrelated run look dirty.
|
||||
func TestGeneratedBindingsAreNotCollected(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
write := func(rel, body string) {
|
||||
t.Helper()
|
||||
path := filepath.Join(root, filepath.FromSlash(rel))
|
||||
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(path, []byte(body), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
write("desktop/frontend/wailsjs/go/models.ts", "export class X {}\n")
|
||||
write("desktop/frontend/src/app.ts", "export const x = 1\n")
|
||||
write("internal/agent/agent.go", "package agent\n")
|
||||
|
||||
got, err := collect(root)
|
||||
if err != nil {
|
||||
t.Fatalf("collect: %v", err)
|
||||
}
|
||||
for _, rel := range got {
|
||||
if filepath.ToSlash(rel) == "desktop/frontend/wailsjs/go/models.ts" {
|
||||
t.Fatalf("generated Wails bindings were collected: %v", got)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{"desktop/frontend/src/app.ts", "internal/agent/agent.go"} {
|
||||
if !slices.ContainsFunc(got, func(rel string) bool { return filepath.ToSlash(rel) == want }) {
|
||||
t.Errorf("%s was skipped; only generated output should be", want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user