Skip to content

Fix Flow methods not inheriting client user_id/session_id#12

Merged
enaboapps merged 1 commit intomasterfrom
fix/flow-user-context-2
Feb 16, 2026
Merged

Fix Flow methods not inheriting client user_id/session_id#12
enaboapps merged 1 commit intomasterfrom
fix/flow-user-context-2

Conversation

@enaboapps
Copy link
Owner

@enaboapps enaboapps commented Feb 16, 2026

Summary

  • Pass client-level user_id and session_id to LogEntry in Flow._log()
  • Flow logs now inherit user context set via client.set_user_id()/set_session_id()

Closes #2

Test plan

  • All 26 existing tests pass

Summary by CodeRabbit

Release Notes

  • Improvements
    • Enhanced logging to include user and session context information, enabling better tracking and correlation of system activities.

- Pass client-level user_id and session_id to LogEntry in Flow._log()
- Flow logs now inherit user context set via client.set_user_id()/set_session_id()

Closes #2

🤖 Auto-generated
@enaboapps enaboapps added this to the v1.1.0 milestone Feb 16, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The Flow._log method now includes user_id and session_id from the client when constructing LogEntry objects, ensuring flow-based log entries inherit the same user and session context that direct client logging methods provide.

Changes

Cohort / File(s) Summary
Flow Logging Context
timberlogs/client.py
Added user_id and session_id parameters from client to LogEntry construction in Flow._log method, aligning flow log behavior with direct client logging.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A humble fix, so small yet keen,
Two fields now passed, a missing scene—
User and session, now aligned,
Flow logs complete, no context left behind! 🌲

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding user_id and session_id inheritance from client to Flow methods.
Linked Issues check ✅ Passed The PR implementation matches the requirements from issue #2: Flow._log() now passes client user_id and session_id to LogEntry, fixing the user context loss.
Out of Scope Changes check ✅ Passed All changes are focused on the stated objective of adding user_id and session_id to Flow log entries; no extraneous modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into master

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/flow-user-context-2

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.

@enaboapps enaboapps merged commit bd0c2e8 into master Feb 16, 2026
1 check passed
@enaboapps enaboapps deleted the fix/flow-user-context-2 branch February 16, 2026 10:18
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.

Fix Flow methods not inheriting client user_id/session_id

2 participants