[GH-ISSUE #1800] [Issue]: Haptics can bypass chat toggles and lost legacy safeguards #881

Closed
opened 2026-10-21 05:22:52 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1800

Originally assigned to: @cha1latte on GitHub.

Summary

Runtime haptics regressed several legacy safeguards. Hidden [haptic: ...] tags can be parsed and executed through connected command handling without the legacy characterCommands and enableHapticFeedback gates. Haptic-agent execution also appears to have lost auto-connect/device-context behavior, inflate support, and some mixed-device/timer safety from legacy.

Expected behavior

Haptic hardware commands should only execute when the relevant chat controls enable commands/haptic feedback and the user has connected devices. Haptic agents should receive actual connected device names/capabilities or skip safely. Legacy-supported haptic capabilities and command timing behavior should either be preserved or documented as intentional divergences.

Actual behavior

Static parity scan found these differences:

  • src/engine/generation/connected-commands.ts parses generated content and executes haptic commands through integrations.haptic.command without an obvious metadata.characterCommands or metadata.enableHapticFeedback gate.
  • Legacy packages/server/src/routes/generate.routes.ts only parsed character commands when conversationCommandsEnabled was true, and only injected haptic command guidance when enableHapticFeedback was true and devices were connected.
  • Refactor src/engine/agents-runtime/executor/agent-executor.ts can render _connectedDevices, but no refactor producer was found for that context. Legacy auto-connected Intiface and injected device names/capabilities for the haptic agent before execution.
  • Refactor haptic types/runtime omit the legacy inflate capability/action.
  • Refactor Rust haptic execution returns on the first target error and uses untracked duration stop tasks. Legacy counted per-device successes and replaced/cleared per-target stop timers.

Steps to reproduce

  1. On the refactor branch, inspect src/engine/generation/connected-commands.ts and follow persistConnectedCommandTags through parseConnectedCommands and haptic executeCommand.
  2. Confirm the haptic execution path does not check metadata.characterCommands or metadata.enableHapticFeedback before calling integrations.haptic.command.
  3. Compare legacy packages/server/src/routes/generate.routes.ts, where conversationCommandsEnabled gates character command parsing and haptic prompt injection is gated by enableHapticFeedback plus connected devices.
  4. Compare refactor haptic surfaces against legacy: src/engine/contracts/types/haptic.ts, src-tauri/src/commands/storage/integrations/haptic.rs, packages/shared/src/types/haptic.ts, and packages/server/src/services/haptic/buttplug-service.ts.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor branch, current checkout during static parity scan
  • Run mode: static code inspection only; no device/Tauri QA run
  • OS + version: not relevant for scan
  • Node + pnpm versions: not run
  • Rust version, if relevant: not run
  • Remote Runtime URL configured? not relevant for scan
  • Provider, model, or integration, if relevant: Intiface Central / Buttplug haptics

Logs, screenshots, or video

No runtime logs or screenshots. Evidence is from code comparison:

  • Refactor connected command parsing/execution: src/engine/generation/connected-commands.ts
  • Refactor haptic agent result replay: src/features/runtime/generation/hooks/use-generate.ts
  • Refactor haptic API/types/runtime: src/shared/api/haptics-api.ts, src/engine/contracts/types/haptic.ts, src-tauri/src/commands/storage/integrations/haptic.rs
  • Refactor remote-runtime exclusion for haptics: src-tauri/src/http_dispatch.rs
  • Legacy haptic gates and device injection: packages/server/src/routes/generate.routes.ts
  • Legacy haptic service/types: packages/server/src/services/haptic/buttplug-service.ts, packages/shared/src/types/haptic.ts

Regression notes

Legacy supported tighter command gating, server-side haptic agent execution with connected-device context, inflate capability/action support, mixed-device partial success, and managed duration stop timers. Refactor appears to have split haptics into Tauri-local runtime support but did not preserve all behavior.

Additional context

Recommended repair order:

  1. Gate hidden haptic execution by characterCommands and enableHapticFeedback.
  2. Add haptic status/device injection before haptic agent runs, with chat URL auto-connect or an intentional skip path.
  3. Restore mixed-device partial success and managed target timers.
  4. Decide whether to restore inflate or document its removal.
  5. Decide whether haptics are Tauri-only or should regain an explicit remote/browser path.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1800 Originally assigned to: @cha1latte on GitHub. ## Summary Runtime haptics regressed several legacy safeguards. Hidden `[haptic: ...]` tags can be parsed and executed through connected command handling without the legacy `characterCommands` and `enableHapticFeedback` gates. Haptic-agent execution also appears to have lost auto-connect/device-context behavior, `inflate` support, and some mixed-device/timer safety from legacy. ## Expected behavior Haptic hardware commands should only execute when the relevant chat controls enable commands/haptic feedback and the user has connected devices. Haptic agents should receive actual connected device names/capabilities or skip safely. Legacy-supported haptic capabilities and command timing behavior should either be preserved or documented as intentional divergences. ## Actual behavior Static parity scan found these differences: - `src/engine/generation/connected-commands.ts` parses generated content and executes haptic commands through `integrations.haptic.command` without an obvious `metadata.characterCommands` or `metadata.enableHapticFeedback` gate. - Legacy `packages/server/src/routes/generate.routes.ts` only parsed character commands when `conversationCommandsEnabled` was true, and only injected haptic command guidance when `enableHapticFeedback` was true and devices were connected. - Refactor `src/engine/agents-runtime/executor/agent-executor.ts` can render `_connectedDevices`, but no refactor producer was found for that context. Legacy auto-connected Intiface and injected device names/capabilities for the haptic agent before execution. - Refactor haptic types/runtime omit the legacy `inflate` capability/action. - Refactor Rust haptic execution returns on the first target error and uses untracked duration stop tasks. Legacy counted per-device successes and replaced/cleared per-target stop timers. ## Steps to reproduce 1. On the refactor branch, inspect `src/engine/generation/connected-commands.ts` and follow `persistConnectedCommandTags` through `parseConnectedCommands` and haptic `executeCommand`. 2. Confirm the haptic execution path does not check `metadata.characterCommands` or `metadata.enableHapticFeedback` before calling `integrations.haptic.command`. 3. Compare legacy `packages/server/src/routes/generate.routes.ts`, where `conversationCommandsEnabled` gates character command parsing and haptic prompt injection is gated by `enableHapticFeedback` plus connected devices. 4. Compare refactor haptic surfaces against legacy: `src/engine/contracts/types/haptic.ts`, `src-tauri/src/commands/storage/integrations/haptic.rs`, `packages/shared/src/types/haptic.ts`, and `packages/server/src/services/haptic/buttplug-service.ts`. ## Impact area <!-- Check the areas you think are relevant. Leave uncertain items unchecked. --> - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [ ] Roleplay mode - [ ] Game mode - [x] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor branch, current checkout during static parity scan - Run mode: static code inspection only; no device/Tauri QA run - OS + version: not relevant for scan - Node + pnpm versions: not run - Rust version, if relevant: not run - Remote Runtime URL configured? not relevant for scan - Provider, model, or integration, if relevant: Intiface Central / Buttplug haptics ## Logs, screenshots, or video No runtime logs or screenshots. Evidence is from code comparison: - Refactor connected command parsing/execution: `src/engine/generation/connected-commands.ts` - Refactor haptic agent result replay: `src/features/runtime/generation/hooks/use-generate.ts` - Refactor haptic API/types/runtime: `src/shared/api/haptics-api.ts`, `src/engine/contracts/types/haptic.ts`, `src-tauri/src/commands/storage/integrations/haptic.rs` - Refactor remote-runtime exclusion for haptics: `src-tauri/src/http_dispatch.rs` - Legacy haptic gates and device injection: `packages/server/src/routes/generate.routes.ts` - Legacy haptic service/types: `packages/server/src/services/haptic/buttplug-service.ts`, `packages/shared/src/types/haptic.ts` ## Regression notes Legacy supported tighter command gating, server-side haptic agent execution with connected-device context, `inflate` capability/action support, mixed-device partial success, and managed duration stop timers. Refactor appears to have split haptics into Tauri-local runtime support but did not preserve all behavior. ## Additional context Recommended repair order: 1. Gate hidden haptic execution by `characterCommands` and `enableHapticFeedback`. 2. Add haptic status/device injection before haptic agent runs, with chat URL auto-connect or an intentional skip path. 3. Restore mixed-device partial success and managed target timers. 4. Decide whether to restore `inflate` or document its removal. 5. Decide whether haptics are Tauri-only or should regain an explicit remote/browser path. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:22:52 +07:00
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

fixed in #1839

<!-- gh-comment-id:4595511542 --> @cha1latte commented on GitHub (Jun 1, 2026): fixed in #1839
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#881
No description provided.