[PR #3644] [MERGED] Add capability runtime readiness diagnostics #6030

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

📋 Pull Request Information

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

Base: staging ← Head: agent/maps-readiness-3642


📝 Commits (4)

  • 51a7ef8 Add capability runtime readiness diagnostics
  • e2152a0 Share file table identity with capability bundles
  • 6e7bd64 Harden capability runtime cleanup
  • 1204209 Merge remote-tracking branch 'origin/staging' into agent/maps-readiness-3642

📊 Changes

7 files changed (+221 additions, -28 deletions)

View changed files

📝 packages/client/src/hooks/use-capability-packages.ts (+2 -1)
📝 packages/server/src/app.ts (+18 -1)
📝 packages/server/src/db/file-schema.ts (+4 -1)
📝 packages/server/src/services/capability-packages/capability-module-runtime.service.ts (+67 -17)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+45 -2)
📝 packages/shared/src/schemas/capability-package.schema.ts (+9 -0)
📝 scripts/regressions/capability-package-lifecycle.regression.ts (+76 -6)

📄 Description

Linked issue

Closes #3642

Paired downloadable package: Pasta-Devs/Marinara-Agents#15

Why this change

Hierarchical Maps 1.0.0 imports successfully and is recorded as active, but its first spatial snapshot read fails because the downloadable bundle contains a table definition from the former storage implementation. Package activation currently proves registration rather than functional readiness, so broken server-backed packages can reach agent registries and client contribution loading.

This PR provides the thin, package-generic Engine boundary for recovery. The map implementation and immutable 1.0.1 artifact remain in Marinara-Agents.

What changed

  • Added separate pending, registered, ready, and error runtime-readiness states without replacing the existing installation lifecycle.
  • Added optional package self-check execution after contribution registration, guarded cleanup, and rollback/error handling when activation or readiness fails.
  • Blocked the known-incompatible Hierarchical Maps 1.0.0 runtime before its private storage bundle can load.
  • Shared file-table identity across trusted package bundles through a global symbol while keeping Engine schema internals private.
  • Gated packaged agents and client modules on functional readiness.
  • Added sanitized package version/readiness diagnostics to Engine health without exposing map data or raw errors.
  • Added regression fixtures for blocked, failed, and successful package readiness, contribution cleanup, client gating, and cross-bundle file-table identity.

Validation

Automated evidence on Node 24.18.0:

  • pnpm install --frozen-lockfile — lockfile current; dependencies already installed.
  • pnpm regression:issues — passed, including capability lifecycle/readiness and file-table identity regressions.
  • pnpm regression:prompt — passed.
  • pnpm check — passed (Impeccable context check, TypeScript, ESLint, server build, client build, and PWA output).
  • Exact paired hierarchical-maps-1.0.1.zip proof — checksum verified; isolated Engine boot reached ready; GET/PUT/GET map routes passed; app restart preserved and re-read the map and bootstrap snapshot.
  • Live post-build restart — marinara.service active; /api/health reports the installed 1.0.0 package as degraded/error instead of active; rebuilt hashed JS bundle returned HTTP 200.

Known extraction debt: pnpm regression:spatial on current staging exits before assertions because its legacy scripts still import map source files already removed from the Engine. The exact downloadable artifact proof above exercises the recovered package boundary instead.

  • 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 install/update Hierarchical Maps through the published catalog after Marinara-Agents#15 merges.
  • Restart and verify readiness becomes ready only after its storage self-check passes.
  • Verify owner movement and an existing spatial-history chat in the browser without rewriting snapshots.
  • Verify uninstall/reinstall recovery and the visible package error/retry experience.

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)

UI evidence (if applicable)

No intentional visual UI changes. This slice adds runtime gating and health diagnostics; browser recovery copy remains separate follow-up work if maintainers want it.


