Skip to content

Fix event source defaults and block handling in LedgerClient#113

Merged
jfrench9 merged 1 commit into
mainfrom
bugfix/ledger-event-block-fixes
May 7, 2026
Merged

Fix event source defaults and block handling in LedgerClient#113
jfrench9 merged 1 commit into
mainfrom
bugfix/ledger-event-block-fixes

Conversation

@jfrench9
Copy link
Copy Markdown
Member

@jfrench9 jfrench9 commented May 7, 2026

Summary

Updates the LedgerClient to correct event source default values so they accurately reflect the true origin of ledger events. This bugfix ensures that events recorded through the ledger client carry proper source attribution, preventing misidentification of event origins.

Key Accomplishments

  • Corrected event source defaults: Updated default parameter values in LedgerClient to accurately represent the originating source of events, replacing previously inaccurate defaults.
  • Enhanced block handling logic: Added approximately 25 lines of new logic to the ledger client, suggesting improved handling of event blocks (e.g., better construction, validation, or default population of block-level fields).
  • Updated tests: Adjusted test assertions to align with the corrected default values, ensuring test coverage reflects the intended behavior.

Breaking Changes

⚠️ Potentially breaking for consumers relying on previous default values. If downstream code or systems depend on the old default event source values (e.g., for filtering, routing, or matching), those integrations may need to be updated to expect the new correct defaults.

Testing Notes

  • Existing unit tests in test_ledger_client.py have been updated to validate the corrected default source values.
  • Verify that any integration tests or end-to-end pipelines that consume ledger events still correctly process events with the updated source field defaults.
  • Confirm that ledger entries created after this change carry the expected origin metadata in staging/test environments before promoting to production.

Infrastructure Considerations

  • Data consistency: Events written before this fix will retain the old (incorrect) source defaults. Consider whether historical data needs annotation or backfilling to maintain consistency in reporting or auditing workflows.
  • Dependent services: Any services that filter or route based on the event source field should be reviewed to ensure compatibility with the corrected values.

🤖 Generated with Claude Code

Branch Info:

  • Source: bugfix/ledger-event-block-fixes
  • Target: main
  • Type: bugfix

Co-Authored-By: Claude noreply@anthropic.com

@jfrench9 jfrench9 merged commit 66f9ee7 into main May 7, 2026
1 check passed
@jfrench9 jfrench9 deleted the bugfix/ledger-event-block-fixes branch May 7, 2026 21:43
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