mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7727] [MERGED] fix(backup): keep agents' Max Output Tokens in profile exports #7899
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7899
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7727
Author: @SpicyMarinara
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7661-profile-export-maxtokens📝 Commits (1)
0c2efa7fix(backup): keep agents' Max Output Tokens in profile exports📊 Changes
2 files changed (+71 additions, -6 deletions)
View changed files
📝
packages/server/src/routes/backup.routes.ts(+10 -6)➕
scripts/regressions/profile-export-agent-settings.regression.ts(+61 -0)📄 Description
Linked issue
Closes #7661
Why this change
settings.maxTokens) tonull. The export treated any agent setting whose name merely contained "token", "secret", "password" or "apiKey" as a credential, andmaxTokenscontains "token". Restoring that profile on a fresh install put every agent back on the default output limit without any warning.maxContextTokens,summaryBudgetTokens, package settings likeexistingNoteTokenBudget), and it had already needed a name-by-name exemption for the Secret Plot settings (#7657).What changed
redactAgentSecrets(profile export, both native and compatible) now treats a setting as a credential only when its name ends in a credential word, optionally storedEncrypted:token,spotifyAccessToken,spotifyRefreshToken,youtubeApiKey,apiKey/api_key,clientSecret,secret(s),password(s),passphrase,credential(s),bearer,privateKey/accessKey/secretKey,accessTokens/refreshTokens,apiKeyEncrypted. Nested settings are still checked the same way.maxTokens,maxOutputTokens,existingNoteTokenBudget), so they export again. Secret Plot settings only start with "secret", so the three-name exemption from #7657 is gone. A credential-style name under that prefix (secretPlotToken) is still blanked.scripts/regressions/profile-export-agent-settings.regression.tsruns an agent row throughsanitizeProfileTableRows("agent_configs", …). It checks that 10 non-credential settings survive, 13 credential names are blanked, nested settings follow the same rule, and no credential value reaches the export. On unfixedstagingit fails withmaxTokens ... null !== 2048.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run checks (not a substitute for the boxes above):
npx tsc --noEmitfor shared, server, client and rootprettier --checkon both changed filesprofile-export-agent-settings(new; fails before the fix, passes after),bulk-export-zips,nanogpt-credentials,connection-model-list,profile-import-data-security,profile-import-asset-securityManual verification notes
profile-tables/agent_configs.jsonlkeepssettings.maxTokens: 2048.spotifyAccessToken,spotifyRefreshTokenandyoutubeApiKeyset tonull.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No docs, UI copy, version or changelog changes.
UI evidence (if applicable)
Not applicable (server-side export only).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.