Skip to content

feat(collections): share durable commands between Wizard and MCP - #271

Merged
IAnMove merged 8 commits into
developmentfrom
feat/shared-collection-commands
Sep 9, 2026
Merged

IAnMove merged 8 commits into
developmentfrom
feat/shared-collection-commands

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 9, 2026

Copy link
Copy Markdown
Owner

A lost collection-save response could leave Wizard or an external agent unable to distinguish a committed save from a failed request. This change gives the manual editor, Wizard and MCP the same versioned collection operations, with the collection and its durable receipt committed together in the existing registry. Reusing an intention returns its original result; a deliberate new intention remains independent; edits require the exact revision.

Wizard prepares the visible collection editor and waits for a correlated React acknowledgement before submission. It applies the returned ID/revision afterwards and preserves the receipt if presentation fails. The editor offers explicit recovery of pending requests after reload. HTTP discovery and MCP derive their schemas from the same executable catalog; the ten legacy MCP names and their completed receipts remain compatible.

Current PR HEAD is ec44c26814c411521e7fa147466c4fdc6bcfa554, after merging development a52fb866 (P1 and speech3D). The collection implementation is unchanged from the reviewed product commit below. Required CI and both Cursor automation jobs pass on this updated HEAD; the formal Independent QA check is neutral.

Validation on collection product commit 7eb06def7e75631b692050f30051ef4b1c1feb07: required CI passes (Python, UI tests/lint/typecheck/build, simulated browser boot). Independent Luna technical review approves the code scope; the final directed backend run passes 29 tests and the code-health ratchet passes against f2ef2205. The collection UI/client suite passes 18 tests. Both Cursor automation jobs succeeded; the separate formal Independent QA publisher remains neutral.

Launched-app evidence uses isolated integration HEAD 8ebcf2f3, combining this product HEAD with P1/#270. Two real Wizard turns through MiniMax-M3 created and edited a collection, followed by manual editing and recovery after an intentionally lost committed response/reload. Official MCP SDK 1.30.0 tests pass without a user tab: discovery, reads, create/update, historical replay, independent intentions and conflicts. The final candidate delta confirms receipt/get/CAS parity, editor locking during retry and preservation of an uncertain intention after a 401. Adversarial browser responses were injected only for those error cases; the report distinguishes them from the real provider turns. No GPU generation was needed for this domain.

Reproducible reports and screenshots: outputs/wizard-mcp-execution-20260909/collection-review/collection-adversarial-signoff-7eb06def.md, browser/collection-live-20260909/collection-browser-report.md, browser/collection-delta-20260909/collection-delta-report.md, and collection-live/real-sdk-report.md (local evidence, excluded from Git).

This is the collection domain slice of the shared Wizard/MCP plan. Generation, editorial domains, Video3D and server workflow execution are subsequent slices. Legacy HTTP PUT keeps its optional revision and DELETE is unchanged. Host-crash behavior on Windows/network filesystems remains unvalidated.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: medium
Scope: 27 file(s); +2628/-156; React UI, backend services, docs, repo scripts / CI

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

Findings

  • medium — Large pull request
    2628 additions / 156 deletions. Reviewers will have an easier time with smaller, focused PRs.
  • 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: app/services/workspace_commands.py, app/services/workspace_store_lock.py, docs/development/WORKSPACE_COMMANDS.md, scripts/export_workspace_command_catalog.py, tests/test_workspace_command_failures.py, tests/test_workspace_commands.py, ui/src/api/workspaceCommandCatalog.json, ui/src/api/workspaceCommands.ts, ui/src/features/agent/workspaceCollectionAdapter.ts, ui/src/features/workspaceCollections/CollectionRecovery.tsx, ui/src/features/workspaceCollections/collectionPresentation.ts, ui/tests/workspaceCollectionPresentation.test.tsx, ui/tests/workspaceCommands.test.ts
  • modified: app/routers/wangp_mcp.py, app/routers/workspace_collections.py, app/services/wangp_agent_adapters.py, app/services/workspace_registry.py, tests/fixtures/route_table.json, ui/src/api/workspaceCollections.ts, ui/src/features/agent/applicationAdapters.ts, ui/src/features/agent/executionCards.ts, ui/src/features/agent/navigationQueueCapabilities.ts, ui/src/features/workspaceCollections/WorkspaceCollectionsPanel.tsx, ui/src/i18n/locales/en/workspaces.json, ui/src/i18n/locales/es/workspaces.json, ui/tests/navigationQueueCapabilities.test.mjs, ui/tests/workspaceCollections.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.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Code health

Quality score: 56.4/100

Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.

Component Weight Current Change
Cyclomatic health 45% 55.1 +0.0
File concentration 25% 63.0 +0.2
Oversized-file debt 20% 39.1 +0.3
Modularity 10% 80.6 +0.3

Change vs PR base: +0.1 points.

Metric Value
Production LOC 270,176
Production files 785
Test LOC 99,250
Functions measured 17,905
Functions complexity ≥ 15 857
Maximum complexity 674
Policy code-health-policy-v1
HEAD c4914a9ed357a2fa9b0f37e4820e9322ff6f7f3f
Base a52fb866dff5f77ded5872d1dff4f6c346f6333e
UI measurement complete

Markdown, JSON catalogs and tests are out of this table. Only app/ runtime + ui/src TS/JS count.

Most complex functions

Complexity Where
674 app/wgp.py:7221 generate_video
381 ui/src/stores/useStore.ts:4084 Async method 'startGeneration'
355 app/_launch_runtime.py:23613 _run_generation
308 app/wgp.py:12363 generate_video_tab
268 ui/src/stores/useStore.ts:8636 Async method 'loadSettingsFromOutput'
262 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:496 Function 'SceneAnimatorPanel'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
248 app/services/director_pipeline.py:13607 _run_video_generation
245 app/services/director_pipeline.py:7712 _run_pipeline
244 ui/src/features/agent/agentActions.ts:1150 Function 'parseAction'
226 app/services/director_pipeline.py:6541 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2924 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC +796
Test LOC +1,131
Functions ≥ 15 +5
Maximum complexity +0

Warnings

  • production LOC increased by +796
  • functions at complexity >= 15 increased by +5

Ratchet passed.

@IAnMove
IAnMove marked this pull request as ready for review September 9, 2026 09:50
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a2bb498d-08b4-4b8a-8346-4b8f0861e4a9)

@IAnMove
IAnMove merged commit edf93aa into development Sep 9, 2026
12 checks passed
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