Skip to content

chore: 标准化仓库治理与持续集成 - #31

Merged
Ev3rGan merged 2 commits into
mainfrom
codex/parent-1-repository-standardization
Sep 1, 2026
Merged

chore: 标准化仓库治理与持续集成#31
Ev3rGan merged 2 commits into
mainfrom
codex/parent-1-repository-standardization

Conversation

@Ev3rGan

@Ev3rGan Ev3rGan commented Sep 1, 2026

Copy link
Copy Markdown
Owner

关联:#1#10(Relates to #1 and Relates to #10

目标

本 PR 完成 Parent #1 的仓库标准化收口,使公开仓库在许可证、打包元数据、贡献与安全治理、Issue/PR 协作入口、依赖维护和持续集成方面具备可审计的统一基线。

主要内容

  • 增加标准 Apache License 2.0 文本,版权归属为 Copyright 2026 Ev3rGan
  • 通过 PEP 639 元数据声明 License-Expression: Apache-2.0License-File: LICENSE,并确保 sdist/wheel 包含同一许可证;
  • 修正 README 的仓库状态、安装/验证边界与公开协作说明;
  • 增加 Contributor Covenant 2.1、贡献指南、安全策略、Issue Forms 与 PR 模板;
  • 增加 Dependabot 配置;
  • 增加最小权限、action 精确 pin 的 GitHub Actions CI:Python 3.11 quality gates,覆盖 Ruff、strict mypy、pytest、构建和包检查;
  • 仅在 tests/test_agent_run.py 修正一个既有 strict-mypy 注解,使用公开 ProviderStreamEvent,运行时行为不变。

首轮 CI 失败与窄修复

首轮 exact head 22f195740a315633af2534221f1c57b8aaec184e 的真实 Linux Actions run 33510584072 在 strict mypy 失败:Linux 类型环境中 subprocess.CREATE_NEW_PROCESS_GROUP 不存在,同时 Windows-only ignore 被判定为 unused。没有绕过、忽略或排除该检查。

第二个普通提交 fc1bd7cab141ce8ad6f8b6b126b8034669f3532e 引入 typed platform seam:Windows 使用 CREATE_NEW_PROCESS_GROUP,POSIX 使用 killpg/SIGKILL,无法确定的平台 fail closed;SWE-bench 复用同一 seam,并增加行为回归测试。该修复不使用 Any 掩盖、不增加 CI exclusion,也未 amend/rebase 旧提交。

精确变更身份

  • Base:fbab60f9a38bc4b49f0e730495d6207ea670bdd1
  • Head:fc1bd7cab141ce8ad6f8b6b126b8034669f3532e
  • 2 个提交,16 个路径
  • 完整 diffstat:835 additions / 9 deletions
  • 完整 stable patch-id:50f15f632e54e7d7f7a114554346647459c50ebc
  • CI repair:3 paths,68 additions / 6 deletions,stable patch-id 5677934c4791244d1b5a87d8183a484adccfe673

验证

同一最终树已通过:

  • focused platform/process tests:10 passed
  • 官方 python:3.11-slim,Python 3.11.16 + mypy 2.3.1:32 files,0 issues
  • Windows Ruff lint/format:PASS
  • strict mypy native、--platform linux--platform win32:全部 PASS
  • pytest:334 passed,1 个明确 network-contract skip
  • git diff --check:PASS
  • sdist/wheel、fresh Python 3.11 install、metadata、helper 与 CLI:PASS
  • Standards review:0 findings;CI repair Spec review:0 findings
  • 未读取 .env,未进行 Provider、Docker 或 Harness 重跑

仓库标准化原始验证还包括 YAML 1.2、CI 最小权限与 action pin、PEP 639、twine check、LICENSE 打包一致性和 fresh wheel Fake demo。

已有真实验收证据

本 PR 基于 exact main fbab60f9a38bc4b49f0e730495d6207ea670bdd1。该 main 已在官方 SWE-bench Harness 中完成 DeepSeek 授权实跑:实例 django__django-11133 applied/resolved=true,resolved/total=1/1,infra failures=0。成功 artifact 保留在仓库外,不进入本 PR,也不会被本操作清理。

合并后 GitHub 配置计划

仅在本 PR 新 exact head 的 Actions 全部成功、PR 普通 merge、merge SHA 自身 CI 再次成功后,custodian 才会按授权配置仓库 settings、安全能力和无 bypass 的 main-ci-gate。现有 owner/review ruleset 的审批语义不会修改。

本 PR 不自动关闭 #1#10;两个 Issue 在独立终态核验前保持 OPEN。


English appendix

Relates to #1 and Relates to #10. This PR standardizes repository governance with Apache-2.0/PEP 639 metadata, community and security documents, templates, Dependabot, and a least-privilege pinned CI workflow.

The first exact head 22f195740a315633af2534221f1c57b8aaec184e exposed a real Linux strict-mypy failure for Windows-only process-group symbols. The second ordinary commit fc1bd7cab141ce8ad6f8b6b126b8034669f3532e adds a typed fail-closed platform seam for Windows process groups and POSIX killpg/SIGKILL, reuses it in SWE-bench, and adds regression coverage. It does not bypass, suppress, or exclude CI checks.

Final identity: base fbab60f9a38bc4b49f0e730495d6207ea670bdd1, head fc1bd7cab141ce8ad6f8b6b126b8034669f3532e, two commits, 16 paths, 835 additions / 9 deletions, stable patch-id 50f15f632e54e7d7f7a114554346647459c50ebc. The repair delta is three paths, 68 additions / 6 deletions, stable patch-id 5677934c4791244d1b5a87d8183a484adccfe673.

The final tree passed focused tests, Linux-container mypy, native/Linux/Win32 strict mypy, Ruff, 334 tests with one explicit network skip, packaging and fresh-install acceptance, plus fixed-point Standards/Spec reviews with zero findings. Merge remains gated on successful Actions for this exact head and again for the merge SHA. Issues #1 and #10 remain open.

@Ev3rGan
Ev3rGan merged commit fc85729 into main Sep 1, 2026
1 check 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