Improvements on browser SSO - #3907
Conversation
- Merge participant and session-context stores into store.go (single store impl) - Unify SQL query-constant IDs under one SSO-SESS-NN prefix - Build the graphbuilder SSO test flow inline; drop testdata/sso_flow.json - Reuse the flow version captured at context load instead of re-fetching the flow in resolveActiveFlowVersion Refs thunder-id#3779
📝 WalkthroughWalkthroughFlow execution now captures SSO flow versions during context initialization and applies inbound SSO handles directly. Session contexts and participants are persisted through operation-DB store methods, query identifiers are renumbered, and related tests use inline flow definitions. ChangesSSO execution and session persistence
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant RequestContext
participant flowExecService
participant EngineContext
participant FlowDefinition
RequestContext->>flowExecService: provide inbound SSO handle
flowExecService->>EngineContext: applyInboundSSO
FlowDefinition->>EngineContext: provide ActiveVersion
flowExecService->>EngineContext: initialize or load SSOFlowVersion
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Purpose
Follow-up to #3779 (flow-centric browser SSO), addressing review comments raised after merge. Pure code-organization and internal-cleanup changes in the flow session subsystem — no behavioral or API changes.
Approach
storetype behind a single package-privatesessionStoreinterface, their split source files (session_context_store.go,participant_store.go) are merged intostore.go. All methods already had the*storereceiver, so this is a pure file consolidation.SSO-SESS-NNprefix (01–11), dropping the old-AC-/-PART-sub-prefixes that reflected the previously-separate stores. IDs are internal identifiers only (no DB/functional impact).TestSSOFlowDefinitionBuildsnow constructs the flow definition inline as a Go literal (matching the dominant pattern ingraph_builder_test.go), andtestdata/sso_flow.jsonis removed. The test still runs against the real executor registry, so a typo'd executor name or dangling node reference still fails it.initContext/loadContextFromStore) instead of re-fetching it in a dedicatedresolveActiveFlowVersioncall. That method and the now-redundantflowUsesSSOSessiongate are removed; the version is carried onEngineContext.SSOFlowVersionthe same way the inbound handle already is.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit
Bug Fixes
New Features