Skip to content

Commit 87bba8b

Browse files
committed
Release v0.6.1 with Netdata histogram metadata
1 parent cf2d64a commit 87bba8b

19 files changed

Lines changed: 1125 additions & 80 deletions

.agents/sow/SOW-status.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SOW Status
22

3-
Last updated: 2026-06-08
3+
Last updated: 2026-06-09
44

55
## Current
66

@@ -43,6 +43,13 @@ Last updated: 2026-06-08
4343

4444
## Recently Closed Or Completed
4545

46+
- SOW-0093 - Netdata Function Boundary Reader Comparison: completed after
47+
2026-06-09 regression repair and `v0.6.1` patch release. Rust and Go Netdata
48+
histogram responses now emit the libnetdata chart metadata tree, including
49+
`histogram.chart.view.dimensions.names`; the comparator rejects missing
50+
histogram chart schema and missing `sts` members; four requested reviewers
51+
returned `PRODUCTION GRADE`; Rust crates were published to crates.io at
52+
`0.6.1`; root and Go module tags are created on the close commit.
4653
- SOW-0100 - Consumer Docs And GitHub Wiki Publication: completed after
4754
regression repair. GitHub wiki navigation now uses `[[Target|Label]]` wiki
4855
links, the wiki has professional API overview plus Rust and Go language
@@ -72,15 +79,6 @@ Last updated: 2026-06-08
7279
tests cover 14 request/source/profile/progress/timeout/sampling/time
7380
behavior clusters, and all approved reviewers returned
7481
`PRODUCTION GRADE: YES`.
75-
- SOW-0093 - Netdata Function Boundary Reader Comparison: completed after
76-
regression repair. The Rust SDK Netdata function boundary now has a broad
77-
SDK-first everyday-use matrix with 20/20 stable-content passes after sampling
78-
parity repairs and explicit non-content classification for known
79-
installed-plugin `MESSAGE` corruption plus selected-and-faceted same-field
80-
quirks. The post-review-fix five-repetition default full-analysis benchmark
81-
shows SDK mean `3.950s`, plugin mean `12.678s`, and `3.21x` ratio of means.
82-
Final six-model reviewer rerun returned `PRODUCTION GRADE` from all approved
83-
reviewers.
8482
- SOW-0082 - Rust Optimized Journal Explorer API: completed after regression
8583
repair. Normal Netdata-shaped Explorer queries now use one candidate-row
8684
traversal for rows, facets, and histogram; the Netdata function wrapper keeps

.agents/sow/done/SOW-0093-20260605-netdata-function-boundary-reader-comparison.md

Lines changed: 243 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Status: completed
66

77
`completed` is the successful terminal status. `done` is a directory name, not a status value. Do not use `Status: done` or `Status: complete`.
88

9-
Sub-state: completed after regression repair. Earlier strict SDK-first
9+
Sub-state: completed after 2026-06-09 regression repair and `v0.6.1` patch
10+
release. Earlier strict SDK-first
1011
content comparison passed locally for the large default-facets full-analysis
1112
request and for the repo-local matrix covering `info`, full priority, filtered
1213
priority, full default facets, low-budget sampling, data-only, data-only delta,
@@ -25,8 +26,14 @@ stable-content passes. The current default full-analysis speedup is
2526
approximately `3.21x` by ratio of means against the installed
2627
`systemd-journal.plugin`; profiling shows the remaining time is in Explorer
2728
traversal, not wrapper glue or JSON shaping. The final whole-SOW reviewer
28-
rerun returned production-grade votes from the six approved reviewers; SOW
29-
lifecycle closeout is pending.
29+
rerun returned production-grade votes from the six approved reviewers. A later
30+
SNMP traps Netdata function integration exposed a UI-breaking histogram chart
31+
metadata gap: the SDK emitted `chart.result` plus a shallow `chart.view`, while
32+
libnetdata facets emits the full chart metadata tree including
33+
`chart.view.dimensions.names`. The regression repair now emits the required
34+
histogram chart metadata in Rust and Go, the shared comparator rejects missing
35+
histogram chart schema, four requested reviewers returned `PRODUCTION GRADE`
36+
after hardening, and Rust packages were published to crates.io at `0.6.1`.
3037

3138
## Requirements
3239

