Skip to content

Move target repository descriptors into packaged resources - #716

Merged
Dong1017 merged 2 commits into
mainfrom
codex/500-repository-pack-resources
Nov 26, 2026
Merged

Dong1017 merged 2 commits into
mainfrom
codex/500-repository-pack-resources

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #712

Dong1017 authorized the target-repository resource move as the first independently mergeable slice of #500. The neutral loader retains its public registry and API. A plain inferrsi doctor now inspects its environment independently of repository descriptors. An explicit --repo-type loads just that target. The plan/run default stays available to existing callers. Accepted design and delegation · Claim

Anchors touched: A2 (neutral resource leaf and importer), A7 (historical digest records), A9 (governing approval). D007 documents the flat src/inferrsi/resources/repo_packs/<repo-type>.json layout. The Indexer evidence runner fingerprints either a frozen older checkout or the new layout. The Python package and shared host bundler use the new root. Migration decision

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "6c85229ca8aae4f0ae3ba042dc6af33e7887af04",
  "human_only": false,
  "material_ai_authors": [
    {"tool": "Codex", "model_id": "gpt-6.2-astra", "effort": "max", "role": "author"}
  ]
}

Acceptance evidence

Requirement Observed on this change
Preserve every registered descriptor Git detects seven byte-identical renames. Compared every file with the blob in base 3efb03ea71356786b19b705e53f65267c17d19bf. Their combined size is 4,092 B. The sorted filename/digest set has SHA-256 a60e1cc18f9cdff2aa9d82c39328517751c8904d3974669ccfc1b33574f5806d.
Ship the same files Built sdist, wheel, Codex, Workswarm and DSH. Read the archives, including Workswarm's payload and DSH's local and remote runtimes. Every copy contains all seven original byte strings under the flat path. Each host manifest agrees with the file digests.
Installed CLI and damage isolation Built and installed a wheel into an independent environment and ran the CLI from a separate disposable Git target. Plain Doctor and all seven explicit targets passed. Removed the installed vllm_omni.json, then reran plain Doctor and all six peers successfully. Selecting the missing target returned exit 2 and its filename.
Protect existing consumers Focused host inspection, facade, resource migration, indexer fingerprint and historical digest checks passed. ruff check src tests tools and git diff --check passed.

The opt-in wheel check is reproducible with RUN_FRESH_VENV=1 python -m pytest tests/knowledge/test_knowledge_fresh_install.py. The local Windows default build-from-sdist hit the existing deep knowledge paths; separate sdist and wheel builds both succeeded. The local Windows suite reported failures; nine early failures were reproduced on both the unmodified base and the first revision. The first Ubuntu 3.10 full run found two stale report links through the maintained-documentation test. The current revision updates both targets. The documentation, fingerprint and A7 test set passes locally (24 tests), as does the project lint scope. The GitHub Ubuntu 3.10/3.11 full checks on this revision determine the integrated outcome.

Handoff and closure

vllm_musa is still on PR #518. The agreed order is #716 first, then #518 rebases and adds resources/repo_packs/vllm_musa.json as the eighth descriptor. The integrator will post the merge SHA on #500. Confirmed order and path #702 follows the merged resource layout. #709 adapts to the Reader in the later #713 slice. MUSA handoff

Dong1017 owns acceptance. #712 remains open for review, required CI and the integrated revision. The library conversion and production cutover belong to #713, #714 and #715.

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex 代表 @Dong1017 请求 @david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 独立评审当前提交 eab7aec0627398879f8df9e112c0cb711ec64aad。这是 #500 的第一段,范围为 #712 的目标仓描述符与基础 Doctor。

请重点核对三处:默认 Doctor 和显式目标的行为边界;七份描述符在 wheel、sdist 和三个宿主包中的路径及字节一致性;旧版指纹与历史审计摘要的保留。已实测已安装 wheel 删除 vllm_omni.json 后,基础检查及其余六个目标成功,显式指定缺失目标以退出码 2 报出该文件名。各发行格式中核对的原始内容均为七份、合计 4,092 B。请将同意或需修改之处作为对上述提交的正式 GitHub review。 验收条件

@Dong1017 Dong1017 added area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters area:harness Harness module: profile, A/B loop, quality gates, evidence reports labels Nov 26, 2026

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Reviewed base 3efb03e and head eab7aec (first revision, diffComplete: true). This is a self-review by the PR author, so this COMMENT is not an independent approval.

No defect found in the head state I could check. I am not passing it yet because the three checks you asked for are not all covered by evidence I could read.

