Add docs for chart bounded context#47877
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Pull request overview
Adds internal developer documentation for Fleet’s chart bounded context, describing its architecture, data model (SCD type-2 + bitmaps), how to add datasets, and how to test/seed chart data.
Changes:
- Added comprehensive docs for
server/chart/(architecture, dependency rules, write/read paths, adding datasets, testing, dev tooling). - Added a
server/chart/CLAUDE.mdpointer/summary for quick orientation. - Updated
tools/charts-collect/README.mdto referencehost_scd_dataand the correct internal constants source file.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/charts-collect/README.md | Updates collection docs to reflect current SCD table + internal constants reference. |
| server/chart/README.md | New end-to-end bounded-context documentation (architecture, data model, extension + testing guidance). |
| server/chart/CLAUDE.md | New quick “read this first” doc pointing to the main README and key gotchas. |
Comments suppressed due to low confidence (1)
tools/charts-collect/README.md:13
- This CVE description mentions closing the "prior-day" row and overwriting "today's" row, but the collector actually keys snapshot rows to hour boundaries (see
bucketStart := time.Now().UTC().Truncate(time.Hour)intools/charts-collect/main.go) and closes the prior open row at the current hour boundary. Updating this avoids misleading readers about the SCD semantics.
bitmaps, and reconciles into `host_scd_data` (`dataset='cve'`). Unchanged
CVEs keep their open row; changed bitmaps close the prior-day row and open
a new one for today; intra-day changes overwrite today's row via ODKU.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Related issue: Resolves #47876
Adds internal documentation for the charts bounded context, including how to add new datasets and how to test. Usable by devs and LLMs.