@@ -2141,3 +2148,236 @@ Reviewer findings and dispositions:
21412148
- Test-name precision and explanatory comments suggested by reviewers are
21422149
non-blocking and do not affect the shipped contract. No follow-up is
21432150
required.
2151+
2152+
## Regression - 2026-06-09
2153+
2154+
### What Broke
2155+
2156+
The Go SDK Netdata function response used by the SNMP traps integration
2157+
returned a successful table response but omitted histogram chart view dimension
2158+
metadata. The local authenticated request returned:
2159+
2160+
- `status=200`;
2161+
- `histogram.chart.result.labels=["time"]`;
2162+
- `histogram.chart.view.dimensions=null`.
2163+
2164+
The Netdata UI stack then failed while reading a `names` member from an
2165+
undefined dimensions object. The raw browser cookies and tokens from the
2166+
reported request were not copied into this SOW or any durable artifact.
2167+
2168+
### Evidence
2169+
2170+
Local response shape checked with a sanitized local request:
2171+
2172+
- top-level `columns` exists as a Netdata table column map;
2173+
- `columns.names` is not part of the table-column contract;
2174+
- `histogram.chart.view.dimensions` is missing;
2175+
- `available_histograms` is an empty array for the tested SNMP traps interval.
2176+
2177+
Netdata/libnetdata source evidence:
2178+
2179+
- `netdata/netdata @ local worktree checked read-only`
2180+
- `src/libnetdata/facets/facets.c:1209` starts
2181+
`facets_histogram_generate()`.
2182+
- `src/libnetdata/facets/facets.c:1253-1430` emits
2183+
`chart.summary`.
2184+
- `src/libnetdata/facets/facets.c:1432-1463` emits
2185+
`chart.totals`.
2186+
- `src/libnetdata/facets/facets.c:1465-1508` emits
2187+
`chart.result`.
2188+
- `src/libnetdata/facets/facets.c:1510-1552` emits
2189+
`chart.db`.
2190+
- `src/libnetdata/facets/facets.c:1554-1595` emits `chart.view`, including
2191+
`view.dimensions.grouped_by`, `ids`, `names`, `colors`, `units`, and `sts`.
2192+
- `src/libnetdata/facets/facets.c:1597-1608` emits `chart.agents`.
2193+
2194+
SDK evidence:
2195+
2196+
- `go/journal/netdata.go:1509-1528` emits only `chart.result` and a shallow
2197+
`chart.view` without `view.dimensions`.
2198+
- `rust/src/journal/src/netdata.rs:863-944` has the same omission in the Rust
2199+
reference path.
2200+
- `tests/netdata_function/compare_function_json.py:329-369` normalized only
2201+
histogram `result.labels` and `result.data`, so it could not catch missing
2202+
UI-facing chart metadata.
2203+
2204+
### Why Previous Validation Missed It
2205+
2206+
The strict comparator intentionally normalized histogram content by bucket and
2207+
label to tolerate presentation-order differences. That was valid for content
2208+
equality, but incomplete for UI replacement. It did not assert the presence of
2209+
Netdata chart metadata consumed by the dashboard.
2210+
2211+
### Repair Plan
2212+
2213+
1. Extend Rust and Go Netdata histogram builders to emit libnetdata-compatible
2214+
histogram chart metadata:
2215+
- `summary`;
2216+
- `totals`;
2217+
- `result`;
2218+
- `db`;
2219+
- `view`, including `dimensions.names`;
2220+
- `agents`.
2221+
2. Keep row/facet/histogram traversal behavior unchanged.
2222+
3. Add focused Rust and Go tests that assert empty-dimension histograms still
2223+
include the UI-facing dimension arrays and objects.
2224+
4. Extend the shared comparator or schema checks so future Netdata function
2225+
parity cannot pass when required chart metadata is missing.
2226+
5. Validate with the local SNMP traps request shape without writing sensitive
2227+
browser/session data to durable artifacts.
2228+
2229+
### Validation Plan
2230+
2231+
- Rust focused Netdata tests.
2232+
- Go focused Netdata tests.
2233+
- Shared Netdata comparator/schema tests.
2234+
- Local sanitized request against the running SNMP traps function, checking
2235+
`histogram.chart.view.dimensions.names` exists as an array.
2236+
- `git diff --check`.
2237+
- `.agents/sow/audit.sh`.
2238+
- Whole-SOW reviewer rerun after local implementation and validation.
2239+
2240+
### Artifact Updates Required
2241+
2242+
- Specs: update `.agents/sow/specs/systemd-journal-plugin-facets.md` with the
2243+
full histogram chart metadata contract.
2244+
- End-user docs: update API docs if public Netdata function response examples
2245+
omit the required chart metadata.
2246+
- SOW status: update `.agents/sow/SOW-status.md` after the repair outcome is
2247+
known.
2248+
2249+
### Implementation Progress
2250+
2251+
Local repair on 2026-06-09:
2252+
2253+
- Rust and Go Netdata histogram builders now emit the libnetdata-compatible
2254+
histogram chart envelope:
2255+
- `chart.summary`;
2256+
- `chart.totals`;
2257+
- `chart.result`;
2258+
- `chart.db`;
2259+
- `chart.view`, including `view.dimensions.grouped_by`, `ids`, `names`,
2260+
`colors`, `units`, and `sts`;
2261+
- `chart.agents`.
2262+
- Empty-dimension histograms preserve empty arrays/objects instead of omitting
2263+
the dimension metadata.
2264+
- The shared Netdata function comparator now has a histogram chart schema gate,
2265+
so missing UI-facing chart metadata fails comparison independently from
2266+
normalized bucket content.
2267+
- Specs and consumer docs now record the chart metadata contract.
2268+
2269+
Focused hardening after reviewer observations:
2270+
2271+
- Removed the unused Go `histogramLabels()` helper after the metadata builder
2272+
replaced it.
2273+
- Strengthened the comparator schema gate to require `sts.min`, `sts.max`,
2274+
`sts.avg`, `sts.arp`, and `sts.con` arrays under both
2275+
`chart.db.dimensions.sts` and `chart.view.dimensions.sts`.
2276+
- Added a Python regression test proving a missing `sts.con` member fails the
2277+
histogram schema check.
2278+
2279+
### Local Validation
2280+
2281+
Validation on 2026-06-09 after focused hardening:
2282+
2283+
- `cd go && go test ./journal -run 'TestNetdataHistogramChartMetadata|TestNetdataFunctionQueryFilters' -count=1`:
2284+
passed.
2285+
- `cd rust && cargo test -p systemd-journal-sdk netdata --lib`: passed, 51
2286+
tests.
2287+
- `python3 -m unittest tests.netdata_function.test_compare_function_json`:
2288+
passed, 25 tests.
2289+
- `python3 -m py_compile tests/netdata_function/compare_function_json.py
2290+
tests/netdata_function/test_compare_function_json.py`: passed.
2291+
- `rg -n 'histogramLabels|histogram_labels' go/journal/netdata.go
2292+
rust/src/journal/src/netdata.rs`: no matches.
2293+
- `git diff --check`: passed.
2294+
- `.agents/sow/audit.sh`: passed with clean verdict.
2295+
2296+
### Reviewer Batch
2297+
2298+
First focused reviewer batch on 2026-06-09 used the current configured models
2299+
from `~/.AGENTS.md` for the requested aliases:
2300+
2301+
- `llm-netdata-cloud/glm-5.1`: `PRODUCTION GRADE`.
2302+
- `llm-netdata-cloud/minimax-m3-coder`: `PRODUCTION GRADE`.
2303+
- `llm-netdata-cloud/mimo-v2.5-pro`: `PRODUCTION GRADE`.
2304+
- `llm-netdata-cloud/qwen3.7-plus`: `PRODUCTION GRADE`.
2305+
2306+
Reviewer findings and dispositions:
2307+
2308+
- Missing histogram metadata: all reviewers agreed the Rust and Go output now
2309+
emits the required chart metadata and fixes the UI-facing regression.
2310+
- Rust/Go parity: all reviewers accepted the changed algorithms as equivalent
2311+
for the histogram metadata contract.
2312+
- Dead Go helper: accepted and fixed by removing `histogramLabels()`.
2313+
- Comparator `sts` subkey schema gap: accepted and fixed by requiring the
2314+
expected `sts` array members in the schema validator.
2315+
- Empty-histogram `view.min` sentinel difference: accepted as non-blocking.
2316+
The SDK emits `0`; libnetdata initializes an internal empty sentinel as
2317+
`UINT32_MAX`. No shipped UI-facing requirement was found for reproducing the
2318+
sentinel, and reviewers did not treat it as a production blocker.
2319+
2320+
Final focused reviewer rerun after hardening fixes:
2321+
2322+
- `llm-netdata-cloud/glm-5.1`: `PRODUCTION GRADE`.
2323+
- `llm-netdata-cloud/minimax-m3-coder`: `PRODUCTION GRADE`.
2324+
- `llm-netdata-cloud/mimo-v2.5-pro`: `PRODUCTION GRADE`.
2325+
- `llm-netdata-cloud/qwen3.7-plus`: `PRODUCTION GRADE`.
2326+
2327+
Final reviewer findings and dispositions:
2328+
2329+
- Empty-histogram `view.min`/`view.max` sentinel difference remains accepted as
2330+
non-blocking. The SDK emits `0` for no data; no UI-facing requirement was
2331+
found for reproducing libnetdata's internal empty sentinel.
2332+
- Histogram summary point counting uses dimensions multiplied by bucket count,
2333+
matching the libnetdata summary-statistics shape; no change required.
2334+
- The Python comparator fixture uses simplified `summary` arrays because the
2335+
comparator intentionally schema-checks metadata shape and compares histogram
2336+
content through normalized buckets; no change required.
2337+
- Sensitive data gate: the reported browser request contained cookies and
2338+
bearer tokens, but this SOW records only sanitized response-shape evidence and
2339+
no raw credentials, tokens, cookies, or private endpoint data.
2340+
2341+
### Patch Release Plan
2342+
2343+
The Netdata integration needs a consumable release containing this regression
2344+
repair. The selected patch release is `v0.6.1`:
2345+
2346+
- Rust workspace version: `0.6.1`.
2347+
- Rust internal publishable package dependency versions: `0.6.1`.
2348+
- Root release tag: `v0.6.1`.
2349+
- Go submodule release tag: `go/v0.6.1`.
2350+
2351+
Tag check on 2026-06-09:
2352+
2353+
- `git ls-remote --tags origin refs/tags/v0.6.1 refs/tags/v0.6.1^{}
2354+
refs/tags/go/v0.6.1 refs/tags/go/v0.6.1^{}` returned no rows, so there is no
2355+
remote tag collision before release.
2356+
2357+
Release validation added after the version bump:
2358+
2359+
- `cd rust && cargo metadata --format-version 1`: passed and refreshed
2360+
`rust/Cargo.lock`.
2361+
- `cd go && go test ./journal -run 'TestNetdataHistogramChartMetadata|TestNetdataFunctionQueryFilters' -count=1`:
2362+
passed.
2363+
- `cd rust && cargo test -p systemd-journal-sdk netdata --lib`: passed, 51
2364+
tests, compiling the changed packages at `0.6.1`.
2365+
- `python3 -m unittest tests.netdata_function.test_compare_function_json`:
2366+
passed, 25 tests.
2367+
- `python3 tests/docs/check_wiki_docs.py`: passed, 14 wiki markdown files.
2368+
2369+
Rust crates.io publication on 2026-06-09:
2370+
2371+
- `systemd-journal-sdk-common 0.6.1`: published.
2372+
- `systemd-journal-sdk-registry 0.6.1`: published.
2373+
- `systemd-journal-sdk-core 0.6.1`: published.
2374+
- `systemd-journal-sdk-log-writer 0.6.1`: published.
2375+
- `systemd-journal-sdk-index 0.6.1`: published.
2376+
- `systemd-journal-sdk-engine 0.6.1`: published.
2377+
- `systemd-journal-sdk 0.6.1`: published.
2378+
2379+
Each crate was dry-run verified immediately before publishing. The first
2380+
dependent-crate dry-run showed that crates.io requires each new internal
2381+
dependency version to be published before the next dependent crate can resolve
2382+
it, so the release used the dependency-ordered dry-run-then-publish sequence.
2383+
No registry tokens or credential material were written to durable artifacts.

