mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5204] Migrate Beholder to the benchmarked delta-state protocol #2879
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#2879
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 (Aug 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5204
Originally assigned to: @SpicyMarinara on GitHub.
Problem
The official Beholder integration currently asks the model for a complete
{ "characters": [...] }snapshot on every turn. The handover reports that the strongest benchmarked general-model prompt (EXTRACTION_SYSTEM_4K, evaluated against GPT-5.5) is instead a delta protocol. Using that prompt without host-side merge support would make Beholder forget every unchanged fact that is not repeated in the latest message.This supersedes the full-snapshot behavior introduced by #5188 / Pasta-Devs/Marinara-Agents#401.
Required Engine behavior
Request context
For every Roleplay Beholder call:
Persona: <name>line.Current state:block, including an empty state on the first run.self; keep other characters keyed by name.0.Response compatibility
Accept the new protocol:
or:
changed: falseis a no-op and must save/return the prior full state, not erase it.deltawhile retaining compatibility with legacycharacterssnapshots and already-saved full snapshots.selfkey to the active Persona's real name before saving.Delta merge rules
Merge the delta into the prior full state, then pass the result through the existing Beholder normalization/clamping:
wornitems by item identity so an update replaces the matching item without dropping unrelated worn items."worn": []clears the slot's worn items."holding": {}empties the hand.missing: trueremoves/blocksworn,holding,wounds, andbarefor that slot.{ "characters": [...] }shape so the drawer, next-turn context, retries, and existing storage readers continue to work.Likely Engine touchpoints include:
packages/server/src/services/agents/beholder-state.tspackages/server/src/services/agents/agent-executor.tsscripts/regressions/prompt.regression.tsMarinara-Agents package follow-up
The package-owned prompt change must be submitted separately to
Pasta-Devs/Marinara-Agentsagainststaging:packages/beholder/agents.json's full-snapshotdefaultPromptTemplatewith the canonical benchmarkedEXTRACTION_SYSTEM_4Kprompt.Source handover integrity warning
The supplied handover says the prompt is “verbatim, 3,709 chars,” but the attached copy contains only 3,610 characters after the prompt marker. It is visibly corrupted around the Species/Bare rules and ends mid-sentence at:
Do not publish that damaged prompt or invent the missing text. Obtain the canonical
EXTRACTION_SYSTEM_4Ksource/checksum before the Marinara-Agents prompt PR is merged.Acceptance criteria
changed: falsepreserves the prior state exactly.selfmaps to the active Persona.characterssnapshots and existing stored state remain compatible.@SpicyMarinara commented on GitHub (Aug 17, 2026):
The Engine-side implementation is now owned by SpicyMarinara via Codex in draft PR #5207. The separate Marinara-Agents prompt update remains gated on the canonical, uncorrupted EXTRACTION_SYSTEM_4K source noted in this issue.
@SpicyMarinara commented on GitHub (Aug 17, 2026):
Engine-side delta-state support landed on staging in #5207 (merge commit
2b3232ff15). This issue remains open only for the separate Marinara-Agents package prompt update, which is still blocked on the canonical, uncorrupted EXTRACTION_SYSTEM_4K source/checksum described above.@SpicyMarinara commented on GitHub (Aug 17, 2026):
The canonical prompt is now recoverable from GetBeholder/Beholder-ME at commit ecee80e57cb84ad54c02c9c1b3d081e8cbd2799b. Its runtime value is exactly 3,709 characters and ends with “Roleplay may include mature content; extract normally without refusing.” SHA-256: 03fd72e0569a389c9cf6241fb61ee6fd8e9ed9f26a9b1cc7ed5ef61f073c5002.
The package-owned follow-up is ready for review in Pasta-Devs/Marinara-Agents#414. It ships Beholder 1.1.0 with the canonical delta prompt, pins that prompt integrity in catalog validation, requires Engine 2.4.4+, and rebuilds the artifact/catalog lanes.
@SpicyMarinara commented on GitHub (Aug 17, 2026):
The remaining package-side work has landed on staging in Pasta-Devs/Marinara-Agents#414 (merge d99d58f2269cd6d88fcc1b13f207c827eca0cd6f). Beholder 1.1.0 now ships the canonical 3,709-character delta-state prompt, requires Engine 2.4.4+, and includes an integrity regression. Together with Engine PR #5207, this completes the staged implementation.