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
@@ -738,6 +738,64 @@ Validation completed for this duplication-reduction increment:
738
738
-`cppcheck_missingIncludeSystem` appears non-actionable in Codacy because it cannot see ordinary system headers in the analyzer environment.
739
739
-`cppcheck_unusedStructMember` is noisy for NetIPC wire-layout structs and internal callback tables, but disabling it affects the whole Netdata repository unless a narrower suppression path is chosen.
Netdata PR #22649 was rechecked after vendoring SDK commit `04f8b09` into Netdata commit `d60e6bc19a`.
744
+
745
+
Facts from GitHub, SonarCloud, and CI:
746
+
747
+
- GitHub review threads: ten total, eight resolved, two open.
748
+
- SonarCloud PR issue API: zero unresolved issues.
749
+
- SonarCloud PR hotspot API: zero unresolved hotspots.
750
+
- Netdata CI: zero failed checks at the snapshot; 103 checks still running and one CLA check pending.
751
+
752
+
Open GitHub review threads:
753
+
754
+
-`src/go/pkg/netipc/transport/internal/framing/handshake.go`: cubic claimed the negotiated request payload should follow `min(max(client, server), 256MB)`.
755
+
- Current public spec evidence says otherwise: `docs/level1-wire-envelope.md` defines proposals above `1 MiB` as `LIMIT_EXCEEDED` and says accepted request payload limits are echoed unchanged.
756
+
- Same-language evidence: C POSIX, C Windows, Rust POSIX, Rust Windows, and Go all implement the same `1 MiB` reject plus echo behavior.
757
+
- Decision for this increment: do not change the handshake contract as a PR-comment side effect. Add source clarification if needed and report the thread as stale/contract-conflicting unless the user explicitly chooses to revise the protocol across docs, C, Rust, Go, and tests.
758
+
-`src/go/pkg/netipc/transport/internal/framing/receive.go`: cubic claimed packets whose received length exceeds the declared frame length should be rejected instead of accepted.
759
+
- Local verification found the finding is real and same-pattern across all packet transports:
760
+
- Go shared framing accepted `n >= totalMsg`.
761
+
- C POSIX UDS accepted `(size_t)n >= total_msg`.
762
+
- C Windows Named Pipe accepted `n >= total_msg`.
763
+
- Rust POSIX UDS accepted `n >= total_msg`.
764
+
- Rust Windows Named Pipe accepted `n >= total_msg`.
765
+
- Decision for this increment: fix the whole class so exact-length packets are accepted, shorter packets enter the chunked path, and longer packets fail as framing/protocol errors.
766
+
767
+
Implemented SDK follow-up:
768
+
769
+
- Added a Go shared-framing comment clarifying the current Level 1 handshake contract: request payload limits are client-proposed, proposals above the wire cap are rejected, and accepted values are echoed unchanged.
770
+
- Changed non-chunked receive completion in Go shared framing, C POSIX UDS, C Windows Named Pipe, Rust POSIX UDS, and Rust Windows Named Pipe from `received_len >= declared_total` to:
771
+
- reject `received_len > declared_total` as a protocol/framing error.
772
+
- accept only `received_len == declared_total` as a complete non-chunked message.
773
+
- keep `received_len < declared_total` as the chunked-message path.
774
+
- Added regression tests for packets that declare one payload byte but contain two bytes in the same packet:
775
+
- Go shared framing unit test.
776
+
- POSIX C UDS integration test.
777
+
- Windows C Named Pipe integration test.
778
+
- POSIX Rust UDS socketpair test.
779
+
- Windows Rust Named Pipe test.
780
+
781
+
Validation completed for this increment:
782
+
783
+
-`cd src/go && go test -count=1 ./pkg/netipc/transport/internal/framing`: passed.
784
+
-`cd src/go && go test -count=1 ./pkg/netipc/transport/internal/framing ./pkg/netipc/transport/posix`: passed.
785
+
-`cd src/go && go test -count=1 ./pkg/netipc/...`: passed.
786
+
-`cd src/go && GOOS=windows GOARCH=amd64 go test -c -o /tmp/netipc-transport-windows.test.exe ./pkg/netipc/transport/windows`: passed.
787
+
-`cargo test --manifest-path src/crates/netipc/Cargo.toml test_receive_packet_longer_than_declared_payload -- --test-threads=1`: passed.
788
+
-`cargo test --manifest-path src/crates/netipc/Cargo.toml transport::posix -- --test-threads=1`: 60 tests passed.
789
+
-`cargo test --manifest-path src/crates/netipc/Cargo.toml -- --test-threads=1`: 333 tests passed.
- Win11 MSYS C validation: `test_named_pipe` built and passed.
795
+
- Win11 Go validation: `cd src/go && MSYSTEM=MSYS CGO_ENABLED=0 go test -count=1 ./pkg/netipc/transport/internal/framing ./pkg/netipc/transport/windows`: passed.
796
+
- Win11 Rust validation: `MSYSTEM=MSYS cargo test --manifest-path src/crates/netipc/Cargo.toml transport::windows -- --test-threads=1`: 26 Windows transport tests passed.
0 commit comments