[GH-ISSUE #2011] 1. Contracts and schemas #985

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

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

Originally assigned to: @Xelvanis on GitHub.

Target 1: Contracts And Schemas

target: 1
name: Contracts and schemas
scan_status: reported
parity_verdict: on_par
proof_level: focused_test
scan_refactor: refactor 50b9d03c
legacy_ref: legacy checkout 7c6190aa
report: https://github.com/Pasta-Devs/Marinara-Engine/issues/1904#issuecomment-4599710600
last_refreshed: 2026-06-03

Scope

Included:

  • Shared contracts and schema shape.
  • Storage collection support and defaults.
  • Agent/custom-tool contract shape.
  • Settings fields that affect runtime contracts.

Not checked:

  • Native app behavior.
  • Full app walkthrough for every collection default/cascade. This pass used static trace plus focused Rust/TypeScript proof.
  • Deep storage behavior owned by target 2, including delete cascade outcomes, large-profile timing, and message swipe sidecar restoration.

Surface Inventory Additions

Surface ID Surface Bucket Source Legacy owner Refactor owner In scope Notes
01-CONTRACT-CONTRACT-app-settings-envelope Opaque app settings { value } envelope and key/value storage shape. CONTRACT both packages/shared/src/schemas/app-settings.schema.ts; packages/server/src/db/schema/app-settings.ts; packages/server/src/services/storage/app-settings.storage.ts src/engine/contracts/schemas/app-settings.schema.ts; src-tauri/src/commands/storage/contracts.rs yes Registry row names collection support, but not the settings envelope contract.
01-CONTRACT-CONTRACT-chat-preset-settings Chat preset mode/settings/default-active contract. CONTRACT both packages/shared/src/schemas/chat-preset.schema.ts; packages/server/src/services/storage/chat-presets.storage.ts src/engine/contracts/schemas/chat-preset.schema.ts; src-tauri/src/commands/storage/contracts.rs yes Prompt presets were named; chat-settings presets were not.
01-CONTRACT-CONTRACT-generation-parameters Generation parameter schema/default family. CONTRACT both packages/shared/src/schemas/prompt.schema.ts; legacy generate route utilities src/engine/contracts/schemas/prompt.schema.ts; src/engine/generation/generate-route-utils.ts; src/engine/generation/provider-visible-parameters.ts yes Covers reasoning effort, verbosity, service tier, stop sequences, role formatting, and provider-visible parameters.
01-CONTRACT-CONTRACT-generate-request-envelope Generate request envelope knobs. CONTRACT both packages/shared/src/schemas/chat.schema.ts; legacy generate routes src/engine/contracts/schemas/chat.schema.ts; src/engine/generation/start-generation.ts yes Existing row only names chat mode normalization.
01-CONTRACT-CONTRACT-agent-core Agent phase/result enum, built-in catalog defaults, default tools, and settings bag shape. CONTRACT both packages/shared/src/schemas/agent.schema.ts; packages/server/src/services/storage/agents.storage.ts; packages/shared/src/types/agent.ts src/engine/contracts/schemas/agent.schema.ts; src/engine/contracts/types/agent.ts; src/engine/generation/agent-runner.ts yes Existing row only names custom activation settings.
01-CONTRACT-CONTRACT-agent-temperature-default Unset agent temperature default divergence. CONTRACT both Legacy agent execution defaulted unset temperature to 0.3. src/engine/agents-runtime/executor/agent-executor.ts; docs/REFACTOR_PARITY_PIPELINE.md yes Intentional divergence recorded in #1899.
01-CONTRACT-CONTRACT-custom-tool-positive-shape Supported custom tool callable shape for static/webhook tools. CONTRACT both packages/shared/src/schemas/custom-tool.schema.ts; legacy tool execution routes src/engine/contracts/schemas/custom-tool.schema.ts; src-tauri/src/commands/storage/custom_tools.rs; src/engine/generation/tools-runtime.ts yes Existing row names script divergence, not supported positive contract.
01-CONTRACT-STORAGE-collection-universe Named storage collection universe and frontend/backend allowlist drift. STORAGE both packages/server/src/db/file-backed-store.ts; legacy file-backed table docs src-tauri/src/commands/storage/contracts.rs; src/engine/capabilities/storage.ts yes StorageGateway accepts non-generic entities that are not Rust generic collections.
01-CONTRACT-STORAGE-registry-subrows Registry proof split by defaults, typed JSON, cleanup metadata, profile inclusion, and startup repair. STORAGE both Legacy schema/default/relation tables and storage services src-tauri/src/commands/storage/contracts.rs; src-tauri/src/commands/storage/shared.rs; src-tauri/src/commands/storage/profile.rs; src-tauri/src/state.rs yes Existing registry row is correct but too broad for future rescan slices.

Coverage Matrix

Surface Status Proof Follow-up
Custom agent activation settings schema on_par static trace: named schema restored and runtime uses same normalization helpers #1889
Unsupported storage collection names on_par focused Rust test + static trace: generic embedded/remote storage paths reject unsupported entities #1892
Central storage schema/default/relation registry on_par focused Rust test + static trace: registry covers collections, profile/startup repair, typed JSON, and cleanup metadata #1893
maxParallelJobs runtime contract on_par static trace: connection schema/UI value flows into resolved agents and pipeline group splitting #1898
Custom tool script / scriptBody divergence intentional_divergence focused Rust test + static trace: script execution disabled with documented migration path #1907
visual_novel chat mode normalization refactor_better static trace: legacy mode accepted and canonicalized to roleplay
Unknown card/book passthrough handling refactor_better static trace: character card/book schemas preserve unknown fields
Prompt preset default to isDefault normalization refactor_better static trace: update/default lookup accepts legacy default and normalizes to isDefault
App settings { value } envelope on_par focused Rust test + static trace: refactor preserves the { value } envelope, maps legacy key rows to storage id, keeps blank-key rows from becoming ui, and accepts a wider opaque JSON value than legacy's serialized string blob
Chat preset settings schema on_par focused Rust test + static trace: Zod settings schema matches legacy, refactor normalizes legacy/default aliases and boolish flags, and embedded/remote storage blocks default-preset field mutation
Generation parameter schema/default family refactor_better focused Vite SSR probe + focused Rust transport tests + static trace: defaults match legacy while refactor aligns xhigh, service tier, stop sequences, verbosity, and provider-visible fields through schema/UI/runtime transport
Generate request envelope on_par focused Vitest probe + static trace: legacy request fields remain covered, current GENERATION_GUIDE_SOURCES includes amend, game_turn, and game_retry, and generateRequestSchema accepts those runtime/replay guide sources #2013 (closed)
Agent core catalog/default/settings schema refactor_better focused Vite SSR probe + focused Rust cadence tests + static trace: phase/result enums, built-in catalog, default tools, run intervals, settings bag, and legacy run matching are covered; refactor adds credit defaults and activation-setting normalization
Unset agent temperature default divergence intentional_divergence static trace + #1899 state: accepted divergence from legacy 0.3; refactor leaves unset agent temperature to the resolved connection/provider default #1899
Custom tool positive static/webhook contract on_par focused Vitest probe + focused Rust custom-tool/security tests + static trace: refactor supports static/webhook, boolean-enabled tools are selectable, script tools remain the documented divergence, and webhook execution restores legacy local-URL opt-in, redirect validation, and 512 KiB response cap #2015 (closed), #2016 (closed by PR #2027)
Storage collection universe and allowlist drift on_par focused Vitest probe + focused Rust tests + static trace: runtime registry covers generic collections and rejects unsupported entities; frontend StorageEntity now includes background-metadata/sprites/game-state-snapshots and no longer advertises non-generic backgrounds/game-assets/game-state #2017 (closed)
Registry subrows for defaults/typed JSON/cleanup/profile/startup repair covered_static focused Rust tests + static trace: contract registry records collection names, profile/startup repair flags, typed JSON fields, default-field metadata, and delete-cleanup metadata; typed JSON/profile/startup paths consume it while create defaults/delete cleanup still have branch dispatch covered by #2006 #2006 (open debt)

Rescan Evidence

  • Refactor checked at 54a9ffd3; legacy checked at 7c6190aa.
  • Batch 1 checked app settings envelope and chat preset settings schema on 2026-06-03. Current worktree was clean but origin/refactor was four commits ahead; the only batch-adjacent changed file was src-tauri/src/commands/storage/shared.rs, and the diff was nested projection logic, not chat-preset defaults/normalization.
  • Batch 2 checked generation parameter schema/default family and generate request envelope on 2026-06-03. Current worktree was clean but origin/refactor was four commits ahead; no batch-2 files changed between local HEAD and origin/refactor.
  • Batch 3 checked agent core catalog/default/settings schema, unset agent temperature divergence, and custom tool positive static/webhook contract on 2026-06-03. Current worktree was clean aside from ignored scratch updates and origin/refactor was four commits ahead; no batch-3 source files changed between local HEAD and origin/refactor.
  • Batch 4 checked storage collection universe and registry subrows on 2026-06-03. Current worktree was clean aside from ignored scratch updates and origin/refactor was four commits ahead; only src-tauri/src/commands/storage/shared.rs changed in the batch-4 file set, and the upstream diff was #2008 nested projection proof/logic rather than collection registry or allowlist semantics.
  • Static trace confirmed legacy app settings used app_settings.key plus string value (packages/shared/src/schemas/app-settings.schema.ts, packages/server/src/db/schema/app-settings.ts, packages/server/src/services/storage/app-settings.storage.ts, packages/server/src/routes/app-settings.routes.ts, packages/client/src/hooks/use-settings-sync.ts), while refactor keeps the { value } envelope with opaque JSON and generic app-settings storage (src/engine/contracts/schemas/app-settings.schema.ts, src/engine/capabilities/storage.ts, src/shared/api/mari-api.ts, src-tauri/src/commands/storage/contracts.rs, src-tauri/src/seed_defaults.rs).
  • Static trace confirmed legacy and refactor chat preset settings schemas match (connectionId, promptPresetId, metadata; strict object; default {}), while refactor additionally accepts legacy default/active aliases in storage/types and protects default preset mutations in embedded/remote storage paths.
  • Static trace confirmed legacy and refactor generation defaults match (DEFAULT_GENERATION_PARAMS), and legacy-supported serviceTier, stopSequences, verbosity, custom parameters, and role-formatting fields remain present in refactor. Refactor broadens the public schema/UI/provider-visible path to include reasoningEffort: "xhigh", matching current native provider transport support and legacy's deeper game/provider xhigh handling.
  • Original batch-2 static trace confirmed legacy generateRequestSchema accepted narrator, guide, and game_start guide sources. The original refactor scan preserved those and added game_turn/game_retry, but omitted amend; #2013 has since closed and the post-fix rescan confirms current schema parity.
  • Static trace confirmed legacy and refactor agent phase/result enums match, built-in agent IDs/default tools are present, default run intervals remain covered, and refactor keeps legacy run/memory compatibility for agentType/agent_type, chatId/chat_id, agentConfigId/agent_config_id, and createdAt/created_at. Refactor additionally adds credit defaults and normalizes custom activation settings.
  • Static trace confirmed #1899 remains the accepted unset agent temperature divergence: refactor agentTemperature returns undefined for unset settings so the connection/provider default wins instead of legacy's implicit 0.3.
  • Static trace confirmed refactor custom tools support the positive static/webhook contract through createCustomToolSchema, src/engine/generation/tools-runtime.ts, src/shared/api/custom-tool-api.ts, src-tauri/src/commands/storage/custom_tools.rs, and remote http_dispatch.rs. Legacy script tools remain the intentional #1907 divergence.
  • Original batch-3 static trace found two custom-tool gaps: selector code treated boolean enabled: true as disabled for newly saved tools (#2015), and refactor webhook execution did not preserve legacy local-URL opt-in and success-body size guards (#2016). Both issues have since closed and the post-fix rescan confirms current static/webhook parity.
  • Follow-up issues #1889, #1892, #1893, #1898, and #1907 were rechecked as closed.
  • Static trace confirmed activation settings schema parity in src/engine/contracts/schemas/agent.schema.ts and runtime use in src/engine/agents-runtime/activation.ts.
  • Static trace confirmed maxParallelJobs in src/engine/contracts/schemas/connection.schema.ts, resolution in src/engine/generation/agent-runner.ts, and batching split logic in src/engine/agents-runtime/pipeline/agent-pipeline.ts.
  • Static trace confirmed storage registry/allowlist/default/typed JSON/cleanup metadata in src-tauri/src/commands/storage/contracts.rs, command use in src-tauri/src/commands/storage/commands/entities.rs, profile/startup repair use in src-tauri/src/commands/storage/profile.rs and src-tauri/src/state.rs, and remote dispatch coverage in src-tauri/src/http_dispatch.rs.
  • Static trace confirmed script tool divergence is documented in docs/REFACTOR_PARITY_PIPELINE.md and enforced in src-tauri/src/commands/storage/custom_tools.rs.
  • Static trace compared legacy FILE_BACKED_TABLES/CASCADES in packages/server/src/db/file-backed-store.ts against refactor StorageCollectionContract rows in src-tauri/src/commands/storage/contracts.rs. Legacy table names map to refactor collections, folded fields, or focused asset/notes/memory paths: prompt_presets to prompts, choice_blocks to prompt-variables, api_connections to connections, chat_images to gallery, character_images to character-gallery, message_swipes to nested message swipes (#1923 remains target 2), lorebook link tables to lorebooks.characterIds/personaIds, and connected notes/OOC/memory chunks to chat notes/memories.
  • Static trace confirmed refactor generic storage commands validate entities through contracts::collection_contract, while profile_collections and startup_json_repair_collections are registry-derived. Native profile collection import/export and legacy profile table import also route through the registry and legacy table mapping helpers.
  • Original batch-4 static trace found one API contract drift: src/engine/capabilities/storage.ts included non-generic backgrounds, game-assets, and game-state in StorageEntity while omitting generic background-metadata and sprites. #2017 has since closed and the post-fix rescan confirms the frontend generic storage entity list now matches the generic Rust collection contract.
  • Static trace confirmed #2006 already tracks the non-blocking follow-up that create_default_fields and delete_cleanup metadata should become executable source of truth instead of branch-dispatched helper behavior.
  • Focused post-fix rescan ran on current refactor at 50b9d03c on 2026-06-03. It confirmed #2013, #2015, #2016, and #2017 are closed and their target-1 contract surfaces now pass focused static/test proof.
  • Static trace confirmed refactor generateRequestSchema imports GENERATION_GUIDE_SOURCES, and the shared guide-source list includes amend, game_turn, and game_retry (src/engine/contracts/schemas/chat.schema.ts, src/engine/shared/text/generation-guide.ts). Legacy accepted narrator, guide, and game_start; refactor now covers those plus current runtime/replay sources.
  • Static trace confirmed refactor isCustomToolSelectable accepts boolean, numeric, and string enabled flags and keeps static/webhook positive-shape requirements (src/features/catalog/agents/hooks/use-custom-tools.ts). Legacy only accepted string "true"/"1" because legacy rows used string flags (packages/client/src/hooks/use-custom-tools.ts).
  • Static trace confirmed refactor custom-tool webhooks now use WEBHOOK_LOCAL_URLS_ENABLED, reject local/private/reserved targets without opt-in, validate redirects per hop, and cap successful response bodies at 512 KiB (src-tauri/src/commands/storage/custom_tools.rs, src-tauri/crates/security/src/lib.rs). Legacy custom-tool webhooks used safeFetch with WEBHOOK_LOCAL_URLS_ENABLED and maxResponseBytes: 512 * 1024 (packages/server/src/services/tools/tool-executor.ts).
  • Static trace confirmed frontend generic storage entities now align with Rust generic collection contracts for the drift found in #2017: background-metadata, sprites, and game-state-snapshots are included, while non-generic asset/runtime routes remain outside StorageEntity.

Focused proof run:

cargo test --manifest-path src-tauri\Cargo.toml registry_has_unique_collection_names
cargo test --manifest-path src-tauri\Cargo.toml generic_storage_commands_reject_unsupported_entities
cargo test --manifest-path src-tauri\Cargo.toml generic_storage_commands_still_accept_supported_entities
cargo test --manifest-path src-tauri\Cargo.toml registry_answers_core_contract_questions
cargo test --manifest-path src-tauri\Cargo.toml script_execution_type_returns_actionable_error
cargo test --manifest-path src-tauri\Cargo.toml legacy_app_settings
cargo test --manifest-path src-tauri\Cargo.toml profile_import_legacy_file_storage_app_settings_key_sets_ui_id
cargo test --manifest-path src-tauri\Cargo.toml profile_import_modern_skips_absent_collections
cargo test --manifest-path src-tauri\Cargo.toml profile_import_modern_present_empty_collection_clears
cargo test --manifest-path src-tauri\Cargo.toml profile_import_modern_rejects_non_array_collection
cargo test --manifest-path src-tauri\Cargo.toml legacy_connected_notes_import_onto_target_chat_notes
cargo test --manifest-path src-tauri\Cargo.toml legacy_game_state_snapshot_maps_sqlite_field_names_to_tracker_rows
cargo test --manifest-path src-tauri\Cargo.toml legacy_lorebook_entries_coerce_text_bools_and_arrays
cargo test --manifest-path src-tauri\Cargo.toml legacy_partial_profile_does_not_wipe_absent_collections
cargo test --manifest-path src-tauri\Cargo.toml legacy_present_but_malformed_table_is_rejected_without_wiping
cargo test --manifest-path src-tauri\Cargo.toml chat_preset_defaults_normalize_boolish_flags
cargo test --manifest-path src-tauri\Cargo.toml dispatch_storage_update_protects_default_chat_preset_fields
cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm anthropic_opus_48_stream_body_sets_stream_true
cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm google_gemini_3_generation_config_keeps_max_tokens_and_strips_sampling
cargo test --manifest-path src-tauri\Cargo.toml cadence_status_uses_default_interval_and_successful_runs
cargo test --manifest-path src-tauri\Cargo.toml cadence_status_matches_imported_runs_by_agent_config_id
cargo test --manifest-path src-tauri\Cargo.toml capabilities_report_script_execution_disabled
cargo test --manifest-path src-tauri\Cargo.toml script_execution_type_returns_actionable_error

All focused Rust tests listed above passed on 2026-06-03. The original batch-2 local Vite SSR probe imported generationParametersSchema, generateRequestSchema, and providerVisibleLlmParameters; it passed while exposing the original gap with amend: false, plus generationXhigh: true, gameTurn: true, gameRetry: true, and an OpenRouter visible parameter object containing service_tier: "priority" and stop: ["</END>"].
The original batch-3 Vite SSR probe imported createAgentConfigSchema, createCustomToolSchema, BUILT_IN_AGENTS, getDefaultBuiltInAgentSettings, and isCustomToolSelectable; it passed while exposing the original selector gap with selectable.booleanEnabled: false, plus builtInCount: 28, hasKnowledgeRouter: true, valid static/webhook schema parses, rejected script schema parse, staticToolEnabled: true, and selectable.stringEnabled: true.

Post-fix focused proof run on refactor 50b9d03c:

pnpm exec vitest run --config scratch/vitest.target1.config.ts
cargo test --manifest-path src-tauri\Cargo.toml custom_tool
cargo test --manifest-path src-tauri\Cargo.toml -p marinara-security outbound_url_policy
cargo test --manifest-path src-tauri\Cargo.toml registry_
cargo test --manifest-path src-tauri\Cargo.toml generic_storage_commands_
cargo test --manifest-path src-tauri\Cargo.toml legacy_app_settings
cargo test --manifest-path src-tauri\Cargo.toml chat_preset_defaults_normalize_boolish_flags
cargo test --manifest-path src-tauri\Cargo.toml dispatch_storage_update_protects_default_chat_preset_fields
cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm anthropic_opus_48_stream_body_sets_stream_true
cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm google_gemini_3_generation_config_keeps_max_tokens_and_strips_sampling
cargo test --manifest-path src-tauri\Cargo.toml cadence_status_uses_default_interval_and_successful_runs
cargo test --manifest-path src-tauri\Cargo.toml cadence_status_matches_imported_runs_by_agent_config_id
cargo test --manifest-path src-tauri\Cargo.toml profile_import_
cargo test --manifest-path src-tauri\Cargo.toml legacy_connected_notes_import_onto_target_chat_notes
cargo test --manifest-path src-tauri\Cargo.toml legacy_game_state_snapshot_maps_sqlite_field_names_to_tracker_rows
cargo test --manifest-path src-tauri\Cargo.toml legacy_lorebook_entries_coerce_text_bools_and_arrays
cargo test --manifest-path src-tauri\Cargo.toml legacy_partial_profile_does_not_wipe_absent_collections
cargo test --manifest-path src-tauri\Cargo.toml legacy_present_but_malformed_table_is_rejected_without_wiping
pnpm typecheck

All post-fix focused commands passed on 2026-06-03. The local Vitest scratch probe confirmed generateRequestSchema accepts amend, game_turn, and game_retry; boolean-enabled static/webhook custom tools are selectable; disabled boolean tools stay hidden; and frontend generic storage entities include background-metadata/sprites/game-state-snapshots while excluding non-generic backgrounds/game-assets/game-state.

Residual Risk

  • No native Tauri app pass was run for this target.
  • The storage contract registry now records defaults and cleanup metadata, but some default application and delete cleanup behavior still runs through existing helper/branch code. Static trace found this bounded and non-blocking for target 1.
  • Prompt preset default alias proof covered update/default lookup paths, not every create/profile-import path.
  • Legacy custom tool scriptBody import/profile preservation was not fully audited here because target 1 classifies script execution as intentional divergence.
  • Batch 1 did not exercise the full Settings UI or Chat Settings Drawer in native Tauri; it proved the contract/import/storage paths only.
  • Batch 2 did not exercise live provider calls or native Tauri generation. It proved schema/default/parameter projection locally and used existing native transport unit tests.
  • No native Agent Settings or Chat Settings UI walkthrough, full agent generation turn, or live webhook call was run. Custom-tool selector and webhook guard parity were proved through focused module tests/static trace rather than native UI/manual runtime proof.
  • Batch 4 did not run native profile export/import UI, a large-profile import, a remote /api/invoke walkthrough, or live asset operations. It proved registry/allowlist/profile contract behavior with Rust tests and static trace only.
  • #2006 remains non-blocking registry debt: create defaults and delete cleanup metadata exist in the registry, but executable behavior still runs through explicit helper branches.

Follow-Ups

Issue State Why it matters
#1889 CLOSED Restored custom agent activation settings schema contract.
#1892 CLOSED Rejected unsupported collection names instead of creating new files.
#1893 CLOSED Restored centralized storage schema/default and relation repair contracts.
#1898 CLOSED Restored maxParallelJobs runtime behavior.
#1899 CLOSED Accepted unset agent temperature default divergence.
#1907 CLOSED Documented custom tool script contract divergence.
#2006 OPEN Make storage create defaults and delete cleanup consume registry metadata as executable source of truth.
#2013 CLOSED Aligned generateRequestSchema with the current /amend generation guide source.
#2015 CLOSED Made boolean-enabled refactor custom tools visible in selectors.
#2016 CLOSED Restored custom-tool webhook local-URL and response-size guards through PR #2027.
#2017 CLOSED Aligned frontend StorageEntity with generic Rust storage collection contracts.

Published Artifacts

  • Tracker report posted to #1904: https://github.com/Pasta-Devs/Marinara-Engine/issues/1904#issuecomment-4599710600
  • Unique finding opened as #1907: custom tool script / scriptBody contract divergence.
  • Batch-2 contract drift opened as #2013: generate request schema omits amend guide source.
  • Batch-3 selector bug opened as #2015: custom tools saved with boolean enabled are hidden from selectors.
  • Batch-3 webhook safety drift opened as #2016: custom tool webhooks lost legacy local-URL and response-size guards.
  • Batch-4 API contract drift opened as #2017: StorageEntity lists non-generic entities that storage commands reject.
  • Merged fix PR for #2016: #2027 restores custom tool webhook safety guards.
  • Focused post-fix rescan on refactor 50b9d03c confirmed closed follow-ups #2013, #2015, #2016, and #2017 no longer block target 1.
  • Batch-4 registry execution debt was already covered by #2006.
  • Existing findings were already covered by #1889, #1892, #1893, and #1898; no duplicate comments were posted.

Rescan Criteria

  • Met on 2026-06-03 for static/focused proof.
  • Met again on 2026-06-03 for post-fix focused proof on current refactor 50b9d03c. Target 1 is on_par; #2006 remains non-blocking registry execution debt.
  • Keep native app behavior and deeper import/profile preservation checks for later targeted scans when they matter to a shipped change.
Originally created by @Xelvanis on GitHub (Jun 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2011 Originally assigned to: @Xelvanis on GitHub. # Target 1: Contracts And Schemas ```yaml target: 1 name: Contracts and schemas scan_status: reported parity_verdict: on_par proof_level: focused_test scan_refactor: refactor 50b9d03c legacy_ref: legacy checkout 7c6190aa report: https://github.com/Pasta-Devs/Marinara-Engine/issues/1904#issuecomment-4599710600 last_refreshed: 2026-06-03 ``` ## Scope Included: - Shared contracts and schema shape. - Storage collection support and defaults. - Agent/custom-tool contract shape. - Settings fields that affect runtime contracts. Not checked: - Native app behavior. - Full app walkthrough for every collection default/cascade. This pass used static trace plus focused Rust/TypeScript proof. - Deep storage behavior owned by target 2, including delete cascade outcomes, large-profile timing, and message swipe sidecar restoration. ## Surface Inventory Additions | Surface ID | Surface | Bucket | Source | Legacy owner | Refactor owner | In scope | Notes | | --- | --- | --- | --- | --- | --- | --- | --- | | 01-CONTRACT-CONTRACT-app-settings-envelope | Opaque app settings `{ value }` envelope and key/value storage shape. | CONTRACT | both | `packages/shared/src/schemas/app-settings.schema.ts`; `packages/server/src/db/schema/app-settings.ts`; `packages/server/src/services/storage/app-settings.storage.ts` | `src/engine/contracts/schemas/app-settings.schema.ts`; `src-tauri/src/commands/storage/contracts.rs` | yes | Registry row names collection support, but not the settings envelope contract. | | 01-CONTRACT-CONTRACT-chat-preset-settings | Chat preset mode/settings/default-active contract. | CONTRACT | both | `packages/shared/src/schemas/chat-preset.schema.ts`; `packages/server/src/services/storage/chat-presets.storage.ts` | `src/engine/contracts/schemas/chat-preset.schema.ts`; `src-tauri/src/commands/storage/contracts.rs` | yes | Prompt presets were named; chat-settings presets were not. | | 01-CONTRACT-CONTRACT-generation-parameters | Generation parameter schema/default family. | CONTRACT | both | `packages/shared/src/schemas/prompt.schema.ts`; legacy generate route utilities | `src/engine/contracts/schemas/prompt.schema.ts`; `src/engine/generation/generate-route-utils.ts`; `src/engine/generation/provider-visible-parameters.ts` | yes | Covers reasoning effort, verbosity, service tier, stop sequences, role formatting, and provider-visible parameters. | | 01-CONTRACT-CONTRACT-generate-request-envelope | Generate request envelope knobs. | CONTRACT | both | `packages/shared/src/schemas/chat.schema.ts`; legacy generate routes | `src/engine/contracts/schemas/chat.schema.ts`; `src/engine/generation/start-generation.ts` | yes | Existing row only names chat mode normalization. | | 01-CONTRACT-CONTRACT-agent-core | Agent phase/result enum, built-in catalog defaults, default tools, and settings bag shape. | CONTRACT | both | `packages/shared/src/schemas/agent.schema.ts`; `packages/server/src/services/storage/agents.storage.ts`; `packages/shared/src/types/agent.ts` | `src/engine/contracts/schemas/agent.schema.ts`; `src/engine/contracts/types/agent.ts`; `src/engine/generation/agent-runner.ts` | yes | Existing row only names custom activation settings. | | 01-CONTRACT-CONTRACT-agent-temperature-default | Unset agent temperature default divergence. | CONTRACT | both | Legacy agent execution defaulted unset temperature to `0.3`. | `src/engine/agents-runtime/executor/agent-executor.ts`; `docs/REFACTOR_PARITY_PIPELINE.md` | yes | Intentional divergence recorded in #1899. | | 01-CONTRACT-CONTRACT-custom-tool-positive-shape | Supported custom tool callable shape for static/webhook tools. | CONTRACT | both | `packages/shared/src/schemas/custom-tool.schema.ts`; legacy tool execution routes | `src/engine/contracts/schemas/custom-tool.schema.ts`; `src-tauri/src/commands/storage/custom_tools.rs`; `src/engine/generation/tools-runtime.ts` | yes | Existing row names script divergence, not supported positive contract. | | 01-CONTRACT-STORAGE-collection-universe | Named storage collection universe and frontend/backend allowlist drift. | STORAGE | both | `packages/server/src/db/file-backed-store.ts`; legacy file-backed table docs | `src-tauri/src/commands/storage/contracts.rs`; `src/engine/capabilities/storage.ts` | yes | `StorageGateway` accepts non-generic entities that are not Rust generic collections. | | 01-CONTRACT-STORAGE-registry-subrows | Registry proof split by defaults, typed JSON, cleanup metadata, profile inclusion, and startup repair. | STORAGE | both | Legacy schema/default/relation tables and storage services | `src-tauri/src/commands/storage/contracts.rs`; `src-tauri/src/commands/storage/shared.rs`; `src-tauri/src/commands/storage/profile.rs`; `src-tauri/src/state.rs` | yes | Existing registry row is correct but too broad for future rescan slices. | ## Coverage Matrix | Surface | Status | Proof | Follow-up | | --- | --- | --- | --- | | Custom agent activation settings schema | on_par | static trace: named schema restored and runtime uses same normalization helpers | #1889 | | Unsupported storage collection names | on_par | focused Rust test + static trace: generic embedded/remote storage paths reject unsupported entities | #1892 | | Central storage schema/default/relation registry | on_par | focused Rust test + static trace: registry covers collections, profile/startup repair, typed JSON, and cleanup metadata | #1893 | | `maxParallelJobs` runtime contract | on_par | static trace: connection schema/UI value flows into resolved agents and pipeline group splitting | #1898 | | Custom tool `script` / `scriptBody` divergence | intentional_divergence | focused Rust test + static trace: script execution disabled with documented migration path | #1907 | | `visual_novel` chat mode normalization | refactor_better | static trace: legacy mode accepted and canonicalized to `roleplay` | | | Unknown card/book passthrough handling | refactor_better | static trace: character card/book schemas preserve unknown fields | | | Prompt preset `default` to `isDefault` normalization | refactor_better | static trace: update/default lookup accepts legacy `default` and normalizes to `isDefault` | | | App settings `{ value }` envelope | on_par | focused Rust test + static trace: refactor preserves the `{ value }` envelope, maps legacy `key` rows to storage `id`, keeps blank-key rows from becoming `ui`, and accepts a wider opaque JSON value than legacy's serialized string blob | | | Chat preset settings schema | on_par | focused Rust test + static trace: Zod settings schema matches legacy, refactor normalizes legacy/default aliases and boolish flags, and embedded/remote storage blocks default-preset field mutation | | | Generation parameter schema/default family | refactor_better | focused Vite SSR probe + focused Rust transport tests + static trace: defaults match legacy while refactor aligns `xhigh`, service tier, stop sequences, verbosity, and provider-visible fields through schema/UI/runtime transport | | | Generate request envelope | on_par | focused Vitest probe + static trace: legacy request fields remain covered, current `GENERATION_GUIDE_SOURCES` includes `amend`, `game_turn`, and `game_retry`, and `generateRequestSchema` accepts those runtime/replay guide sources | #2013 (closed) | | Agent core catalog/default/settings schema | refactor_better | focused Vite SSR probe + focused Rust cadence tests + static trace: phase/result enums, built-in catalog, default tools, run intervals, settings bag, and legacy run matching are covered; refactor adds credit defaults and activation-setting normalization | | | Unset agent temperature default divergence | intentional_divergence | static trace + #1899 state: accepted divergence from legacy `0.3`; refactor leaves unset agent temperature to the resolved connection/provider default | #1899 | | Custom tool positive static/webhook contract | on_par | focused Vitest probe + focused Rust custom-tool/security tests + static trace: refactor supports static/webhook, boolean-enabled tools are selectable, script tools remain the documented divergence, and webhook execution restores legacy local-URL opt-in, redirect validation, and 512 KiB response cap | #2015 (closed), #2016 (closed by PR #2027) | | Storage collection universe and allowlist drift | on_par | focused Vitest probe + focused Rust tests + static trace: runtime registry covers generic collections and rejects unsupported entities; frontend `StorageEntity` now includes `background-metadata`/`sprites`/`game-state-snapshots` and no longer advertises non-generic `backgrounds`/`game-assets`/`game-state` | #2017 (closed) | | Registry subrows for defaults/typed JSON/cleanup/profile/startup repair | covered_static | focused Rust tests + static trace: contract registry records collection names, profile/startup repair flags, typed JSON fields, default-field metadata, and delete-cleanup metadata; typed JSON/profile/startup paths consume it while create defaults/delete cleanup still have branch dispatch covered by #2006 | #2006 (open debt) | ## Rescan Evidence - Refactor checked at `54a9ffd3`; legacy checked at `7c6190aa`. - Batch 1 checked app settings envelope and chat preset settings schema on 2026-06-03. Current worktree was clean but `origin/refactor` was four commits ahead; the only batch-adjacent changed file was `src-tauri/src/commands/storage/shared.rs`, and the diff was nested projection logic, not chat-preset defaults/normalization. - Batch 2 checked generation parameter schema/default family and generate request envelope on 2026-06-03. Current worktree was clean but `origin/refactor` was four commits ahead; no batch-2 files changed between local `HEAD` and `origin/refactor`. - Batch 3 checked agent core catalog/default/settings schema, unset agent temperature divergence, and custom tool positive static/webhook contract on 2026-06-03. Current worktree was clean aside from ignored scratch updates and `origin/refactor` was four commits ahead; no batch-3 source files changed between local `HEAD` and `origin/refactor`. - Batch 4 checked storage collection universe and registry subrows on 2026-06-03. Current worktree was clean aside from ignored scratch updates and `origin/refactor` was four commits ahead; only `src-tauri/src/commands/storage/shared.rs` changed in the batch-4 file set, and the upstream diff was #2008 nested projection proof/logic rather than collection registry or allowlist semantics. - Static trace confirmed legacy app settings used `app_settings.key` plus string `value` (`packages/shared/src/schemas/app-settings.schema.ts`, `packages/server/src/db/schema/app-settings.ts`, `packages/server/src/services/storage/app-settings.storage.ts`, `packages/server/src/routes/app-settings.routes.ts`, `packages/client/src/hooks/use-settings-sync.ts`), while refactor keeps the `{ value }` envelope with opaque JSON and generic `app-settings` storage (`src/engine/contracts/schemas/app-settings.schema.ts`, `src/engine/capabilities/storage.ts`, `src/shared/api/mari-api.ts`, `src-tauri/src/commands/storage/contracts.rs`, `src-tauri/src/seed_defaults.rs`). - Static trace confirmed legacy and refactor chat preset settings schemas match (`connectionId`, `promptPresetId`, `metadata`; strict object; default `{}`), while refactor additionally accepts legacy `default`/`active` aliases in storage/types and protects default preset mutations in embedded/remote storage paths. - Static trace confirmed legacy and refactor generation defaults match (`DEFAULT_GENERATION_PARAMS`), and legacy-supported `serviceTier`, `stopSequences`, verbosity, custom parameters, and role-formatting fields remain present in refactor. Refactor broadens the public schema/UI/provider-visible path to include `reasoningEffort: "xhigh"`, matching current native provider transport support and legacy's deeper game/provider xhigh handling. - Original batch-2 static trace confirmed legacy `generateRequestSchema` accepted `narrator`, `guide`, and `game_start` guide sources. The original refactor scan preserved those and added `game_turn`/`game_retry`, but omitted `amend`; #2013 has since closed and the post-fix rescan confirms current schema parity. - Static trace confirmed legacy and refactor agent phase/result enums match, built-in agent IDs/default tools are present, default run intervals remain covered, and refactor keeps legacy run/memory compatibility for `agentType`/`agent_type`, `chatId`/`chat_id`, `agentConfigId`/`agent_config_id`, and `createdAt`/`created_at`. Refactor additionally adds `credit` defaults and normalizes custom activation settings. - Static trace confirmed #1899 remains the accepted unset agent temperature divergence: refactor `agentTemperature` returns `undefined` for unset settings so the connection/provider default wins instead of legacy's implicit `0.3`. - Static trace confirmed refactor custom tools support the positive static/webhook contract through `createCustomToolSchema`, `src/engine/generation/tools-runtime.ts`, `src/shared/api/custom-tool-api.ts`, `src-tauri/src/commands/storage/custom_tools.rs`, and remote `http_dispatch.rs`. Legacy script tools remain the intentional #1907 divergence. - Original batch-3 static trace found two custom-tool gaps: selector code treated boolean `enabled: true` as disabled for newly saved tools (#2015), and refactor webhook execution did not preserve legacy local-URL opt-in and success-body size guards (#2016). Both issues have since closed and the post-fix rescan confirms current static/webhook parity. - Follow-up issues #1889, #1892, #1893, #1898, and #1907 were rechecked as closed. - Static trace confirmed activation settings schema parity in `src/engine/contracts/schemas/agent.schema.ts` and runtime use in `src/engine/agents-runtime/activation.ts`. - Static trace confirmed `maxParallelJobs` in `src/engine/contracts/schemas/connection.schema.ts`, resolution in `src/engine/generation/agent-runner.ts`, and batching split logic in `src/engine/agents-runtime/pipeline/agent-pipeline.ts`. - Static trace confirmed storage registry/allowlist/default/typed JSON/cleanup metadata in `src-tauri/src/commands/storage/contracts.rs`, command use in `src-tauri/src/commands/storage/commands/entities.rs`, profile/startup repair use in `src-tauri/src/commands/storage/profile.rs` and `src-tauri/src/state.rs`, and remote dispatch coverage in `src-tauri/src/http_dispatch.rs`. - Static trace confirmed script tool divergence is documented in `docs/REFACTOR_PARITY_PIPELINE.md` and enforced in `src-tauri/src/commands/storage/custom_tools.rs`. - Static trace compared legacy `FILE_BACKED_TABLES`/`CASCADES` in `packages/server/src/db/file-backed-store.ts` against refactor `StorageCollectionContract` rows in `src-tauri/src/commands/storage/contracts.rs`. Legacy table names map to refactor collections, folded fields, or focused asset/notes/memory paths: `prompt_presets` to `prompts`, `choice_blocks` to `prompt-variables`, `api_connections` to `connections`, `chat_images` to `gallery`, `character_images` to `character-gallery`, `message_swipes` to nested message swipes (#1923 remains target 2), lorebook link tables to `lorebooks.characterIds`/`personaIds`, and connected notes/OOC/memory chunks to chat notes/memories. - Static trace confirmed refactor generic storage commands validate entities through `contracts::collection_contract`, while `profile_collections` and `startup_json_repair_collections` are registry-derived. Native profile collection import/export and legacy profile table import also route through the registry and legacy table mapping helpers. - Original batch-4 static trace found one API contract drift: `src/engine/capabilities/storage.ts` included non-generic `backgrounds`, `game-assets`, and `game-state` in `StorageEntity` while omitting generic `background-metadata` and `sprites`. #2017 has since closed and the post-fix rescan confirms the frontend generic storage entity list now matches the generic Rust collection contract. - Static trace confirmed #2006 already tracks the non-blocking follow-up that `create_default_fields` and `delete_cleanup` metadata should become executable source of truth instead of branch-dispatched helper behavior. - Focused post-fix rescan ran on current `refactor` at `50b9d03c` on 2026-06-03. It confirmed #2013, #2015, #2016, and #2017 are closed and their target-1 contract surfaces now pass focused static/test proof. - Static trace confirmed refactor `generateRequestSchema` imports `GENERATION_GUIDE_SOURCES`, and the shared guide-source list includes `amend`, `game_turn`, and `game_retry` (`src/engine/contracts/schemas/chat.schema.ts`, `src/engine/shared/text/generation-guide.ts`). Legacy accepted `narrator`, `guide`, and `game_start`; refactor now covers those plus current runtime/replay sources. - Static trace confirmed refactor `isCustomToolSelectable` accepts boolean, numeric, and string enabled flags and keeps static/webhook positive-shape requirements (`src/features/catalog/agents/hooks/use-custom-tools.ts`). Legacy only accepted string `"true"`/`"1"` because legacy rows used string flags (`packages/client/src/hooks/use-custom-tools.ts`). - Static trace confirmed refactor custom-tool webhooks now use `WEBHOOK_LOCAL_URLS_ENABLED`, reject local/private/reserved targets without opt-in, validate redirects per hop, and cap successful response bodies at 512 KiB (`src-tauri/src/commands/storage/custom_tools.rs`, `src-tauri/crates/security/src/lib.rs`). Legacy custom-tool webhooks used `safeFetch` with `WEBHOOK_LOCAL_URLS_ENABLED` and `maxResponseBytes: 512 * 1024` (`packages/server/src/services/tools/tool-executor.ts`). - Static trace confirmed frontend generic storage entities now align with Rust generic collection contracts for the drift found in #2017: `background-metadata`, `sprites`, and `game-state-snapshots` are included, while non-generic asset/runtime routes remain outside `StorageEntity`. Focused proof run: ```powershell cargo test --manifest-path src-tauri\Cargo.toml registry_has_unique_collection_names cargo test --manifest-path src-tauri\Cargo.toml generic_storage_commands_reject_unsupported_entities cargo test --manifest-path src-tauri\Cargo.toml generic_storage_commands_still_accept_supported_entities cargo test --manifest-path src-tauri\Cargo.toml registry_answers_core_contract_questions cargo test --manifest-path src-tauri\Cargo.toml script_execution_type_returns_actionable_error cargo test --manifest-path src-tauri\Cargo.toml legacy_app_settings cargo test --manifest-path src-tauri\Cargo.toml profile_import_legacy_file_storage_app_settings_key_sets_ui_id cargo test --manifest-path src-tauri\Cargo.toml profile_import_modern_skips_absent_collections cargo test --manifest-path src-tauri\Cargo.toml profile_import_modern_present_empty_collection_clears cargo test --manifest-path src-tauri\Cargo.toml profile_import_modern_rejects_non_array_collection cargo test --manifest-path src-tauri\Cargo.toml legacy_connected_notes_import_onto_target_chat_notes cargo test --manifest-path src-tauri\Cargo.toml legacy_game_state_snapshot_maps_sqlite_field_names_to_tracker_rows cargo test --manifest-path src-tauri\Cargo.toml legacy_lorebook_entries_coerce_text_bools_and_arrays cargo test --manifest-path src-tauri\Cargo.toml legacy_partial_profile_does_not_wipe_absent_collections cargo test --manifest-path src-tauri\Cargo.toml legacy_present_but_malformed_table_is_rejected_without_wiping cargo test --manifest-path src-tauri\Cargo.toml chat_preset_defaults_normalize_boolish_flags cargo test --manifest-path src-tauri\Cargo.toml dispatch_storage_update_protects_default_chat_preset_fields cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm anthropic_opus_48_stream_body_sets_stream_true cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm google_gemini_3_generation_config_keeps_max_tokens_and_strips_sampling cargo test --manifest-path src-tauri\Cargo.toml cadence_status_uses_default_interval_and_successful_runs cargo test --manifest-path src-tauri\Cargo.toml cadence_status_matches_imported_runs_by_agent_config_id cargo test --manifest-path src-tauri\Cargo.toml capabilities_report_script_execution_disabled cargo test --manifest-path src-tauri\Cargo.toml script_execution_type_returns_actionable_error ``` All focused Rust tests listed above passed on 2026-06-03. The original batch-2 local Vite SSR probe imported `generationParametersSchema`, `generateRequestSchema`, and `providerVisibleLlmParameters`; it passed while exposing the original gap with `amend: false`, plus `generationXhigh: true`, `gameTurn: true`, `gameRetry: true`, and an OpenRouter visible parameter object containing `service_tier: "priority"` and `stop: ["</END>"]`. The original batch-3 Vite SSR probe imported `createAgentConfigSchema`, `createCustomToolSchema`, `BUILT_IN_AGENTS`, `getDefaultBuiltInAgentSettings`, and `isCustomToolSelectable`; it passed while exposing the original selector gap with `selectable.booleanEnabled: false`, plus `builtInCount: 28`, `hasKnowledgeRouter: true`, valid static/webhook schema parses, rejected script schema parse, `staticToolEnabled: true`, and `selectable.stringEnabled: true`. Post-fix focused proof run on `refactor` `50b9d03c`: ```powershell pnpm exec vitest run --config scratch/vitest.target1.config.ts cargo test --manifest-path src-tauri\Cargo.toml custom_tool cargo test --manifest-path src-tauri\Cargo.toml -p marinara-security outbound_url_policy cargo test --manifest-path src-tauri\Cargo.toml registry_ cargo test --manifest-path src-tauri\Cargo.toml generic_storage_commands_ cargo test --manifest-path src-tauri\Cargo.toml legacy_app_settings cargo test --manifest-path src-tauri\Cargo.toml chat_preset_defaults_normalize_boolish_flags cargo test --manifest-path src-tauri\Cargo.toml dispatch_storage_update_protects_default_chat_preset_fields cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm anthropic_opus_48_stream_body_sets_stream_true cargo test --manifest-path src-tauri\Cargo.toml --package marinara-llm google_gemini_3_generation_config_keeps_max_tokens_and_strips_sampling cargo test --manifest-path src-tauri\Cargo.toml cadence_status_uses_default_interval_and_successful_runs cargo test --manifest-path src-tauri\Cargo.toml cadence_status_matches_imported_runs_by_agent_config_id cargo test --manifest-path src-tauri\Cargo.toml profile_import_ cargo test --manifest-path src-tauri\Cargo.toml legacy_connected_notes_import_onto_target_chat_notes cargo test --manifest-path src-tauri\Cargo.toml legacy_game_state_snapshot_maps_sqlite_field_names_to_tracker_rows cargo test --manifest-path src-tauri\Cargo.toml legacy_lorebook_entries_coerce_text_bools_and_arrays cargo test --manifest-path src-tauri\Cargo.toml legacy_partial_profile_does_not_wipe_absent_collections cargo test --manifest-path src-tauri\Cargo.toml legacy_present_but_malformed_table_is_rejected_without_wiping pnpm typecheck ``` All post-fix focused commands passed on 2026-06-03. The local Vitest scratch probe confirmed `generateRequestSchema` accepts `amend`, `game_turn`, and `game_retry`; boolean-enabled static/webhook custom tools are selectable; disabled boolean tools stay hidden; and frontend generic storage entities include `background-metadata`/`sprites`/`game-state-snapshots` while excluding non-generic `backgrounds`/`game-assets`/`game-state`. ## Residual Risk - No native Tauri app pass was run for this target. - The storage contract registry now records defaults and cleanup metadata, but some default application and delete cleanup behavior still runs through existing helper/branch code. Static trace found this bounded and non-blocking for target 1. - Prompt preset `default` alias proof covered update/default lookup paths, not every create/profile-import path. - Legacy custom tool `scriptBody` import/profile preservation was not fully audited here because target 1 classifies script execution as intentional divergence. - Batch 1 did not exercise the full Settings UI or Chat Settings Drawer in native Tauri; it proved the contract/import/storage paths only. - Batch 2 did not exercise live provider calls or native Tauri generation. It proved schema/default/parameter projection locally and used existing native transport unit tests. - No native Agent Settings or Chat Settings UI walkthrough, full agent generation turn, or live webhook call was run. Custom-tool selector and webhook guard parity were proved through focused module tests/static trace rather than native UI/manual runtime proof. - Batch 4 did not run native profile export/import UI, a large-profile import, a remote `/api/invoke` walkthrough, or live asset operations. It proved registry/allowlist/profile contract behavior with Rust tests and static trace only. - #2006 remains non-blocking registry debt: create defaults and delete cleanup metadata exist in the registry, but executable behavior still runs through explicit helper branches. ## Follow-Ups | Issue | State | Why it matters | | --- | --- | --- | | #1889 | CLOSED | Restored custom agent activation settings schema contract. | | #1892 | CLOSED | Rejected unsupported collection names instead of creating new files. | | #1893 | CLOSED | Restored centralized storage schema/default and relation repair contracts. | | #1898 | CLOSED | Restored `maxParallelJobs` runtime behavior. | | #1899 | CLOSED | Accepted unset agent temperature default divergence. | | #1907 | CLOSED | Documented custom tool script contract divergence. | | #2006 | OPEN | Make storage create defaults and delete cleanup consume registry metadata as executable source of truth. | | #2013 | CLOSED | Aligned `generateRequestSchema` with the current `/amend` generation guide source. | | #2015 | CLOSED | Made boolean-enabled refactor custom tools visible in selectors. | | #2016 | CLOSED | Restored custom-tool webhook local-URL and response-size guards through PR #2027. | | #2017 | CLOSED | Aligned frontend `StorageEntity` with generic Rust storage collection contracts. | ## Published Artifacts - Tracker report posted to #1904: https://github.com/Pasta-Devs/Marinara-Engine/issues/1904#issuecomment-4599710600 - Unique finding opened as #1907: custom tool `script` / `scriptBody` contract divergence. - Batch-2 contract drift opened as #2013: generate request schema omits `amend` guide source. - Batch-3 selector bug opened as #2015: custom tools saved with boolean `enabled` are hidden from selectors. - Batch-3 webhook safety drift opened as #2016: custom tool webhooks lost legacy local-URL and response-size guards. - Batch-4 API contract drift opened as #2017: `StorageEntity` lists non-generic entities that storage commands reject. - Merged fix PR for #2016: #2027 restores custom tool webhook safety guards. - Focused post-fix rescan on `refactor` `50b9d03c` confirmed closed follow-ups #2013, #2015, #2016, and #2017 no longer block target 1. - Batch-4 registry execution debt was already covered by #2006. - Existing findings were already covered by #1889, #1892, #1893, and #1898; no duplicate comments were posted. ## Rescan Criteria - Met on 2026-06-03 for static/focused proof. - Met again on 2026-06-03 for post-fix focused proof on current `refactor` `50b9d03c`. Target 1 is `on_par`; #2006 remains non-blocking registry execution debt. - Keep native app behavior and deeper import/profile preservation checks for later targeted scans when they matter to a shipped change.
bsakaguchi 2026-10-21 05:24:49 +07:00
  • closed this issue
  • added the
    roadmap
    label
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#985
No description provided.