mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7291] [MERGED] fix(mari): accept chat ids that start with a dash #7667
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#7667
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/7291
Author: @SpicyMarinara
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/mari-chat-id-dash📝 Commits (3)
08dd2b1fix(mari): accept chat ids that start with a dash8e6e789Merge origin/staging into fix/mari-chat-id-dashb36267fMerge origin/staging into fix/mari-chat-id-dash📊 Changes
3 files changed (+44 additions, -5 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/mari-db/mari-db.service.ts(+8 -5)📝
scripts/regressions/mari/chat-app-data.regression.ts(+35 -0)📄 Description
Linked issue
Closes #7289
Why this change
chat.*app_data actions could not read about 1 chat in 4096. Chat ids are 21-character nanoids, and1/64²of them start with--.executeChatActionrebuilt the action as CLI argv with the chat id as a bare positional, andparseArgs(packages/server/src/services/mari-db/mari-db.service.ts:849) reads any argument that starts with--as a flag. The id vanished, sochat.getandchat.messagesfailed withUsage: mari chats get <id>/Usage: mari chats messages <chat-id> ....staging:chat.searchwith a query that starts with--failed withUsage: mari chats search <query>, andchat.listwith acharacterIdthat starts with--read the id as another flag and returned every chat unfiltered.staginge0d33c86b(Oct 7), jobcomplete-node-regressions, failedscripts/regressions/mari/chat-app-data.regression.ts:32(assert.equal(fetched.ok, true)afterchat.get) withWARN [mari-db] structured app_data action failed ... "message": "Usage: mari chats get <id>". The fixture chat gets a fresh nanoid each run, so the regression flakes about 1 run in 4096 and passes on rerun.executeChatActionis the only app_data family that re-enters a CLI parser (this.executeChatsCommand(argv, …)is the only action-side call into anexecute*Commandmethod).character.*,persona.*,lorebook.*,theme.*,personal_extension.*,preset.*,agent.*,home_widget.*andinstruction.*call storage directly, andmari dbalready handles--ids (db-hyphen-ids.regression.ts), so nothing else needed the change.What changed
executeChatActionpasses flag values as--flag=valueand puts positionals (chat id, search query) after the--end-of-options marker thatparseArgsalready honours. No change toparseArgsor to the typedmari chats …CLI.scripts/regressions/mari/chat-app-data.regression.tsadds a chat with id--Ew_dash-chat-idand character id--dash-characterand checkschat.get,chat.messages,chat.list(character filter) andchat.search. Before the fix it fails onchat.getwith the sameUsage: mari chats get <id>error as CI; after the fix it passes.CHANGELOG.md[Unreleased]entry.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run results (not a substitute for the boxes above):
pnpm check(impeccable, localization, format, lint, e2e/token-estimation types, build): exit 0 on08dd2b189.node ./scripts/run-regressions.mjs --filter scripts/regressions/mari/: 10/10 passed (includeschat-app-dataanddb-hyphen-ids).chat-app-data.regression.tswith the new cases on unpatchedstaginga8ce0021f: fails atchat.getwithUsage: mari chats get <id>, the CI error.mari-workspace-context,mari-permissions-mode,mari-write-readbackregressions: passed.coderabbit review --agent --committed, basea8ce0021f): completed with 0 findings.Manual verification notes
--: point the server at a scratch data folder that holds a chat whose id starts with--(make it with a short script that copies a chat and its messages through the storage API under an id such as--test-chat, aschat-app-data.regression.tsdoes; editing the files by hand is not enough because message files are named after the chat id), ask Mari to read that chat's recent messages, and confirm she gets them instead of a usage error.last,afterPost,tail,limitandoffsetexactly as before (for example "read the last 5 messages of ").Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Only
CHANGELOG.mdchanged; no docs underdocs/.UI evidence (if applicable)
Not applicable: server-side change with no UI.
Summary by CodeRabbit
--, rather than treating them as options or returning unrelated chats.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.