Verified at head eab7aec

  • src/inferrsi/resources/repo_packs/ holds seven files: afd_plugin, sglang, sglang_omni, strata, vllm, vllm_omni, vllm_rlt (.json). They match REPO_TYPES at src/inferrsi/resources/repository_packs.py L9.
  • repository_pack reads the flat path (L15). The module imports only json, importlib.resources and typing (L3–L7), so the neutral loader does not import inferrsi.harness. src/inferrsi/resources/__init__.py is import-free.
  • src/inferrsi/harness/data is absent at head, so the old Harness copies are gone.
  • pyproject.toml L40 "inferrsi.resources" = ["repo_packs/*.json"] ships the flat files as package data.
  • Plain Doctor: src/inferrsi/apps/cli/arguments.py L467–472 sets the doctor repo_type default to None. src/inferrsi/apps/host/inspection.py L72–73 loads a pack only when repo_type is not None. Plain Doctor therefore does not depend on any descriptor, and an explicit --repo-type loads only its own pack.
  • plan and run keep the vllm_omni default (arguments.py L109, _common).
  • src/inferrsi/knowledge/catalog.py L12 takes REPO_TYPES from the neutral loader, so the knowledge scopes stay on the same registry.

Open evidence (blocks PASS)

  1. Byte identity of the seven descriptors against base 3efb03ea (blob IDs, per-file digests and the SHA-256 a60e1cc1…5806d set). I could not read pr/diff.patch in this run, and the head reads cannot show base blobs. Please post the rename list and digest check output.
  2. Indexer evidence-runner fingerprint for both the frozen older checkout and the new layout, and the A7 historical digest records. The PR claims these pass; I did not locate the fingerprint code in this head read, so the claim is unverified.
  3. Host manifests and archive contents for Codex, Workswarm and DSH (sdist and wheel). The body reports them, but I did not inspect them.
  4. ruff and pytest results are author-reported. I did not run them, and I did not read CI status.

Decision record note
The #500 decision recorded 2026-11-26 12:44Z says "REPO_TYPES stays 8". Main and this head both have 7 entries, and this PR does not change the count. That record needs correcting; this review does not depend on it.

Next
I will re-read after the author pushes or posts items 1–3. Two of the four reviewers named in the thread (david6666666, zengchuang-hw) have not posted formal reviews on this head yet, and an independent Approve is still needed.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex 代表 @Dong1017 请 @david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 独立评审修订 6c85229ca8aae4f0ae3ba042dc6af33e7887af04。四位的正式评审请求已更新。首版两个 Python 全量检查各有同一个文档链接测试失败。新提交修正了 AFD、vLLM-RLT 两篇评审报告的相对链接,本地重跑包含该检查的 24 项均通过。以下是对首轮补证要求的逐项回复。 首轮评审 · 本次两行修改 · 当前 CI

1. 七份描述符原始字节。 表中每个 name 由 src/inferrsi/harness/data/repo_packs/<name>/pack.json 迁到 src/inferrsi/resources/repo_packs/<name>.json。逐项比较 git rev-parse <rev>:<path> 的 blob ID,并读取 git cat-file blob <id> 的原始字节。基线 3efb03ea71356786b19b705e53f65267c17d19bf 与当前修订每行均完全一致。

name 字节 两侧 Git blob ID 两侧 SHA-256
afd_plugin 502 0cbac5464c046f8f95119e995cfca2acf0991cad 00042abeabdc9c0e24f1a4edaba47e233df398aef0ad4e181fc70191d383da5f
sglang 620 991ef3c609b49f041431d51add715a6e40823f1d bce2e0c42796a9ef499d459c37b56d1d56f4b19344841359c534fca29c0359ce
sglang_omni 630 72a87f58b697200379939ba58f803d02e4cd1b5d 8e70336bc2aac0c74732a026337813652b5d5c6e1fc60f5571e9442345077b96
strata 617 fa6fb42505a0627d906e34d19e4f1484b761a4a4 643b32defb8db9aa230f624856f4fb4b595b5c23db58d9453091f5420cff71c3
vllm 508 8986ce6ab54fcf1bdc4afbd10e2e83e3ef81e31a 1705d96710249c4514c15d8d011b43c1a1ae7c15fbc9ddf11ef2d0e6b2ab7d07
vllm_omni 566 5cbd9c47b0526a58e46ae83563a9958ef948d9c2 58c971e9dcf6ac15752629ed4d9426aeb5b5d857fc37b5bcf921aa2e81c0cdd5
vllm_rlt 649 9616890f1fd46d4edf83f0fbc812e2df69394d68 6097041b8d026740060e527f49b1b4e288315b1c3227f7583805b86d8fa415f7

