You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/sow/current/SOW-0015-20260605-codacy-scope-and-maintainability.md
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -544,6 +544,55 @@ Plan:
544
544
7. Validate Netdata build/tests for the vendored NetIPC surface, including Windows compile/unit validation if the Netdata workflow exposes it locally.
545
545
8. Commit only explicit Netdata vendor/update files, push the branch, and open a PR against Netdata.
546
546
547
+
### 2026-06-07 - PR 22649 Review And SonarCloud Follow-up
548
+
549
+
Netdata PR #22649 review context was checked before editing:
550
+
551
+
- GitHub review threads had two unresolved, non-outdated, actionable findings:
552
+
-`src/crates/netipc/src/service/raw/server.rs:95` equivalent vendored Windows raw server shutdown risk: only the initially stored listener handle was available to `stop()`, while later accepted pipe instances could keep blocking.
553
+
-`src/go/pkg/netipc/service/raw/cgroups_lookup.go:123` service dispatch had a dead `builder.Finish() == 0` check after builder error and item-count checks.
554
+
- Same-pattern service dispatch review was checked in Go raw apps lookup; the same dead service-level guard existed there.
555
+
- Protocol-level Go lookup dispatch was also checked. The guard looked similar, but `cd src/go && go test -count=1 ./...` proved it is required: `TestLookupDispatchCoverage` intentionally corrupts builder state and expects `ErrOverflow`. The protocol-level guards were restored.
556
+
- SonarCloud PR query reported six open issues:
557
+
- Go parameter-count findings in `src/go/pkg/netipc/protocol/apps_lookup.go`.
558
+
- Go unnecessary recovered variable findings in `src/go/pkg/netipc/service/raw/server_unix.go` and `src/go/pkg/netipc/service/raw/server_windows.go`.
559
+
- C `openat()` descriptor finding in `src/libnetdata/netipc/src/transport/posix/netipc_shm.c`.
560
+
- C memcpy bounds finding in `src/libnetdata/netipc/src/transport/posix/netipc_uds_receive.c`.
561
+
- GitHub AI quality findings also reported:
562
+
- ignored `clock_gettime` syscall result in `bench/drivers/go/main.go`.
563
+
- Go integer `range` compatibility concerns in Go service/raw and stale-dial code.
564
+
- missing rationale around the Go UDS 32-bit total-length limit.
565
+
- maintainability issues in `vendor-to-netdata.sh`.
566
+
567
+
Implemented SDK follow-up:
568
+
569
+
- Aligned all plugin-ipc Go modules to Netdata's Go version, `go 1.26.0`.
570
+
- Ran Go's `go fix` modernization on the affected Go module surfaces, including benchmark driver loop and slice cleanups.
571
+
- Changed Go benchmark CPU-time helper to check the `clock_gettime` syscall error path and return zero on failure.
572
+
- Added the missing Go UDS comment explaining the protocol's 32-bit framed total-length contract.
573
+
- Hardened `vendor-to-netdata.sh`:
574
+
- validates source `go.mod` presence and parses module paths from the `module` directive.
575
+
- avoids fragile status-line spacing.
576
+
- counts only relevant C, Rust, and Go source files.
577
+
- prints an import-rewrite review command after the suggested `sed` command.
578
+
- Updated Rust Windows raw server to refresh the stored listener handle around each accept and clear it before joining session threads, so `stop()` can target the currently blocking listener handle.
579
+
- Removed dead service-level Go lookup dispatch `builder.Finish() == 0` checks in raw apps lookup and raw cgroups lookup.
580
+
- Reduced SonarCloud Go parameter count in apps lookup semantic validators by passing a private `appsLookupSemantics` struct.
581
+
- Removed unnecessary recovered-value variables from Go raw server panic-recovery paths.
582
+
- Avoided `openat()` with an invalid directory descriptor in POSIX SHM stale cleanup.
583
+
- Added explicit chunk and first-packet bounds checks in POSIX UDS receive before copying chunk payload data into the assembled receive buffer.
584
+
585
+
Validation completed for this follow-up:
586
+
587
+
-`cd bench/drivers/go && go fix ./... && go test ./...`: passed.
588
+
-`git diff --check`: passed.
589
+
-`cd src/go && go test -count=1 ./...`: passed.
590
+
-`cargo test --manifest-path src/crates/netipc/Cargo.toml`: 332 tests passed.
-`codacy-analysis analyze --files ... --output-format json`: 0 issues; known local Revive adapter invocation error remains.
@@ -576,13 +630,17 @@ Real-use evidence:
576
630
Reviewer findings:
577
631
578
632
- GitHub AI findings for `netipc_uds_send.c` were manually verified and addressed.
633
+
- GitHub review-thread findings from Netdata PR #22649 were manually verified and addressed where they were real.
634
+
- SonarCloud PR findings for Netdata PR #22649 were queried and addressed in the SDK source before re-vendoring.
579
635
- No external AI reviewer was used for this increment.
580
636
581
637
Same-failure scan:
582
638
583
639
- Same C total-message-width helper pattern was found and fixed in the Windows named-pipe transport.
584
640
- Same chunk-count overflow-prone ceil pattern was found and fixed in POSIX C, Windows C, POSIX Rust, Windows Rust, POSIX Go, and Windows Go transport paths.
585
641
- Same benchmark batch sizing nondeterminism pattern was found and fixed in POSIX and Windows Go benchmark drivers.
642
+
- Same dead Go service-level lookup dispatch guard was found and removed in apps lookup and cgroups lookup.
643
+
- Similar Go protocol-level lookup dispatch guards were tested and kept because regression coverage proves they still guard an overflow state.
0 commit comments