Repository navigation
Sessions survive deploys, 12-hour idle timeout (#194) - #222
Merged
Merged
Conversation
Session files move from PHP's default (the container's tmp, lost on every recreate) to var/sessions, inside the volume every topology mounts. AuthSession stamps last_active_at on login and on every authenticated request, and ends a login idle for more than 12 hours. Only the login is dropped, not the session: the check runs before the CSRF listener, and invalidating there would turn an idle tab's first write into a 403 the client doesn't treat as a logout. gc_maxlifetime is 48 hours, for disk cleanup only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI's mutation job flagged two escaped mutants in the idle branch. The filter-disable call there had no reachable effect (CompanyFilterListener resets the filter per request) and is dropped; the timestamp removal now has a unit test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #194, part of #213.
What changes
var/sessions, inside the/app/varvolume every topology mounts. Notvar/cache, which the deploy step deletes.AuthSessionstampslast_active_aton login and on every authenticated request, and ends a login idle for more thanIDLE_TIMEOUT_SECONDS. A logged-in session with no stamp counts as idle.CompanyFilterListener, before the CSRF listener; invalidating the session there made an idle tab's first write fail with 403 "invalid CSRF token", which the client doesn't treat as a logout. Found in review round 1.gc_maxlifetimeis 48 hours, disk cleanup only.cookie_lifetimestays0.No migration, no frontend change.
Verification
make verify-pr-readypasses (808 backend tests, lint, mutation)./api/mebefore and afterdocker compose up -d --force-recreate; withlast_active_atset 12h 5s back it returned 401.code-reviewrounds; the second came back with nothing that held up.Not done
See
docs/decisions/2026-10-03-sessions-survive-deploys-idle-timeout.md.🤖 Generated with Claude Code