Pull Request has been successfully merged by openeuler-ci-bot.
(Thank you for fqy_Sandbox's contribution.)变更摘要
本 PR 将 E2B 自托管验证套件从原有的七项业务操作扩展为覆盖更完整 SDK 能力的端到端用例集。核心思路是:新增一套扩展用例目录(后台命令、文件系统/监听/签名 URL、Sandbox 检查/指标/网络、Snapshot、Checkpoint 恢复、pause/resume 生命周期、PTY、Template SDK),为每个场景新增独立 handler 模块,并引入基于 E2B_API_URL/E2B_API_KEY 的轻量 REST 客户端 E2BApiClient 来断言 SDK 未暴露的生命周期接口(pause、resume、connect、timeout、snapshot 列表)。同时测试运行器支持按 depends_on 传递依赖自动选取用例,新增统一的脱敏诊断契约(可能原因、只读定位命令、Agent 提示),报告与资源清理也相应增强,并将最低 E2B SDK 版本提升至 2.19。该 PR 主要面向功能与验证能力扩展,属于测试套件内部改动。
主要改动
- 扩展用例目录与 handler 模块: 新增
e2e_extended_cases.py(含BG-*、FS-*、SI-*、SNP-*、CPR-*、PRC-*、PTY-*、TSDK-*等约 60 个用例),并为各场景新增e2e_command_handlers.py、e2e_filesystem_handlers.py、e2e_snapshot_handlers.py、e2e_checkpoint_handlers.py、e2e_pause_resume_handlers.py、e2e_pty_handlers.py、e2e_template_handlers.py等模块;e2e_models.py的Business枚举新增BACKGROUND_COMMAND、CHECKPOINT_RESTORE、PAUSE_RESUME、TEMPLATE_SDK等 14 个业务类型,e2e_test_cases.py将扩展用例并入目录并增加用例 ID 唯一性校验。 - 用例选择与依赖解析:
e2e_test_runner.py新增select_cases_with_dependencies,按depends_on递归选取用例及其传递依赖,并检测未知依赖与循环依赖;运行循环改为通过build_diagnostics生成诊断、print_case_result/print_run_summary输出结果,替代原有简单打印。 - 生命周期 REST 断言: 新增
e2e_api_client.py,提供create_sandbox、pause、resume、connect、set_timeout、list_snapshots等接口及响应解析辅助函数;e2e_pause_resume_handlers.py据此验证状态码(如 204/201/409/404)、状态迁移、autoPause/autoResume能力探测与 filesystem-only 能力判定。 - 诊断与报告增强: 新增
e2e_diagnostics.py构建统一脱敏诊断契约(possible_causes、next_commands、analysis_prompt、Agent 约束等);e2e_report.py新增递归脱敏函数redact_data及 Query 参数签名脱敏规则,报告增加通过率、正负向/边界用例统计、业务覆盖、资源清理汇总等章节。 - 资源清理与 SDK 版本要求:
e2e_resources.py新增summarize_cleanup及record_background_process、record_pty、record_watcher、record_snapshot、record_template_tag等资源登记方法;runner 按"先释放后台进程/PTY/watcher,再清理 Sandbox,最后删除 Snapshot 与 Template"的顺序执行清理并登记结果;bootstrap.py将MINIMUM_E2B提升为(2, 19, 0)并以E2B_REQUIREMENT = "e2b>=2.19.0,<3"替代原有requirements.txt安装方式。


Welcome To openEuler Community
Hey @fqy_Sandbox , thanks for your contribution to the community.
Bot Usage Manual
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
Contact Guide
If you have any questions, please contact the SIG: sig-CloudNative ,
and any of the maintainers: @duguhaotian, @gaodaweiky, @jimmieme, @lu-wei-army, @weibaohui, @wonleing, @yangzhao_kl, @zhaoyifan28, @zmr_2020 ,
and any of the committers: @feijianqiang, @zhourenjianz .


门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/KASandbox/243/console


门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/KASandbox/254/console


/lgtm
/approve


当前PR是否有AI参与:
[x] 否
[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :
参考:openEuler社区《生成式AI工具使用与开源贡献政策》
PR功能描述 / 为什么需要这个合入**:
该PR关联的issue
(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #
希望检视人员了解: