Skip to content

Conversation

@nikhilsinhaparseable
Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable commented Jan 28, 2026

Summary by CodeRabbit

  • Improvements

    • More accurate detection and reporting of whether data has been ingested, improving visibility into pipeline status and UI indicators.
  • Breaking Changes

    • The home API dataset payload now includes a new ingestion boolean field. Consumers of the serialized HomeResponse.DataSet must expect and handle this additional field.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

Adds an ingestion: bool field to HomeResponse.DataSet, threads explicit ingestion through get_stream_metadata and generate_home_response, and computes dataset ingestion as whether any stream has events (>0); data_ingested aggregation now uses the new ingestion field. (50 words)

Changes

Cohort / File(s) Summary
Data model
src/prism/home/mod.rs
DataSet struct gains a new public field ingestion: bool; StreamMetadataResponse alias/signature updated to include the extra boolean.
Logic & flow
src/prism/home/mod.rs
get_stream_metadata now computes ingested (true if any stream has events > 0) and returns it; generate_home_response unpacks and propagates ingestion into DataSet, and data_ingested aggregation uses d.ingestion.
Behavioral tweak
src/prism/home/mod.rs
Existing internal-stream skipping logic retained; ingestion is now propagated despite that filtering.

Sequence Diagram(s)

(No sequence diagrams generated for this change.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

for next release

Suggested reviewers

  • praveen5959
  • parmesant

Poem

🐰 I hopped through code with tiny feet,
Found where streams and datasets softly meet,
A little flag — ingestion true,
Now each dataset knows what it can do,
Hooray for data, tidy and neat! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is completely empty, missing all required template sections including description, rationale, key changes, and testing/documentation checklists. Add a comprehensive description covering the goal, rationale for the changes, key modifications made, and complete the required testing and documentation checklists.
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 accurately summarizes the main change: adding an ingestion boolean field to the home API response, which is the core purpose of this PR.

✏️ 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 154-156: Change the computation of data_ingested so it uses the
server-wide streams collection instead of the RBAC-/internal-filtered datasets:
replace the current use of datasets.iter().any(|d| d.ingestion) with a check
against all_streams (or the variable holding server-wide streams) e.g.
all_streams.iter().any(|s| s.ingestion), and ensure the Checklist struct's
data_ingested field is set from that server-wide boolean rather than the
filtered datasets value.

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`:
- Line 237: The ingestion detection uses stream_jsons.iter().all(|s|
s.first_event_at.is_some()) which returns false if any metadata lacks
first_event_at; change this to use any() so ingested becomes true when any
stream_json has data: replace the call to .all(...) with .any(...) on
stream_jsons (keep the same closure checking s.first_event_at.is_some()) so the
ingested variable correctly reflects "stream has any data" semantics.

@nitisht nitisht merged commit 2fb8c0b into parseablehq:main Jan 28, 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