mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix(limits): lower the session ceiling to 462 so the layout budget holds
An owner's tab layout holds at most MAX_TAB_REFS (512) refs, counting saved web tabs (up to MAX_WEBVIEWS, 50 by default) as well as sessions. With a ceiling of 500, session creation could still fail with HTTP 500 on the layout limit before the capacity message. 512 - 50 = 462; a test pins the ceiling plus MAX_WEBVIEWS inside MAX_TAB_REFS so the two limits cannot drift apart again. Co-Authored-By: Christian Haberl <116439789+christianhaberl@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
b073035bdc
commit
e58c1a2f19
9 files changed
+28
-19
No files matched your search
@@ -22,13 +22,14 @@
|
||||
const DEFAULT_MAX_CONCURRENT_SESSIONS = 50;
|
||||
|
||||
/**
|
||||
* Highest value `CODEMAN_MAX_SESSIONS` can raise the cap to. Other bounds assume
|
||||
* the session count stays small: an owner's tab layout holds at most
|
||||
* `MAX_TAB_REFS` (512) refs and `PUT /api/session-order` accepts at most 500 ids,
|
||||
* so a larger cap would let session creation fail with a 500 instead of the
|
||||
* capacity message.
|
||||
* Highest value `CODEMAN_MAX_SESSIONS` can raise the cap to. An owner's tab layout
|
||||
* holds at most `MAX_TAB_REFS` (512) refs, and those count saved web tabs as well
|
||||
* as sessions; an owner can save up to `MAX_WEBVIEWS` (50 by default) web tabs.
|
||||
* 512 - 50 = 462 keeps session creation answering with the capacity message
|
||||
* instead of failing with a 500 on the layout limit. (`PUT /api/session-order`
|
||||
* accepts up to 500 ids, which stays above this.)
|
||||
*/
|
||||
export const MAX_CONCURRENT_SESSIONS_CEILING = 500;
|
||||
export const MAX_CONCURRENT_SESSIONS_CEILING = 462;
|
||||
|
||||
/**
|
||||
* Resolve the session cap from `CODEMAN_MAX_SESSIONS` (a positive integer,
|
||||
|
||||
Reference in new issue
Block a user