|
4 | 4 |
|
5 | 5 | Status: in-progress |
6 | 6 |
|
7 | | -Sub-state: implementing the approved first remediation target: Go raw L3 cache duplication. |
| 7 | +Sub-state: reviewing and applying only useful low-risk typed service-facade duplication cleanups before moving to complexity hotspots. |
8 | 8 |
|
9 | 9 | ## Requirements |
10 | 10 |
|
@@ -146,7 +146,7 @@ Open-source reference evidence: |
146 | 146 |
|
147 | 147 | Open decisions: |
148 | 148 |
|
149 | | -- After the Go raw L3 cache target is validated, decide whether to continue with larger typed service-facade duplication or stop. |
| 149 | +- After low-risk typed service-facade cleanup is validated, switch to complexity hotspots. |
150 | 150 |
|
151 | 151 | ## Implications And Decisions |
152 | 152 |
|
@@ -327,6 +327,19 @@ Refined recommendation: |
327 | 327 | - Preserved public `NewCache()` signatures and platform-specific transport configuration types. |
328 | 328 | - Kept platform-specific client construction in the build-tagged files; the shared helper accepts the already constructed raw `Client`. |
329 | 329 | - The shared cache logic uses the checked `uint32` conversion path that was already present in the POSIX implementation. |
| 330 | +- Committed and pushed the raw-cache cleanup as `e762aef` with message `Refactor Go raw cache implementation`. |
| 331 | +- GitHub reported the direct push bypassed the pull-request rule for `main`, as requested by the user. |
| 332 | +- Reviewed typed service-facade duplication for obvious low-risk and useful cleanup: |
| 333 | + - Useful/low-risk: same-package Go POSIX/Windows wrappers in `src/go/pkg/netipc/service/cgroups/`, `src/go/pkg/netipc/service/apps_lookup/`, and `src/go/pkg/netipc/service/cgroups_lookup/`. |
| 334 | + - Reason: common wrapper code can move to untagged files inside the same package, while platform transport config conversion remains in build-tagged files. |
| 335 | + - Rejected for now: cross-service Go abstraction between apps lookup and cgroups lookup, because it would require generic/internal indirection across public service packages for modest readability gain. |
| 336 | + - Rejected for now: Rust apps/cgroups lookup facade abstraction, because it would likely require traits/generics/macros around service-specific public types and would make the facade less direct. |
| 337 | +- Applied the low-risk Go typed-facade cleanup: |
| 338 | + - `src/go/pkg/netipc/service/cgroups/client_common.go` |
| 339 | + - `src/go/pkg/netipc/service/cgroups/cache_common.go` |
| 340 | + - `src/go/pkg/netipc/service/apps_lookup/client_common.go` |
| 341 | + - `src/go/pkg/netipc/service/cgroups_lookup/client_common.go` |
| 342 | +- Left build-tagged Go files responsible only for POSIX/Windows transport config conversion and platform-specific `NewCache()` construction where needed. |
330 | 343 |
|
331 | 344 | ## Validation |
332 | 345 |
|
@@ -371,6 +384,27 @@ Implementation validation: |
371 | 384 | - total: 0 issues, 0 errors. |
372 | 385 | - `bash .agents/sow/audit.sh` passed and reported SOW initialization complete and clean. |
373 | 386 | - `git diff --check` passed. |
| 387 | +- Low-risk typed-facade validation: |
| 388 | + - `gofmt -w` passed for all touched Go facade files. |
| 389 | + - `go test ./pkg/netipc/service/apps_lookup ./pkg/netipc/service/cgroups_lookup ./pkg/netipc/service/cgroups` passed in `src/go`. |
| 390 | + - `GOOS=windows GOARCH=amd64 go test -c ./pkg/netipc/service/apps_lookup -o /tmp/plugin-ipc-apps-lookup-windows.test.exe` passed. |
| 391 | + - `GOOS=windows GOARCH=amd64 go test -c ./pkg/netipc/service/cgroups_lookup -o /tmp/plugin-ipc-cgroups-lookup-windows.test.exe` passed. |
| 392 | + - `GOOS=windows GOARCH=amd64 go test -c ./pkg/netipc/service/cgroups -o /tmp/plugin-ipc-cgroups-windows-b.test.exe` passed. |
| 393 | + - `go test ./...` passed in `src/go`. |
| 394 | + - JSCPD production-source after the Go typed-facade cleanup: |
| 395 | + - previous state after raw-cache cleanup: 40 exact clones, 905 duplicated lines, 11.38%. |
| 396 | + - after same-package Go typed-facade cleanup: 36 exact clones, 679 duplicated lines, 8.76%. |
| 397 | + - Remaining service-facade clones are cross-service config/type shapes and small constructor similarities; these were rejected for now because removing them would require broader public-package abstraction. |
| 398 | + - `codacy-analysis analyze --output-format json` passed: |
| 399 | + - Checkov: 0 issues. |
| 400 | + - Opengrep/Semgrep: 0 issues. |
| 401 | + - Trivy: 0 issues. |
| 402 | + - cppcheck: 0 issues. |
| 403 | + - ShellCheck: 0 issues. |
| 404 | + - Spectral: 0 issues. |
| 405 | + - total: 0 issues, 0 errors. |
| 406 | + - `bash .agents/sow/audit.sh` passed and reported SOW initialization complete and clean. |
| 407 | + - `git diff --check` passed. |
374 | 408 |
|
375 | 409 | Sensitive data gate: |
376 | 410 |
|
|
0 commit comments