test: cover resolveShareAiMaxOutputTokens output-token cap (#60) #104
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #101 (commit
05a7a400, closes #60) addedresolveShareAiMaxOutputTokens()— apps/server/src/core/ai-chat/public-share-chat.service.ts:78, used at L230 — bounding per-request output tokens for the anonymous assistant.Gap: untested, while its identical sibling
resolveShareAiWorkspaceMaxhas 5 dedicated tests inpublic-share-chat.spec.ts.Needed: mirror the sibling test block: valid int; float floors via
Math.floor; NaN/unset → default (512); zero/negative → default. Regression risk: dropping theraw > 0check lets env0disable the cap → unbounded billable output.Found in code review of PR #101.