mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1889] Restore custom agent activation settings schema contract #916
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#916
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xelvanis on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1889
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
Legacy custom agent activation exposed a named schema contract for
settings.activationKeywordsandsettings.activationScanDepth. Refactor keeps runtime behavior, but the agent config schema now acceptssettingsas a generic record, so activation settings are normalized at runtime without a matching contract-level schema.Evidence:
src/engine/contracts/constants/agent-activation.ts.src/engine/agents-runtime/activation.ts.settings: z.record(z.unknown()).default({})insrc/engine/contracts/schemas/agent.schema.tsand has no named custom agent activation settings schema.customAgentActivationSettingsSchemainpackages/shared/src/schemas/agent.schema.tsforactivationKeywordsandactivationScanDepth.Proposed behavior
Add or restore a named custom agent activation settings schema in the refactor contract layer that validates:
activationKeywords: trimmed non-empty string array, max 100activationScanDepth: integer from 1 throughMAX_CUSTOM_AGENT_ACTIVATION_SCAN_DEPTHUse it where custom agent settings are validated or normalized, while keeping product behavior in
src/engineand not moving React or runtime adapter concerns into contracts.Expected owner or impact area
Refactor branch considerations
Keep the activation contract in the React-free engine layer. UI should consume the contract helpers instead of duplicating parsing rules. Storage/import paths should preserve unknown settings, but activation-specific fields should still have a contract shape when they are intentionally supported.
Alternatives considered
Leaving only runtime normalizers avoids immediate behavior changes, but it leaves persisted/imported custom agent activation settings without a named schema surface and makes future compatibility checks easier to miss.
Additional context
A legacy parity audit on
origin/refactorfound no confirmed custom agent activation runtime regression. Refactor is better than legacy in one respect: UI and runtime now share the same normalization helpers. This issue tracks the remaining contract/schema parity gap only.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 2, 2026):
Fixed on refactor in
a4ba3c90: restored the named custom agent activation settings schema, validating normalized activationKeywords and activationScanDepth while preserving unknown settings. Verification passed: typecheck, architecture, docs, build, cargo check, diff check.