refactor(mono):Init toolchains BUCK and reject third-party.git root repo#1816
Merged
benjamin-747 merged 1 commit intoweb3infra-foundation:mainfrom Jan 18, 2026
Conversation
…repo Signed-off-by: MYUU <1405758738@qq.com>
933b2ef to
9dd0980
Compare
benjamin-747
approved these changes
Jan 18, 2026
Merged
via the queue into
web3infra-foundation:main
with commit Jan 18, 2026
750e2b7
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 背景
为支持 Buck2 初始化与仓库安全策略, 在 monorepo 初始化阶段自动补齐
toolchains/BUCK,同时在 HTTP smart protocol 入口处禁止对根仓库third-party.git的访问/修改(但允许third-party下的子目录仓库,例如third-party/test.git)。改动内容
monorepo 初始化
.buckroot/.buckconfig)后,额外为toolchains子树注入BUCK文件,确保 Buck2 相关流程在无用户提交时也能正常工作。jupiter/src/utils/converter.rsHTTP 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属于补齐默认结构,不依赖用户内容。