Skip to content

test: freeze Agent Mode capability ports (Paso 3 gate) - #36

Merged
IAnMove merged 1 commit into
mainfrom
test/agent-capability-ports-gate
Sep 1, 2026
Merged

test: freeze Agent Mode capability ports (Paso 3 gate)#36
IAnMove merged 1 commit into
mainfrom
test/agent-capability-ports-gate

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Qué

Gate de arquitectura para el Paso 3, equivalente al muro WanGP / freeze de providers: solo tests, sin mover lógica.

Nuevo ui/tests/agentCapabilityPorts.test.mjs:

  • Congela las 8 escrituras useStore.setState en features/agent/** fuera de applicationAdapters.ts (stageStoryVideo 3, stageStoryMusicVideo 2, cancelCanonicalQueueTask, resumeCanonicalQueueTask, authoritativeWorkspaces).
  • Prohíbe que otros slices importen features/agent, salvo los 4 listeners actuales de agentUiBus en Story/Series.
  • Exige que las capabilities nuevas ejecuten vía context.adapters.*. Congela las 25 executors legacy (Studio bridge, cola, workspaces, Video Editor aux, canciones alternativas, generate_comic_panel, update_character_kit).
  • Mide el grafo de módulos de agentActions.ts y labActions.ts. Cualquier PR de slice posterior debe encoger estas listas, no crecerlas.

Por qué ahora

La primera ola ya está en main (f373667). npm test pasa 443. Este PR no toca hotspots (agentActions.ts / labActions.ts / useStore.ts / launch).

No implementa un quinto objeto ActionContext. El contrato común ya existe (WizardContextSnapshot, CommandEnvelope, CommandResult, WizardPendingQuestion) y hay que revisarlo antes de trocear dominio.

No hace

  • No mueve Story/Series/Comics/Studio fuera del mago.
  • No cambia JSX ni añade animaciones.
  • No extrae otro router HTTP.

Verificación local

  • npx tsx --tsconfig tsconfig.app.json --test tests/agentCapabilityPorts.test.mjs — 4 pass
  • npm test en main — 443 pass (precondición D7)
  • npm run test:e2e en main — boot + Story Lab simulada, 2 pass
  • Stashes intactos: stash@{0} e2e wip, stash@{1} compositor 3D

Dueño del merge: humano. No auto-merge.


Note

Low Risk
Test-only change; it enforces boundaries on future PRs but does not alter runtime behavior.

Overview
Adds ui/tests/agentCapabilityPorts.test.mjs, a Paso 3 architecture gate with four static checks and no production or refactor changes.

The suite freezes today’s Agent Mode “ports”: 8 useStore.setState call sites outside applicationAdapters.ts, 4 cross-slice imports of agentUiBus only, 25 legacy capability executors that do not use context.adapters, and the import graphs of agentActions.ts and labActions.ts. Failures report added vs removed drift so later slice PRs must shrink allowlists, not grow them.

One test loads capabilityRegistry under JSDOM and asserts 73 registered capabilities total.

Reviewed by Cursor Bugbot for commit a6995ce. Configure here.

Gate for Paso 3 without moving domain logic. Names the current
useStore.setState allowlist, slice→agent UI-bus imports, legacy
capability executors, and the agentActions/labActions module graph
so later slice PRs must shrink those lists instead of growing them.
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 1 file(s); +265/-0

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • added: ui/tests/agentCapabilityPorts.test.mjs

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

@IAnMove

IAnMove commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a6995ce. Configure here.

@IAnMove
IAnMove merged commit 1be6c3a into main Sep 1, 2026
5 checks passed
@IAnMove
IAnMove deleted the test/agent-capability-ports-gate branch September 5, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant