[GH-ISSUE #3847] [Issue]: Capability contracts expose resultType and interruptibleSeats without host behavior #2077

Closed
opened 2026-10-21 05:45:09 +07:00 by bsakaguchi · 2 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Two exported capability contracts advertise behavior that the Engine host never consumes:

  1. BuiltInAgentManifest.resultType is accepted and transmitted, but built-in runtime defaults only read defaultSettings.resultType.
  2. TurnGameEngine.interruptibleSeats() is required and implemented by turn-game packages, but neither host turn-game runner calls it.

This makes the package API misleading: package authors can provide valid contract fields that have no effect.

Expected behavior

Every advertised capability-contract member should either influence host behavior or be removed from the active authoring contract. Legacy package data should remain installable where compatibility requires it.

Actual behavior

  • packages/shared/src/features/agents/agent-manifest.types.ts exposes optional resultType.
  • packages/shared/src/schemas/capability-package.schema.ts accepts the same top-level field.
  • getDefaultBuiltInAgentSettings() in packages/shared/src/types/agent.ts reads defaultSettings, promptTemplates, defaultInjectAsSection, and runInterval, but never reads the manifest's top-level resultType.
  • Current official rewrite-agent definitions compensate by storing text_rewrite both at the top level and under defaultSettings.resultType; only the latter affects runtime behavior.
  • packages/shared/src/features/turn-games/engine.types.ts requires interruptibleSeats().
  • The server runners call currentSeat, legalMoves, applyMove, describeForModel, and publicView, but never call interruptibleSeats. UNO computes a non-empty interruptible-seat list for jump-in/call-out situations, but that contract member does not drive host scheduling.

Steps to reproduce

  1. Trace BuiltInAgentManifest.resultType from package parsing through replaceBuiltInAgentDefinitions() and getDefaultBuiltInAgentSettings().
  2. Observe that only defaultSettings.resultType reaches resolved agent settings.
  3. Search the client and server for reads or calls to interruptibleSeats.
  4. Observe that the only occurrences are the interface declaration and package implementations.

Environment

  • Marinara Engine version: staging checkout, package version 2.3.3
  • Install type: source
  • OS + version: Not environment-dependent
  • Browser or app shell: Not applicable

Logs, screenshots, or video

Not applicable; this is a static package-contract trace.

Additional context

Suggested compatibility-safe cleanup:

  • Remove resultType from BuiltInAgentManifest so new code does not advertise it. Continue accepting the top-level field in the strict package schema as deprecated compatibility data for already-installed or older packages. Keep defaultSettings.resultType as the canonical runtime setting.
  • Decide whether out-of-turn bot interruption is intended. If yes, wire interruptibleSeats() into runner behavior with explicit turn-order/concurrency handling. If no, remove it from TurnGameEngine and update the package source contracts; existing bundled package objects may retain the extra method without runtime breakage.

The two members are grouped because they share the same root problem: the exported host contract promises package behavior that the host does not provide.

Template check

Please uncheck (untick) 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 (Jul 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3847 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Two exported capability contracts advertise behavior that the Engine host never consumes: 1. `BuiltInAgentManifest.resultType` is accepted and transmitted, but built-in runtime defaults only read `defaultSettings.resultType`. 2. `TurnGameEngine.interruptibleSeats()` is required and implemented by turn-game packages, but neither host turn-game runner calls it. This makes the package API misleading: package authors can provide valid contract fields that have no effect. ## Expected behavior Every advertised capability-contract member should either influence host behavior or be removed from the active authoring contract. Legacy package data should remain installable where compatibility requires it. ## Actual behavior - `packages/shared/src/features/agents/agent-manifest.types.ts` exposes optional `resultType`. - `packages/shared/src/schemas/capability-package.schema.ts` accepts the same top-level field. - `getDefaultBuiltInAgentSettings()` in `packages/shared/src/types/agent.ts` reads `defaultSettings`, `promptTemplates`, `defaultInjectAsSection`, and `runInterval`, but never reads the manifest's top-level `resultType`. - Current official rewrite-agent definitions compensate by storing `text_rewrite` both at the top level and under `defaultSettings.resultType`; only the latter affects runtime behavior. - `packages/shared/src/features/turn-games/engine.types.ts` requires `interruptibleSeats()`. - The server runners call `currentSeat`, `legalMoves`, `applyMove`, `describeForModel`, and `publicView`, but never call `interruptibleSeats`. UNO computes a non-empty interruptible-seat list for jump-in/call-out situations, but that contract member does not drive host scheduling. ## Steps to reproduce 1. Trace `BuiltInAgentManifest.resultType` from package parsing through `replaceBuiltInAgentDefinitions()` and `getDefaultBuiltInAgentSettings()`. 2. Observe that only `defaultSettings.resultType` reaches resolved agent settings. 3. Search the client and server for reads or calls to `interruptibleSeats`. 4. Observe that the only occurrences are the interface declaration and package implementations. ## Environment - Marinara Engine version: staging checkout, package version 2.3.3 - Install type: source - OS + version: Not environment-dependent - Browser or app shell: Not applicable ## Logs, screenshots, or video Not applicable; this is a static package-contract trace. ## Additional context Suggested compatibility-safe cleanup: - Remove `resultType` from `BuiltInAgentManifest` so new code does not advertise it. Continue accepting the top-level field in the strict package schema as deprecated compatibility data for already-installed or older packages. Keep `defaultSettings.resultType` as the canonical runtime setting. - Decide whether out-of-turn bot interruption is intended. If yes, wire `interruptibleSeats()` into runner behavior with explicit turn-order/concurrency handling. If no, remove it from `TurnGameEngine` and update the package source contracts; existing bundled package objects may retain the extra method without runtime breakage. The two members are grouped because they share the same root problem: the exported host contract promises package behavior that the host does not provide. ## Template check Please **uncheck (untick)** 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:45:09 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 20, 2026):

@SpicyMarinara is taking this. I’ll make the authoring contracts match host behavior while preserving legacy package parsing for top-level resultType data.

<!-- gh-comment-id:5020079712 --> @SpicyMarinara commented on GitHub (Jul 20, 2026): @SpicyMarinara is taking this. I’ll make the authoring contracts match host behavior while preserving legacy package parsing for top-level resultType data.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 20, 2026):

Addressed in #3853 and merged into staging.

<!-- gh-comment-id:5020383630 --> @SpicyMarinara commented on GitHub (Jul 20, 2026): Addressed in #3853 and merged into staging.
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#2077
No description provided.