Public report of etcd-io/etcd, published 13 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 13 November 2026, 12:14 UTC · Survey ID cd_7429c5020ce0467db02805092729ff30
etcd-io/etcd
Measured 13 November 2026, 12:13 UTC, at code version 1b969e2
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 77,723 lines of product code in 12 projects, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Security and Compliance, 56
Findings by how serious they are
11 critical772 serious178 minor
30 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 12:13 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
51of 51 dimensions measured by tools.
935of 961 findings point to an exact file and line, so you can open each one in the code. The other 26 concern the repository as a whole, such as missing documentation.
51dimensions across 6 lenses, read from 77,723 lines of product code in 12 projects.
etcd-io/etcd falls short of our standard for production, in part because it has unsafe settings in infrastructure or container files. It scores 65 out of 100 and is rated Adequate, and nine of its 11 critical findings are security problems.
Security and Compliance, at 56, is the weakest lens and counts most in the score. The best first steps are recording design decisions and fixing the product with no limit on what it can connect to, each worth about 2 points. Raising Security and Compliance to 70 would lift the score to about 72.
Five settings leave the servers or containers unsafe. One automatic update takes new releases before a bad one can be spotted, and one password or key is open to anyone who can read the repository. Correcting the unsafe settings, setting a waiting period for automatic updates and replacing the exposed password or key would close these risks. Passing outside input through environment variables would fix the pipeline step that puts outside input straight into a shell command, and the pipeline step that runs a download without checking it needs each download checked against a known checksum first. The part of the code nobody has worked on for a long time needs someone to learn and document it before anyone changes it.
The product code is 77,723 lines, about €210,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Code Duplication · Edited copy of a member (86 corresponding lines) server/proxy/grpcproxy/lease.go
Code Duplication · Edited copy of a member (71 corresponding lines) server/etcdserver/api/v2store/store.go
Code Duplication · Edited copy of a member (51 corresponding lines) server/etcdserver/cluster_util.go
Code Duplication · Edited copy of a member (61 corresponding lines) server/storage/backend/backend.go
Code Duplication · Edited copy of a member (55 corresponding lines) server/etcdserver/api/v2store/store.go
Code Duplication · Edited copy of a member (44 corresponding lines) server/auth/store.go
Code Duplication · Edited copy of a member (29 corresponding lines) server/etcdserver/api/rafthttp/transport.go
Code Duplication · Edited copy of a member (35 corresponding lines) client/v3/experimental/recipes/priority_queue.go
Code Duplication · Edited copy of a member (62 corresponding lines) etcdctl/ctlv3/command/completion_command.go
Code Duplication · Edited copy of a member (24 corresponding lines) etcdctl/ctlv3/command/downgrade_command.go
Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) server/etcdserver/v3_server.go
Code Duplication · Edited copy of a member (33 corresponding lines) etcdctl/ctlv3/command/elect_command.go
Code Duplication · Edited copy of a member (26 corresponding lines) etcdctl/ctlv3/command/ep_command.go
Code Duplication · Edited copy of a member (17 corresponding lines) etcdctl/ctlv3/command/printer_fields.go
Code Duplication · Edited copy of a member (24 corresponding lines) server/proxy/grpcproxy/lease.go
Code Duplication · Edited copy of a member (20 corresponding lines) client/v3/kubernetes/client.go
Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) pkg/netutil/routes_linux.go
Code Duplication · Edited copies of one member (3 members, 37+ corresponding lines) server/auth/options.go
Code Duplication · Edited copy of a member (18 corresponding lines) server/embed/config.go
Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) REDACTED
Code Duplication · Edited copy of a member (14 corresponding lines) server/etcdserver/api/v3election/election.go
Code Duplication · Edited copy of a member (13 corresponding lines) pkg/report/weighted.go
Code Duplication · Edited copies of one member (5 members, 18+ corresponding lines) etcdctl/ctlv3/command/compaction_command.go
Code Duplication · Edited copy of a member (14 corresponding lines) server/etcdserver/api/membership/storev2.go
Code Duplication · Edited copy of a member (16 corresponding lines) server/etcdserver/v3_server.go
Code Duplication · Edited copy of a member (23 corresponding lines) client/v3/ordering/kv.go
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) REDACTED
Code Duplication · Edited copy of a member (24 corresponding lines) server/etcdserver/api/v3discovery/discovery.go
Code Duplication · Edited copy of a member (19 corresponding lines) server/storage/backend/batch_tx.go
Code Duplication · Edited copy of a member (12 corresponding lines) etcdctl/ctlv3/command/role_command.go
Code Duplication · Edited copy of a member (13 corresponding lines) server/etcdserver/api/v3rpc/interceptor.go
Code Duplication · Edited copy of a member (17 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (14 corresponding lines) server/etcdserver/v3_server.go
Code Duplication · Edited copy of a member (14 corresponding lines) server/etcdserver/api/v3rpc/lease.go
Code Duplication · Edited copy of a member (22 corresponding lines) etcdctl/ctlv3/command/txn_command.go
Code Duplication · Edited copy of a member (15 corresponding lines) pkg/flags/flag.go
Code Duplication · Edited copy of a member (13 corresponding lines) server/etcdserver/v3_server.go
Code Duplication · Edited copy of a member (14 corresponding lines) client/pkg/fileutil/lock_flock.go
Code Duplication · Edited copy of a member (12 corresponding lines) client/v3/namespace/kv.go
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) client/v3/maintenance.go
Code Duplication · Edited copy of a member (17 corresponding lines) server/proxy/grpcproxy/election.go
Code Duplication · Edited copy of a member (12 corresponding lines) etcdctl/ctlv3/command/role_command.go
Code Duplication · Edited copy of a member (11 corresponding lines) client/v3/experimental/recipes/client.go
Code Duplication · Edited copy of a member (13 corresponding lines) server/storage/schema/auth_roles.go
Code Duplication · Edited copy of a member (17 corresponding lines) client/pkg/fileutil/fileutil.go
Code Duplication · Edited copies of one member (5 members, 12+ corresponding lines) etcdctl/ctlv3/command/auth_command.go
Code Duplication · Edited copy of a member (12 corresponding lines) etcdctl/ctlv3/command/alarm_command.go
Code Duplication · Edited copy of a member (17 corresponding lines) client/v3/txn.go
Code Duplication · Edited copy of a member (16 corresponding lines) server/etcdserver/server.go
Code Duplication · Edited copy of a member (15 corresponding lines) server/embed/config.go
Code Duplication · Edited copy of a member (14 corresponding lines) client/v3/cluster.go
Code Duplication · Edited copy of a member (10 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (17 corresponding lines) server/lease/lessor.go
Code Duplication · Edited copy of a member (13 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (23 corresponding lines) pkg/adt/interval_tree.go
Code Duplication · Edited copy of a member (11 corresponding lines) server/storage/schema/membership.go
Code Duplication · Edited copy of a member (11 corresponding lines) client/v3/ctx.go
Code Duplication · Edited copy of a member (12 corresponding lines) server/auth/range_perm_cache.go
Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) server/etcdserver/api/v3rpc/key.go
Code Duplication · Edited copy of a member (7 corresponding lines) server/proxy/grpcproxy/kv.go
Code Duplication · Edited copy of a member (13 corresponding lines) cache/ringbuffer.go
Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) client/pkg/fileutil/lock_flock.go
Code Duplication · Edited copy of a member (9 corresponding lines) server/etcdserver/api/membership/storev2.go
Code Duplication · Edited copy of a member (4 corresponding lines) client/v3/auth.go
Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) etcdctl/ctlv3/command/del_command.go
Code Duplication · Edited copy of a member (15 corresponding lines) etcdctl/ctlv3/command/printer.go
Code Duplication · Edited copy of a member (15 corresponding lines) cache/demux.go
Code Duplication · Edited copy of a member (11 corresponding lines) pkg/netutil/netutil.go
Code Duplication · Edited copy of a member (11 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (7 corresponding lines) server/storage/wal/wal.go
Code Duplication · Edited copy of a member (7 corresponding lines) server/storage/schema/auth_roles.go
Code Duplication · Edited copy of a member (8 corresponding lines) pkg/flags/unique_strings.go
Code Duplication · Edited copy of a member (15 corresponding lines) server/etcdserver/api/v3rpc/auth.go
Code Duplication · Edited copy of a member (8 corresponding lines) server/etcdserver/api/v3rpc/lease.go
Code Duplication · Edited copy of a member (8 corresponding lines) etcdctl/ctlv3/command/printer_json.go
Code Duplication · Edited copy of a member (8 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (8 corresponding lines) server/storage/schema/auth.go
Code Duplication · Edited copy of a member (7 corresponding lines) server/etcdserver/api/membership/store.go
Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) server/proxy/grpcproxy/adapter/election_client_adapter.go
Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) server/proxy/grpcproxy/adapter/election_client_adapter.go
Code Duplication · Edited copy of a member (8 corresponding lines) server/embed/etcd.go
Code Duplication · Edited copy of a member (5 corresponding lines) client/pkg/testutil/testingtb.go
Code Duplication · Edited copy of a member (77 corresponding lines) tools/rw-heatmaps/pkg/chart/heatmaps.go
Code Duplication · Edited copy of a member (24 corresponding lines) tools/rw-heatmaps/pkg/chart/heatmaps.go
Code Duplication · Edited copy of a member (25 corresponding lines) tools/etcd-dump-metrics/install_darwin.go
Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) tools/etcd-dump-db/main.go
Explicit Debt · TodoComment repeated across 21 files tests/integration/v3_grpc_test.go
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 48 findings
These 48 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one.
Cancellation propagation · Function without context.Context: install tools/etcd-dump-metrics/install_linux.go
Cancellation propagation · Function without context.Context: install tools/etcd-dump-metrics/install_darwin.go
Cancellation propagation · Function without context.Context: newBridgeConn REDACTED
Cancellation propagation · Function without context.Context: fetchJSON tools/testgrid-analysis/cmd/data.go
Exception handling · Swallowed exception (caught, then discarded) tools/check-grpc-experimental/main.go
Outbound HTTP resilience · Outbound HTTP without resilience tools/etcd-dump-metrics/install_darwin.go
Outbound HTTP resilience · Outbound HTTP without resilience tools/etcd-dump-metrics/install_linux.go
Outbound HTTP resilience · Outbound HTTP without resilience tools/testgrid-analysis/cmd/data.go
Rebuild cost: about €210,000 · Estimate
Cost to rebuild
€71,000 to €360,000, for 1,189 to 3,772 hours of work, about 1.5 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 65. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 77,723 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Procfile.
Raises the score by about 2 points · Low effort · ADR Quality
2
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €210,000 to build again, about 1.5 person-years of work. Its weakest lens is Security and Compliance, at 56 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
129 modules, with 174 dependencies between them. 2 loops run through 5 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 89 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
io/etcd/client/pkg/v3/srv uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/client/pkg/v3/srv, while a change to io/etcd/client/pkg/v3/srv can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/client/pkg/v3/srv uses a module listed above it, which is the healthy direction.
io/etcd/client/v3/concurrency uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/client/v3/concurrency, while a change to io/etcd/client/v3/concurrency can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/client/v3/concurrency uses a module listed above it, which is the healthy direction.
io/etcd/client/v3/naming/endpoints uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/client/v3/naming/endpoints, while a change to io/etcd/client/v3/naming/endpoints can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/client/v3/naming/endpoints uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api, while a change to io/etcd/server/v3/etcdserver/api can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api uses a module listed above it, which is the healthy direction.
15→24 io/etcd/server/v3/etcdserver/api uses io/etcd/server/v3/etcdserver/api/membershippart of a loop✕
Connections
1 pair of types, where a type in io/etcd/server/v3/etcdserver/api uses a type in io/etcd/server/v3/etcdserver/api/membership.
io/etcd/server/v3/etcdserver/api uses io/etcd/server/v3/etcdserver/api/membership, so a change to io/etcd/server/v3/etcdserver/api/membership can break io/etcd/server/v3/etcdserver/api, while a change to io/etcd/server/v3/etcdserver/api can't break io/etcd/server/v3/etcdserver/api/membership.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
io/etcd/server/v3/etcdserver/api/rafthttp uses io/etcd/client/pkg/v3/transport, so a change to io/etcd/client/pkg/v3/transport can break io/etcd/server/v3/etcdserver/api/rafthttp, while a change to io/etcd/server/v3/etcdserver/api/rafthttp can't break io/etcd/client/pkg/v3/transport.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/rafthttp uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/rafthttp uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api/rafthttp, while a change to io/etcd/server/v3/etcdserver/api/rafthttp can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/rafthttp uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/rafthttp uses io/etcd/server/v3/etcdserver/api/snap, so a change to io/etcd/server/v3/etcdserver/api/snap can break io/etcd/server/v3/etcdserver/api/rafthttp, while a change to io/etcd/server/v3/etcdserver/api/rafthttp can't break io/etcd/server/v3/etcdserver/api/snap.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/rafthttp uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v2store uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api/v2store, while a change to io/etcd/server/v3/etcdserver/api/v2store can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v2store uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3discovery uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api/v3discovery, while a change to io/etcd/server/v3/etcdserver/api/v3discovery can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3discovery uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3discovery uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/server/v3/etcdserver/api/v3discovery, while a change to io/etcd/server/v3/etcdserver/api/v3discovery can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3discovery uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/backend uses io/etcd/client/pkg/v3/verify, so a change to io/etcd/client/pkg/v3/verify can break io/etcd/server/v3/storage/backend, while a change to io/etcd/server/v3/storage/backend can't break io/etcd/client/pkg/v3/verify.
Position
Below the diagonal: io/etcd/server/v3/storage/backend uses a module listed above it, which is the healthy direction.
io/etcd/client/pkg/v3/testutil uses io/etcd/server/v3/etcdserver/api/rafthttp, so a change to io/etcd/server/v3/etcdserver/api/rafthttp can break io/etcd/client/pkg/v3/testutil, while a change to io/etcd/client/pkg/v3/testutil can't break io/etcd/server/v3/etcdserver/api/rafthttp.
Position
Below the diagonal: io/etcd/client/pkg/v3/testutil uses a module listed above it, which is the healthy direction.
io/etcd/client/v3/experimental/recipes uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/client/v3/experimental/recipes, while a change to io/etcd/client/v3/experimental/recipes can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/client/v3/experimental/recipes uses a module listed above it, which is the healthy direction.
io/etcd/client/v3/experimental/recipes uses io/etcd/client/v3/concurrency, so a change to io/etcd/client/v3/concurrency can break io/etcd/client/v3/experimental/recipes, while a change to io/etcd/client/v3/experimental/recipes can't break io/etcd/client/v3/concurrency.
Position
Below the diagonal: io/etcd/client/v3/experimental/recipes uses a module listed above it, which is the healthy direction.
io/etcd/etcdctl/v3/ctlv3/command uses io/etcd/client/pkg/v3/transport, so a change to io/etcd/client/pkg/v3/transport can break io/etcd/etcdctl/v3/ctlv3/command, while a change to io/etcd/etcdctl/v3/ctlv3/command can't break io/etcd/client/pkg/v3/transport.
Position
Below the diagonal: io/etcd/etcdctl/v3/ctlv3/command uses a module listed above it, which is the healthy direction.
145 pairs of types, where a type in io/etcd/etcdctl/v3/ctlv3/command uses a type in io/etcd/client/v3. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
io/etcd/etcdctl/v3/ctlv3/command uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/etcdctl/v3/ctlv3/command, while a change to io/etcd/etcdctl/v3/ctlv3/command can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/etcdctl/v3/ctlv3/command uses a module listed above it, which is the healthy direction.
io/etcd/etcdctl/v3/ctlv3/command uses io/etcd/client/v3/concurrency, so a change to io/etcd/client/v3/concurrency can break io/etcd/etcdctl/v3/ctlv3/command, while a change to io/etcd/etcdctl/v3/ctlv3/command can't break io/etcd/client/v3/concurrency.
Position
Below the diagonal: io/etcd/etcdctl/v3/ctlv3/command uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/config uses io/etcd/client/pkg/v3/transport, so a change to io/etcd/client/pkg/v3/transport can break io/etcd/server/v3/config, while a change to io/etcd/server/v3/config can't break io/etcd/client/pkg/v3/transport.
Position
Below the diagonal: io/etcd/server/v3/config uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/config uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/config, while a change to io/etcd/server/v3/config can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/config uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/config uses io/etcd/pkg/v3/featuregate, so a change to io/etcd/pkg/v3/featuregate can break io/etcd/server/v3/config, while a change to io/etcd/server/v3/config can't break io/etcd/pkg/v3/featuregate.
Position
Below the diagonal: io/etcd/server/v3/config uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/config uses io/etcd/server/v3/etcdserver/api/v3discovery, so a change to io/etcd/server/v3/etcdserver/api/v3discovery can break io/etcd/server/v3/config, while a change to io/etcd/server/v3/config can't break io/etcd/server/v3/etcdserver/api/v3discovery.
Position
Below the diagonal: io/etcd/server/v3/config uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/membership uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api/membership, while a change to io/etcd/server/v3/etcdserver/api/membership can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/membership uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/membership uses io/etcd/server/v3/etcdserver/version, so a change to io/etcd/server/v3/etcdserver/version can break io/etcd/server/v3/etcdserver/api/membership, while a change to io/etcd/server/v3/etcdserver/api/membership can't break io/etcd/server/v3/etcdserver/version.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/membership uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/membership uses io/etcd/server/v3/etcdserver/api, so a change to io/etcd/server/v3/etcdserver/api can break io/etcd/server/v3/etcdserver/api/membership, while a change to io/etcd/server/v3/etcdserver/api/membership can't break io/etcd/server/v3/etcdserver/api.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/membership uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/membership uses io/etcd/server/v3/etcdserver/api/v2store, so a change to io/etcd/server/v3/etcdserver/api/v2store can break io/etcd/server/v3/etcdserver/api/membership, while a change to io/etcd/server/v3/etcdserver/api/membership can't break io/etcd/server/v3/etcdserver/api/v2store.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/membership uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/cindex uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/etcdserver/cindex, while a change to io/etcd/server/v3/etcdserver/cindex can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/cindex uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/lease uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/lease, while a change to io/etcd/server/v3/lease can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/lease uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/etcdhttp uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api/etcdhttp, while a change to io/etcd/server/v3/etcdserver/api/etcdhttp can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/etcdhttp uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/etcdhttp uses io/etcd/server/v3/auth, so a change to io/etcd/server/v3/auth can break io/etcd/server/v3/etcdserver/api/etcdhttp, while a change to io/etcd/server/v3/etcdserver/api/etcdhttp can't break io/etcd/server/v3/auth.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/etcdhttp uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/etcdhttp uses io/etcd/server/v3/etcdserver/api, so a change to io/etcd/server/v3/etcdserver/api can break io/etcd/server/v3/etcdserver/api/etcdhttp, while a change to io/etcd/server/v3/etcdserver/api/etcdhttp can't break io/etcd/server/v3/etcdserver/api.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/etcdhttp uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/etcdhttp uses io/etcd/server/v3/config, so a change to io/etcd/server/v3/config can break io/etcd/server/v3/etcdserver/api/etcdhttp, while a change to io/etcd/server/v3/etcdserver/api/etcdhttp can't break io/etcd/server/v3/config.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/etcdhttp uses a module listed above it, which is the healthy direction.
27→37 io/etcd/server/v3/etcdserver/api/etcdhttp uses io/etcd/server/v3/etcdserverpart of a loop✕
Connections
3 pairs of types, where a type in io/etcd/server/v3/etcdserver/api/etcdhttp uses a type in io/etcd/server/v3/etcdserver.
io/etcd/server/v3/etcdserver/api/etcdhttp uses io/etcd/server/v3/etcdserver, so a change to io/etcd/server/v3/etcdserver can break io/etcd/server/v3/etcdserver/api/etcdhttp, while a change to io/etcd/server/v3/etcdserver/api/etcdhttp can't break io/etcd/server/v3/etcdserver.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
io/etcd/server/v3/storage uses io/etcd/server/v3/etcdserver/api/snap, so a change to io/etcd/server/v3/etcdserver/api/snap can break io/etcd/server/v3/storage, while a change to io/etcd/server/v3/storage can't break io/etcd/server/v3/etcdserver/api/snap.
Position
Below the diagonal: io/etcd/server/v3/storage uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage uses io/etcd/server/v3/storage/wal, so a change to io/etcd/server/v3/storage/wal can break io/etcd/server/v3/storage, while a change to io/etcd/server/v3/storage can't break io/etcd/server/v3/storage/wal.
Position
Below the diagonal: io/etcd/server/v3/storage uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/storage, while a change to io/etcd/server/v3/storage can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/storage uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage uses io/etcd/server/v3/config, so a change to io/etcd/server/v3/config can break io/etcd/server/v3/storage, while a change to io/etcd/server/v3/storage can't break io/etcd/server/v3/config.
Position
Below the diagonal: io/etcd/server/v3/storage uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage uses io/etcd/server/v3/etcdserver/cindex, so a change to io/etcd/server/v3/etcdserver/cindex can break io/etcd/server/v3/storage, while a change to io/etcd/server/v3/storage can't break io/etcd/server/v3/etcdserver/cindex.
Position
Below the diagonal: io/etcd/server/v3/storage uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/mvcc uses io/etcd/pkg/v3/traceutil, so a change to io/etcd/pkg/v3/traceutil can break io/etcd/server/v3/storage/mvcc, while a change to io/etcd/server/v3/storage/mvcc can't break io/etcd/pkg/v3/traceutil.
Position
Below the diagonal: io/etcd/server/v3/storage/mvcc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/mvcc uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/storage/mvcc, while a change to io/etcd/server/v3/storage/mvcc can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/storage/mvcc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/mvcc uses io/etcd/server/v3/lease, so a change to io/etcd/server/v3/lease can break io/etcd/server/v3/storage/mvcc, while a change to io/etcd/server/v3/storage/mvcc can't break io/etcd/server/v3/lease.
Position
Below the diagonal: io/etcd/server/v3/storage/mvcc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/schema uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/storage/schema, while a change to io/etcd/server/v3/storage/schema can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/storage/schema uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/schema uses io/etcd/server/v3/auth, so a change to io/etcd/server/v3/auth can break io/etcd/server/v3/storage/schema, while a change to io/etcd/server/v3/storage/schema can't break io/etcd/server/v3/auth.
Position
Below the diagonal: io/etcd/server/v3/storage/schema uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/schema uses io/etcd/server/v3/etcdserver/version, so a change to io/etcd/server/v3/etcdserver/version can break io/etcd/server/v3/storage/schema, while a change to io/etcd/server/v3/storage/schema can't break io/etcd/server/v3/etcdserver/version.
Position
Below the diagonal: io/etcd/server/v3/storage/schema uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/schema uses io/etcd/server/v3/storage/wal, so a change to io/etcd/server/v3/storage/wal can break io/etcd/server/v3/storage/schema, while a change to io/etcd/server/v3/storage/schema can't break io/etcd/server/v3/storage/wal.
Position
Below the diagonal: io/etcd/server/v3/storage/schema uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/schema uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/storage/schema, while a change to io/etcd/server/v3/storage/schema can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/storage/schema uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/storage/schema uses io/etcd/server/v3/etcdserver/api/membership, so a change to io/etcd/server/v3/etcdserver/api/membership can break io/etcd/server/v3/storage/schema, while a change to io/etcd/server/v3/storage/schema can't break io/etcd/server/v3/etcdserver/api/membership.
Position
Below the diagonal: io/etcd/server/v3/storage/schema uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/snapshot uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/etcdutl/v3/snapshot, while a change to io/etcd/etcdutl/v3/snapshot can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/etcdutl/v3/snapshot uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/snapshot uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/etcdutl/v3/snapshot, while a change to io/etcd/etcdutl/v3/snapshot can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/etcdutl/v3/snapshot uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/snapshot uses io/etcd/server/v3/etcdserver/api/membership, so a change to io/etcd/server/v3/etcdserver/api/membership can break io/etcd/etcdutl/v3/snapshot, while a change to io/etcd/etcdutl/v3/snapshot can't break io/etcd/server/v3/etcdserver/api/membership.
Position
Below the diagonal: io/etcd/etcdutl/v3/snapshot uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/snapshot uses io/etcd/server/v3/storage/mvcc, so a change to io/etcd/server/v3/storage/mvcc can break io/etcd/etcdutl/v3/snapshot, while a change to io/etcd/etcdutl/v3/snapshot can't break io/etcd/server/v3/storage/mvcc.
Position
Below the diagonal: io/etcd/etcdutl/v3/snapshot uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3alarm uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api/v3alarm, while a change to io/etcd/server/v3/etcdserver/api/v3alarm can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3alarm uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3alarm uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/etcdserver/api/v3alarm, while a change to io/etcd/server/v3/etcdserver/api/v3alarm can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3alarm uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3alarm uses io/etcd/server/v3/storage/schema, so a change to io/etcd/server/v3/storage/schema can break io/etcd/server/v3/etcdserver/api/v3alarm, while a change to io/etcd/server/v3/etcdserver/api/v3alarm can't break io/etcd/server/v3/storage/schema.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3alarm uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/txn uses io/etcd/pkg/v3/traceutil, so a change to io/etcd/pkg/v3/traceutil can break io/etcd/server/v3/etcdserver/txn, while a change to io/etcd/server/v3/etcdserver/txn can't break io/etcd/pkg/v3/traceutil.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/txn uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/txn uses io/etcd/server/v3/lease, so a change to io/etcd/server/v3/lease can break io/etcd/server/v3/etcdserver/txn, while a change to io/etcd/server/v3/etcdserver/txn can't break io/etcd/server/v3/lease.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/txn uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/txn uses io/etcd/server/v3/storage/mvcc, so a change to io/etcd/server/v3/storage/mvcc can break io/etcd/server/v3/etcdserver/txn, while a change to io/etcd/server/v3/etcdserver/txn can't break io/etcd/server/v3/storage/mvcc.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/txn uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/etcdutl uses io/etcd/server/v3/storage/wal, so a change to io/etcd/server/v3/storage/wal can break io/etcd/etcdutl/v3/etcdutl, while a change to io/etcd/etcdutl/v3/etcdutl can't break io/etcd/server/v3/storage/wal.
Position
Below the diagonal: io/etcd/etcdutl/v3/etcdutl uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/etcdutl uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/etcdutl/v3/etcdutl, while a change to io/etcd/etcdutl/v3/etcdutl can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/etcdutl/v3/etcdutl uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/etcdutl uses io/etcd/server/v3/lease, so a change to io/etcd/server/v3/lease can break io/etcd/etcdutl/v3/etcdutl, while a change to io/etcd/etcdutl/v3/etcdutl can't break io/etcd/server/v3/lease.
Position
Below the diagonal: io/etcd/etcdutl/v3/etcdutl uses a module listed above it, which is the healthy direction.
io/etcd/etcdutl/v3/etcdutl uses io/etcd/etcdutl/v3/snapshot, so a change to io/etcd/etcdutl/v3/snapshot can break io/etcd/etcdutl/v3/etcdutl, while a change to io/etcd/etcdutl/v3/etcdutl can't break io/etcd/etcdutl/v3/snapshot.
Position
Below the diagonal: io/etcd/etcdutl/v3/etcdutl uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/pkg/v3/traceutil, so a change to io/etcd/pkg/v3/traceutil can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/pkg/v3/traceutil.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/pkg/v3/wait, so a change to io/etcd/pkg/v3/wait can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/pkg/v3/wait.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/auth, so a change to io/etcd/server/v3/auth can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/auth.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/etcdserver/api/membership, so a change to io/etcd/server/v3/etcdserver/api/membership can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/etcdserver/api/membership.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/etcdserver/cindex, so a change to io/etcd/server/v3/etcdserver/cindex can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/etcdserver/cindex.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/lease, so a change to io/etcd/server/v3/lease can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/lease.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/storage, so a change to io/etcd/server/v3/storage can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/storage.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/storage/mvcc, so a change to io/etcd/server/v3/storage/mvcc can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/storage/mvcc.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/apply uses io/etcd/server/v3/etcdserver/api/v3alarm, so a change to io/etcd/server/v3/etcdserver/api/v3alarm can break io/etcd/server/v3/etcdserver/apply, while a change to io/etcd/server/v3/etcdserver/apply can't break io/etcd/server/v3/etcdserver/api/v3alarm.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/apply uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/auth, so a change to io/etcd/server/v3/auth can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/auth.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/etcdserver/version, so a change to io/etcd/server/v3/etcdserver/version can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/etcdserver/version.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/etcdserver/api, so a change to io/etcd/server/v3/etcdserver/api can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/etcdserver/api.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/config, so a change to io/etcd/server/v3/config can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/config.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/etcdserver/api/membership, so a change to io/etcd/server/v3/etcdserver/api/membership can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/etcdserver/api/membership.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/storage, so a change to io/etcd/server/v3/storage can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/storage.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/storage/mvcc, so a change to io/etcd/server/v3/storage/mvcc can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/storage/mvcc.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/etcdserver/apply, so a change to io/etcd/server/v3/etcdserver/apply can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/etcdserver/apply.
Position
Below the diagonal: io/etcd/server/v3/etcdserver/api/v3rpc uses a module listed above it, which is the healthy direction.
36→37 io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/etcdserverpart of a loop✕
Connections
6 pairs of types, where a type in io/etcd/server/v3/etcdserver/api/v3rpc uses a type in io/etcd/server/v3/etcdserver.
io/etcd/server/v3/etcdserver/api/v3rpc uses io/etcd/server/v3/etcdserver, so a change to io/etcd/server/v3/etcdserver can break io/etcd/server/v3/etcdserver/api/v3rpc, while a change to io/etcd/server/v3/etcdserver/api/v3rpc can't break io/etcd/server/v3/etcdserver.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
io/etcd/server/v3/etcdserver uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/pkg/v3/featuregate, so a change to io/etcd/pkg/v3/featuregate can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/pkg/v3/featuregate.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/pkg/v3/wait, so a change to io/etcd/pkg/v3/wait can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/pkg/v3/wait.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/auth, so a change to io/etcd/server/v3/auth can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/auth.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api/snap, so a change to io/etcd/server/v3/etcdserver/api/snap can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api/snap.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/version, so a change to io/etcd/server/v3/etcdserver/version can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/version.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/storage/wal, so a change to io/etcd/server/v3/storage/wal can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/storage/wal.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api, so a change to io/etcd/server/v3/etcdserver/api can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api/rafthttp, so a change to io/etcd/server/v3/etcdserver/api/rafthttp can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api/rafthttp.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api/v2store, so a change to io/etcd/server/v3/etcdserver/api/v2store can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api/v2store.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/storage/backend, so a change to io/etcd/server/v3/storage/backend can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/storage/backend.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/config, so a change to io/etcd/server/v3/config can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/config.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api/membership, so a change to io/etcd/server/v3/etcdserver/api/membership can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api/membership.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/cindex, so a change to io/etcd/server/v3/etcdserver/cindex can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/cindex.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/lease, so a change to io/etcd/server/v3/lease can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/lease.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api/etcdhttp, so a change to io/etcd/server/v3/etcdserver/api/etcdhttp can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api/etcdhttp.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/storage, so a change to io/etcd/server/v3/storage can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/storage.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/storage/mvcc, so a change to io/etcd/server/v3/storage/mvcc can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/storage/mvcc.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api/v3alarm, so a change to io/etcd/server/v3/etcdserver/api/v3alarm can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api/v3alarm.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/apply, so a change to io/etcd/server/v3/etcdserver/apply can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/apply.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdserver uses io/etcd/server/v3/etcdserver/api/v3rpc, so a change to io/etcd/server/v3/etcdserver/api/v3rpc can break io/etcd/server/v3/etcdserver, while a change to io/etcd/server/v3/etcdserver can't break io/etcd/server/v3/etcdserver/api/v3rpc.
Position
Below the diagonal: io/etcd/server/v3/etcdserver uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/embed uses io/etcd/client/pkg/v3/transport, so a change to io/etcd/client/pkg/v3/transport can break io/etcd/server/v3/embed, while a change to io/etcd/server/v3/embed can't break io/etcd/client/pkg/v3/transport.
Position
Below the diagonal: io/etcd/server/v3/embed uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/embed uses io/etcd/client/pkg/v3/types, so a change to io/etcd/client/pkg/v3/types can break io/etcd/server/v3/embed, while a change to io/etcd/server/v3/embed can't break io/etcd/client/pkg/v3/types.
Position
Below the diagonal: io/etcd/server/v3/embed uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/embed uses io/etcd/pkg/v3/featuregate, so a change to io/etcd/pkg/v3/featuregate can break io/etcd/server/v3/embed, while a change to io/etcd/server/v3/embed can't break io/etcd/pkg/v3/featuregate.
Position
Below the diagonal: io/etcd/server/v3/embed uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/embed uses io/etcd/server/v3/etcdserver/api/v3discovery, so a change to io/etcd/server/v3/etcdserver/api/v3discovery can break io/etcd/server/v3/embed, while a change to io/etcd/server/v3/embed can't break io/etcd/server/v3/etcdserver/api/v3discovery.
Position
Below the diagonal: io/etcd/server/v3/embed uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/embed uses io/etcd/server/v3/config, so a change to io/etcd/server/v3/config can break io/etcd/server/v3/embed, while a change to io/etcd/server/v3/embed can't break io/etcd/server/v3/config.
Position
Below the diagonal: io/etcd/server/v3/embed uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/embed uses io/etcd/server/v3/etcdserver, so a change to io/etcd/server/v3/etcdserver can break io/etcd/server/v3/embed, while a change to io/etcd/server/v3/embed can't break io/etcd/server/v3/etcdserver.
Position
Below the diagonal: io/etcd/server/v3/embed uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/proxy/grpcproxy uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/server/v3/proxy/grpcproxy, while a change to io/etcd/server/v3/proxy/grpcproxy can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/server/v3/proxy/grpcproxy uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/proxy/grpcproxy uses io/etcd/client/v3/concurrency, so a change to io/etcd/client/v3/concurrency can break io/etcd/server/v3/proxy/grpcproxy, while a change to io/etcd/server/v3/proxy/grpcproxy can't break io/etcd/client/v3/concurrency.
Position
Below the diagonal: io/etcd/server/v3/proxy/grpcproxy uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/proxy/grpcproxy uses io/etcd/client/v3/naming/endpoints, so a change to io/etcd/client/v3/naming/endpoints can break io/etcd/server/v3/proxy/grpcproxy, while a change to io/etcd/server/v3/proxy/grpcproxy can't break io/etcd/client/v3/naming/endpoints.
Position
Below the diagonal: io/etcd/server/v3/proxy/grpcproxy uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/proxy/grpcproxy uses io/etcd/server/v3/etcdserver/api/etcdhttp, so a change to io/etcd/server/v3/etcdserver/api/etcdhttp can break io/etcd/server/v3/proxy/grpcproxy, while a change to io/etcd/server/v3/proxy/grpcproxy can't break io/etcd/server/v3/etcdserver/api/etcdhttp.
Position
Below the diagonal: io/etcd/server/v3/proxy/grpcproxy uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/proxy/grpcproxy uses io/etcd/server/v3/storage/mvcc, so a change to io/etcd/server/v3/storage/mvcc can break io/etcd/server/v3/proxy/grpcproxy, while a change to io/etcd/server/v3/proxy/grpcproxy can't break io/etcd/server/v3/storage/mvcc.
Position
Below the diagonal: io/etcd/server/v3/proxy/grpcproxy uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/proxy/grpcproxy uses io/etcd/server/v3/etcdserver, so a change to io/etcd/server/v3/etcdserver can break io/etcd/server/v3/proxy/grpcproxy, while a change to io/etcd/server/v3/proxy/grpcproxy can't break io/etcd/server/v3/etcdserver.
Position
Below the diagonal: io/etcd/server/v3/proxy/grpcproxy uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdmain uses io/etcd/client/pkg/v3/transport, so a change to io/etcd/client/pkg/v3/transport can break io/etcd/server/v3/etcdmain, while a change to io/etcd/server/v3/etcdmain can't break io/etcd/client/pkg/v3/transport.
Position
Below the diagonal: io/etcd/server/v3/etcdmain uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdmain uses io/etcd/client/v3, so a change to io/etcd/client/v3 can break io/etcd/server/v3/etcdmain, while a change to io/etcd/server/v3/etcdmain can't break io/etcd/client/v3.
Position
Below the diagonal: io/etcd/server/v3/etcdmain uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdmain uses io/etcd/client/pkg/v3/srv, so a change to io/etcd/client/pkg/v3/srv can break io/etcd/server/v3/etcdmain, while a change to io/etcd/server/v3/etcdmain can't break io/etcd/client/pkg/v3/srv.
Position
Below the diagonal: io/etcd/server/v3/etcdmain uses a module listed above it, which is the healthy direction.
io/etcd/server/v3/etcdmain uses io/etcd/server/v3/embed, so a change to io/etcd/server/v3/embed can break io/etcd/server/v3/etcdmain, while a change to io/etcd/server/v3/etcdmain can't break io/etcd/server/v3/embed.
Position
Below the diagonal: io/etcd/server/v3/etcdmain uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2025 — Security Misconfiguration
146
High / Critical
A05:2025 — Injection
48
High / Critical
A03:2025 — Software Supply Chain Failures
6
Medium
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: Resolve the 103 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (78), REDACTED (25); Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Procfile; Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Procfile.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 11
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 772
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 178
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 30
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 51 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 51 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 935 of 961 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a Codecov configuration (codecov.yml) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.go), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — the Go suite (10 modules) did not finish re-running within its budget: the Go suite did not finish re-running within its tier budget.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D31 IaC & Container Security — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Tools/container-images/devcontainer/REDACTED carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 11 of 12 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `server/etcdserver/server.go`, `server/storage/wal/wal.go` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — static-debian13@sha256:448810357cc8e67b7208988abdba0f5ec3d3aebee0a5b13eb624979792cffc0f: failed to resolve source metadata for gcr.io/distroless/static-debian13@sha256:448810357cc8e67b7208988abdba0f5ec3d3aebee0a5b13eb624979792cffc0f: failed to do request: Head "https://gcr.io/v2/distroless/static-debian13/manifests/sha256:448810357cc8e67b7208988abdba0f5ec3d3aebee0a5b13eb624979792cffc0f": Forbidden; runtime evidence skipped.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
53 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was command.parseWatchArgs at 46. A further 3 function(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being uberApplier.dispatch at 34 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: server/etcdserver/apply/uber_applier.go (uberApplier.dispatch at 34), server/etcdserver/api/v2store/stats.go (Stats.Inc at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 48 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 53 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with command.parseWatchArgs (cyclomatic 46), watchGRPCStream.run (cyclomatic 44), server.ioCopy (cyclomatic 41). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 53 together lifts Cyclomatic Complexity from 6.8 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 112 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 8 bodies over 60 down to 60 or less in Cognitive Complexity — start with watchGRPCStream.run (cognitive 99), serverWatchStream.sendLoop (cognitive 91), Config.setupLogging (cognitive 81). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 8 together lifts Cognitive Complexity from 5.4 to about 6.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 FileTooLong finding(s) in God Classes — start with REDACTED (2), v3_server.go, REDACTED. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 9 MethodTooLong finding(s) in God Classes — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 8 TooManyMethods finding(s) in God Classes — start with REDACTED (2), store.go, printer_simple.go. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
67 duplicated block group(s) detected. A further 87 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 12 of the 154 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
Edited copy of a member (17 corresponding lines) · ×6etcdctl/ctlv3/command/printer_fields.go:88
Edited copy of a member (14 corresponding lines) · ×6server/etcdserver/api/v3election/election.go:60
Edited copy of a member (13 corresponding lines) · ×6pkg/report/weighted.go:43
+ 70 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with printer_fields.go, election.go, interceptor.go. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with maintenance.go, v3_server.go, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 6 Edited copy of a member (17 corresponding lines) finding(s) in Code Duplication — start with printer_fields.go, REDACTED, election.go. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.5 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
11 production modules (Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence.
Off the main sequence: go.etcd.io/etcd/api/v3 · ×2
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with printer_simple.go, storage_recorder.go. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
4 outdated, 4 author-deprecated direct Go module(s), 4 pinning or checksum defect(s). 127 of 127 direct requirement(s) were graded against proxy.golang.org (0 not served there, 8 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Dependency pinned to a stale untagged commit: github.com/tmc/grpc-websocket-proxy · ×4
Outdated: github.com/creack/pty · ×4
What to do
Resolve the 4 Deprecated module finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 299 required Go module(s) use a banned license. Licences were read per module version from the licence files pkg.go.dev detects (via api.deps.dev), over every module this repository's REDACTED requires, direct and indirect, at the version the build uses. Go records no test-only scope at module level, so modules only this repository's own tests import are included. 1 of them carry no licence file that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged. 6 further module(s) carry a banned licence but are required only by a Go tool this repository declares, never by its own code, and are not charged: `github.com/OpenPeeDeeP/depguard/v2` (GPL-3.0 OR GPL-3.0-or-later), `github.com/denis-tingaikin/go-header` (GPL-3.0), `github.com/firefart/nonamedreturns` (GPL-3.0), `github.com/ldez/structtags` (GPL-3.0), `github.com/leonklingele/grouper` (GPL-3.0), `github.com/xen0n/gosmopolitan` (GPL-3.0 OR GPL-3.0-or-later).
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with wal.go. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
13 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is client/pkg/transport/listener_tls.go. Counted over 296 of the 587 production source files in this repository: 280 are under the ~2,400-byte size floor this dimension measures over, and the remaining 11 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
260 deducted task-comment markers across 77723 LoC (0.3/KLoC) → score 9.3. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment repeated across 21 filestests/integration/v3_grpc_test.go:31
What to do
Resolve the 208 TodoComment finding(s) in Explicit Debt — start with REDACTED (13), REDACTED (10), REDACTED (7). — One of this dimension's main actionable groups (208 warning-level).
Resolve the 10 FixmeComment finding(s) in Explicit Debt — start with server_test.go (6), ordering_kv_test.go (2), lease_test.go (2). — One of this dimension's main actionable groups (10 warning-level).
Resolve the 3 XxxComment finding(s) in Explicit Debt — start with v3_queue_test.go (2), v3_lock_test.go. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 46 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Procfile. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
2 of 12 build units (Go) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
30 % of calls cross a namespace and 17 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
49 finding(s): 0 critical, 3 high, 28 medium, 18 low. semgrep hit a parse error in 5 file(s) — `api/etcdserverpb/rpc.pb.go`, `scripts/test.sh` (line 275), `server/etcdserver/server.go` (line 1394, line 1657, lines 1751–1752), `server/storage/wal/wal.go` (line 179, line 246), `tools/rw-heatmaps/rw-benchmark.sh` — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 103 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (78), REDACTED (25). — One of this dimension's main actionable groups (103 warning-level).
Resolve the 38 Low IaC finding(s) in IaC & Container Security — start with REDACTED (28), REDACTED (6), REDACTED (4). — One of this dimension's main actionable groups (38 recommendation-level).
Resolve the 5 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
95 of 307 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is server/etcdserver/api/v2store/store.go. Counted over 307 of the 587 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 94 Orphaned file finding(s) in Knowledge Freshness — start with auth.go (3), kv.go (2), REDACTED (2). — One of this dimension's main actionable groups (94 recommendation-level).
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with store.go. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with etcd.go. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/4 workload(s) run every container under a seccomp profile; 0/4 declare an AppArmor/SELinux profile.
No seccomp profile · ×4REDACTED:16
What to do
Resolve the 4 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 15 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Package `main` serves requests (net/http handlers run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (data; e.g. `data` in `handler` at line 89). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — REDACTED:89
What to do
Go: guard the state handlers share with a sync.Mutex held for the whole update (`mu.Lock(); defer mu.Unlock()`), make counters sync/atomic types (atomic.Int64) and caches a sync.Map, or keep per-request data in locals and the request context. `go test -race` over a handler test confirms the race and then its fix.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`http.Post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — contrib/lock/client/client.go:63
`http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:116
`http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — REDACTED:630, server/lease/leasehttp/http.go:179, server/lease/leasehttp/http.go:244
What to do
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader4.8 / 10Weak✓ Tool-verified
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
`size` is read from the bytes being parsed at line 236 (`binary.Read`), then used to size a `make([]byte, …)` at line 239 — and nowhere in its scope is `size` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: `make` reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the runtime cannot satisfy is `fatal error: out of memory` — not a panic, so no `recover` intercepts it and the whole process dies; a 64-bit length too large to represent panics with `makeslice: len out of range` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `size` against the bytes actually remaining and a maximum the format allows before allocating. — REDACTED:239
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 5/12 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`tryReactivate` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:41
`serve` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:156
`listenAndServe` calls `tp.DialContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:285
`endpointMemoryMetrics` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:97
`write` calls `http.Post(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — contrib/lock/client/client.go:50
`ValidateSecureEndpoints` calls `t.DialContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — client/pkg/transport/tls.go:27
`DialJournal` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — client/pkg/systemd/journal.go:23
What to do
Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×20) — server/storage/wal/repair.go:37, server/storage/wal/util.go:32, REDACTED:138, …
`if err := wps.stream.Send(wresp); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — server/proxy/grpcproxy/watch.go:307
`if err := le.cp(context.Background(), &pb.LeaseCheckpointRequest{Checkpoints: cps}); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — server/lease/lessor.go:679
`if ctxErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — server/etcdserver/api/v3rpc/util.go:111
`if err := um.Unmarshal(data); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — pkg/pbutil/pbutil.go:47
`if wc, closeErr = w.newWatchClient(); closeErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — client/v3/watch.go:672
`if err := json.Unmarshal(kv.Value, &iup); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — client/v3/naming/endpoints/endpoints_impl.go:185
`if rec := recover(); rec != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — client/v3/internal/resolver/resolver.go:81
`if err := ctx.Err(); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — cache/cache.go:317
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 61 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — static-debian13@sha256:448810357cc8e67b7208988abdba0f5ec3d3aebee0a5b13eb624979792cffc0f: failed to resolve source metadata for gcr.io/distroless/static-debian13@sha256:448810357cc8e67b7208988abdba0f5ec3d3aebee0a5b13eb624979792cffc0f: failed to do request: Head "https://gcr.io/v2/distroless/static-debian13/manifests/sha256:448810357cc8e67b7208988abdba0f5ec3d3aebee0a5b13eb624979792cffc0f": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~103579 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Go not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (server), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .go, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 5 strongly-typed id(s)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (6 event-sourced shape(s) (event folds / event-recording aggregates))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (6 Go aggregate(s) recording domain events (own events-slice append / raise-record))
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Go's `++`, `--` and assignments are STATEMENTS, not expressions, so none of them can appear in a `case` expression or anywhere else in a condition, and a type switch's cases are types. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Go's type system has no nullable and non-nullable types — every pointer, map, slice and interface is nil-able at every position, there is no switch that turns null checking on, and the compiler produces no nullability warning for an operator to silence. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge server/etcdserver/api/v2store/store.go:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Boundary-crossing change coupling: etcd.go ↔ etcd_features.go server/embed/etcd.go:1— `server/embed/etcd.go` (context embed) and `server/features/etcd_features.go` (context features) sit in DIFFERENT parts of the tree yet change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `73fdbfe8` Cleanup the deprecated experimental flags for etcdserver; `5fa8c1f6` Migrate --experimental-set-member-localaddr to using feature flag; `2cd8fcce` migrate experimental-enable-lease-checkpoint and experimental-enable-… — run `git show` on any of them.
TodoComment tools/etcd-dump-metrics/main.go:184— // TODO: enable default metrics initialization in v3.1 and v3.2 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tools/etcd-dump-logs/etcd-dump-log_test.go:42— // TODO(ptabor): The test does not run by default from ./scripts/test.sh. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tools/etcd-dump-logs/etcd-dump-log_test.go:88— // TODO(ptabor): Get rid of the whitespaces both in code and the test-files. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tools/etcd-dump-db/backend.go:54— // TODO: import directly from packages, rather than copy&paste — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tools/etcd-dump-db/backend.go:152— // TODO: remove sensitive information — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tools/etcd-dump-db/backend.go:176— // TODO: revert by revision and find specified hash value — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tools/benchmark/cmd/mvcc-put.go:56— // TODO: after the PR https://github.com/spf13/cobra/pull/220 is merged, the below pprof related flags should be moved to RootCmd
TodoComment tests/robustness/validate/patch_history_test.go:427— // TODO: We can infer that failed operation finished before last operation matching following. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/robustness/validate/watch.go:268— // TODO(MadhavJivrajani): check if compaction has been run as part — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/robustness/traffic/traffic.go:181— // TODO: Validate QPS post failpoint injection to ensure that we sufficiently cover the period when the cluster recovers. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/robustness/traffic/traffic.go:407— // TODO: merge 2 key stores into 1 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/robustness/model/deterministic.go:174— // TODO: Avoid copying when TXN only has read operations — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/robustness/failpoint/cluster.go:278— // TODO: Remove preceding Get when v3.4 is no longer supported. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/robustness/failpoint/gofail.go:219— // TODO: Check gofail status (https://github.com/etcd-io/gofail/pull/47) and wait for sleep to be executed at least once.
TodoComment tests/robustness/failpoint/network.go:74— // TODO: find a way to stop all traffic — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/robustness/failpoint/trigger.go:98— // TODO: Re-enable the peer proxy for compact failpoints when we confirm the root cause. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/cluster_test.go:114— // TODO: remove the last but one member — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/cluster_test.go:338— // TODO: client should return descriptive error codes for internal errors — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/cluster_test.go:374— // TODO: client should return more descriptive error codes for internal errors — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/v3_grpc_test.go:2467— // TODO: Remove retry loop once the new grpc load balancer provides retry. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/v3_lease_test.go:44— // TODO: use customized clock to make this test go faster? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/v3_lease_test.go:461— // TODO: Consider fixing grpcproxy to properly propagate errors. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/snapshot/v3_snapshot_test.go:269— // TODO: TLS — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/clientv3/maintenance_test.go:78— // TODO: Change this to fuzz test — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment server/storage/mvcc/hash_test.go:135— // TODO: Change this to fuzz test — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Swallowed exception (caught, then discarded) server/storage/wal/repair.go:37— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/storage/wal/util.go:32— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:138— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:146— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/storage/schema/version.go:40— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/storage/schema/version.go:51— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/storage/mvcc/index.go:118— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/storage/mvcc/index.go:147— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/storage/mvcc/index.go:168— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/proxy/grpcproxy/watch.go:307— `if err := wps.stream.Send(wresp); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/lease/lessor.go:679— `if err := le.cp(context.Background(), &pb.LeaseCheckpointRequest{Checkpoints: cps}); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/etcdserver/cluster_util.go:43— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/etcdserver/txn/txn.go:275— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/etcdserver/api/v3rpc/util.go:111— `if ctxErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) server/auth/simple_token.go:235— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/pbutil/pbutil.go:47— `if err := um.Unmarshal(data); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/netutil/host_normalize.go:33— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/httputil/httputil.go:45— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) pkg/expect/expect.go:125— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) client/v3/watch.go:672— `if wc, closeErr = w.newWatchClient(); closeErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) client/v3/naming/endpoints/endpoints_impl.go:185— `if err := json.Unmarshal(kv.Value, &iup); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) client/v3/leasing/kv.go:148— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) client/v3/leasing/kv.go:165— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) client/v3/internal/resolver/resolver.go:81— `if rec := recover(); rec != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) client/v3/internal/endpoint/endpoint.go:38— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
FileTooLong: etcdserver/server.go server/etcdserver/server.go— FileTooLong — 1444 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: EtcdServer (84 blocks, 212-2459). The bar is 500 significant lines; this is 944 over it, 2.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: etcdserver/v3_server.go server/etcdserver/v3_server.go— FileTooLong — 819 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: EtcdServer (46 blocks, 107-1292). The bar is 500 significant lines; this is 319 over it, 1.64× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: embed/config.go server/embed/config.go— FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 270 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: auth/store.go server/auth/store.go— FileTooLong — 741 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: authStore (38 blocks, 244-1232). The bar is 500 significant lines; this is 241 over it, 1.48× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 656 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: server (32 blocks, 143-990). The bar is 500 significant lines; this is 156 over it, 1.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: wal/wal.go server/storage/wal/wal.go— FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 133 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: backend/backend.go server/storage/backend/backend.go— FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 124 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: v3/watch.go client/v3/watch.go— FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: watchGRPCStream (20 blocks, 157-1062). The bar is 500 significant lines; this is 119 over it, 1.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: embed/etcd.go server/embed/etcd.go— FileTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 103 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: RaftCluster (35 blocks, 43-921). The bar is 500 significant lines; this is 90 over it, 1.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: etcdserver/bootstrap.go server/etcdserver/bootstrap.go— FileTooLong — 548 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 48 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FixmeComment tests/integration/clientv3/ordering_kv_test.go:79— // FIXME: Figure out how pause SetEndpoints sufficiently that this is not needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/integration/clientv3/ordering_kv_test.go:141— // FIXME: Figure out how pause SetEndpoints sufficiently that this is not needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/common/lease_test.go:142— // FIXME: When leader changes, old leader steps — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/common/lease_test.go:191— // FIXME: When leader changes, old leader steps — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment pkg/proxy/server_test.go:86— //nolint:testifylint //FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment pkg/proxy/server_test.go:93— //nolint:testifylint //FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment pkg/proxy/server_test.go:256— //nolint:testifylint //FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment pkg/proxy/server_test.go:376— //nolint:testifylint //FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment pkg/proxy/server_test.go:481— //nolint:testifylint //FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment pkg/proxy/server_test.go:483— //nolint:testifylint //FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
MethodTooLong: server.ioCopy REDACTED:426— MethodTooLong — ioCopy runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Config.AddFlags server/embed/config.go:588— MethodTooLong — AddFlags runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: serveCtx.serve server/embed/serve.go:119— MethodTooLong — serve runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: watchGRPCStream.run client/v3/watch.go:512— MethodTooLong — run runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Config.setupLogging server/embed/config_logging.go:46— MethodTooLong — setupLogging runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: streamWriter.run server/etcdserver/api/rafthttp/stream.go:160— MethodTooLong — run runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: serverWatchStream.recvLoop REDACTED:249— MethodTooLong — recvLoop runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: uberApplier.dispatch server/etcdserver/apply/uber_applier.go:93— MethodTooLong — dispatch runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: serverWatchStream.sendLoop REDACTED:411— MethodTooLong — sendLoop runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (8 lines × 2) etcdctl/ctlv3/command/printer_fields.go:93— etcdctl/ctlv3/command/printer_fields.go:93-100 | etcdctl/ctlv3/command/printer_simple.go:68-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `etcdctl/ctlv3/command/printer_fields.go:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/etcdserver/api/v3election/election.go:61— server/etcdserver/api/v3election/election.go:61-68 | server/etcdserver/api/v3election/election.go:111-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) server/etcdserver/api/v3rpc/interceptor.go:191— server/etcdserver/api/v3rpc/interceptor.go:191-198 | server/etcdserver/api/v3rpc/interceptor.go:207-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/v3rpc/interceptor.go:191` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/etcdserver/bootstrap.go:226— server/etcdserver/bootstrap.go:226-233 | server/etcdserver/bootstrap.go:236-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/bootstrap.go:226` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) server/embed/serve.go:186— server/embed/serve.go:186-193 | server/embed/serve.go:246-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/embed/serve.go:186` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) server/etcdserver/api/rafthttp/remote.go:66— server/etcdserver/api/rafthttp/remote.go:66-73 | server/etcdserver/api/rafthttp/stream.go:541-548 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/remote.go:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/etcdserver/api/rafthttp/snapshot_sender.go:82— server/etcdserver/api/rafthttp/snapshot_sender.go:82-89 | server/etcdserver/api/rafthttp/snapshot_sender.go:131-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/snapshot_sender.go:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:689— REDACTED:689-696 | REDACTED:729-736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:689` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) server/etcdserver/api/rafthttp/pipeline.go:72— server/etcdserver/api/rafthttp/pipeline.go:72-79 | server/etcdserver/api/rafthttp/pipeline.go:85-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/pipeline.go:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
TooManyMethods: EtcdServer server/etcdserver/server.go:212— TooManyMethods — 161 methods, declared across 5 files: etcdserver/server.go (103), etcdserver/v3_server.go (47), etcdserver/interface.go (7), etcdserver/corrupt.go (3), +1 more file(s). The bar is 30 methods; this is 131 over it, 5.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: authStore server/auth/store.go:244— TooManyMethods — 39 methods, declared across 2 files: auth/store.go (37), auth/range_perm_cache.go (2). The bar is 30 methods; this is 9 over it, 1.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement auth.AuthStore (31 of 39 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: simplePrinter etcdctl/ctlv3/command/printer_simple.go:30— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. Most of these members implement command.printer (37 of 37 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: Op client/v3/op.go:32— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RaftCluster REDACTED:43— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: printerRPC etcdctl/ctlv3/command/printer.go:94— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. Most of these members implement command.printer (34 of 34 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: server REDACTED:143— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. Most of these members implement proxy.Server (30 of 34 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: applierV3backend server/etcdserver/apply/backend.go:36— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. Most of these members implement apply.applierV3 (30 of 31 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
Duplicated block (7 lines × 2) client/v3/maintenance.go:231— client/v3/maintenance.go:231-237 | client/v3/maintenance.go:274-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) server/etcdserver/v3_server.go:894— server/etcdserver/v3_server.go:894-900 | server/etcdserver/v3_server.go:919-925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/v3_server.go:894` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) REDACTED:191— REDACTED:191-197 | REDACTED:373-379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 2) client/pkg/types/urls.go:79— client/pkg/types/urls.go:79-86 | pkg/netutil/netutil.go:199-205 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) server/etcdserver/api/rafthttp/stream.go:400— server/etcdserver/api/rafthttp/stream.go:400-406 | server/etcdserver/api/rafthttp/stream.go:447-453 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/stream.go:400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) server/etcdserver/api/rafthttp/http.go:498— server/etcdserver/api/rafthttp/http.go:498-504 | server/etcdserver/api/rafthttp/http.go:512-518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/http.go:498` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) tools/rw-heatmaps/pkg/chart/heatmaps.go:277— tools/rw-heatmaps/pkg/chart/heatmaps.go:277-283 | tools/rw-heatmaps/pkg/chart/heatmaps.go:303-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
X2 · Cancellation propagation· Function without context.Context · ×7
Function without context.Context: tryReactivate REDACTED:41— `tryReactivate` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: serve REDACTED:156— `serve` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: listenAndServe REDACTED:285— `listenAndServe` calls `tp.DialContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: endpointMemoryMetrics REDACTED:97— `endpointMemoryMetrics` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: write contrib/lock/client/client.go:50— `write` calls `http.Post(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: ValidateSecureEndpoints client/pkg/transport/tls.go:27— `ValidateSecureEndpoints` calls `t.DialContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: DialJournal client/pkg/systemd/journal.go:23— `DialJournal` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×6
Edited copy of a member (17 corresponding lines) etcdctl/ctlv3/command/printer_fields.go:88— etcdctl/ctlv3/command/printer_fields.go:88-104 | etcdctl/ctlv3/command/printer_simple.go:58-79 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) REDACTED:79— REDACTED:79-95 | REDACTED:157-179 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) server/proxy/grpcproxy/election.go:46— server/proxy/grpcproxy/election.go:46-62 | server/proxy/grpcproxy/maintenance.go:42-66 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) client/pkg/fileutil/fileutil.go:101— client/pkg/fileutil/fileutil.go:101-120 | client/pkg/fileutil/preallocate.go:38-54 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) client/v3/txn.go:99— client/v3/txn.go:99-118 | client/v3/txn.go:120-136 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) server/lease/lessor.go:555— server/lease/lessor.go:555-571 | server/lease/lessor.go:582-598 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×6
Edited copy of a member (14 corresponding lines) server/etcdserver/api/v3election/election.go:60— server/etcdserver/api/v3election/election.go:60-73 | server/etcdserver/api/v3election/election.go:110-123 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) server/etcdserver/api/membership/storev2.go:124— server/etcdserver/api/membership/storev2.go:124-137 | server/etcdserver/api/membership/storev2.go:149-162 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) server/etcdserver/v3_server.go:296— server/etcdserver/v3_server.go:296-309 | server/etcdserver/v3_server.go:311-324 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) server/etcdserver/api/v3rpc/lease.go:62— server/etcdserver/api/v3rpc/lease.go:62-76 | server/etcdserver/api/v3rpc/lease.go:78-91 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) client/pkg/fileutil/lock_flock.go:25— client/pkg/fileutil/lock_flock.go:25-38 | client/pkg/fileutil/lock_linux.go:59-74 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) client/v3/cluster.go:84— client/v3/cluster.go:84-99 | client/v3/cluster.go:110-123 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×6
Edited copy of a member (13 corresponding lines) pkg/report/weighted.go:43— pkg/report/weighted.go:43-56 | pkg/report/weighted.go:58-70 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/etcdserver/api/v3rpc/interceptor.go:186— server/etcdserver/api/v3rpc/interceptor.go:186-198 | server/etcdserver/api/v3rpc/interceptor.go:202-214 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/etcdserver/v3_server.go:738— server/etcdserver/v3_server.go:738-750 | server/proxy/grpcproxy/lease.go:121-135 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) server/storage/schema/auth_roles.go:72— server/storage/schema/auth_roles.go:72-84 | server/storage/schema/auth_users.go:56-72 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) REDACTED:698— REDACTED:698-710 | REDACTED:738-750 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) cache/ringbuffer.go:130— cache/ringbuffer.go:130-142 | cache/ringbuffer.go:144-156 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×6
Edited copy of a member (8 corresponding lines) pkg/flags/unique_strings.go:47— pkg/flags/unique_strings.go:47-54 | pkg/flags/unique_urls.go:64-71 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) server/etcdserver/api/v3rpc/lease.go:44— server/etcdserver/api/v3rpc/lease.go:44-51 | server/etcdserver/api/v3rpc/maintenance.go:320-328 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) etcdctl/ctlv3/command/printer_json.go:92— etcdctl/ctlv3/command/printer_json.go:92-99 | etcdutl/etcdutl/printer_json.go:39-46 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) REDACTED:201— REDACTED:201-208 | tools/etcd-dump-db/scan.go:69-77 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) server/storage/schema/auth.go:50— server/storage/schema/auth.go:50-57 | server/storage/schema/membership.go:171-178 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) server/embed/etcd.go:896— server/embed/etcd.go:896-903 | server/embed/serve.go:84-94 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (10 lines × 2) server/etcdserver/api/rafthttp/stream.go:197— server/etcdserver/api/rafthttp/stream.go:197-206 | server/etcdserver/api/rafthttp/stream.go:226-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/etcdserver/api/rafthttp/stream.go:196` calls `WithLabelValues`, `String`, `Inc` and `server/etcdserver/api/rafthttp/stream.go:225` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) server/lease/leasehttp/http.go:80— server/lease/leasehttp/http.go:80-89 | server/lease/leasehttp/http.go:111-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) server/storage/backend/backend.go:647— server/storage/backend/backend.go:647-656 | server/storage/backend/backend.go:708-717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/storage/backend/backend.go:647` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) tools/etcd-dump-db/main.go:83— tools/etcd-dump-db/main.go:83-92 | tools/etcd-dump-db/main.go:143-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) tools/etcd-dump-db/main.go:104— tools/etcd-dump-db/main.go:104-113 | tools/etcd-dump-db/main.go:122-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) tools/rw-heatmaps/pkg/chart/line_chart.go:188— tools/rw-heatmaps/pkg/chart/line_chart.go:188-197 | tools/rw-heatmaps/pkg/chart/line_chart.go:202-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tools/rw-heatmaps/pkg/chart/line_chart.go:198` calls `Points` and `tools/rw-heatmaps/pkg/chart/line_chart.go:212` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
ClassTooLong: EtcdServer server/etcdserver/server.go:212— ClassTooLong — 1160 significant lines (blank, comment-only and punctuation-only lines excluded), 161 methods, 84 blocks, lines 212-2459. The bar is 400 significant lines; this is 760 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: server REDACTED:143— ClassTooLong — 525 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods, 32 blocks, lines 143-990. The bar is 400 significant lines; this is 125 over it, 1.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: authStore server/auth/store.go:244— ClassTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods, 38 blocks, lines 244-1232. The bar is 400 significant lines; this is 122 over it, 1.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RaftCluster REDACTED:43— ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods, 35 blocks, lines 43-921. The bar is 400 significant lines; this is 77 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Config server/embed/config.go:165— ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods, 17 blocks, lines 165-1371. The bar is 400 significant lines; this is 50 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×5
Edited copy of a member (12 corresponding lines) etcdctl/ctlv3/command/role_command.go:167— etcdctl/ctlv3/command/role_command.go:167-184 | etcdctl/ctlv3/command/role_command.go:187-198 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) client/v3/namespace/kv.go:53— client/v3/namespace/kv.go:53-68 | client/v3/namespace/kv.go:75-86 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) etcdctl/ctlv3/command/role_command.go:110— etcdctl/ctlv3/command/role_command.go:110-121 | etcdctl/ctlv3/command/role_command.go:124-135 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) etcdctl/ctlv3/command/alarm_command.go:51— etcdctl/ctlv3/command/alarm_command.go:51-62 | etcdctl/ctlv3/command/alarm_command.go:74-85 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) server/auth/range_perm_cache.go:78— server/auth/range_perm_cache.go:78-95 | server/auth/range_perm_cache.go:97-108 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) pkg/flags/flag.go:34— pkg/flags/flag.go:34-48 | pkg/flags/flag.go:52-66 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) server/embed/config.go:1296— server/embed/config.go:1296-1315 | server/embed/config.go:1317-1331 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) etcdctl/ctlv3/command/printer.go:78— etcdctl/ctlv3/command/printer.go:78-92 | etcdutl/etcdutl/printer.go:35-49 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) cache/demux.go:166— cache/demux.go:166-180 | cache/demux.go:182-197 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) server/etcdserver/api/v3rpc/auth.go:191— server/etcdserver/api/v3rpc/auth.go:191-205 | server/etcdserver/v3_server.go:1278-1292 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) client/v3/experimental/recipes/client.go:33— client/v3/experimental/recipes/client.go:33-43 | client/v3/experimental/recipes/key.go:63-74 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) server/storage/schema/membership.go:50— server/storage/schema/membership.go:50-61 | server/storage/schema/membership.go:159-169 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) client/v3/ctx.go:28— client/v3/ctx.go:28-38 | client/v3/ctx.go:41-51 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) pkg/netutil/netutil.go:207— pkg/netutil/netutil.go:207-217 | server/storage/schema/actions.go:71-82 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) REDACTED:778— REDACTED:778-790 | REDACTED:931-941 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (6 lines × 2) server/etcdserver/api/rafthttp/http.go:107— server/etcdserver/api/rafthttp/http.go:107-112 | server/etcdserver/api/rafthttp/http.go:215-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/http.go:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) server/etcdserver/corrupt.go:137— server/etcdserver/corrupt.go:137-142 | server/etcdserver/corrupt.go:148-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/corrupt.go:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) etcdctl/ctlv3/command/printer.go:169— etcdctl/ctlv3/command/printer.go:169-174 | etcdutl/etcdutl/printer.go:58-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) server/storage/schema/lease.go:81— server/storage/schema/lease.go:81-86 | tools/etcd-dump-db/backend.go:81-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) server/etcdserver/server.go:473— server/etcdserver/server.go:473-478 | server/etcdserver/server.go:511-517 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/server.go:473` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/etcdserver/server.go:520` calls `Int` and `server/etcdserver/server.go:481` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Outbound HTTP without resilience contrib/lock/client/client.go:63— `http.Post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:116— `http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:630— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience server/lease/leasehttp/http.go:179— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience server/lease/leasehttp/http.go:244— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Deprecated module: github.com/golang/protobuf — `github.com/golang/protobuf` is required at v1.5.4 in api/go.mod, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
Deprecated module: github.com/golang/protobuf — `github.com/golang/protobuf` is required at v1.5.4 in client/v3/go.mod, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
Deprecated module: github.com/golang/protobuf — `github.com/golang/protobuf` is required at v1.5.4 in REDACTED, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
Deprecated module: github.com/golang/protobuf — `github.com/golang/protobuf` is required at v1.5.4 in server/go.mod, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×4
Dependency pinned to a stale untagged commit: github.com/tmc/grpc-websocket-proxy — Direct dependency `github.com/tmc/grpc-websocket-proxy` is required at `v0.0.0-20220101234140-673ab2c3ae75` in server/go.mod — a pseudo-version, which pins an UNTAGGED commit from 2022-01-01, 4.9 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/tmc/grpc-websocket-proxy` and has not moved this requirement in 4.9 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/tmc/grpc-websocket-proxy` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/xiang90/probing — Direct dependency `github.com/xiang90/probing` is required at `v0.0.0-20221125231312-a49e3df8f510` in server/go.mod — a pseudo-version, which pins an UNTAGGED commit from 2022-11-25, 4 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/xiang90/probing` and has not moved this requirement in 4 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/xiang90/probing` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/appscodelabs/license-bill-of-materials — Direct dependency `github.com/appscodelabs/license-bill-of-materials` is required at `v0.0.0-20220707232035-6018e0c5287c` in tools/mod/go.mod — a pseudo-version, which pins an UNTAGGED commit from 2022-07-07, 4.4 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/appscodelabs/license-bill-of-materials` and has not moved this requirement in 4.4 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/appscodelabs/license-bill-of-materials` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: go.etcd.io/protodoc — Direct dependency `go.etcd.io/protodoc` is required at `v0.0.0-20180829002748-484ab544e116` in tools/mod/go.mod — a pseudo-version, which pins an UNTAGGED commit from 2018-08-29, 8.2 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `go.etcd.io/protodoc` and has not moved this requirement in 8.2 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `go.etcd.io/protodoc` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
TooManyFields: Config server/embed/config.go:165— TooManyFields — 85 stored fields beside 21 methods. The bar is 30 stored fields; this is 55 over it, 2.83× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ServerConfig server/config/config.go:42— TooManyFields — 57 stored fields beside 14 methods. The bar is 30 stored fields; this is 27 over it, 1.90× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: EtcdServer server/etcdserver/server.go:212— TooManyFields — 46 stored fields beside 161 methods. The bar is 30 stored fields; this is 16 over it, 1.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: server REDACTED:143— TooManyFields — 32 stored fields beside 34 methods. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×4
Edited copy of a member (24 corresponding lines) etcdctl/ctlv3/command/downgrade_command.go:76— etcdctl/ctlv3/command/downgrade_command.go:76-99 | etcdctl/ctlv3/command/downgrade_command.go:102-125 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) server/proxy/grpcproxy/lease.go:55— server/proxy/grpcproxy/lease.go:55-78 | server/proxy/grpcproxy/watch.go:54-81 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) server/etcdserver/api/v3discovery/discovery.go:98— server/etcdserver/api/v3discovery/discovery.go:98-121 | server/etcdserver/api/v3discovery/discovery.go:130-153 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) tools/rw-heatmaps/pkg/chart/heatmaps.go:276— tools/rw-heatmaps/pkg/chart/heatmaps.go:276-299 | tools/rw-heatmaps/pkg/chart/heatmaps.go:302-333 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×4
Edited copy of a member (7 corresponding lines) server/proxy/grpcproxy/kv.go:82— server/proxy/grpcproxy/kv.go:82-88 | server/proxy/grpcproxy/kv.go:90-96 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) server/storage/wal/wal.go:602— server/storage/wal/wal.go:602-609 | tools/etcd-dump-logs/main.go:175-181 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) server/storage/schema/auth_roles.go:51— server/storage/schema/auth_roles.go:51-62 | server/storage/schema/auth_users.go:40-46 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) server/etcdserver/api/membership/store.go:51— server/etcdserver/api/membership/store.go:51-57 | server/storage/schema/membership.go:180-186 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) client/v3/experimental/recipes/priority_queue.go:67— client/v3/experimental/recipes/priority_queue.go:67-80 | client/v3/experimental/recipes/queue.go:64-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/v3/experimental/recipes/priority_queue.go:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) etcdctl/ctlv3/command/downgrade_command.go:77— etcdctl/ctlv3/command/downgrade_command.go:77-90 | etcdctl/ctlv3/command/downgrade_command.go:103-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) server/storage/wal/wal.go:654— server/storage/wal/wal.go:654-667 | server/storage/wal/wal.go:728-741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/storage/wal/wal.go:654` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (14 lines × 2) server/etcdserver/api/v3discovery/discovery.go:100— server/etcdserver/api/v3discovery/discovery.go:100-113 | server/etcdserver/api/v3discovery/discovery.go:132-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/v3discovery/discovery.go:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (13 lines × 2) server/auth/store.go:625— server/auth/store.go:625-637 | server/auth/store.go:738-750 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/auth/store.go:625` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/auth/store.go:734` calls `UnsafeDeleteRole`, `UnsafeGetAllUsers` and `server/auth/store.go:623` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) server/etcdserver/api/v3discovery/discovery.go:278— server/etcdserver/api/v3discovery/discovery.go:278-290 | server/etcdserver/api/v3discovery/discovery.go:385-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/v3discovery/discovery.go:278` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) server/etcdserver/cluster_util.go:244— server/etcdserver/cluster_util.go:244-256 | server/etcdserver/cluster_util.go:384-396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/cluster_util.go:244` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) server/proxy/grpcproxy/lease.go:63— server/proxy/grpcproxy/lease.go:63-75 | server/proxy/grpcproxy/watch.go:65-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/proxy/grpcproxy/lease.go:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/proxy/grpcproxy/watch.go:78` calls `stop` and `server/proxy/grpcproxy/lease.go:76` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
XxxComment tests/integration/clientv3/experimental/recipes/v3_lock_test.go:292— // XXX switch tests to use TB interface — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tests/integration/clientv3/experimental/recipes/v3_queue_test.go:83— // XXX switch tests to use TB interface — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment tests/integration/clientv3/experimental/recipes/v3_queue_test.go:133— // XXX switch tests to use TB interface — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (8 lines × 3) etcdctl/ctlv3/command/elect_command.go:74— etcdctl/ctlv3/command/elect_command.go:74-81 | etcdctl/ctlv3/command/elect_command.go:108-115 | etcdctl/ctlv3/command/lock_command.go:80-88 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `etcdctl/ctlv3/command/elect_command.go:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) etcdctl/ctlv3/command/member_command.go:187— etcdctl/ctlv3/command/member_command.go:187-194 | etcdctl/ctlv3/command/member_command.go:207-214 | etcdctl/ctlv3/command/member_command.go:250-257 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) server/etcdserver/api/rafthttp/stream.go:198— server/etcdserver/api/rafthttp/stream.go:198-205 | server/etcdserver/api/rafthttp/stream.go:227-234 | server/etcdserver/api/rafthttp/stream.go:269-276 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/etcdserver/api/rafthttp/stream.go:196` calls `WithLabelValues`, `String`, `Inc` and `server/etcdserver/api/rafthttp/stream.go:225` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) REDACTED:563— REDACTED:563-567 | REDACTED:572-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:563` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) server/etcdserver/v3_server.go:116— server/etcdserver/v3_server.go:116-120 | server/etcdserver/v3_server.go:167-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/v3_server.go:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/etcdserver/v3_server.go:115` calls `Bool`, `GetKeysOnly` and `server/etcdserver/v3_server.go:166` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) server/etcdserver/api/rafthttp/stream.go:534— server/etcdserver/api/rafthttp/stream.go:534-538 | server/etcdserver/api/rafthttp/stream.go:545-549 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/stream.go:534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) server/etcdserver/v3_server.go:892— server/etcdserver/v3_server.go:892-907 | server/etcdserver/v3_server.go:917-932 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) server/etcdserver/server.go:1435— server/etcdserver/server.go:1435-1450 | server/etcdserver/server.go:1646-1661 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) client/v3/ordering/kv.go:55— client/v3/ordering/kv.go:55-79 | client/v3/ordering/kv.go:135-157 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) pkg/adt/interval_tree.go:585— pkg/adt/interval_tree.go:585-607 | pkg/adt/interval_tree.go:630-652 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×2
Edited copies of one member (4 members, 7+ corresponding lines) server/proxy/grpcproxy/adapter/election_client_adapter.go:64— server/proxy/grpcproxy/adapter/election_client_adapter.go:64-70 | server/proxy/grpcproxy/adapter/lease_client_adapter.go:66-72 | server/proxy/grpcproxy/adapter/maintenance_client_adapter.go:76-82 | server/proxy/grpcproxy/adapter/watch_client_adapter.go:51-57 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 7+ corresponding lines) server/proxy/grpcproxy/adapter/election_client_adapter.go:76— server/proxy/grpcproxy/adapter/election_client_adapter.go:76-82 | server/proxy/grpcproxy/adapter/lease_client_adapter.go:78-84 | server/proxy/grpcproxy/adapter/maintenance_client_adapter.go:88-94 | server/proxy/grpcproxy/adapter/watch_client_adapter.go:63-69 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (22 lines × 2) server/etcdserver/api/v2store/node.go:272— server/etcdserver/api/v2store/node.go:272-293 | server/etcdserver/api/v2store/node_extern.go:43-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `server/etcdserver/api/v2store/node_extern.go:39` calls `loadInternalNode`, `IsDir` and `server/etcdserver/api/v2store/node.go:270` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (22 lines × 2) server/etcdserver/cluster_util.go:258— server/etcdserver/cluster_util.go:258-279 | server/etcdserver/cluster_util.go:398-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) client/v3/concurrency/mutex.go:53— client/v3/concurrency/mutex.go:53-63 | client/v3/concurrency/mutex.go:76-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) etcdctl/ctlv3/command/elect_command.go:69— etcdctl/ctlv3/command/elect_command.go:69-79 | etcdctl/ctlv3/command/elect_command.go:103-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `etcdctl/ctlv3/command/elect_command.go:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) etcdctl/ctlv3/command/member_command.go:188— etcdctl/ctlv3/command/member_command.go:188-196 | etcdctl/ctlv3/command/member_command.go:251-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `etcdctl/ctlv3/command/member_command.go:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) tools/etcd-dump-metrics/main.go:95— tools/etcd-dump-metrics/main.go:95-103 | tools/etcd-dump-metrics/main.go:109-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tools/etcd-dump-metrics/main.go:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) REDACTED:669— REDACTED:669-680 | REDACTED:695-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:669` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) tools/etcd-dump-metrics/install_darwin.go:33— tools/etcd-dump-metrics/install_darwin.go:33-44 | tools/etcd-dump-metrics/install_linux.go:33-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (5 lines × 3) server/etcdserver/api/rafthttp/peer.go:253— server/etcdserver/api/rafthttp/peer.go:253-257 | server/etcdserver/api/rafthttp/remote.go:59-63 | server/etcdserver/api/rafthttp/remote.go:70-74 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/peer.go:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `server/etcdserver/api/rafthttp/peer.go:260` calls `String` and `server/etcdserver/api/rafthttp/remote.go:66` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) server/etcdserver/corrupt.go:133— server/etcdserver/corrupt.go:133-137 | server/etcdserver/corrupt.go:144-148 | server/etcdserver/corrupt.go:155-159 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/corrupt.go:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: go.etcd.io/etcd/api/v3 — go.etcd.io/etcd/api/v3: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: go.etcd.io/etcd/client/pkg/v3 — go.etcd.io/etcd/client/pkg/v3: abstractness 0.12, instability 0.00, distance 0.88 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Low cohesion: simplePrinter (LCOM4 15) etcdctl/ctlv3/command/printer_simple.go:30— simplePrinter's methods fall into 15 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 15 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: StorageRecorder (LCOM4 4) server/mock/mockstorage/storage_recorder.go:25— StorageRecorder's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Stateful package: main REDACTED:89— Package `main` serves requests (net/http handlers run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (data; e.g. `data` in `handler` at line 89). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
command.parseWatchArgs (cyclomatic 46) etcdctl/ctlv3/command/watch_command.go:200— command.parseWatchArgs has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
watchGRPCStream.run (cyclomatic 44) client/v3/watch.go:512— watchGRPCStream.run has cyclomatic complexity 44 (threshold 15). Of this number, 38 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
server.ioCopy (cyclomatic 41) REDACTED:426— server.ioCopy has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Config.Validate (cyclomatic 39) server/embed/config.go:926— Config.Validate has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
serverWatchStream.sendLoop (cyclomatic 36) REDACTED:411— serverWatchStream.sendLoop has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TLSInfo.baseConfig (cyclomatic 35) REDACTED:368— TLSInfo.baseConfig has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body's own statements and 12 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
serverWatchStream.recvLoop (cyclomatic 34) REDACTED:249— serverWatchStream.recvLoop has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
command.getGetOp (cyclomatic 32) etcdctl/ctlv3/command/get_command.go:122— command.getGetOp has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
embed.configureClientListeners (cyclomatic 31) server/embed/etcd.go:644— embed.configureClientListeners has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Config.setupLogging (cyclomatic 31) server/embed/config_logging.go:46— Config.setupLogging has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
raftNode.start (cyclomatic 31) server/etcdserver/raft.go:174— raftNode.start has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
configYAML.configFromFile (cyclomatic 29) server/embed/config.go:766— configYAML.configFromFile has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
server.listenAndServe (cyclomatic 27) REDACTED:285— server.listenAndServe has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clientv3.newClient (cyclomatic 26) client/v3/client.go:362— clientv3.newClient has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
serveCtx.serve (cyclomatic 26) server/embed/serve.go:119— serveCtx.serve has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RaftCluster.ValidateConfigurationChange (cyclomatic 26) REDACTED:306— RaftCluster.ValidateConfigurationChange has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WAL.ReadAll (cyclomatic 26) server/storage/wal/wal.go:477— WAL.ReadAll has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
command.makeMirror (cyclomatic 24) etcdctl/ctlv3/command/make_mirror_command.go:142— command.makeMirror has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
v3rpc.logUnaryRequestStats (cyclomatic 24) server/etcdserver/api/v3rpc/interceptor.go:91— v3rpc.logUnaryRequestStats has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
streamWriter.run (cyclomatic 23) server/etcdserver/api/rafthttp/stream.go:160— streamWriter.run has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
embed.StartEtcd (cyclomatic 22) server/embed/etcd.go:110— embed.StartEtcd has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
etcdmain.startEtcdOrProxyV2 (cyclomatic 22) server/etcdmain/etcd.go:43— etcdmain.startEtcdOrProxyV2 has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
v3rpc.checkIntervals (cyclomatic 21) server/etcdserver/api/v3rpc/key.go:236— v3rpc.checkIntervals has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
watchGRPCStream.serveSubstream (cyclomatic 20) client/v3/watch.go:789— watchGRPCStream.serveSubstream has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
leaseHandler.ServeHTTP (cyclomatic 20) server/lease/leasehttp/http.go:58— leaseHandler.ServeHTTP has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wal.Create (cyclomatic 20) server/storage/wal/wal.go:101— wal.Create has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wal.Verify (cyclomatic 20) server/storage/wal/wal.go:709— wal.Verify has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
msgAppV2Encoder.encode (cyclomatic 19) REDACTED:87— msgAppV2Encoder.encode has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cache.Watch (cyclomatic 18) cache/cache.go:116— Cache.Watch has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 143). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
command.newCheckDatascaleCommand (cyclomatic 18) REDACTED:315— command.newCheckDatascaleCommand has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
command.epHealthCommandFunc (cyclomatic 18) etcdctl/ctlv3/command/ep_command.go:95— command.epHealthCommandFunc has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 118). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
v3Manager.copyAndVerifyDB (cyclomatic 18) REDACTED:434— v3Manager.copyAndVerifyDB has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EtcdServer.LeaseRenew (cyclomatic 18) server/etcdserver/v3_server.go:489— EtcdServer.LeaseRenew has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: etcdserver.getRequestType (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
fileutil.purgeFile (cyclomatic 17) client/pkg/fileutil/purge.go:44— fileutil.purgeFile has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 55). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Election.observe (cyclomatic 17) client/v3/concurrency/election.go:173— Election.observe has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
command.newCheckPerfCommand (cyclomatic 17) REDACTED:143— command.newCheckPerfCommand has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
v3Manager.Status (cyclomatic 17) REDACTED:116— v3Manager.Status has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
EtcdServer.run (cyclomatic 17) server/etcdserver/server.go:751— EtcdServer.run has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
watcher.send (cyclomatic 17) server/proxy/grpcproxy/watcher.go:55— watcher.send has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
backend.catchUpDefrag (cyclomatic 17) server/storage/backend/backend.go:960— backend.catchUpDefrag has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
decoder.decodeRecord (cyclomatic 17) server/storage/wal/decoder.go:88— decoder.decodeRecord has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
watcher.Watch (cyclomatic 16) client/v3/watch.go:304— watcher.Watch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
v3Manager.Restore (cyclomatic 16) REDACTED:255— v3Manager.Restore has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
accessController.ServeHTTP (cyclomatic 16) server/embed/serve.go:444— accessController.ServeHTTP has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
etcdmain.startGateway (cyclomatic 16) server/etcdmain/gateway.go:93— etcdmain.startGateway has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
etcdmain.checkArgs (cyclomatic 16) REDACTED:291— etcdmain.checkArgs has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
streamReader.dial (cyclomatic 16) server/etcdserver/api/rafthttp/stream.go:569— streamReader.dial has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
apply.checkTxnReqsPermission (cyclomatic 16) server/etcdserver/apply/auth.go:140— apply.checkTxnReqsPermission has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EtcdServer.applyConfChange (cyclomatic 16) server/etcdserver/server.go:2002— EtcdServer.applyConfChange has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EtcdServer.rangeStream (cyclomatic 16) server/etcdserver/v3_server.go:198— EtcdServer.rangeStream has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: etcdserver.getRequestType (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
leaseProxy.LeaseKeepAlive (cyclomatic 16) server/proxy/grpcproxy/lease.go:137— leaseProxy.LeaseKeepAlive has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
backend.defragdbAndTrackLastKeys (cyclomatic 16) server/storage/backend/backend.go:862— backend.defragdbAndTrackLastKeys has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WAL.cut (cyclomatic 16) server/storage/wal/wal.go:790— WAL.cut has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Hotspot: server/storage/wal/wal.go server/storage/wal/wal.go:101— server/storage/wal/wal.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in wal.Create at line 101. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 17:17:52 +00:00' --until='2026-11-12 17:17:52 +00:00' --full-history --no-merges -- server/storage/wal/wal.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
TodoComment repeated across 21 files tests/integration/v3_grpc_test.go:31— The identical TodoComment appears in 21 files (39 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 39 independent debts. Fix the systemic cause once rather than file-by-file. Text: "//nolint:staticcheck // TODO: remove for a supported version". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
watchGRPCStream.run (cognitive 99) client/v3/watch.go:512— watchGRPCStream.run has cognitive complexity 99 (threshold 15). Drivers by points: if/else 24 (83 pts), match/switch 3 (8 pts), boolean chains 4, loops 4 (nesting depth added 64). Of this number, 91 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serverWatchStream.sendLoop (cognitive 91) REDACTED:411— serverWatchStream.sendLoop has cognitive complexity 91 (threshold 15). Drivers by points: if/else 21 (67 pts), loops 7 (15 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 55). Of this number, 87 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config.setupLogging (cognitive 81) server/embed/config_logging.go:46— Config.setupLogging has cognitive complexity 81 (threshold 15). Drivers by points: if/else 25 (65 pts), loops 4 (12 pts), match/switch 2 (4 pts) (nesting depth added 50). Of this number, 73 points are the body's own statements and 8 belong to one function literal inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
raftNode.start (cognitive 81) server/etcdserver/raft.go:174— raftNode.start has cognitive complexity 81 (threshold 15). Drivers by points: if/else 20 (62 pts), match/switch 4 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 54). None of this is in the body itself: all 81 points belong to one function literal inside it that branches (line 177). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
serverWatchStream.recvLoop (cognitive 80) REDACTED:249— serverWatchStream.recvLoop has cognitive complexity 80 (threshold 15). Drivers by points: if/else 18 (56 pts), match/switch 6 (22 pts), boolean chains 1, loops 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.parseWatchArgs (cognitive 73) etcdctl/ctlv3/command/watch_command.go:200— command.parseWatchArgs has cognitive complexity 73 (threshold 15). Drivers by points: if/else 29 (56 pts), loops 6 (10 pts), boolean chains 7 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server.ioCopy (cognitive 73) REDACTED:426— server.ioCopy has cognitive complexity 73 (threshold 15). Drivers by points: match/switch 15 (42 pts), if/else 12 (30 pts), loops 1 (nesting depth added 45). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
server.listenAndServe (cognitive 63) REDACTED:285— server.listenAndServe has cognitive complexity 63 (threshold 15). Drivers by points: match/switch 11 (43 pts), if/else 8 (19 pts), loops 1 (nesting depth added 43). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RaftCluster.ValidateConfigurationChange (cognitive 58) REDACTED:306— RaftCluster.ValidateConfigurationChange has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 6 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streamWriter.run (cognitive 52) server/etcdserver/api/rafthttp/stream.go:160— streamWriter.run has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (45 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TLSInfo.baseConfig (cognitive 48) REDACTED:368— TLSInfo.baseConfig has cognitive complexity 48 (threshold 15). Drivers by points: if/else 27 (37 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 13). Of this number, 24 points are the body's own statements and 24 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serveCtx.serve (cognitive 48) server/embed/serve.go:119— serveCtx.serve has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (44 pts), boolean chains 2, match/switch 2 (nesting depth added 23). Of this number, 42 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.makeMirror (cognitive 47) etcdctl/ctlv3/command/make_mirror_command.go:142— command.makeMirror has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 5 (9 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 25). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
embed.configureClientListeners (cognitive 46) server/embed/etcd.go:644— embed.configureClientListeners has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 9, loops 5 (6 pts) (nesting depth added 16). Of this number, 43 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
v3rpc.checkIntervals (cognitive 43) server/etcdserver/api/v3rpc/key.go:236— v3rpc.checkIntervals has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Election.observe (cognitive 41) client/v3/concurrency/election.go:173— Election.observe has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 5 (13 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
backend.catchUpDefrag (cognitive 41) server/storage/backend/backend.go:960— backend.catchUpDefrag has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 25). Of this number, 40 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WAL.ReadAll (cognitive 41) server/storage/wal/wal.go:477— WAL.ReadAll has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fileutil.purgeFile (cognitive 40) client/pkg/fileutil/purge.go:44— fileutil.purgeFile has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 25). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to one function literal inside it that branches (line 55). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
watchGRPCStream.serveSubstream (cognitive 40) client/v3/watch.go:789— watchGRPCStream.serveSubstream has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (37 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 23). Of this number, 37 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config.Validate (cognitive 40) server/embed/config.go:926— Config.Validate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 28 (31 pts), boolean chains 6, loops 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
msgAppV2Encoder.encode (cognitive 39) REDACTED:87— msgAppV2Encoder.encode has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
configYAML.configFromFile (cognitive 37) server/embed/config.go:766— configYAML.configFromFile has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24 (32 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
v3rpc.logUnaryRequestStats (cognitive 37) server/etcdserver/api/v3rpc/interceptor.go:91— v3rpc.logUnaryRequestStats has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 2 (8 pts), boolean chains 2, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
intervalTree.deleteFixup (cognitive 36) pkg/adt/interval_tree.go:361— intervalTree.deleteFixup has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 3, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
apply.checkTxnReqsPermission (cognitive 34) server/etcdserver/apply/auth.go:140— apply.checkTxnReqsPermission has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (31 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EtcdServer.LeaseRenew (cognitive 34) server/etcdserver/v3_server.go:489— EtcdServer.LeaseRenew has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clientv3.newClient (cognitive 31) client/v3/client.go:362— clientv3.newClient has cognitive complexity 31 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
command.epHealthCommandFunc (cognitive 31) etcdctl/ctlv3/command/ep_command.go:95— command.epHealthCommandFunc has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (7 pts), match/switch 1 (5 pts), boolean chains 2 (nesting depth added 14). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 118). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
etcdmain.startEtcdOrProxyV2 (cognitive 31) server/etcdmain/etcd.go:43— etcdmain.startEtcdOrProxyV2 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
leaseHandler.ServeHTTP (cognitive 31) server/lease/leasehttp/http.go:58— leaseHandler.ServeHTTP has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 3 (5 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.getGetOp (cognitive 30) etcdctl/ctlv3/command/get_command.go:122— command.getGetOp has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 3, match/switch 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
leaseProxyStream.keepAliveLoop (cognitive 30) server/proxy/grpcproxy/lease.go:276— leaseProxyStream.keepAliveLoop has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 2 (7 pts), loops 2 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mvcc.restoreIntoIndex (cognitive 30) server/storage/mvcc/kvstore.go:444— mvcc.restoreIntoIndex has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 17). None of this is in the body itself: all 30 points belong to one function literal inside it that branches (line 446). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
v3Manager.Status (cognitive 29) REDACTED:116— v3Manager.Status has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 2 (nesting depth added 12). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
msgAppV2Decoder.decode (cognitive 29) REDACTED:179— msgAppV2Decoder.decode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streamReader.decodeLoop (cognitive 29) server/etcdserver/api/rafthttp/stream.go:471— streamReader.decodeLoop has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 3 (4 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EtcdServer.rangeStream (cognitive 29) server/etcdserver/v3_server.go:198— EtcdServer.rangeStream has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wal.Repair (cognitive 28) server/storage/wal/repair.go:32— wal.Repair has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (24 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lessor.recvKeepAliveLoop (cognitive 27) client/v3/lease.go:456— lessor.recvKeepAliveLoop has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 17). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streamReader.run (cognitive 27) server/etcdserver/api/rafthttp/stream.go:396— streamReader.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
decoder.decodeRecord (cognitive 26) server/storage/wal/decoder.go:88— decoder.decodeRecord has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cache.Watch (cognitive 25) cache/cache.go:116— Cache.Watch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 3 (10 pts), loops 1 (nesting depth added 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 143). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
transport.isHostInDNS (cognitive 25) client/pkg/transport/listener_tls.go:254— transport.isHostInDNS has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 6 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
embed.StartEtcd (cognitive 25) server/embed/etcd.go:110— embed.StartEtcd has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (20 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). Of this number, 20 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
txn.executeTxn (cognitive 25) server/etcdserver/txn/txn.go:135— txn.executeTxn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TCPProxy.runMonitor (cognitive 25) REDACTED:196— TCPProxy.runMonitor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 17). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 205). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
backend.defragdbAndTrackLastKeys (cognitive 25) server/storage/backend/backend.go:862— backend.defragdbAndTrackLastKeys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 1, loops 1 (nesting depth added 10). Of this number, 15 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wal.Verify (cognitive 25) server/storage/wal/wal.go:709— wal.Verify has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 10). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
endpointManager.watch (cognitive 24) client/v3/naming/endpoints/endpoints_impl.go:125— endpointManager.watch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdserver.getClusterFromRemotePeers (cognitive 24) server/etcdserver/cluster_util.go:69— etcdserver.getClusterFromRemotePeers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventHistory.scan (cognitive 24) server/etcdserver/api/v2store/event_history.go:58— EventHistory.scan has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EtcdServer.applyConfChange (cognitive 24) server/etcdserver/server.go:2002— EtcdServer.applyConfChange has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EtcdServer.leaseTimeToLive (cognitive 24) server/etcdserver/v3_server.go:637— EtcdServer.leaseTimeToLive has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watchableStore.moveVictims (cognitive 24) server/storage/mvcc/watchable_store.go:285— watchableStore.moveVictims has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
leasingKV.monitorLease (cognitive 23) client/v3/leasing/kv.go:159— leasingKV.monitorLease has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watcher.Watch (cognitive 23) client/v3/watch.go:304— watcher.Watch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdmain.startGateway (cognitive 23) server/etcdmain/gateway.go:93— etcdmain.startGateway has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Request.Unmarshal (cognitive 23) server/internal/legacyv2/legacyv2.go:39— Request.Unmarshal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.newCheckPerfCommand (cognitive 22) REDACTED:143— command.newCheckPerfCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, loops 7 (10 pts) (nesting depth added 3). Of this number, 18 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
simplePrinter.RoleGet (cognitive 22) etcdctl/ctlv3/command/printer_simple.go:206— simplePrinter.RoleGet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (nesting depth added 6). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdmain.startGRPCProxy (cognitive 22) REDACTED:189— etcdmain.startGRPCProxy has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rafthttp.startPeer (cognitive 22) server/etcdserver/api/rafthttp/peer.go:131— rafthttp.startPeer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 2 (4 pts), loops 2 (nesting depth added 12). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 174, 192, 135). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
pipeline.handle (cognitive 22) server/etcdserver/api/rafthttp/pipeline.go:94— pipeline.handle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
raftNode.processMessages (cognitive 22) server/etcdserver/raft.go:357— raftNode.processMessages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 1 (3 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TCPProxy.pick (cognitive 22) REDACTED:99— TCPProxy.pick has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watcher.send (cognitive 22) server/storage/mvcc/watchable_store.go:577— watcher.send has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 11). Of this number, 16 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.memberAddCommandFunc (cognitive 21) etcdctl/ctlv3/command/member_command.go:126— command.memberAddCommandFunc has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
v3Manager.copyAndVerifyDB (cognitive 21) REDACTED:434— v3Manager.copyAndVerifyDB has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
command.newCheckDatascaleCommand (cognitive 20) REDACTED:315— command.newCheckDatascaleCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, loops 6 (9 pts) (nesting depth added 3). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
command.userAddCommandFunc (cognitive 20) etcdctl/ctlv3/command/user_command.go:127— command.userAddCommandFunc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (20 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.watchInteractiveFunc (cognitive 20) etcdctl/ctlv3/command/watch_command.go:95— command.watchInteractiveFunc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
intervalTree.insertFixup (cognitive 20) pkg/adt/interval_tree.go:520— intervalTree.insertFixup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdhttp.writeError (cognitive 20) server/etcdserver/api/etcdhttp/utils.go:40— etcdhttp.writeError has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
membership.IsMetaStoreOnly (cognitive 20) server/etcdserver/api/membership/storev2.go:45— membership.IsMetaStoreOnly has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
corruptionChecker.checkPeerHashes (cognitive 20) server/etcdserver/corrupt.go:302— corruptionChecker.checkPeerHashes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watcher.send (cognitive 20) server/proxy/grpcproxy/watcher.go:55— watcher.send has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wal.Create (cognitive 20) server/storage/wal/wal.go:101— wal.Create has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19 (20 pts) (nesting depth added 1). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
intervalTree.Insert (cognitive 19) pkg/adt/interval_tree.go:442— intervalTree.Insert has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExpectProcess.ExpectFunc (cognitive 19) pkg/expect/expect.go:162— ExpectProcess.ExpectFunc has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), match/switch 2 (3 pts) (nesting depth added 8). Of this number, 12 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Trace.logInfo (cognitive 19) REDACTED:199— Trace.logInfo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
embed.configurePeerListeners (cognitive 19) server/embed/etcd.go:530— embed.configurePeerListeners has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2, boolean chains 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
accessController.ServeHTTP (cognitive 19) server/embed/serve.go:444— accessController.ServeHTTP has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
v3rpc.monitorLeader (cognitive 19) server/etcdserver/api/v3rpc/interceptor.go:315— v3rpc.monitorLeader has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 12). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 320). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
LeaseServer.leaseKeepAlive (cognitive 19) server/etcdserver/api/v3rpc/lease.go:111— LeaseServer.leaseKeepAlive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Read.requestCurrentIndex (cognitive 19) server/etcdserver/read/read.go:148— Read.requestCurrentIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EtcdServer.run (cognitive 19) server/etcdserver/server.go:751— EtcdServer.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 765, 793). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
wal.visitEntryData (cognitive 19) REDACTED:105— wal.visitEntryData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Client.unaryClientInterceptor (cognitive 18) client/v3/retry_interceptor.go:41— Client.unaryClientInterceptor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (nesting depth added 9). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 43). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
command.getDelOp (cognitive 18) etcdctl/ctlv3/command/del_command.go:63— command.getDelOp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flags.verifyEnv (cognitive 18) pkg/flags/flag.go:73— flags.verifyEnv has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdserver.promoteMemberHTTP (cognitive 18) server/etcdserver/cluster_util.go:295— etcdserver.promoteMemberHTTP has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
etcdserver.NewServer (cognitive 18) server/etcdserver/server.go:299— etcdserver.NewServer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (nesting depth added 4). Of this number, 14 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rafthttp.monitorProbingStatus (cognitive 18) server/etcdserver/api/rafthttp/probing_status.go:60— rafthttp.monitorProbingStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
node.Remove (cognitive 18) server/etcdserver/api/v2store/node.go:206— node.Remove has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
corruptionChecker.InitialCheck (cognitive 18) server/etcdserver/corrupt.go:90— corruptionChecker.InitialCheck has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
backend.defragdb (cognitive 18) server/storage/backend/backend.go:796— backend.defragdb has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). Of this number, 9 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.restore (cognitive 18) server/storage/mvcc/kvstore.go:327— store.restore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watchableStore.syncWatchers (cognitive 18) server/storage/mvcc/watchable_store.go:347— watchableStore.syncWatchers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
srv.GetCluster (cognitive 17) client/pkg/srv/srv.go:35— srv.GetCluster has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2, boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 51). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TLSInfo.ClientConfig (cognitive 17) REDACTED:562— TLSInfo.ClientConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lessor.closeRequireLeader (cognitive 17) client/v3/lease.go:383— lessor.closeRequireLeader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auth.getMergedPerms (cognitive 17) server/auth/range_perm_cache.go:24— auth.getMergedPerms has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdserver.recoverSnapshot (cognitive 17) server/etcdserver/bootstrap.go:441— etcdserver.recoverSnapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streamReader.dial (cognitive 17) server/etcdserver/api/rafthttp/stream.go:569— streamReader.dial has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Periodic.Run (cognitive 17) server/etcdserver/api/v3compactor/periodic.go:100— Periodic.Run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 105). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
storeTxnCommon.rangeKeys (cognitive 17) server/storage/mvcc/kvstore_txn.go:73— storeTxnCommon.rangeKeys has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cache.validateRange (cognitive 16) cache/cache.go:478— Cache.validateRange has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Demux.updateStoreLocked (cognitive 16) cache/demux.go:199— Demux.updateStoreLocked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transport.SelfCert (cognitive 16) REDACTED:220— transport.SelfCert has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DoubleBarrier.Leave (cognitive 16) client/v3/experimental/recipes/double_barrier.go:112— DoubleBarrier.Leave has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
leasing.evalCmp (cognitive 16) client/v3/leasing/util.go:36— leasing.evalCmp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
v3Manager.Restore (cognitive 16) REDACTED:255— v3Manager.Restore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Etcd.Close (cognitive 16) server/embed/etcd.go:413— Etcd.Close has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
etcdserver.openWALFromSnapshot (cognitive 16) server/etcdserver/bootstrap.go:667— etcdserver.openWALFromSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Snapshotter.ReleaseSnapDBs (cognitive 16) server/etcdserver/api/snap/snapshotter.go:45— Snapshotter.ReleaseSnapDBs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
corruptionChecker.PeriodicCheck (cognitive 16) server/etcdserver/corrupt.go:179— corruptionChecker.PeriodicCheck has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: embed.StartEtcd server/embed/etcd.go:110— FunctionTooLong — StartEtcd runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) etcdctl/ctlv3/command/printer_table.go:28— etcdctl/ctlv3/command/printer_table.go:28-37 | etcdctl/ctlv3/command/printer_table.go:39-48 | etcdctl/ctlv3/command/printer_table.go:50-59 | etcdctl/ctlv3/command/printer_table.go:61-70 | etcdutl/etcdutl/printer_table.go:28-37 | etcdutl/etcdutl/printer_table.go:39-48 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (86 corresponding lines) · ×1
Edited copy of a member (86 corresponding lines) server/proxy/grpcproxy/lease.go:137— server/proxy/grpcproxy/lease.go:137-230 | server/proxy/grpcproxy/watch.go:83-168 — These two members are one piece of code written twice and then edited apart: 86 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (71 corresponding lines) · ×1
Edited copy of a member (71 corresponding lines) server/etcdserver/api/v2store/store.go:261— server/etcdserver/api/v2store/store.go:261-332 | server/etcdserver/api/v2store/store.go:494-564 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) server/etcdserver/cluster_util.go:243— server/etcdserver/cluster_util.go:243-293 | server/etcdserver/cluster_util.go:383-433 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) server/storage/backend/backend.go:796— server/storage/backend/backend.go:796-856 | server/storage/backend/backend.go:862-952 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) server/etcdserver/api/v2store/store.go:336— server/etcdserver/api/v2store/store.go:336-395 | server/etcdserver/api/v2store/store.go:397-451 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) server/auth/store.go:606— server/auth/store.go:606-654 | server/auth/store.go:719-762 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) server/etcdserver/api/rafthttp/transport.go:296— server/etcdserver/api/rafthttp/transport.go:296-325 | server/etcdserver/api/rafthttp/transport.go:370-398 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) client/v3/experimental/recipes/priority_queue.go:46— client/v3/experimental/recipes/priority_queue.go:46-80 | client/v3/experimental/recipes/queue.go:43-77 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) etcdctl/ctlv3/command/completion_command.go:23— etcdctl/ctlv3/command/completion_command.go:23-85 | etcdutl/etcdutl/completion_commmand.go:23-84 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 28+ corresponding lines) · ×1
Edited copies of one member (3 members, 28+ corresponding lines) server/etcdserver/v3_server.go:575— server/etcdserver/v3_server.go:575-606 | server/etcdserver/v3_server.go:608-635 | server/etcdserver/v3_server.go:752-784 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) etcdctl/ctlv3/command/elect_command.go:68— etcdctl/ctlv3/command/elect_command.go:68-100 | etcdctl/ctlv3/command/elect_command.go:102-137 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) etcdctl/ctlv3/command/ep_command.go:187— etcdctl/ctlv3/command/ep_command.go:187-212 | etcdctl/ctlv3/command/ep_command.go:219-244 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) client/v3/kubernetes/client.go:83— client/v3/kubernetes/client.go:83-107 | client/v3/kubernetes/client.go:109-128 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) pkg/netutil/routes_linux.go:95— pkg/netutil/routes_linux.go:95-128 | pkg/netutil/routes_linux.go:131-157 | pkg/netutil/routes_linux.go:160-186 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 37+ corresponding lines) · ×1
Edited copies of one member (3 members, 37+ corresponding lines) server/auth/options.go:119— server/auth/options.go:119-155 | server/auth/options.go:157-193 | server/auth/options.go:195-235 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) server/embed/config.go:1214— server/embed/config.go:1214-1234 | server/embed/config.go:1236-1253 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) REDACTED:626— REDACTED:626-657 | REDACTED:659-687 | REDACTED:689-713 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 18+ corresponding lines) · ×1
Edited copies of one member (5 members, 18+ corresponding lines) etcdctl/ctlv3/command/compaction_command.go:42— etcdctl/ctlv3/command/compaction_command.go:42-65 | etcdctl/ctlv3/command/lease_command.go:59-76 | etcdctl/ctlv3/command/member_command.go:186-203 | etcdctl/ctlv3/command/member_command.go:206-230 | etcdctl/ctlv3/command/member_command.go:249-266 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) REDACTED:679— REDACTED:679-696 | REDACTED:719-736 | REDACTED:759-776 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) server/storage/backend/batch_tx.go:169— server/storage/backend/batch_tx.go:169-191 | server/storage/backend/batch_tx.go:229-247 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) etcdctl/ctlv3/command/txn_command.go:98— etcdctl/ctlv3/command/txn_command.go:98-119 | etcdctl/ctlv3/command/txn_command.go:121-142 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) client/v3/maintenance.go:191— client/v3/maintenance.go:191-202 | client/v3/maintenance.go:204-215 | client/v3/maintenance.go:217-228 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 12+ corresponding lines) · ×1
Edited copies of one member (5 members, 12+ corresponding lines) etcdctl/ctlv3/command/auth_command.go:52— etcdctl/ctlv3/command/auth_command.go:52-65 | etcdctl/ctlv3/command/user_command.go:175-186 | etcdctl/ctlv3/command/user_command.go:220-232 | etcdctl/ctlv3/command/user_command.go:258-270 | etcdctl/ctlv3/command/user_command.go:273-285 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) REDACTED:148— REDACTED:148-157 | REDACTED:160-169 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) server/etcdserver/api/v3rpc/key.go:48— server/etcdserver/api/v3rpc/key.go:48-60 | server/etcdserver/api/v3rpc/key.go:90-102 | server/etcdserver/api/v3rpc/key.go:104-116 | server/etcdserver/api/v3rpc/key.go:139-151 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) client/pkg/fileutil/lock_flock.go:40— client/pkg/fileutil/lock_flock.go:40-50 | client/pkg/fileutil/lock_linux.go:80-93 | client/pkg/fileutil/lock_windows.go:30-40 | client/pkg/fileutil/lock_windows.go:42-52 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) server/etcdserver/api/membership/storev2.go:139— server/etcdserver/api/membership/storev2.go:139-147 | server/etcdserver/api/membership/storev2.go:164-172 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) client/v3/auth.go:156— client/v3/auth.go:156-159 | client/v3/auth.go:161-164 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) etcdctl/ctlv3/command/del_command.go:52— etcdctl/ctlv3/command/del_command.go:52-61 | etcdctl/ctlv3/command/member_command.go:233-246 | etcdctl/ctlv3/command/put_command.go:70-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) client/pkg/testutil/testingtb.go:125— client/pkg/testutil/testingtb.go:125-129 | pkg/grpctesting/stub_server.go:84-89 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (21 lines × 2) server/auth/options.go:135— server/auth/options.go:135-155 | server/auth/options.go:173-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/auth/options.go:135` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–21 lines × 2) server/proxy/grpcproxy/lease.go:160— server/proxy/grpcproxy/lease.go:160-177 | server/proxy/grpcproxy/watch.go:111-131 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/proxy/grpcproxy/lease.go:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (17 lines × 2) client/v3/experimental/recipes/priority_queue.go:49— client/v3/experimental/recipes/priority_queue.go:49-65 | client/v3/experimental/recipes/queue.go:46-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/v3/experimental/recipes/priority_queue.go:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 3) server/storage/backend/backend.go:834— server/storage/backend/backend.go:834-848 | server/storage/backend/backend.go:914-928 | server/storage/backend/backend.go:998-1011 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15 lines × 2) etcdctl/ctlv3/command/completion_command.go:66— etcdctl/ctlv3/command/completion_command.go:66-80 | etcdutl/etcdutl/completion_commmand.go:66-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–14 lines × 2) server/storage/schema/membership.go:192— server/storage/schema/membership.go:192-204 | server/storage/schema/membership.go:212-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11–13 lines × 2) client/v3/kubernetes/client.go:88— client/v3/kubernetes/client.go:88-100 | client/v3/kubernetes/client.go:114-124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `client/v3/kubernetes/client.go:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `client/v3/kubernetes/client.go:102` calls `Errorf` and `client/v3/kubernetes/client.go:125` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 2) pkg/adt/interval_tree.go:293— pkg/adt/interval_tree.go:293-304 | pkg/adt/interval_tree.go:656-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) etcdctl/ctlv3/command/elect_command.go:108— etcdctl/ctlv3/command/elect_command.go:108-117 | etcdctl/ctlv3/command/lock_command.go:80-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9–10 lines × 2) server/etcdserver/server.go:1467— server/etcdserver/server.go:1467-1475 | server/etcdserver/v3_server.go:672-681 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/server.go:1467` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 6) etcdctl/ctlv3/command/printer_table.go:30— etcdctl/ctlv3/command/printer_table.go:30-37 | etcdctl/ctlv3/command/printer_table.go:41-48 | etcdctl/ctlv3/command/printer_table.go:52-59 | etcdctl/ctlv3/command/printer_table.go:63-70 | etcdutl/etcdutl/printer_table.go:30-37 | etcdutl/etcdutl/printer_table.go:41-48 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `etcdctl/ctlv3/command/printer_table.go:30` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5–6 lines × 2) server/etcdserver/api/rafthttp/remote.go:64— server/etcdserver/api/rafthttp/remote.go:64-68 | server/etcdserver/api/rafthttp/remote.go:75-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/etcdserver/api/rafthttp/remote.go:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 5) etcdctl/ctlv3/command/printer_simple.go:155— etcdctl/ctlv3/command/printer_simple.go:155-160 | etcdctl/ctlv3/command/printer_simple.go:172-177 | etcdctl/ctlv3/command/printer_simple.go:179-184 | etcdutl/etcdutl/printer_simple.go:26-31 | etcdutl/etcdutl/printer_simple.go:33-38 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11 lines × 3) REDACTED:647— REDACTED:647-657 | REDACTED:677-687 | REDACTED:703-713 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:647` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (77 corresponding lines) · ×1
Edited copy of a member (77 corresponding lines) tools/rw-heatmaps/pkg/chart/heatmaps.go:91— tools/rw-heatmaps/pkg/chart/heatmaps.go:91-167 | tools/rw-heatmaps/pkg/chart/heatmaps.go:170-251 — These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) tools/etcd-dump-metrics/install_darwin.go:32— tools/etcd-dump-metrics/install_darwin.go:32-58 | tools/etcd-dump-metrics/install_linux.go:32-56 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) tools/etcd-dump-db/main.go:82— tools/etcd-dump-db/main.go:82-101 | tools/etcd-dump-db/main.go:103-119 | tools/etcd-dump-db/main.go:121-140 | tools/etcd-dump-db/main.go:142-159 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (16–17 lines × 3) tools/rw-heatmaps/pkg/chart/heatmaps.go:98— tools/rw-heatmaps/pkg/chart/heatmaps.go:98-114 | tools/rw-heatmaps/pkg/chart/heatmaps.go:176-192 | tools/rw-heatmaps/pkg/chart/line_chart.go:61-76 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (24 lines × 2) tools/rw-heatmaps/pkg/chart/heatmaps.go:137— tools/rw-heatmaps/pkg/chart/heatmaps.go:137-160 | tools/rw-heatmaps/pkg/chart/heatmaps.go:219-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×1
Length read from the parsed input is spent without ever being bounded REDACTED:239— `size` is read from the bytes being parsed at line 236 (`binary.Read`), then used to size a `make([]byte, …)` at line 239 — and nowhere in its scope is `size` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: `make` reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the runtime cannot satisfy is `fatal error: out of memory` — not a panic, so no `recover` intercepts it and the whole process dies; a 64-bit length too large to represent panics with `makeslice: len out of range` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `size` against the bytes actually remaining and a maximum the format allows before allocating.
Orphaned file server/etcdserver/api/v3discovery/discovery.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/featuregate/feature_gate.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file client/v3/leasing/kv.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file client/v3/auth.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file server/etcdserver/api/v3rpc/interceptor.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file client/v3/concurrency/stm.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file server/proxy/grpcproxy/lease.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/expect/expect.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tools/check-grpc-experimental/main.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file etcdctl/ctlv3/command/member_command.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file etcdctl/ctlv3/command/role_command.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file etcdctl/ctlv3/command/make_mirror_command.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/report/report.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file server/storage/backend/tx_buffer.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file server/auth/simple_token.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file api/etcdserverpb/raft_internal_stringer.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pkg/netutil/routes_linux.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file server/auth/range_perm_cache.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file client/v3/namespace/kv.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file client/v3/leasing/txn.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file server/etcdserver/api/v3rpc/auth.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file client/v3/naming/endpoints/endpoints_impl.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate server/etcdserver/api/v3compactor/periodic.go:143— `err == nil || errors.Is(err, mvcc.ErrCompacted)` appears character-identically in 2 files — server/etcdserver/api/v3compactor/periodic.go, server/etcdserver/api/v3compactor/revision.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate etcdctl/ctlv3/command/ep_command.go:134— `err == nil || errors.Is(err, rpctypes.ErrPermissionDenied)` appears character-identically in 2 files — etcdctl/ctlv3/command/ep_command.go, server/proxy/grpcproxy/health.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate server/proxy/grpcproxy/lease.go:163— `len(v) > 0 && v[0] == rpctypes.MetadataHasLeader` appears character-identically in 2 files — server/proxy/grpcproxy/lease.go, server/proxy/grpcproxy/watch.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate server/embed/config.go:1048— `maxVersion != 0 && minVersion > maxVersion` appears character-identically in 2 files — server/embed/config.go, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate pkg/netutil/netutil.go:92— `u.Scheme == "unix" || u.Scheme == "unixs"` appears character-identically in 2 files — pkg/netutil/netutil.go, server/embed/etcd.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
No seccomp profile REDACTED:16— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:71— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:126— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:3— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
Silent fallback default on error server/storage/mvcc/index.go:118— `Revisions` turns a non-nil `err` into `return nil, 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error server/storage/mvcc/index.go:147— `CountRevisions` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error server/storage/mvcc/index.go:168— `Range` turns a non-nil `err` into `return nil, nil, nil, nil, 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: client/pkg/transport/listener_tls.go, server/storage/quota.go. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 10 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (13 single-owned of 296 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 296 of the 587 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) (+4 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: client/v3/internal/endpoint/endpoint.go, server/storage/schema/actions.go, REDACTED, server/etcdserver/read/read.go, client/v3/concurrency/session.go, client/pkg/types/set.go, server/embed/config_tracing.go, client/pkg/fileutil/purge.go (+3 more).
No ADRs found Procfile:1— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `Procfile` makes this repository a deployable product (line 1).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 2 of 12 project(s) overshoot their size bounds, lowering Project Cohesion to 6.8/10. The most over is `server` (42424 LoC, 220 module-visible types across 50 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 94 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: pkg/featuregate/feature_gate.go, client/v3/leasing/kv.go, REDACTED, client/v3/auth.go, client/v3/concurrency/stm.go, server/proxy/grpcproxy/lease.go, pkg/expect/expect.go, tools/check-grpc-experimental/main.go (and 86 more) (95 orphaned of 307 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 307 of the 587 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D40 · Network Egress Confinement· No network policy · ×1
No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context · ×1
Not all functions that make a request accept a context.Context — Only 5/12 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Outdated: github.com/creack/pty — `github.com/creack/pty` is required at v1.1.18 in pkg/go.mod, but v1.1.24 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/creack/pty@v1.1.24 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/crypto — `golang.org/x/crypto` is required at v0.58.0 in server/go.mod, but v0.59.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/crypto@v0.59.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sys — `golang.org/x/sys` is required at v0.49.0 in client/pkg/go.mod, but v0.50.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sys@v0.50.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sys — `golang.org/x/sys` is required at v0.49.0 in pkg/go.mod, but v0.50.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sys@v0.50.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 2 file(s) — `server/etcdserver/server.go`, `server/storage/wal/wal.go` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a1d4d3-f6e9-7189-bbf3-165ad9c86bcd · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 11 · Warnings: 772 · Recommendations: 174 · Info: 4 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 12:13 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.