.agents/sow/specs/product-scope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ alias it as `journal` in Cargo dependencies to keep the existing
1919

2020
```toml
2121
[dependencies]
22-
journal = { package = "systemd-journal-sdk", version = "0.6.0" }
22+
journal = { package = "systemd-journal-sdk", version = "0.6.1" }
2323
```
2424

2525
The Rust workspace also publishes lower-level project-prefixed packages for

.agents/sow/specs/systemd-journal-plugin-facets.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,14 @@ Output:
630630
- histogram dimensions that occur in at least one bucket use numeric zero in
631631
buckets where that value is absent. Dimensions known only from the facet
632632
vocabulary use JSON `null` in every bucket where the value was not observed.
633+
- histogram chart metadata must preserve the libnetdata facets chart shape:
634+
`chart.summary`, `chart.totals`, `chart.result`, `chart.db`, `chart.view`,
635+
and `chart.agents` are part of the UI-facing contract. In particular,
636+
`chart.view.dimensions.names` and the sibling `ids`, `colors`, `units`, and
637+
`sts` members must exist as arrays/objects even when the selected time window
638+
has no values for the histogram field. Missing these members is a Netdata
639+
function compatibility bug even if `chart.result.labels` and bucket counts
640+
are otherwise correct.
633641

634642
Evidence: `facets.c:2817-2868`, `facets.c:1209-1609`.
635643

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ dependency alias:
7373

