feat(workflow-run): add frontend execution foundation - #6
Draft
huyanxius wants to merge 11 commits into
Draft
Conversation
Workflow execution needs a stable boundary between generation records and backend tasks. Parse character-template results and bind generation IDs to task IDs. Require subscriptions to replay a current snapshot before later updates.
Workflow execution needs a frontend-owned snapshot that can survive page refreshes. Add the fixed step model, versioned local storage, and runtime hydration validation. Keep memory authoritative when persistence fails or stored data is invalid.
Quick Start and the editor need one frontend-owned progression boundary. Add character setup updates, generation submission, task recovery, and interruption handling. Advance valid results to candidate selection without exposing unfinished steps.
Workflow state and async recovery need regression coverage before page integration. Test persistence, submission deduplication, task replay, and interruption races. Verify the first generation slice through the real store and controller.
The skeleton documentation no longer reflects the implemented workflow slice. Record controller scope, recovery behavior, task replay, and local persistence limits. Keep editor, Quick Start automation, and later steps explicitly out of scope.
The workflow controller mixed process coordination, state transitions, and asynchronous task recovery in one file. Extract pure WorkflowRun transitions and the character-template task lifecycle behind the existing controller facade. Keep the public API and runtime behavior unchanged while making later workflow steps easier to add.
The new pure state boundary needs direct regression coverage alongside the existing controller tests. Cover fixed workflow creation, character setup normalization, and activation of the character-template step. Protect the extracted rules without changing production behavior.
The Character Setup feature exposed the asset creation DTO while the workflow controller expects step-local input. Change the submit callback to accept CharacterSetupStepInput. Allow Quick Start and Workflow Editor to connect without translating through an unrelated asset contract.
The Character Setup boundary previously drifted to an unrelated asset DTO. Add a type assertion for the submit callback parameter. Prevent the page-to-workflow contract from regressing.
* feat: add backend skeleton * ci: add backend CI workflow and naming convention gates * feat: add backend skeleton * docs: add module split document Describe the backend package layout (common/framework/app) and the server domain module split: user, project, asset, character with action/character_template/wearable subdomains, generation and media. All modules currently define abstract interfaces only. * feat: add unified response and global exception Add the shared response/exception kernel in windup_common: Response/ListResponse unified bodies (HTTP always 200, business code in body), BizException base, ModelException for LLM calls, and the BizCode/ModelErrorType enums. Add the app-level global exception handlers that convert these into Response.fail. * feat: add framework infrastructure scaffolding Add windup_framework infrastructure abstractions: SQLAlchemy db base/session, config loaders (database/provider/storage), LLM provider protocols (chat/image/video) and Kodo object storage. * feat: add server module api skeletons Add abstract service interfaces and domain models for the server modules: user, project, asset, character (with action/character_template/wearable subdomains), generation and media. Drop the now-obsolete .gitkeep placeholders. * refactor: remove health endpoint Drop the placeholder health router and its registration in create_app; the web layer now revolves around the global exception handlers. * build: add windup entrypoint and python-multipart dependency Expose the windup CLI entrypoint (windup_app.bootstrap.app:main) and add python-multipart for form/file uploads; refresh uv.lock accordingly. * docs: fix stale module paths in character service docstring Point the sub-entity references at the nested character subpackages (character.action / character_template / wearable) instead of the old top-level paths. * chore: drop unused imports Remove unused imports flagged by ruff F401 in generation/interface.py and user/model.py. * ci: split naming gate into its own workflow 将 validate-branch 与 validate-commits 从 backend.yml 拆到独立的 naming.yml。命名规范门禁不局限于 backend 范畴,应作为仓库级 CI 单独维护(PR review:@minorcell 建议)。 backend.yml 仅保留 lint-and-test;naming.yml 用独立 concurrency group 避免与 backend 共用 group 互相取消。 * docs: sync module-split with current design Reflect character/media/generation/user module redesigns in the split document. * feat(generation): refine task types and SSE streaming Replace strategy pattern with typed submit methods. - model: add CharacterImageOutput/CharacterActionOutput/CharacterActionFrame as typed task results, remove generic GenerationResult - interface: split submit into generate_character_image and generate_character_action with typed inputs - document SSE streaming flow (GET /generation/tasks/{id}/stream) replacing frontend polling * refactor(user): defer OAuth to future iteration Remove OAuth abstract methods and models from UserService. Commented-out methods: get_oauth_authorize_url, login_by_oauth, bind_oauth, get_oauth_bindings. Related imports OAuthCallbackInput and UserOAuth removed from interface. The OAuth region is preserved as a placeholder for future extension. * feat(media): add file upload to object storage Add ObjectStorageMediaService implementing MediaService. - service: upload to Kodo via KodoStorage adapter, auto-generated object keys with category prefix, no user filenames in keys - app: register media router (POST /media/upload) in create_app * refactor(media): implement Qiniu upload and deduplicate MediaCategory - Remove dead storage module (empty __init__.py and kodo.py) from framework - Implement actual Qiniu Kodo SDK upload in ObjectStorageMediaService - Move MediaCategory to windup_common.enums.media, remove duplicate from media/model - Update media __init__ to import MediaCategory from common * fix(media): lazy-import qiniu SDK to avoid import-time failure Move qiniu import inside upload() so module collection does not fail when qiniu is not installed (e.g. CI test runs). * feat(generation): update API contract models to match implementation - CharacterImageInput: reference_image_url optional, add width/height/num_images - CharacterImageOutput: unified type field, image_urls list (single element for one image) - CharacterActionOutput: unified type field - Generation API endpoint: request/response Pydantic models with size validation - Stubs marked with TODO for actual implementation
后端 1024XEngineer#64 合入 main 后根 .gitignore 出现 add/add 冲突。 根 .gitignore 取 main 版本(已含 .DS_Store),前端的依赖与构建产物由 frontend/.gitignore 负责。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: feat(workflow-run): add frontend execution foundation
Dependency
feat/58-frontend-module-skeletonis the head of PR feat(frontend): add MS2 module skeleton with API contracts 1024XEngineer/Windup#70.mainand update the upstream draft PR.Feature Description
Implementation Approach
Testing
npm run format:check— passed (47 files)npm run lint— passednpm run typecheck— passednpm run test— passed (5 files, 32 tests)npm run build— passedgit diff --check 7a6515e...HEAD— passedFrontend CI— passed[CX] Prompt & Review
Refs 1024XEngineer#58