合计 4,092 B。集合 SHA-256 为 a60e1cc18f9cdff2aa9d82c39328517751c8904d3974669ccfc1b33574f5806d。复算方法是按含 .json 的文件名排序,每行由 UTF-8 文件名、一个 NUL、64 位小写十六进制 SHA-256 组成。只在行之间放一个 LF,最后一行无 LF。

2. Indexer 与 A7。 在三个完整 Git checkout 上用当前 tools.evaluate_indexer.identity(Path(checkout))["corpus"] 重算。其输入包括每个文件的相对路径和内容摘要。指纹实现 · 旧目录和扁平目录的回归测试

checkout 文件数(含 pack) corpus SHA-256
发布版 v0.3.4 / e2f3be10,旧路径 775(7) b76073f7829d7d25f2d36cad324a272ade49fcc41d19db3d0b07118afc43dc68
PR 基线 3efb03ea,旧路径 775(7) b76073f7829d7d25f2d36cad324a272ade49fcc41d19db3d0b07118afc43dc68
当前 6c85229c,扁平路径 775(7) 3a85497f9d413afaf778e8a0cf22c9984af246cb52c1d8eb63d1db401f4bdbfc

基线和当前修订排除这 7 个路径后,同一批 768 个文件的指纹均为 bb3d80409b9241df78fed14f5b4142cbc5c272b9287f3792697d1673a816baee。A7 保留 K02/C2 的历史记录。本次 loader 文件的旧摘要为 751d7bf663318962a2e73cf9d75369e0f8f8c2bda27964c56e44021b9f86c992,新摘要为 ef87247b7c670f8d21b9ee546226b5baf936eee42c16b70f59ea0d20ddd5dbdb。A7 测试比对清单、当前文件内容及历史摘要链。历史记录 · 本次迁移记录 · 摘要断言

3. 当前修订的实际打包结果。 对每份归档逐个读取全部 7 个文件,核对上表基线原字节,另核对每份宿主 manifest.json 中的 7 个摘要。下面记 P = inferrsi/resources/repo_packs/。DSH 的本地和远端运行时分别解包。

交付物 实际位置 本次外层文件 SHA-256
wheel P d3d840f7e2a2bdbd3e6798b7422d1df03758a3204dd6e2e29ae2fe1a9c8dd5e5
sdist inferrsi-0.3.5.dev6+g6c85229ca/src/P a213cd5d45d0d94e8e2a0ee669f6e7c26872e2f5e33093eadc360f6490340543
Codex ZIP inferrsi/runtime/P,清单 inferrsi/runtime/manifest.json bee6eed09e1432a3eead055b9464fc7caf27fd09bdd39bf721e7e5d9499e0ac0
Workswarm ZIP inferrsi/runtime/payload.zip 内的 P,外层 inferrsi/runtime/manifest.json 也与 payload 摘要一致 94c4ef0e86f657684c6540cefe4c6881ef9aa274659caf1a3a1946ef83492dd1
DSH tgz 本地 package/runtime/P 配 package/runtime/manifest.json,远端 package/remote-runtime.zip 内的 P 配 manifest.json 39a32be26e57d836f5146e878abcc1694263dd922483caedf47f802994f6fc3c

可从此提交分别构建 sdist、wheel 和三个宿主包,按成员摘要重放。wheel 数据声明 · 共用宿主打包与清单 · Workswarm 嵌套包 · DSH 两份运行时

4. 执行记录与交接。 当前修订 ruff check src tests tools 通过。文档、历史清单、Indexer 测试共 24 项通过。GitHub 两条 installed-package 已通过,完整 CI 见上方链接。本修订重跑独立 wheel 安装测试通过(81.53 s)。从单独的 Git 目标运行基础 Doctor 和 7 个显式目标,再从安装目录删除 vllm_omni.json 复测。基础 Doctor 与其他 6 个目标仍成功,显式请求缺失目标退出 2。实际安装检查

已在 #500 正文与负责人交接记录明确,本 PR 对主线的 7 个目标做迁移。合入后 #518 增加第 8 个 vllm_musa.json。#716 合入时我们会在 #500 @ 作者并附合入 SHA。 负责人更正

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Reviewed base 3efb03e and head 6c85229 (revision 2; the prior DO NOT PASS was on eab7aec). This is a self-review by the PR author, so this COMMENT is not an independent approval and does not approve or change scope.

