LoRA source resolver rejects shared cache blobs accepted by serving-artifact validation

未关闭 适合新手
#1,001 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@draarivpatel-ui 已经在做这个了。

开始于 2026年11月24日。

  • #1022 来自 @draarivpatel-ui —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python

调研方向

从 packages/sie_server/src/sie_server/adapters/_lora_source.py 中的 _check_files 开始;将其允许的布局与同一模块中的 _is_cache_owned_file 以及 packages/sie_server/src/sie_server/config/serving_artifacts.py 中的检查进行比较。用 40 个字符的 revision 和 64 个字符的 blob 名称重建该 issue 的本地 fixture,然后在快照上调用 resolve_lora_source。完成意味着共享缓存 blob 被接受,而无关 target 仍会抛出 escape 错误,并且有一个覆盖这两种情况的测试。

由索引模型根据 Issue 内容生成。

描述

Hullo folks,

I’m doing some research for Tessl Code Review and ran it against your repo. It flagged a potential issue, and I figured it made sense to share it with you:

What happens

A LoRA snapshot whose weight file resolves into the cache-level shared blob store is rejected as an escaping artifact. The same layout is explicitly accepted by the serving-artifact ownership check.

This surfaced during a retrospective review of #833. I rechecked the resolver at 1518299.

Reproduction

Create this small local fixture, using a 40-character hex revision and a 64-character hex blob name:

cache/
  models--test--adapter/
    snapshots/<revision>/
      adapter_config.json
      adapter_model.safetensors -> ../../blobs/weights
    blobs/weights -> ../../blobs/bb/<64 b characters>
  blobs/bb/<64 b characters>

Then call resolve_lora_source(str(snapshot)).

Observed with the unchanged resolver and temporary files:

  • A regular weight file in the repository's own blobs/ directory is accepted.
  • Replacing that file with a link into the shared cache/blobs/bb/<hash> store raises ValueError: LoRA artifact escapes its declared directory or repository blobs.
  • _is_cache_owned_file(shared_blob, repository) returns True for that same target.
  • An unrelated target outside both permitted layouts is correctly rejected.
Expected behavior

The LoRA resolver should accept the cache-owned shared-blob layout while continuing to reject unrelated targets. Otherwise, an adapter already present in a layout supported elsewhere in SIE cannot pass load-time resolution.

The difference appears to be in _check_files: it permits only the snapshot and repository-local blobs. The serving-artifact check also recognizes the shared hash layout.

Validation was a local resolver test on macOS with Python 3.14.2, using the checkout's actual modules while bypassing unrelated package initialization. It did not download weights or run model inference.

Full transparency: I work at Tessl, and we've spotted that using Tessl Code Review - using repository-level context and specific review lenses that improve over time through feedback. That’s how this finding surfaced.

We’re just getting started and want to offer the tool free to open-source projects. If this is useful, happy to give you access.

Bap

主要语言
Python
星标
3.5k
派生
328
平均合并
17 小时 8 分钟
30 天内合并 PR
108

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

superlinked/sie 的其他 Issue

查看 superlinked/sie 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。