Skip to content

feat(generation): 四向八向使用全方向独立合同 - #577

Merged
huyanxius merged 3 commits into
1024XEngineer:mainfrom
xyh202131:feat/full-direction-contract
Aug 24, 2026
Merged

huyanxius merged 3 commits into
1024XEngineer:mainfrom
xyh202131:feat/full-direction-contract

Conversation

@xyh202131

@xyh202131 xyh202131 commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

变更内容

  • 四向改为 east、west、north、south 四个真实生成方向,八向改为八个真实生成方向
  • Workflow Controller、Quick Start、Workflow Editor 的生成、选择、确认、重试与微调统一使用 generationDirections
  • CharacterData v2 保留显式 west 等方向的真实模板与动作序列,不再错误回退为 east 镜像
  • 发布与渐进导出按项目方向规格校验完整真实序列;缺少任一必需方向时明确拒绝
  • 发布态 v1 多方向镜像资产在创建和更新时均拒绝,单向旧资产继续兼容
  • 单向资产仅保存 east 真实序列时,可正确导出为默认序列
  • 已同步最新 main;新增动作继续复用 main 的现有 Workflow 路径,不恢复旧的自建流程

验证

  • 后端全量:1409 passed,14 skipped,覆盖率 94%
  • 前端方向逻辑及其余全量:72 个测试文件、1042 条用例全部通过
  • 前端覆盖率:Statements 92.21%,Branches 86.65%,Functions 95.91%,Lines 95.20%
  • 前端 lint、typecheck、正式 build 通过
  • 后端 Ruff 与 git diff --check 通过
  • main 新增的字体交付测试在 Windows 长盘符路径下存在 URL pathname 可移植性问题;该问题不属于本 PR,正式 Vite build 已通过

Refs #544
Refs #222

@vercel

vercel Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
windup Ready Ready Preview Aug 24, 2026 7:32am

@github-actions

Copy link
Copy Markdown

⚠️ @xyh202131,此 PR 尚未关联 issue。请在 PR 描述中使用 Closes #123 等关闭关键字;更新描述后,此提醒将自动标记为已解决。

@codecov

codecov Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

@xyh202131

Copy link
Copy Markdown
Contributor Author

/review

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

审阅了后端方向完整性校验、生成入口,以及前端方向配置和工作流消费者。当前有两处会让新合同在正常路径下失效:前端仍生成旧的源方向子集;API 对 v1 多方向资产绕过了新增校验。固定提交范围的 git diff --check 通过;后端和前端测试未能运行,因为环境中没有 uv/pytest,且未安装前端依赖。

Comment thread frontend/src/entities/character/directions.ts
Comment thread backend/packages/app/src/windup_app/web/api/character.py Outdated

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the full fixed diff for the direction-generation contract. The backend contract changes are directionally consistent, but two integration paths still allow incomplete or incorrectly published multi-direction assets. The local Python and frontend test runners were unavailable in this environment (pytest/uv missing; vitest not executable).

Additional findings

  • backend/packages/app/src/windup_app/web/api/character.py:?: [P1] Validate legacy multi-direction assets before publishing: This guard bypasses validate_character_directions whenever data.version < 2. CharacterStatus.from_character_data can still classify a legacy v1 payload as PUBLISHED, so create/update accept v1 characters in four- or eight-way projects even though the new validator explicitly rejects those mirror-based assets as incomplete. Remove the version check here and let the validator retain only the intended v1 single-direction compatibility case.

Comment thread frontend/src/entities/character/directions.ts
…eat/full-direction-contract

# Conflicts:
#	frontend/src/pages/quick-start/service.test.ts

@huyanxius huyanxius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@huyanxius
huyanxius merged commit 17f8776 into 1024XEngineer:main Aug 24, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — 17a8273a Deployed Aug 24, 2026 by vercel[bot]
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.

2 participants