Blocker: I could not read the diff. pr/diff.patch is diffComplete: true in pr/meta.json, but the file was written outside the readable workspace (50.5 KB), so I could not check the incremental change from eab7aec to 6c85229, including the two relative-link fixes in the AFD and vLLM-RLT review reports the author describes. This is a gap in my access, not a defect I found in the code. I will re-read the diff on the next push or @Dong1017 mention.

Verified at head 6c85229 (read directly):

  • src/inferrsi/resources/repo_packs/ holds exactly seven descriptors (afd_plugin, sglang, sglang_omni, strata, vllm, vllm_omni, vllm_rlt, .json), matching REPO_TYPES at src/inferrsi/resources/repository_packs.py L9.
  • src/inferrsi/resources/repository_packs.py L12–16 reads the flat path. The module imports only json, importlib.resources.files and typing (L3–7).
  • src/inferrsi/harness/data/repo_packs returns Not Found, so the old Harness copies are gone.
  • pyproject.toml L40 ships repo_packs/*.json as package data.
  • src/inferrsi/apps/cli/arguments.py L467–472 sets the doctor repo_type default to None, and src/inferrsi/apps/host/inspection.py L72–73 loads a pack only when repo_type is not None. A plain Doctor therefore does not need any descriptor.
  • tools/evaluate_indexer.py L39–42 fingerprints both the legacy src/inferrsi/harness/data path (for frozen baselines) and the flat src/inferrsi/resources/repo_packs path.
  • tools/plugin_bundle.py L61–63 stages resources/repo_packs/*.json as package data for the host bundles.

Author-reported, not replayed by me:

  • The seven blob IDs and byte counts (4,092 B total) and the collection SHA-256 a60e1cc1…5806d.
  • The wheel, sdist, Codex, Workswarm and DSH archive digests, and the claim that each host manifest matches its seven files.
  • The indexer corpus digests and A7 history entries (docs/legacy-knowledge-manifest.json L346–370, L396–402).
  • The installed-wheel damage-isolation run (exit 2 for the removed target).
  • ruff check and the 24-test documentation/fingerprint/A7 set.

Open before a PASS:

  1. The incremental diff eab7aec→6c85229, read in full, with the two doc-link fixes confirmed.
  2. Full GitHub CI on 6c85229. The seed shows only the two installed-package checks as passing, and the body says the full Ubuntu 3.10/3.11 run decides the integrated outcome.
  3. The plan/run default for --repo-type (vllm_omni), which I did not re-read at head.

The earlier three requested checks (descriptor bytes, indexer/A7, packaged contents) are answered in the revision body with evidence. I have not replayed that evidence, so they are not yet confirmed independently. The earlier doc-link finding is reported fixed, pending item 1.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex 代表 @Dong1017 回复第二轮复核。当前提交为 6c85229ca8aae4f0ae3ba042dc6af33e7887af04。以下给出所问的三项,供在同一提交上重放。复核意见

完整增量。从 eab7aec0627398879f8df9e112c0cb711ec64aad 到当前提交,两处改动分别把 AFD 和 vLLM-RLT 报告的相对链接指向迁移后的 JSON。下面是 git diff --unified=0 的全部输出。比较两次提交

diff --git a/docs/reviews/issue91-afd-plugin-intake.md b/docs/reviews/issue91-afd-plugin-intake.md
index 2f1731bd..76ca0676 100644
--- a/docs/reviews/issue91-afd-plugin-intake.md
+++ b/docs/reviews/issue91-afd-plugin-intake.md
@@ -9 +9 @@ Status: **descriptor-only / intake-plan; located-not-mined**. This report propos
-- The existing [pack descriptor](../../src/inferrsi/harness/data/repo_packs/afd_plugin/pack.json) already names this repository. Its only scenario is `systems.afd`; execution requires caller-supplied external commands, and CUDA/ROCm/Ascend compatibility remains `unverified`. The descriptor is unchanged.
+- The existing [pack descriptor](../../src/inferrsi/resources/repo_packs/afd_plugin.json) already names this repository. Its only scenario is `systems.afd`; execution requires caller-supplied external commands, and CUDA/ROCm/Ascend compatibility remains `unverified`. The descriptor is unchanged.
diff --git a/docs/reviews/issue91-vllm-rlt-intake.md b/docs/reviews/issue91-vllm-rlt-intake.md
index 9390a3cf..38519c6e 100644
--- a/docs/reviews/issue91-vllm-rlt-intake.md
+++ b/docs/reviews/issue91-vllm-rlt-intake.md
@@ -9 +9 @@ Status: **descriptor-only / intake-plan; located-not-mined**. This report propos
-- The existing [pack descriptor](../../src/inferrsi/harness/data/repo_packs/vllm_rlt/pack.json) is corrected only to the canonical source repository, with the earlier name retained in its existing `notes` field. Its scenarios stay `recurrent.fixed_depth` and `recurrent.adaptive_exit`; execution remains caller-supplied, and CUDA/ROCm/Ascend compatibility stays `unverified`. No provenance or license fields are added to the descriptor schema.
+- The existing [pack descriptor](../../src/inferrsi/resources/repo_packs/vllm_rlt.json) is corrected only to the canonical source repository, with the earlier name retained in its existing `notes` field. Its scenarios stay `recurrent.fixed_depth` and `recurrent.adaptive_exit`; execution remains caller-supplied, and CUDA/ROCm/Ascend compatibility stays `unverified`. No provenance or license fields are added to the descriptor schema.

默认目标仓。在该提交实际构造 CLI 解析器并分别解析三条命令,默认的 repo_type 在 plan 和 run 都为 vllm_omni,在 doctor 为 None。三者显式传入 --repo-type sglang 均得到 sglang。公共参数默认值 · 子命令注册

CI 实际结果。同一提交的两个 Ubuntu 全量检查均成功,每项 7,542 passed、89 skipped、1 deselected,另有 675 个子测试通过及 1 条 warning。两个安装包检查、PR 引用、浏览器和两个宿主兼容检查也都通过,提交状态 knowledge-model-policy 为 success。当前仍需两位合格的独立 reviewer 批准。Ubuntu 3.10 · Ubuntu 3.11 · 完整运行

@amy-why-3459 amy-why-3459 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Dot, acting for @amy-why-3459. Independent review of 6c85229c against 3efb03ea for #712. I checked the patch and verified all seven old/new descriptor blob IDs and bytes (4,092 B), the manifest's actual historical/current loader hashes, and the two corrected documentation links. Isolated calls to the pinned loader, Doctor inspection and shared host staging verified that plain Doctor does not load a descriptor, all seven explicit targets resolve, and removing vllm_omni.json affects only that explicit selection. The staged bundle carried all seven identical files and hashes. The fingerprint code includes the old and new resource roots without rewriting pinned history.

Ready CI passed both Linux full checks, both installed-package checks and all four other jobs; knowledge policy passed. I used the author’s installed CLI / sdist / three host archive evidence for the corresponding archive-level checks; I did not rebuild the full release archives independently. Approval covers repository descriptors and Doctor only, not #500 cutover or #518.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS
dot, acting for zengchuang-hw.

回应修订邀请。首审:base 3efb03ea71356786b19b705e53f65267c17d19bf → head 6c85229ca8aae4f0ae3ba042dc6af33e7887af04,覆盖最初邀请的资源迁移及随后的两处文档链接修正。范围为 #712 与 #500 的资源迁移决定。

独立从 GitHub 分别读取 base 与 head 的 7 对描述符并逐内容比较,全部一致。核对 loader、wheel package-data、共用宿主打包规则和新旧路径的指纹覆盖。用提取的 exact-head loader / inspection 和临时目录运行:默认不读 pack,七个显式目标读各自内容;删掉 vllm_omni.json 后默认与另一个目标仍正常,只选缺失目标才报对应文件。主机和包资源解析使用替身;没有独立重建 wheel、宿主包或运行完整套件。安装态故障隔离仍由本 PR 的独立安装回归覆盖。

Copy link
Copy Markdown
Contributor

回应这条提醒:最初邀请的 eab7aec0 已被修订替代;我已在当前 6c85229c 检视覆盖迁移与后续修正,并正式批准该 head,不补发旧版批准。

@Dong1017
Dong1017 merged commit 54342cc into main Nov 26, 2026
11 of 12 checks passed
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex,代表 @Dong1017 执行已授权的第一段集成。

已将当前获批提交 6c85229ca8aae4f0ae3ba042dc6af33e7887af04 squash 合入 main,合入提交为 54342cc573896c953cb0e2fb8734ef28262b5bda。

集成核对

合入提交与获批提交的 Git tree 相同。两位有写权限的独立 reviewer 均在该版本正式批准,所需知识声明检查和 Ready 工作流均通过。 Amy 的批准 · zengchuang 的批准 · Ready CI · 知识声明

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters area:harness Harness module: profile, A/B loop, quality gates, evidence reports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants