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
{{ message }}
Repository navigation
Commit 50c16fa
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/sow/current/SOW-0015-20260605-codacy-scope-and-maintainability.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,8 +236,72 @@ Open decisions:
236
236
- cppcheck: success, 45 files, 0 issues.
237
237
- ShellCheck: success, 3 files, 0 issues.
238
238
- Spectral: success, 11 files, 0 issues.
239
-
- Revive: partial, 90 files, 0 issues, 1 `findings is not iterable` invocation error.
239
+
- Revive: partial, 90 files, 0 issues, 1 `findings is not iterable` invocation error.
240
240
- The previous pushed commit `5a55246b9b4698317bdf8440c898369034a1f408` has green CI for CodeQL, Static Analysis, Supply Chain Security, Codacy Local Analysis, Codacy Coverage, and the Codacy GitHub check.
241
+
- Committed and pushed `36c06554e1a617e314574ab1cfeae17547285f14`.
242
+
- Imported `.codacy/codacy.config.json` again after adding Revive locally:
- 133 files are now listed as ignored, including `bench/**`, `tests/**`, Go `*_test.go`, Rust `*_tests.rs`, and Rust `tests.rs` files.
257
+
- Repository headline metrics still report the previous full-analysis commit `5a55246b9b4698317bdf8440c898369034a1f408` and still show 42% complex files and 41% duplicated files. This appears to be Codacy metric lag or commit-selection lag after a config-only commit.
258
+
- Built a production-source-only file list by filtering the current Codacy file API data through the new ignored-path rules.
259
+
- Top production complexity files after filtering ignored test/bench paths:
- Selected `src/libnetdata/netipc/src/transport/posix/netipc_uds.c` as the next production maintainability target because it is the highest-complexity production file after excluding test/bench paths.
266
+
- Read `src/libnetdata/netipc/src/transport/posix/netipc_uds.c` in full.
267
+
-`netipc_uds.c` currently mixes several separate responsibilities in one compilation unit:
268
+
- path validation and stale endpoint recovery.
269
+
- low-level SEQPACKET send/receive.
270
+
- client handshake.
271
+
- server handshake.
272
+
- listener/connect/accept/close lifecycle.
273
+
- client-side in-flight message ID tracking.
274
+
- send chunking.
275
+
- receive chunk reassembly and batch validation.
276
+
- Selected low-risk implementation shape:
277
+
- keep the public `netipc_uds.h` API unchanged.
278
+
- keep `netipc_uds.c` as shared low-level/common helpers.
279
+
- add a private `netipc_uds_internal.h`.
280
+
- move lifecycle/stale recovery, handshake, in-flight tracking, send, and receive into separate POSIX UDS implementation files.
281
+
- split send/receive helper logic only where it removes obvious nested branches without changing protocol behavior.
282
+
- Implemented the POSIX UDS split:
283
+
-`netipc_uds.c`: shared low-level send/receive and packet-size helpers.
284
+
-`netipc_uds_internal.h`: private POSIX UDS declarations and constants.
285
+
-`netipc_uds_handshake.c`: client/server handshake and negotiation.
286
+
-`netipc_uds_lifecycle.c`: listen/connect/accept/close and stale socket recovery.
287
+
-`netipc_uds_inflight.c`: client-side message ID tracking.
288
+
-`netipc_uds_send.c`: outbound limit checks, single-packet send, and chunked send.
289
+
-`netipc_uds_receive.c`: inbound validation, chunk reassembly, and batch validation.
290
+
- Updated `CMakeLists.txt` so the `netipc_uds` static library builds all POSIX UDS implementation files.
291
+
- Validation after the split:
292
+
-`cmake --build build`: passed.
293
+
-`/usr/bin/ctest --test-dir build --output-on-failure`: 46/46 tests passed in 449.75 seconds.
294
+
-`git diff --check`: passed.
295
+
-`bash .agents/sow/audit.sh`: passed.
296
+
-`codacy-analysis analyze . --output-format json`: exit status 0, 0 issues, 1 known Revive adapter error.
297
+
- Checkov: success, 11 files, 0 issues.
298
+
- Opengrep/Semgrep: success, 271 files, 0 issues.
299
+
- Trivy: success, 272 files, 0 issues.
300
+
- cppcheck: success, 51 files, 0 issues.
301
+
- ShellCheck: success, 3 files, 0 issues.
302
+
- Spectral: success, 11 files, 0 issues.
303
+
- Revive: partial, 90 files, 0 issues, 1 `findings is not iterable` invocation error.
304
+
- Note: plain `ctest` resolves to a broken user-local Python wrapper at `~/.local/bin/ctest`; system `/usr/bin/ctest` was used for validation.
0 commit comments