[GH-ISSUE #4889] [Issue]: Keep Agent registries consistent after capability hydration #2710

Closed
opened 2026-10-21 05:53:33 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Agent registry consumers currently have two consistency liabilities: the ordered result-type vocabulary is handwritten separately in TypeScript, Zod, and executor admission, while the Connections Sidecar card snapshots the mutable built-in Agent registry once and can miss tracker Agents that arrive after capability-package hydration.

Expected behavior

  • One ordered result-type vocabulary should drive TypeScript, request validation, and runtime executor admission without changing the existing 28 values, their order, mappings, or unknown-value fallbacks.
  • Connections should react when capability Agent manifests hydrate or refresh.
  • The displayed local tracker count and “assign all trackers to local” action should use the same current visible tracker list, excluding hidden trackers.

Actual behavior

  • Adding or changing a result type requires coordinated edits to three literal lists, so a future partial edit can make the compile-time, request, and runtime contracts disagree.
  • SidecarCard derives tracker Agents from BUILT_IN_AGENTS in a memo with no dependencies. If Connections mounts before package-backed manifests hydrate, the card can retain the initial tracker list until remounted.

Steps to reproduce

  1. Use a source checkout with a package-backed visible tracker Agent available.
  2. Open Connections before /api/capability-packages/agents finishes hydrating the shared registry.
  3. Keep the Connections panel mounted while capability Agents hydrate or refresh.
  4. Inspect the Local Model Sidecar tracker count or use “assign all trackers to local.”
  5. Observe that the pre-hydration snapshot can omit the late tracker until the card remounts.

The vocabulary liability is established statically: compare the three handwritten result-type lists in shared types, the shared Zod schema, and executor admission.

Environment

  • Marinara Engine version: 2.4.2 development tree based on staging commit db0c598e3b32c29170d0c865a735fde8c624dd19
  • Install type: source
  • OS + version: Windows; exact version not captured
  • Browser or app shell: disposable headed Microsoft Edge session for bounded UI proof

Logs, screenshots, or video

No submission attachments are prepared. In isolated desktop and 390×844 browser proof, Connections and the Local Model card rendered, the capability-Agent endpoints returned 200, and the console had zero errors. The isolated runtime had no downloaded local model, so the conditional tracker count/action was covered by focused deterministic regression and production-wiring checks rather than visible interaction.

Additional context

  • The current three result-type lists contain the same ordered 28 values; this part prevents future contract drift rather than correcting a present mismatch.
  • Existing built-in mappings and mapped/unmapped unknown-value fallbacks must remain unchanged.

Acceptance criteria

  • One shared const tuple owns the exact ordered 28-value production vocabulary.
  • AgentResultType, agentResultTypeSchema, and executor admission derive from that tuple.
  • A regression independently pins the exact compatibility vocabulary and rejects unknown schema values while retaining executor fallbacks.
  • Sidecar tracker derivation subscribes to React Query capability-Agent data and recomputes after hydration/refresh.
  • Count, rendered total, and assign-all use one current visible tracker list; hidden trackers remain excluded.
  • Focused regressions and pnpm check pass.

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 (Aug 11, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4889 Originally assigned to: @SpicyMarinara on GitHub. <!-- task-id: agent-registry-consistency --> ## Summary Agent registry consumers currently have two consistency liabilities: the ordered result-type vocabulary is handwritten separately in TypeScript, Zod, and executor admission, while the Connections Sidecar card snapshots the mutable built-in Agent registry once and can miss tracker Agents that arrive after capability-package hydration. ## Expected behavior - One ordered result-type vocabulary should drive TypeScript, request validation, and runtime executor admission without changing the existing 28 values, their order, mappings, or unknown-value fallbacks. - Connections should react when capability Agent manifests hydrate or refresh. - The displayed local tracker count and “assign all trackers to local” action should use the same current visible tracker list, excluding hidden trackers. ## Actual behavior - Adding or changing a result type requires coordinated edits to three literal lists, so a future partial edit can make the compile-time, request, and runtime contracts disagree. - `SidecarCard` derives tracker Agents from `BUILT_IN_AGENTS` in a memo with no dependencies. If Connections mounts before package-backed manifests hydrate, the card can retain the initial tracker list until remounted. ## Steps to reproduce 1. Use a source checkout with a package-backed visible tracker Agent available. 2. Open Connections before `/api/capability-packages/agents` finishes hydrating the shared registry. 3. Keep the Connections panel mounted while capability Agents hydrate or refresh. 4. Inspect the Local Model Sidecar tracker count or use “assign all trackers to local.” 5. Observe that the pre-hydration snapshot can omit the late tracker until the card remounts. The vocabulary liability is established statically: compare the three handwritten result-type lists in shared types, the shared Zod schema, and executor admission. ## Environment - Marinara Engine version: `2.4.2` development tree based on `staging` commit `db0c598e3b32c29170d0c865a735fde8c624dd19` - Install type: source - OS + version: Windows; exact version not captured - Browser or app shell: disposable headed Microsoft Edge session for bounded UI proof ## Logs, screenshots, or video No submission attachments are prepared. In isolated desktop and 390×844 browser proof, Connections and the Local Model card rendered, the capability-Agent endpoints returned 200, and the console had zero errors. The isolated runtime had no downloaded local model, so the conditional tracker count/action was covered by focused deterministic regression and production-wiring checks rather than visible interaction. ## Additional context - The current three result-type lists contain the same ordered 28 values; this part prevents future contract drift rather than correcting a present mismatch. - Existing built-in mappings and mapped/unmapped unknown-value fallbacks must remain unchanged. ### Acceptance criteria - One shared const tuple owns the exact ordered 28-value production vocabulary. - `AgentResultType`, `agentResultTypeSchema`, and executor admission derive from that tuple. - A regression independently pins the exact compatibility vocabulary and rejects unknown schema values while retaining executor fallbacks. - Sidecar tracker derivation subscribes to React Query capability-Agent data and recomputes after hydration/refresh. - Count, rendered total, and assign-all use one current visible tracker list; hidden trackers remain excluded. - Focused regressions and `pnpm check` pass. ## 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:53:33 +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#2710
No description provided.