sonic-net / sonic-buildimage
Code health
This codebase scores 8.9 out of 10 for code health, which we rate excellent. It also scores maintainability 8.9 and static performance 9.8 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 24 of 9,481 files are git hotspots, and they average 4.9 — which is where the fixes pay off most.
Do next
1 suggested
3 things worth doing this quarter, 2 of them now.
Worth planning
Delete 10,432 unused symbols and files (344,996 lines)
Nothing in the graph reaches them, across 2,836 files; every reader and agent pays to skip them.
- symbols
- 10432
- lines
- 344,996
- safe to delete
- Yes(inferred)
Medium effort
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effortReview the 49 proposed decisions
None is accepted yet, so nothing can drift from one and agents get no enforced guidance from them.
- proposed
- 49
- accepted
- 0
Medium effort
- Lines of code
- 2.8M
Recent activity
All commitsCommits
- db028339[Mellanox] Fix syncd heap-buffer-overflow from SAI metadata missing CPU_PORT (#28365)2mo ago
- 08ea9e4c[Nvidia-Bluefield] Update NASA/SAI to 26.4-RC8/SAIBuild0.0.56.0 (#28544)2mo ago
- 7337433f[Mellanox] Fix speed in Mellanox-SN5600-C256-S1 SKU port config (#28577)2mo ago
- cd68db19[Mellanox] Reduce fatal dumps to 5 and add support for fw warn (#28420)2mo ago
- 690c4107[Mellanox] thermal_updater: stop writing 0 for ASIC not-ready/error (avoids false fan emergency) (#28493)2mo ago
- d142cdc3[Mellanox] Fix /tmp/nv-syncd-shared created with 755 by determine-reboot-cause (#28441)2mo ago
Decisions
- Add new implementations only to kcompat_impl.hproposed · 2mo ago
- Use only NEED_/HAVE_ checks; avoid kernel version checksproposed · 2mo ago
- Offset DEVLINK_PARAM_GENERIC_ID_MAX for backport safetyproposed · 2mo ago
- Make dhcpservd readiness check idempotentproposed · 2mo ago
- Fix kea-dhcp4 paths for Kea 2.6 strict validation (Trixie upgrade)proposed · 2mo ago
- Omit DHCP server gateway when gateway is optionalproposed · 2mo ago
Everything we found
33,482 open
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.
- worst item is critical severity. Code health12,602Nested complexity · src/sonic-yang-mgmt/sonic_yang_ext.py45 findings · 8.0 deducted
- worst item is medium severity. Refactoring1,966onie_tlv+1.7 health, XL effort · platform/broadcom/sonic-platform-modules-tencent/common/lib/eepromutil/onietlv.py
- worst item is medium severity. Decisions73src/system-health/tests/test_system_health.py49 awaiting review · 24 hotspots ungoverned
- worst item is medium severity. Ownership6,023build_debian.sh85% single-owner concentration, 9 commits in 90d
- worst item is low severity. Dead code12,818device/accton/x86_64-accton_as4630_54te-r0/sonic_platform/chassis.pyUnreachable symbol (390 lines)
Composition
Open the graph- python50%
- c20%
- cpp12%
- shell11%
- makefile6%
- Other<1%
Explore this codebase
- Docs16,705 pages across 8 modules
- ChatAsk this codebase a question and get an answer with its sources.
- Files9,481 files with per-file docs, health and history
- ArchitectureDependency graph, layers, and 67 entry points
- Code healthPer-file scores, 13,127 open findings, coverage and refactoring targets
- Knowledge graphEntities, communities, and the paths between them
- Change couplingFiles that keep changing together, mined from commit history
- CommitsChange-risk ranked history with agent provenance
- ContributorsBus factor, per-file maintainers, and the human/agent split
- StatsSize class, origin, lifetime churn, rhythm and records
- CostsWhat indexing this snapshot cost, by model and by run.