Skip to content

Conversation

@zhoujiaqi30
Copy link
Contributor

@zhoujiaqi30 zhoujiaqi30 commented Jan 17, 2026

PR 背景

为支持 Buck2 初始化与仓库安全策略, 在 monorepo 初始化阶段自动补齐 toolchains/BUCK,同时在 HTTP smart protocol 入口处禁止对根仓库 third-party.git 的访问/修改(但允许 third-party 下的子目录仓库,例如 third-party/test.git)。

改动内容

  • monorepo 初始化

    • 初始化 root tree 的 buck 文件(.buckroot / .buckconfig)后,额外为 toolchains 子树注入 BUCK 文件,确保 Buck2 相关流程在无用户提交时也能正常工作。
    • 相关修改:jupiter/src/utils/converter.rs
  • HTTP smart protocol 路由拦截

    • 当请求路径为 /third-party.git/...(例如 /third-party.git/info/refs)时,直接返回“不支持该仓库”的错误,禁止对该根仓库操作。
    • 当请求路径为 /third-party/<subdir>.git/...(例如 /third-party/test.git/info/refs)时,保持原有行为,允许访问与操作。
    • 相关修改:mono/src/server/http_server.rs
  • 初始目录树新增toolchains用于存储编各种译工具链配置

    • config/config.toml 有同步调整(与本次行为相关的配置变化一并提交)。

影响范围与兼容性

  • 不影响现有 third-party/* 子仓库(如 third-party/test.git)的 smart protocol 行为。
  • 仅对根仓库 third-party.git 做了显式拦截,防止被当作可写仓库使用。
  • 初始化阶段新增 toolchains/BUCK 属于补齐默认结构,不依赖用户内容。

@zhoujiaqi30 zhoujiaqi30 force-pushed the refactor/monorepo-init-auto-structure branch from 933b2ef to 9dd0980 Compare January 17, 2026 12:35
@benjamin-747 benjamin-747 added this pull request to the merge queue Jan 18, 2026
Merged via the queue into web3infra-foundation:main with commit 750e2b7 Jan 18, 2026
11 checks 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.

2 participants