mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7289] [Issue]: Professor Mari chat actions fail for chat ids that start with -- #4064
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#4064
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?
Originally created by @SpicyMarinara on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7289
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Professor Mari's structured
chat.*app_data actions cannot read a chat whose id starts with--. Chat ids are 21-character nanoids, so about 1 chat in 4096 starts with--(1/64²). For those chats,chat.getandchat.messagesfail withUsage: mari chats get <id>, andchat.listwith a character id that starts with--silently ignores the filter.This also makes
scripts/regressions/mari/chat-app-data.regression.tsflaky in CI, because the fixture chat gets a fresh nanoid on every run.Expected behavior
chat.get,chat.messages,chat.list(withcharacterId) andchat.searchtreat the chat id, character id, or query as a value whatever its first characters are.Actual behavior
executeChatAction(packages/server/src/services/mari-db/mari-db.service.ts) turns the structured action back into CLI argv ([sub, <chatId>, --flag, value]) and hands it toexecuteChatsCommand, whoseparseArgs(line 849) treats any argument starting with--as a flag. The chat id disappears from the positionals:chat.get/chat.messagesthrowUsage: mari chats get <id>/Usage: mari chats messages <chat-id> ....chat.listwithcharacterId: "--…"pushes--character --…; the value is read as another flag,--characterbecomestrue, and the list comes back unfiltered.chat.searchwith a query that starts with--throwsUsage: mari chats search <query>.Other app_data families (
character.*,lorebook.*,persona.*,theme.*,preset.*, …) call storage directly and do not go throughparseArgs;executeChatActionis the only action that re-enters a CLI parser.Steps to reproduce
--(for example insert a chat row with id--Ew_dash-chat-id, or create chats until nanoid produces one).new MariDbService(db).executeAction({ action: "chat.get", chatId: "--Ew_dash-chat-id" }).{ ok: false, error: "Usage: mari chats get <id>" }instead of the chat.Environment
stagingate0d33c86b, and currentstaginga8ce0021f)ubuntu-latest), reproduced locallyLogs, screenshots, or video
Regression Checks run 37618203499 on
staginge0d33c86b(Oct 7), jobcomplete-node-regressions:Line 32 is
assert.equal(fetched.ok, true)right afterexecuteAction({ action: "chat.get", chatId: chat.id }), wherechat.idis a fresh nanoid. The same regression passes on rerun because the next id does not start with--.Additional context
Found during the nightly e2e/CI triage.
mari dbalready handles---prefixed ids through known value flags and the--end-of-options marker (db-hyphen-ids.regression.ts); the chat bridge does not use either.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Oct 8, 2026):
Fixed on
stagingby #7291. Ships tomainwith the next promotion.