Skip to content

feat(sessions): 统一创建入口的文件引用与初始事件校验 - #333

Open
pxguan wants to merge 1 commit into
codex/session-event-file-referencesfrom
codex/session-creation-file-references
Open

pxguan wants to merge 1 commit into
codex/session-event-file-referencesfrom
codex/session-creation-file-references

Conversation

@pxguan

@pxguan pxguan commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

变更摘要

Session 创建与 Deployment Run 的初始文件引用现在共用资源计划和初始事件校验。相同的末尾 system.message 携带 URL 图片时,两条入口都拒绝;合法文本顺序继续接受。直接创建 Session 的公开事件保留原始附件字段。

  • Session 创建支持 initial_events,与资源在同一个创建事务内提交。
  • Deployment 只做模板、secret、运行期资源 ID 和依赖解析;共享计划生成 SessionFileMountEventFileBinding,继续复用 insertSessionTx
  • 将已有 Deployment 内容与顺序规则迁入共享解析器,删除 Session 重复顺序校验;Session 仍允许省略初始事件,Deployment 仍要求提供。
  • 同步设计文档及失败、文件引用和审计字段回归测试。不增加数据库 migration。

依赖与范围

依赖 #227 的运行中事件文件引用与 worker 转换。当前目标分支为 codex/session-event-file-references,Files changed 只展示创建入口的增量。#227 合并后将目标分支改为 main

前端附件能力由另一个 PR 提供,本 PR 不依赖它。

验证

  • 创建计划、Sessions、Deployments、Session Resource、Sandbox 路径包测试通过。
  • lint、dead-code、重复代码和复杂度检查通过;提交 hook 通过。
  • 已运行 just test,全量集成测试未通过:当前共享数据库缺少 deployment_runs.scheduled_atenvironment_work.session_uuid、Vault 加密列等 schema,阻断 Session/Deployment API 集成用例。
  • 未将包级测试视为真实 worker E2E 通过。

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 0a66efe3-89f1-4ce0-ac59-88966213b2df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog

pullfrog Bot commented Sep 7, 2026

Copy link
Copy Markdown

Run failed. View the logs →

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using openai-compatible/deepseek-v4-flash𝕏

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