feat(core): extract server safe core#230
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| @@ -477,15 +478,24 @@ func autoEnableValueMode3D(configs []internal_charts.ChartConfig, axes []shared. | |||
| // assembleDataset builds the output Dataset from parsed results plus the | |||
| // command's metadata and the resolved per-chart configs. | |||
| func assembleDataset(results []shared.DataPoint, m RunMeta, configs []internal_charts.ChartConfig, cfg parser.Config) *shared.Dataset { | |||
There was a problem hiding this comment.
assembleDataset already goes through core. Assemble, but the old helpers (buildDataset and friends) are still sitting next to it as a second copy. A few tests still call that old path, so they miss the code we actually ship. Can we delete the CLI copies and point those tests at assembleDataset / core.Assemble?
4295604 to
f85685a
Compare
|
Hi @fahimfaisaal I do a refactoring based on your comments, please take a look when you have a chance. Thanks |
|
Hi @hfl0506 Thanks for the chnages, Well done for moving parser errors into returned errors. One server-safety issue remains: |
|
🥷 Let’s handle the request-scoped Go benchmark metadata in #236. This PR already contains a large set of changes, so keeping this follow-up in a separate merge should make both reviews easier. |
Related Issue
Resolve #212
Changes
Added server-safe core operations for inline conversion, Dataset assembly,
merging, and UI generation.
Converted CSV/JSON parsing to reader-based, error-returning paths.
Replaced server-reachable parser select/value exits with returned errors.
Added quiet auto-detection for request paths to avoid terminal output.
Added error-returning HTML template generation APIs.
Updated CLI merge, UI, and Dataset assembly to use shared core operations.
Added core success, validation, chart, merge, UI, and 3D coverage tests.
Raised pkg/core coverage to 93.0%.
Test Steps