7474
```toml
7575
[dependencies]
76-
journal = { package = "systemd-journal-sdk", version = "0.6.0" }
76+
journal = { package = "systemd-journal-sdk", version = "0.6.1" }
7777
```
7878

7979
Advanced Rust consumers that need lower-level building blocks can also depend

SOW-status.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SOW Status
22

3-
Last updated: 2026-06-08
3+
Last updated: 2026-06-09
44

55
This root file is a short convenience index. The canonical detailed SOW ledger
66
is `.agents/sow/SOW-status.md`; if summaries differ, the canonical ledger wins.
@@ -23,6 +23,7 @@ is `.agents/sow/SOW-status.md`; if summaries differ, the canonical ledger wins.
2323

2424
## Done
2525

26+
- `SOW-0093-20260605-netdata-function-boundary-reader-comparison.md` - completed after 2026-06-09 regression repair and `v0.6.1` patch release. Rust and Go Netdata histogram responses now emit the libnetdata chart metadata tree, the comparator rejects missing histogram chart schema, four requested reviewers returned `PRODUCTION GRADE`, and Rust crates were published to crates.io at `0.6.1`.
2627
- `SOW-0100-20260608-consumer-docs-github-wiki.md` - completed after regression repair. GitHub wiki navigation now uses `[[Target|Label]]` wiki links, the wiki has professional API overview plus Rust and Go language guides with examples, and the docs validator rejects production `*.md` wiki links while allowing fenced anti-pattern examples.
2728
- `SOW-0099-20260608-rust-crates-io-publication.md` - completed. Rust SDK packages were published to crates.io at `0.6.0` under `systemd-journal-sdk` plus project-prefixed internal package names; release tags are created on the SOW close commit.
2829
- `SOW-0096-20260607-codacy-metrics-and-coverage-hygiene.md` - completed. Go and Rust coverage reports now remove test/test-harness paths before Codacy upload, the Rust/Go Codacy metrics audit is committed, GitHub code scanning has zero open alerts on final implementation commit `7e3d3e5d`, Codacy reports `issuesCount = 0`, coverage `73%`, complexity `46%`, and duplication `30%`; remaining production metric debt is tracked by SOW-0097 and SOW-0098.

