Skip to content

fix: save session data when session id is regenerated#15749

Merged
ascorbic merged 1 commit intomainfrom
fix/session-regenerate-dirty-flag
Mar 4, 2026
Merged

fix: save session data when session id is regenerated#15749
ascorbic merged 1 commit intomainfrom
fix/session-regenerate-dirty-flag

Conversation

@ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Mar 4, 2026

Changes

Fixes a bug that caused session.regenerate() to silently lose session data

Previously, regenerated session data was not saved under the new session ID unless set() was also called. This PR fixes this by setting #dirty to true when regenrate is called.

Testing

Added a test

Docs

@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: 4e3f7b8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 4, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 4, 2026

Merging this PR will improve performance by 10.06%

⚡ 1 improved benchmark
✅ 17 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation Build: hybrid site (static + server) 8.9 s 8.1 s +10.06%

Comparing fix/session-regenerate-dirty-flag (4e3f7b8) with main (08437d5)

Open in CodSpeed

@ascorbic ascorbic merged commit 573d188 into main Mar 4, 2026
26 checks passed
@ascorbic ascorbic deleted the fix/session-regenerate-dirty-flag branch March 4, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants