[GH-ISSUE #3829] [Issue]: Reject turn-game packages without a server entrypoint before installation #2069

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The shared capability manifest contract accepts a package whose kind includes turn-game while entrypoints.server is absent. Installation persists that package as active/ready before the route attempts mandatory server activation, so activation fails after mutation and leaves an inconsistent installed record.

Expected behavior

A turn-game package without a server entrypoint should be rejected before its files or installed-registry entry are mutated.

Actual behavior

  1. capabilityPackageManifestSchema permits kind: ["turn-game"] with no entrypoints.server.
  2. installCatalogPackage() persists it with status: "active" and readiness: "ready" because there is no server entrypoint.
  3. The install route then calls capabilityModuleRuntime.activatePackage() for every turn-game package.
  4. runtimePackages() excludes the package because it has no server entrypoint, so activation throws Installed capability package <id> has no server runtime before status/error handling or rollback runs.
  5. The route's finally refreshes the agent registry but does not remove or mark the installed record as failed.

Relevant source at audited staging revision:

Steps to reproduce

  1. Create a valid capability-package fixture with kind: ["turn-game"], a client entrypoint/contribution, and no server entrypoint.
  2. Parse it with capabilityPackageManifestSchema; validation succeeds.
  3. Install it through the capability-package route using a catalog fixture.
  4. Observe the install request fails with has no server runtime.
  5. Read /api/capability-packages/installed; the package remains present as active/ready.

Environment

  • Marinara Engine version: 2.3.3 (staging revision e2aaec9bf327a686f4471deac96c1076632994d2)
  • Install type: source audit
  • OS + version: Not platform-specific; this is a source-level contract issue
  • Browser or app shell: Not applicable

Logs, screenshots, or video

A direct schema/readiness check produced:

{"parsedKind":["turn-game"],"server":null,"consideredReady":true}

The complete catalog-download route was not executed during the audit; the persistence and activation sequence above was verified statically.

Additional context

The package documentation states that turn-game installation registers its server engine immediately, so a server entrypoint is a runtime invariant.

The smallest safe fix is an install-time/catalog invariant check before artifact or registry mutation. Adding the rule directly to the base manifest schema needs compatibility consideration because the same schema parses existing installed-registry records; an already persisted malformed record should not prevent startup without a migration path.

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 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3829 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The shared capability manifest contract accepts a package whose `kind` includes `turn-game` while `entrypoints.server` is absent. Installation persists that package as active/ready before the route attempts mandatory server activation, so activation fails after mutation and leaves an inconsistent installed record. ## Expected behavior A turn-game package without a server entrypoint should be rejected before its files or installed-registry entry are mutated. ## Actual behavior 1. `capabilityPackageManifestSchema` permits `kind: ["turn-game"]` with no `entrypoints.server`. 2. `installCatalogPackage()` persists it with `status: "active"` and `readiness: "ready"` because there is no server entrypoint. 3. The install route then calls `capabilityModuleRuntime.activatePackage()` for every turn-game package. 4. `runtimePackages()` excludes the package because it has no server entrypoint, so activation throws `Installed capability package <id> has no server runtime` before status/error handling or rollback runs. 5. The route's `finally` refreshes the agent registry but does not remove or mark the installed record as failed. Relevant source at audited `staging` revision: - [Manifest fields are independently optional](https://github.com/Pasta-Devs/Marinara-Engine/blob/e2aaec9bf327a686f4471deac96c1076632994d2/packages/shared/src/schemas/capability-package.schema.ts#L22-L30) - [Installation persists active/ready state](https://github.com/Pasta-Devs/Marinara-Engine/blob/e2aaec9bf327a686f4471deac96c1076632994d2/packages/server/src/services/capability-packages/package-manager.service.ts#L288-L301) - [Turn-game installation always requests activation](https://github.com/Pasta-Devs/Marinara-Engine/blob/e2aaec9bf327a686f4471deac96c1076632994d2/packages/server/src/routes/capability-packages.routes.ts#L27-L37) - [Activation rejects packages missing a server runtime](https://github.com/Pasta-Devs/Marinara-Engine/blob/e2aaec9bf327a686f4471deac96c1076632994d2/packages/server/src/services/capability-packages/capability-module-runtime.service.ts#L200-L208) ## Steps to reproduce 1. Create a valid capability-package fixture with `kind: ["turn-game"]`, a client entrypoint/contribution, and no server entrypoint. 2. Parse it with `capabilityPackageManifestSchema`; validation succeeds. 3. Install it through the capability-package route using a catalog fixture. 4. Observe the install request fails with `has no server runtime`. 5. Read `/api/capability-packages/installed`; the package remains present as active/ready. ## Environment - Marinara Engine version: 2.3.3 (`staging` revision `e2aaec9bf327a686f4471deac96c1076632994d2`) - Install type: source audit - OS + version: Not platform-specific; this is a source-level contract issue - Browser or app shell: Not applicable ## Logs, screenshots, or video A direct schema/readiness check produced: ```json {"parsedKind":["turn-game"],"server":null,"consideredReady":true} ``` The complete catalog-download route was not executed during the audit; the persistence and activation sequence above was verified statically. ## Additional context The package documentation states that turn-game installation registers its server engine immediately, so a server entrypoint is a runtime invariant. The smallest safe fix is an install-time/catalog invariant check before artifact or registry mutation. Adding the rule directly to the base manifest schema needs compatibility consideration because the same schema parses existing installed-registry records; an already persisted malformed record should not prevent startup without a migration path. ## 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:04 +07:00
  • closed this issue
  • added the
    in-pr
    label
Author
Owner

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

Claimed by @SpicyMarinara in draft PR #3835 for this assigned issue sweep.

<!-- gh-comment-id:5016973229 --> @SpicyMarinara commented on GitHub (Jul 19, 2026): Claimed by @SpicyMarinara in draft PR #3835 for this assigned issue sweep.
Author
Owner

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

Addressed in #3835: turn-game packages without a server entrypoint are rejected before install state or package artifacts are mutated, with lifecycle regression coverage.

<!-- gh-comment-id:5017046467 --> @SpicyMarinara commented on GitHub (Jul 19, 2026): Addressed in #3835: turn-game packages without a server entrypoint are rejected before install state or package artifacts are mutated, with lifecycle regression coverage.
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#2069
No description provided.