agent-substrate/substrate
Agent Substrate: the core system
The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
Most complex files
- cmd/ateapi/internal/controlapi/zz_generated.validation.go2220 cx
- pkg/proto/ateapipb/ateapi.pb.go1193 cx
- cmd/ateapi/internal/store/storecontract/contract.go764 cx
- cmd/ateapi/internal/controlapi/functionaltest/actor_test.go588 cx
- internal/proto/ateletpb/atelet.pb.go533 cx
- internal/proto/ateompb/ateom.pb.go333 cx
- cmd/ateapi/internal/controlapi/validation_test.go331 cx
- cmd/atelet/main.go319 cx
- pkg/proto/ateapipb/ateapi_grpc.pb.go306 cx
- cmd/atelet/main_test.go290 cx
Dead code 17.64% unused · 22 findings
- benchmarking/automation/testtypes/nighthawk_ingress.pyunused-file
- benchmarking/locust/common/trace.pyunused-file
- benchmarking/locust/common/grpc_tracing.pyunused-file
- benchmarking/locust/common/metrics.pyunused-file
- benchmarking/locust/common/wait_time.pyunused-file
- benchmarking/automation/testtypes/locust.pyunused-file
- benchmarking/locust/common/memload_config.pyunused-file
- benchmarking/locust/common/sweperf_config.pyunused-file
- benchmarking/locust/common/durdir_config.pyunused-file
- benchmarking/locust/shapes/burst_shape.pyunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 43 generated files: cmd/ateapi/internal/controlapi/zz_generated.validation.go, internal/proto/ateletpb/atelet_grpc.pb.go, internal/proto/ateletpb/atelet.pb.go, internal/proto/ateompb/ateom_grpc.pb.go, internal/proto/ateompb/ateom.pb.go, internal/proto/glutton/glutton_grpc.pb.go, internal/proto/glutton/glutton.pb.go, internal/proto/grpcechopb/grpcecho_grpc.pb.go, internal/proto/grpcechopb/grpcecho.pb.go, pkg/api/v1alpha1/zz_generated.deepcopy.go, pkg/client/clientset/versioned/clientset.go, pkg/client/clientset/versioned/fake/clientset_generated.go, pkg/client/clientset/versioned/fake/doc.go, pkg/client/clientset/versioned/fake/register.go, pkg/client/clientset/versioned/scheme/doc.go, pkg/client/clientset/versioned/scheme/register.go, pkg/client/clientset/versioned/typed/api/v1alpha1/api_client.go, pkg/client/clientset/versioned/typed/api/v1alpha1/csidriverconfig.go, pkg/client/clientset/versioned/typed/api/v1alpha1/doc.go, pkg/client/clientset/versioned/typed/api/v1alpha1/fake/doc.go and 23 more.
Largest clones in the code
- 14 lines in 6 placesgo176 tokenscmd/ateapi/internal/store/storecontract/contract.go:306–319cmd/ateapi/internal/store/storecontract/contract.go:810–823cmd/ateapi/internal/store/storecontract/contract.go:1049–1062cmd/ateapi/internal/store/storecontract/contract.go:1286–1299cmd/ateapi/internal/store/storecontract/contract.go:1930–1943and 1 more
306uid, version := policy.GetMetadata().GetUid(), policy.GetMetadata().GetVersion() 307if err := del(store.DeletePreconditions{Version: version + 1}); !errors.Is(err, store.ErrVersionConflict) { 308 t.Errorf("stale version alone = %v, want ErrVersionConflict", err) 309} 310if err := del(store.DeletePreconditions{UID: uid, Version: version + 1}); !errors.Is(err, store.ErrVersionConflict) { 311 t.Errorf("matching uid, stale version = %v, want ErrVersionConflict", err) 312} 313if err := del(store.DeletePreconditions{UID: foreignUID}); !errors.Is(err, store.ErrUIDConflict) { 314 t.Errorf("foreign uid alone = %v, want ErrUIDConflict", err) 315}First 10 of 14 lines.
- 7 lines in 14 placesgo59 tokenscmd/ateapi/internal/store/storecontract/contract.go:1732–1738cmd/ateapi/internal/store/storecontract/contract.go:2094–2100cmd/ateapi/internal/store/storecontract/contract.go:2139–2145cmd/ateapi/internal/store/storecontract/contract.go:2169–2175cmd/ateapi/internal/store/storecontract/contract.go:2202–2208and 9 more
1732t.Run("UpdateWorker_Conflict", func(t *testing.T) { 1733 s := setup(t) 1734 ctx := context.Background() 1735 1736 if _, err := s.CreateWorker(ctx, newTestWorker(testWorkerName, "pod-1")); err != nil { 1737 t.Fatalf("CreateWorker failed: %v", err) 1738 } - 16 lines in 3 placesgo182 tokens
1630func validateRunRequest(req *ateletpb.RunRequest) error { 1631 var errs field.ErrorList 1632 errs = append(errs, resources.ValidateResourceName(req.GetAtespace(), field.NewPath("atespace"))...) 1633 errs = append(errs, resources.ValidateResourceName(req.GetActorName(), field.NewPath("actor_name"))...) 1634 errs = append(errs, resources.ValidateResourceName(req.GetActorUid(), field.NewPath("actor_uid"))...) 1635 if len(errs) > 0 { 1636 return errs.ToAggregate() 1637 } 1638 // TODO: Migrate all validations below to the validation framework. 1639 if err := resources.ValidateAteomUID(req.GetTargetAteomUid()); err != nil {First 10 of 16 lines.
7 more
- 52 lines in 2 placesgo309 tokens
- 12 lines in 4 placesgo95 tokens
- 32 lines in 2 placesgo273 tokens
- 54 lines in 2 placesgo268 tokens
- 11 lines in 4 placesgo87 tokens
- 40 lines in 2 placesgo260 tokens
- 32 lines in 2 placesgo258 tokens
Largest clones over all files, tests and data included
- 201 lines in 18 placestxtdocs and examples1,869 tokens_LICENSES/github.com/aws/aws-sdk-go-v2/LICENSE.txt:2–202_LICENSES/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/LICENSE.txt:2–202_LICENSES/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt:2–202_LICENSES/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt:2–202_LICENSES/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt:2–202and 13 more
2 Apache License 3 Version 2.0, January 2004 4 http://www.apache.org/licenses/ 5 6TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 81. Definitions. 9 10 "License" shall mean the terms and conditions for use, reproduction, 11 and distribution as defined by Sections 1 through 9 of this document.First 10 of 201 lines.
- 10 lines in 102 placesgogenerated51 tokensinternal/proto/ateletpb/atelet.pb.go:231–240internal/proto/ateletpb/atelet.pb.go:274–283internal/proto/ateletpb/atelet.pb.go:319–328internal/proto/ateletpb/atelet.pb.go:385–394internal/proto/ateletpb/atelet.pb.go:435–444and 97 more
231 mi := &file_atelet_proto_msgTypes[0] 232 if x != nil { 233 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 234 if ms.LoadMessageInfo() == nil { 235 ms.StoreMessageInfo(mi) 236 } 237 return ms 238 } 239 return mi.MessageOf(x) 240} - 40 lines in 16 placesgo307 tokenscmd/ateapi/internal/controlapi/zz_generated.validation.go:91–130cmd/ateapi/internal/controlapi/zz_generated.validation.go:1607–1646cmd/ateapi/internal/controlapi/zz_generated.validation.go:2009–2048cmd/ateapi/internal/controlapi/zz_generated.validation.go:2094–2133cmd/ateapi/internal/controlapi/zz_generated.validation.go:2207–2246and 11 more
91fn := func( 92 fldPath *field.Path, 93 obj, oldObj *ateapipb.ObjectRef, 94 oldValueCorrelated bool) (errs field.ErrorList) { 95 // don't revalidate unchanged data 96 if oldValueCorrelated && op.Type == operation.Update { 97 if ateDeepEqual(obj, oldObj) { 98 return nil 99 } 100 }First 10 of 40 lines.
- 174 lines in 3 placestxtdocs and examples1,658 tokens
- 19 lines in 21 placesgo130 tokenscmd/ateapi/internal/controlapi/zz_generated.validation.go:349–367cmd/ateapi/internal/controlapi/zz_generated.validation.go:1188–1206cmd/ateapi/internal/controlapi/zz_generated.validation.go:3047–3065cmd/ateapi/internal/controlapi/zz_generated.validation.go:3388–3406cmd/ateapi/internal/controlapi/zz_generated.validation.go:4028–4046and 16 more
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| go | 398 | 82,985 | 262 | 2,885 | 3.48% |
| bash | 54 | 5,334 | 4 | 68 | 1.27% |
| python | 31 | 4,546 | 1 | 20 | 0.44% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| go | 841 | 220,563 | 1,716 | 19,681 | 8.92% |
| yaml | 67 | 12,107 | 67 | 1,326 | 10.95% |
| txt | 33 | 4,239 | 30 | 3,929 | 92.69% |
| markup | 4 | 2,395 | 12 | 666 | 27.81% |
| python | 43 | 5,787 | 11 | 313 | 5.41% |
| markdown | 79 | 15,884 | 10 | 121 | 0.76% |
| bash | 85 | 6,462 | 4 | 68 | 1.05% |
| json | 7 | 1,347 | 2 | 42 | 3.12% |
| protobuf | 7 | 3,450 | 0 | 0 | 0% |
| text | 15 | 292 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 24, 2026 | #6 | 3,570 (+558) | 1,189 | 272,973 | 1,852 | 9.58% | 3.2% | D 48 | 31a5e0b |
| Sep 23, 2026 | #2 | 3,083 (+245) | 1,173 | 271,780 | 1,848 | 9.62% | 3.12% | D 49.3 | d277088 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.