docs/Explorer-And-Netdata-Queries.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,9 @@ That layer handles:
118118
- timeout behavior;
119119
- plugin-compatible response envelopes.
120120

121+
Histogram responses include the libnetdata-style chart envelope used by the
122+
Netdata UI: `summary`, `totals`, `result`, `db`, `view`, and `agents`.
123+
`view.dimensions.names` and sibling dimension arrays are present even when the
124+
selected time window has no values for the histogram field.
125+
121126
The generic SDK Explorer stays separate from Netdata-specific response shaping.

docs/Getting-Started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Use the public Rust package for normal integrations:
1919

2020
```toml
2121
[dependencies]
22-
journal = { package = "systemd-journal-sdk", version = "0.6.0" }
22+
journal = { package = "systemd-journal-sdk", version = "0.6.1" }
2323
```
2424

2525
The alias keeps imports short:
@@ -35,7 +35,7 @@ layout.
3535
## Install Go
3636

3737
```sh
38-
go get github.com/netdata/systemd-journal-sdk/go@v0.6.0
38+
go get github.com/netdata/systemd-journal-sdk/go@v0.6.1
3939
```
4040

4141
Then import:

docs/Go-API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Install the Go submodule:
44

55
```sh
6-
go get github.com/netdata/systemd-journal-sdk/go@v0.6.0
6+
go get github.com/netdata/systemd-journal-sdk/go@v0.6.1
77
```
88

99
Import the journal package:

0 commit comments

Comments
 (0)