🔄 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/3644 **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:** `agent/maps-readiness-3642` --- ### 📝 Commits (4) - [`51a7ef8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/51a7ef8dfca65f761f0d5be26f21bec78e67c3b9) Add capability runtime readiness diagnostics - [`e2152a0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e2152a09aef90c3a1ce287d68a3913acce3184e0) Share file table identity with capability bundles - [`6e7bd64`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6e7bd64ef7c3d1248485825604ae688615921c19) Harden capability runtime cleanup - [`1204209`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1204209898674f6571a0cb95536f5389700162d6) Merge remote-tracking branch 'origin/staging' into agent/maps-readiness-3642 ### 📊 Changes **7 files changed** (+221 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/hooks/use-capability-packages.ts` (+2 -1) 📝 `packages/server/src/app.ts` (+18 -1) 📝 `packages/server/src/db/file-schema.ts` (+4 -1) 📝 `packages/server/src/services/capability-packages/capability-module-runtime.service.ts` (+67 -17) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+45 -2) 📝 `packages/shared/src/schemas/capability-package.schema.ts` (+9 -0) 📝 `scripts/regressions/capability-package-lifecycle.regression.ts` (+76 -6) </details> ### 📄 Description ## Linked issue Closes #3642 Paired downloadable package: Pasta-Devs/Marinara-Agents#15 ## Why this change Hierarchical Maps 1.0.0 imports successfully and is recorded as active, but its first spatial snapshot read fails because the downloadable bundle contains a table definition from the former storage implementation. Package activation currently proves registration rather than functional readiness, so broken server-backed packages can reach agent registries and client contribution loading. This PR provides the thin, package-generic Engine boundary for recovery. The map implementation and immutable 1.0.1 artifact remain in Marinara-Agents. ## What changed - Added separate pending, registered, ready, and error runtime-readiness states without replacing the existing installation lifecycle. - Added optional package self-check execution after contribution registration, guarded cleanup, and rollback/error handling when activation or readiness fails. - Blocked the known-incompatible Hierarchical Maps 1.0.0 runtime before its private storage bundle can load. - Shared file-table identity across trusted package bundles through a global symbol while keeping Engine schema internals private. - Gated packaged agents and client modules on functional readiness. - Added sanitized package version/readiness diagnostics to Engine health without exposing map data or raw errors. - Added regression fixtures for blocked, failed, and successful package readiness, contribution cleanup, client gating, and cross-bundle file-table identity. ## Validation Automated evidence on Node 24.18.0: - `pnpm install --frozen-lockfile` — lockfile current; dependencies already installed. - `pnpm regression:issues` — passed, including capability lifecycle/readiness and file-table identity regressions. - `pnpm regression:prompt` — passed. - `pnpm check` — passed (Impeccable context check, TypeScript, ESLint, server build, client build, and PWA output). - Exact paired `hierarchical-maps-1.0.1.zip` proof — checksum verified; isolated Engine boot reached `ready`; GET/PUT/GET map routes passed; app restart preserved and re-read the map and bootstrap snapshot. - Live post-build restart — `marinara.service` active; `/api/health` reports the installed 1.0.0 package as degraded/error instead of active; rebuilt hashed JS bundle returned HTTP 200. Known extraction debt: `pnpm regression:spatial` on current `staging` exits before assertions because its legacy scripts still import map source files already removed from the Engine. The exact downloadable artifact proof above exercises the recovered package boundary instead. - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] 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 install/update Hierarchical Maps through the published catalog after Marinara-Agents#15 merges. - Restart and verify readiness becomes `ready` only after its storage self-check passes. - Verify owner movement and an existing spatial-history chat in the browser without rewriting snapshots. - Verify uninstall/reinstall recovery and the visible package error/retry experience. ## Docs and release impact - [x] 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) ## UI evidence (if applicable) No intentional visual UI changes. This slice adds runtime gating and health diagnostics; browser recovery copy remains separate follow-up work if maintainers want it. --- <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:23 +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#6030
No description provided.