fix(resource): 统一 ResourceQuery 路径匹配契约

This commit is contained in:
2026-09-19 07:59:31 +08:00
parent 045d598400
commit 56ad014199
5 changed files with 367 additions and 85 deletions
+6
View File
@@ -119,6 +119,12 @@ SQLite `ResourceRepository`,索引不存在时返回 `ok=true` 且
属于 `parse.text_units` / `parse.errors` 的对象级查询。`limit` 范围是
`1..=1000`,非法参数返回 `BAT-ERR-700002`
`path_pattern` 使用 `ResourceRepository` 的统一匹配契约:`*` 匹配零个或多个
不含 `/` 的 Unicode scalar value`**` 可以跨 `/``?` 匹配恰好一个不含 `/`
的 Unicode scalar value`**/` 可匹配根目录文件和任意深度目录。匹配区分大小写,
没有转义语法,`/``%``_``\` 都是字面量。SQLite 只做候选筛选,最终由
同一 matcher 判定,带路径或 metadata 后置过滤时 `count()``list()` 保持一致。
`resource.manifest` 的请求必须携带由 `release.attestation` 返回的
`release_id``expected_publication_identity``expected_manifest_identity`
`expected_verification_generation`