|
4 | 4 |
|
5 | 5 | Status: completed |
6 | 6 |
|
7 | | -Sub-state: Windows Rust CI compile regression repaired and validated. |
| 7 | +Sub-state: residual Go quality findings repaired and CodeQL false-positive alert dismissed. |
8 | 8 |
|
9 | 9 | ## Requirements |
10 | 10 |
|
@@ -1587,3 +1587,57 @@ Artifact impact: |
1587 | 1587 | - End-user/operator docs: no public docs change needed. |
1588 | 1588 | - End-user/operator skills: no exported integration guidance change needed. |
1589 | 1589 | - SOW lifecycle: this completed SOW was reopened from `done/` to `current/` for a true regression and will be completed again with the repair commit. |
| 1590 | + |
| 1591 | +## Regression - 2026-06-05 |
| 1592 | + |
| 1593 | +What broke: |
| 1594 | + |
| 1595 | +- GitHub AI quality findings reported two issues in `src/go/pkg/netipc/protocol/lookup_common.go` after the maintainability split: |
| 1596 | + - exported type `LookupLabelView` lacked a Go doc comment. |
| 1597 | + - `finishLookupResponse()` converted `itemCount` through `checkedInt(uint64(itemCount))` after the stronger `checkedInt(uint64(itemCount) * uint64(LookupDirEntrySize))` guard had already succeeded, making the second checked conversion unreachable. |
| 1598 | +- GitHub CodeQL reported one open `cpp/stack-address-escape` alert: |
| 1599 | + - alert `7641` |
| 1600 | + - `src/libnetdata/netipc/src/service/netipc_service_posix_server.c:273` |
| 1601 | + - `sctx->server = server` |
| 1602 | + |
| 1603 | +Evidence: |
| 1604 | + |
| 1605 | +- `src/go/pkg/netipc/protocol/lookup_common.go:19` exported `LookupLabelView` without a doc comment. |
| 1606 | +- `src/go/pkg/netipc/protocol/lookup_common.go:447` already validates `itemCount * LookupDirEntrySize` fits in `int`; since `LookupDirEntrySize` is `8`, a subsequent bare `itemCount` conversion cannot fail after that guard. |
| 1607 | +- GitHub code scanning API reported alert `7641` with rule `cpp/stack-address-escape`, path `src/libnetdata/netipc/src/service/netipc_service_posix_server.c`, line `273`. |
| 1608 | + |
| 1609 | +Root-cause model: |
| 1610 | + |
| 1611 | +- The Go findings are straightforward hygiene issues introduced or exposed by the lookup common split. |
| 1612 | +- The CodeQL finding is a lifecycle false positive: the session context stores the caller-owned managed-server pointer while the managed server owns the session list, and `nipc_server_drain()` / `nipc_server_destroy()` join all session threads before releasing the session array. CodeQL's own query help says this pattern can be safe if the stored address is never used after the function returns, but it is not generally recommended without clear lifetime control. |
| 1613 | + |
| 1614 | +Repair plan: |
| 1615 | + |
| 1616 | +- Add a Go doc comment for `LookupLabelView`. |
| 1617 | +- Replace the redundant checked conversion with `count := int(itemCount)` after the existing directory-size guard. |
| 1618 | +- Dismiss CodeQL alert `7641` as a false positive with the managed-server lifecycle reason; do not disable the rule. |
| 1619 | + |
| 1620 | +Repair implemented: |
| 1621 | + |
| 1622 | +- `LookupLabelView` now has a Go doc comment beginning with the exported identifier name. |
| 1623 | +- `finishLookupResponse()` now uses `count := int(itemCount)` after the existing `itemCount * LookupDirEntrySize` guard. |
| 1624 | +- GitHub CodeQL alert `7641` was dismissed as a false positive, with the managed-server/session lifetime reason recorded in the alert dismissal comment. |
| 1625 | + |
| 1626 | +Validation: |
| 1627 | + |
| 1628 | +- `gofmt` was run on `src/go/pkg/netipc/protocol/lookup_common.go`. |
| 1629 | +- `go test -C src/go ./pkg/netipc/protocol` passed. |
| 1630 | +- `go test -C src/go ./...` passed. |
| 1631 | +- `codacy-analysis analyze --files src/go/pkg/netipc/protocol/lookup_common.go --output-format json` passed with 0 issues and 0 errors. |
| 1632 | +- `git diff --check` passed. |
| 1633 | +- GitHub code scanning open-alert query returned 0 open alerts after dismissing alert `7641`. |
| 1634 | +- `bash .agents/sow/audit.sh` passed after moving this completed SOW back to `done/`, with status and directory consistent. |
| 1635 | + |
| 1636 | +Artifact impact: |
| 1637 | + |
| 1638 | +- `AGENTS.md`: no workflow or guardrail change. |
| 1639 | +- Runtime project skills: no reusable workflow change. |
| 1640 | +- Specs: no protocol/API behavior change; the Go doc comment describes existing type purpose. |
| 1641 | +- End-user/operator docs: no docs change needed. |
| 1642 | +- End-user/operator skills: no exported integration guidance change needed. |
| 1643 | +- SOW lifecycle: this completed SOW was reopened from `done/` to `current/` for residual findings and is completed again with the repair commit and alert disposition. |
0 commit comments