Skip to content

feat(data-pathways): source id/name + delivery-log sourceId/eventType#215

Merged
jbiskur merged 1 commit intomainfrom
feat/delivery-log-source-event
Apr 23, 2026
Merged

feat(data-pathways): source id/name + delivery-log sourceId/eventType#215
jbiskur merged 1 commit intomainfrom
feat/delivery-log-source-event

Conversation

@jbiskur
Copy link
Copy Markdown
Contributor

@jbiskur jbiskur commented Apr 23, 2026

Summary

  • SourceConfigSchema gets optional id + name so callers can address and label pathway sources that share a flowType.
  • DataPathwayDeliveryLogEntrySchema adds nullable sourceId + eventType.
  • DataPathwayDeliveryLogBatchEntrySchema accepts the two new fields on POST.

Mirrors the additive Phase 1 contract landed in data-pathways v2.6.0. Phase 2 will swap pump_states uniqueness to be id-keyed and add sourceId-addressed pump-state commands; this SDK change lands the additive surface first so consumers can start reading the new fields.

Test plan

  • deno test --allow-all test/tests/commands/data-pathways.test.ts green (new case: should accept sourceId and eventType on delivery log batch entries)
  • CI green

Summary by CodeRabbit

  • New Features

    • Data sources now support optional identifiers and names; delivery logs can track source identification and event type information for enhanced data monitoring.
  • Tests

    • Added tests for delivery-log batch commands with new metadata field support.

Mirrors the additive Phase 1 contract in data-pathways v2.6.0:

- SourceConfigSchema gains optional id + name so callers can address
  and label pathway sources that share a flowType.
- DataPathwayDeliveryLogEntrySchema adds nullable sourceId + eventType
  so consumers can see which source / event type produced each row.
- DataPathwayDeliveryLogBatchEntrySchema accepts the same two fields
  on POST so workers can report them.

Phase 2 in data-pathways will swap pump_states to id-keyed uniqueness
and add sourceId-addressed pump-state commands; this SDK change lands
the additive surface first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

TypeBox schemas in data-pathways.ts are extended with optional metadata fields. SourceConfigSchema gains id and name properties, while delivery log entry schemas gain sourceId and eventType fields. A corresponding test validates the batch command accepts these new fields.

Changes

Cohort / File(s) Summary
Schema Metadata Enhancement
src/contracts/data-pathways.ts
Added optional id and name properties to SourceConfigSchema. Added sourceId and eventType fields (string or null) to delivery log entry and batch entry schemas.
Batch Command Test Coverage
test/tests/commands/data-pathways.test.ts
New test for delivery-log batch command verifying acceptance of sourceId and eventType per-entry fields alongside existing required fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Hop, skip, and a bound through metadata land,
New fields now dance in schemas so grand!
Source IDs and events in careful array,
Tested and typed in the most fluffy way! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main changes: adding source id/name to SourceConfigSchema and sourceId/eventType to delivery-log schemas, which aligns with the primary modifications shown in both modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/delivery-log-source-event

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jbiskur jbiskur merged commit 7d44549 into main Apr 23, 2026
1 of 2 checks passed
@jbiskur jbiskur deleted the feat/delivery-log-source-event branch April 23, 2026 13:30
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.

1 participant