Skip to content

fix: pre-populate headerSessionIndex from DB on startup#304

Merged
BYK merged 1 commit into
mainfrom
byk/fix-header-session-index-startup
May 14, 2026
Merged

fix: pre-populate headerSessionIndex from DB on startup#304
BYK merged 1 commit into
mainfrom
byk/fix-header-session-index-startup

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 14, 2026

Summary

Follow-up to #303. Fixes a pre-existing bug where headerSessionIndex was empty after process restart, causing Tier 1 session identification to fail and orphan persisted session state.

  • Load header→session mappings from session_state table in initIfNeeded() (before the first identifySession() call)
  • Clear headerSessionIndex in resetPipelineState() for test isolation
  • New loadHeaderSessionIndex() DB function + tests

After process restart, headerSessionIndex was empty so Tier 1 session
identification failed — generating new session IDs and orphaning old
persisted state. Fix by loading header→session mappings from DB in
initIfNeeded() before the first identifySession() call.

Also clear headerSessionIndex in resetPipelineState() for test isolation.
@BYK BYK merged commit ccd068b into main May 14, 2026
7 checks passed
@BYK BYK deleted the byk/fix-header-session-index-startup branch May 14, 2026 10:35
@craft-deployer craft-deployer Bot mentioned this pull request May 14, 2026
6 tasks
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