Skip to content

Conversation

@nikhilsinhaparseable
Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable commented Jan 21, 2026

Summary by CodeRabbit

  • New Features
    • Stream metadata and dataset listings now include dataset format information, improving visibility into each stream's format and characteristics.
    • Home/stream responses now return format detail alongside existing metadata and timing info for clearer context.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Walkthrough

Adds a dataset_format: LogSource field to DataSet, updates StreamMetadataResponse and get_stream_metadata to return the new value, and threads that value through generate_home_response when constructing home API responses.

Changes

Cohort / File(s) Summary
Home metadata enrichment
src/prism/home/mod.rs
Imported LogSource/LogSourceEntry. Extended DataSet with dataset_format: LogSource. Changed StreamMetadataResponse and get_stream_metadata to include LogSource in returned tuple. get_stream_metadata now extracts dataset_format from stream_jsons.first().log_source.first().log_source_format.clone() and generate_home_response destructures and populates the new field.

Sequence Diagram(s)

(omitted — change is internal to a single module and does not introduce a multi-component control flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

for next release

Suggested reviewers

  • praveen5959
  • parmesant

Poem

🐰 I found a LogSource in the metadata hay,
I tucked it in DataSet and hopped on my way.
Tuples grew longer, fields snug and neat,
Home responses now carry the format so sweet.
🥕✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is empty; required sections like Description, rationale, key changes, and testing/documentation checklist are all missing. Add a detailed description covering the goal, rationale, key changes, and complete the provided checklist for testing, comments, and documentation.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding log source information to the home API response.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/prism/home/mod.rs`:
- Around line 256-259: The assignment of dataset_format using
stream_jsons[0].log_source[0].log_source_format is unsafe and discards
additional sources; instead, defend against empty lists and represent multiple
formats explicitly: when extracting dataset_format from stream_jsons (and
specifically from the log_source field), check if log_source is empty and handle
that case (e.g., set dataset_format to None or a sentinel like "unknown"), and
if there are multiple entries, either return a Vec of formats or a distinct
"mixed" value rather than silently taking the first element; update the code
that references dataset_format to accept the chosen representation and use
methods on stream_jsons, log_source, and dataset_format to locate the changes.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 21, 2026
@nitisht nitisht merged commit ca4adb8 into parseablehq:main Jan 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants