[PR #3652] [MERGED] Add versioned capability package contracts #6034

Closed
opened 2026-10-23 04:06:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3652
Author: @thetopham
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feature/capability-api-contract-3651


📝 Commits (2)

  • 9c37d8d Add versioned capability package contracts
  • 02c467c Merge branch 'staging' into feature/capability-api-contract-3651

📊 Changes

3 files changed (+105 additions, -4 deletions)

View changed files

📝 packages/server/src/services/capability-packages/package-manager.service.ts (+8 -1)
📝 packages/shared/src/schemas/capability-package.schema.ts (+38 -2)
📝 scripts/regressions/capability-package-lifecycle.regression.ts (+59 -1)

📄 Description

Linked issue

Closes #3651

Why this change

Executable downloadable packages currently declare only an Engine semver range. Hierarchical Maps 1.0.0 showed that this is not enough to detect a private host-contract mismatch before runtime. The Engine needs a small, package-generic compatibility boundary that future downloadable packages can declare without moving their implementations into core.

This is the first narrow Phase 2 prerequisite from the Hierarchical Maps recovery plan. The Maps source, version, bundles, artifacts, and catalog remain owned by Pasta-Devs/Marinara-Agents.

What changed

  • Added manifest schema v2 with required capabilityApi and exact builtAgainst provenance.
  • Preserved manifest v1 parsing for every existing installed and catalog package.
  • Published the Engine-supported capability API as version 1.0.
  • Rejected unsupported API majors and package minors newer than the host before artifact download and before runtime import.
  • Added sanitized contract/provenance fields to capability diagnostics.
  • Added lifecycle regressions for legacy compatibility, required provenance, supported contracts, unsupported major/minor versions, and runtime blocking.

No Maps implementation, package payload, generated bundle, artifact, or catalog entry changes in this PR.

Validation

Automated evidence so far:

  • pnpm build:shared — passed.

  • pnpm regression:issues — passed on Node 24.18.0.

  • git diff --check — passed.

  • pnpm check — passed (Impeccable context, TypeScript, ESLint, server/client production builds, and PWA output).

  • pnpm check passes locally

  • Container (Docker / Podman) built and ran without issue

  • Ran the app, clicked through the changes manually

  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)

  • Above manual verification completed (describe below)

  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify a manifest v1 package remains installable.
  • Manually verify a supported manifest v2 package can install and activate.
  • Manually verify unsupported v2 major/minor contracts fail before extraction and runtime import.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

The corresponding Hierarchical Maps 1.1 manifest and package-owned source migration will be a separate issue and PR in Pasta-Devs/Marinara-Agents.

UI evidence (if applicable)

No UI changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3652 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/15/2026 **Status:** ✅ Merged **Merged:** 7/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feature/capability-api-contract-3651` --- ### 📝 Commits (2) - [`9c37d8d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c37d8d819be44a53160643c788f4835ee88ec81) Add versioned capability package contracts - [`02c467c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/02c467ca234104f9634f32f0d5ad4f88b174cbd7) Merge branch 'staging' into feature/capability-api-contract-3651 ### 📊 Changes **3 files changed** (+105 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+8 -1) 📝 `packages/shared/src/schemas/capability-package.schema.ts` (+38 -2) 📝 `scripts/regressions/capability-package-lifecycle.regression.ts` (+59 -1) </details> ### 📄 Description ## Linked issue Closes #3651 ## Why this change Executable downloadable packages currently declare only an Engine semver range. Hierarchical Maps 1.0.0 showed that this is not enough to detect a private host-contract mismatch before runtime. The Engine needs a small, package-generic compatibility boundary that future downloadable packages can declare without moving their implementations into core. This is the first narrow Phase 2 prerequisite from the Hierarchical Maps recovery plan. The Maps source, version, bundles, artifacts, and catalog remain owned by Pasta-Devs/Marinara-Agents. ## What changed - Added manifest schema v2 with required `capabilityApi` and exact `builtAgainst` provenance. - Preserved manifest v1 parsing for every existing installed and catalog package. - Published the Engine-supported capability API as version 1.0. - Rejected unsupported API majors and package minors newer than the host before artifact download and before runtime import. - Added sanitized contract/provenance fields to capability diagnostics. - Added lifecycle regressions for legacy compatibility, required provenance, supported contracts, unsupported major/minor versions, and runtime blocking. No Maps implementation, package payload, generated bundle, artifact, or catalog entry changes in this PR. ## Validation Automated evidence so far: - `pnpm build:shared` — passed. - `pnpm regression:issues` — passed on Node 24.18.0. - `git diff --check` — passed. - `pnpm check` — passed (Impeccable context, TypeScript, ESLint, server/client production builds, and PWA output). - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify a manifest v1 package remains installable. - Manually verify a supported manifest v2 package can install and activate. - Manually verify unsupported v2 major/minor contracts fail before extraction and runtime import. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) The corresponding Hierarchical Maps 1.1 manifest and package-owned source migration will be a separate issue and PR in Pasta-Devs/Marinara-Agents. ## UI evidence (if applicable) No UI changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:06:26 +07:00
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#6034
No description provided.