From eab7aec0627398879f8df9e112c0cb711ec64aad Mon Sep 17 00:00:00 2001 From: Dong1017 <55723162+Dong1017@users.noreply.github.com> Date: Thu, 26 Nov 2026 20:33:00 +0800 Subject: [PATCH 1/2] Move target repository descriptors into packaged resources Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com> --- docs/architecture.md | 2 +- docs/contracts/current-design.md | 4 +- docs/contributing.md | 2 +- docs/guides/module-layout.md | 15 ++++-- docs/knowledge-base.md | 2 +- docs/legacy-knowledge-manifest.json | 17 ++++-- pyproject.toml | 2 +- src/inferrsi/apps/cli/arguments.py | 4 +- src/inferrsi/apps/host/inspection.py | 8 +-- .../apps/host/prepared_environment.py | 2 +- .../repo_packs/afd_plugin.json} | 0 .../repo_packs/sglang.json} | 0 .../repo_packs/sglang_omni.json} | 0 .../repo_packs/strata.json} | 0 .../repo_packs/vllm.json} | 0 .../repo_packs/vllm_omni.json} | 0 .../repo_packs/vllm_rlt.json} | 0 src/inferrsi/resources/repository_packs.py | 9 ++-- tests/apps/test_codex_plugin.py | 3 +- tests/apps/test_inspection.py | 14 ++++- .../test_indexer_evaluation_summary.py | 24 ++++++++- .../test_knowledge_compatibility_shells.py | 22 ++++---- .../knowledge/test_knowledge_fresh_install.py | 54 ++++++++++++++++++- tests/knowledge/test_knowledge_store.py | 2 +- .../knowledge/test_repository_packs_facade.py | 16 +++--- tests/knowledge/test_resource_migration.py | 23 ++++---- tests/repository/check_installed.py | 12 ++--- .../test_first_wave_isolation_policy.py | 2 +- tools/evaluate_indexer.py | 4 +- tools/plugin_bundle.py | 10 ++-- 30 files changed, 177 insertions(+), 76 deletions(-) rename src/inferrsi/{harness/data/repo_packs/afd_plugin/pack.json => resources/repo_packs/afd_plugin.json} (100%) rename src/inferrsi/{harness/data/repo_packs/sglang/pack.json => resources/repo_packs/sglang.json} (100%) rename src/inferrsi/{harness/data/repo_packs/sglang_omni/pack.json => resources/repo_packs/sglang_omni.json} (100%) rename src/inferrsi/{harness/data/repo_packs/strata/pack.json => resources/repo_packs/strata.json} (100%) rename src/inferrsi/{harness/data/repo_packs/vllm/pack.json => resources/repo_packs/vllm.json} (100%) rename src/inferrsi/{harness/data/repo_packs/vllm_omni/pack.json => resources/repo_packs/vllm_omni.json} (100%) rename src/inferrsi/{harness/data/repo_packs/vllm_rlt/pack.json => resources/repo_packs/vllm_rlt.json} (100%) diff --git a/docs/architecture.md b/docs/architecture.md index edd61dd17..f98d7dea2 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -285,7 +285,7 @@ the [import gate](guides/module-layout.md#import-gate) for migration and depende | Add | Main extension locations | Required qualification | | --- | --- | --- | | Model or scenario | `harness/serving`, `benchmark/metrics.py`, `benchmark/validators`; trials run through the model-independent `harness/trials/external.py` | Frozen request and metric contract; model-specific quality coverage | -| Repository | `apps/host/targets`, a composed scenario, `harness/data/repo_packs` | Stable source identity; command/result contract; environment isolation | +| Repository | `apps/host/targets`, a composed scenario, `resources/repo_packs` | Stable source identity; command/result contract; environment isolation | | Hardware | `apps/host/platforms` | Device selection, process exclusivity and independent backend/model evidence; a backend is registered in `apps/host/platforms/__init__.py` and its probe command is defined in the implementing module under `apps/host/platforms/`, not in package data | The acceptance rule is: **a new model or hardware adapter must reuse the common diff --git a/docs/contracts/current-design.md b/docs/contracts/current-design.md index d1699d6dd..de7386493 100644 --- a/docs/contracts/current-design.md +++ b/docs/contracts/current-design.md @@ -34,7 +34,7 @@ Permitted shared technical leaves are only: - `inferrsi.contracts.evidence` — the existing evidence segment names and pure path rules; it reads and writes no filesystem state and is not re-exported by the package initializer; - `inferrsi.resources.repository_packs` — the neutral raw pack-data reader and the existing static data enumeration (D020), formerly root `inferrsi._repo_pack_data`. Its parent initializer `resources/__init__.py` imports nothing. Outside Knowledge it has one permanent importer, `inferrsi.apps.host.inspection`, which binds only `repository_pack`; that exact rule is not a compatibility pair. A1 (#408) removed the separate temporary entry for root `arguments.py`: the moved parser `inferrsi.apps.cli.arguments` reads the same `REPO_TYPES` object through `inferrsi.knowledge.catalog` and does not import the leaf. -The neutral leaf carries no target selection, task, scoring, scheduling, or public business DTO, and imports none of K/H/B/Apps. It still finds the Harness-owned `pack.json` through `files("inferrsi").joinpath("harness", "data", "repo_packs", ...)`, so reading it never imports Harness. Creating the evidence directories is host I/O and stays in Apps, in `inferrsi.apps.storage.evidence_layout`; that module is not a shared leaf. The list is exact: a `contracts.` or `resources.` prefix admits no other module. +The neutral leaf carries no target selection, task, scoring, scheduling, or public business DTO, and imports none of K/H/B/Apps. It reads the selected target descriptor from `resources/repo_packs/.json` through the root `files("inferrsi")` anchor. Creating the evidence directories is host I/O and stays in Apps, in `inferrsi.apps.storage.evidence_layout`; that module is not a shared leaf. The list is exact: a `contracts.` or `resources.` prefix admits no other module. Why: this matches the accepted A–D direction and removes the reverse dependency that a shared DTO package creates. Rejected: a shared business DTO package; Apps owning scoring/sampling/budget algorithms; creating empty packages to declare migration done. @@ -98,7 +98,7 @@ Acceptance: T01–T14, T22–T24, including the same-key conflict, finished repl ## D007 — target resource tree -Decision: `knowledge/data/skill_library (records, configuration, compiled provenance and skill owners)`; `pack.json` separately at `harness/data/repo_packs//pack.json`; the dashboard template at `Apps/views/templates/dashboard.html`. K01 migrates seven code modules only and moves no resources; K02 performs the three precise migration classes (importlib, checkout `Path`, plugin physical layout) with old logical pins/hashes preserved and without assuming a single loader. +The corpus lives in `knowledge/data/skill_library/`. Target repository descriptors live in `resources/repo_packs/.json`, alongside the neutral `resources/repository_packs.py` loader. Checkout, wheel and host plugins carry the same registered descriptors and bytes. Apps includes `repository_pack` in an explicit `doctor --repo-type ` report. Basic `doctor` inspects the environment without reading a descriptor. Dashboard templates live in `apps/views/`. ## D008 — function ownership diff --git a/docs/contributing.md b/docs/contributing.md index 044660495..2864f2afd 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -38,7 +38,7 @@ Nightly checks cover Linux and Windows checkouts with `core.autocrlf` set to Use `harness/serving` for a new model's server and request protocol and `benchmark/metrics.py` with `benchmark/validators` for its metric and quality checks. `harness/trials/external.py` runs any external command as one trial and is the -same for every model. Use `apps/host/targets` with `harness/data/repo_packs` for +same for every model. Use `apps/host/targets` with `resources/repo_packs` for repositories, and `apps/host/platforms` for hardware. A backend is registered in `apps/host/platforms/__init__.py`; its probe command is defined in the diff --git a/docs/guides/module-layout.md b/docs/guides/module-layout.md index 167d0aadb..2a51b1eba 100644 --- a/docs/guides/module-layout.md +++ b/docs/guides/module-layout.md @@ -78,7 +78,7 @@ business DTOs and performs no core or host initialization. path rules. It only builds paths and does no filesystem I/O. Creating the directories is `apps/storage/evidence_layout.py`, which reuses those rules, so `mkdir` stays out of the contracts package. `resources/repository_packs.py` is the -neutral repository-pack facade: the one `REPO_TYPES` tuple and the `pack.json` +neutral repository-pack facade: the one `REPO_TYPES` tuple and the descriptor reader. It imports no `inferrsi` module, and `resources/__init__.py` imports nothing. C2 (#451) moved these out of root `_repo_pack_data.py` and `evidence_paths.py` and deleted both root files, with @@ -90,10 +90,11 @@ The build-generated `_version.py` is wheel metadata. New implementation belongs in an owning subpackage. See [retired root modules](#retired-root-modules) for the former paths and their replacements. -There is no sibling `data/` resource tier. K02 moved the Knowledge corpus to -`src/inferrsi/knowledge/data/` and the `repo_packs/*/pack.json` target -descriptions to `src/inferrsi/harness/data/`. Dashboard view templates live in -`apps/views/`. +The Knowledge corpus lives in `src/inferrsi/knowledge/data/`. Target descriptors +ship at `src/inferrsi/resources/repo_packs/.json`. An explicit +`doctor --repo-type ` includes that descriptor as `repository_pack`. +Plain `doctor` checks the checkout, Python and devices independently of these files. +Dashboard view templates live in `apps/views/`. The move is physical only. Bundle resource keys, dependency keys and the pinned `source_files` paths in generated records keep their recorded spelling, so @@ -385,6 +386,10 @@ provenance. The nine pairs remain, so the allowlist blocker remains. That manifest revision requires formal architecture review; the implementer does not self-approve it, and passing tests are not that review. +The subsequent relocation into `resources/repo_packs/` is recorded in +`technical_leaf.descriptor_relocation`. Its hashes link the historical C2 reader +to the current reader. The registered types and descriptor bytes are preserved. + R1 (#412) deleted the seven root shells in the change that moved their last consumers to `inferrsi.knowledge`, so the manifest's `compatibility_pairs` is now empty and the allowlist blocker is gone. The C2 revision joined diff --git a/docs/knowledge-base.md b/docs/knowledge-base.md index 08b0f081f..906adf82e 100644 --- a/docs/knowledge-base.md +++ b/docs/knowledge-base.md @@ -89,7 +89,7 @@ src/inferrsi/knowledge/skill_catalog.py Packaged or custom-root skill reader src/inferrsi/knowledge/data/skill_library/records/.json Authored engineering findings src/inferrsi/knowledge/data/skill_library/config/ Aliases and research profiles src/inferrsi/knowledge/data/skill_library/_compiled/ Generated YAML headers and Git provenance -src/inferrsi/harness/data/repo_packs//pack.json Target descriptor, read by repository_pack +src/inferrsi/resources/repo_packs/.json Target descriptor, read by repository_pack evidence// Frozen plans, results, patches and validators docs/reference-matrix.md Sources, inspected scope and extraction docs/searchspace-matrix.md Resource × optimization-stage coverage diff --git a/docs/legacy-knowledge-manifest.json b/docs/legacy-knowledge-manifest.json index 0e076c57e..d4a843430 100644 --- a/docs/legacy-knowledge-manifest.json +++ b/docs/legacy-knowledge-manifest.json @@ -317,9 +317,9 @@ "compatibility_pairs": [], "technical_leaf": { "module": "inferrsi.resources.repository_packs", - "note": "K01 created src/inferrsi/_repo_pack_data.py from the recorded original fragment plus a leading comment, the future import, and the three listed stdlib imports. K02 repointed the reader to the Harness resource root and extended that comment, so file_sha256 was relocked then. C2 (#451) moved the file byte for byte to src/inferrsi/resources/repository_packs.py and deleted the root file; file_sha256 is checked against the relocated file and keeps its K02 value. original_fragment keeps the P0b provenance text; current_fragment is the body in the file today. P0b recorded only the fragment.", + "note": "K01 created the raw-data leaf from the P0b original fragment. K02 changed its resource path and C2 moved the module byte for byte. The descriptor relocation below records the subsequent move to Resources. file_sha256 and current_fragment describe the current reader.", "file": "src/inferrsi/resources/repository_packs.py", - "file_sha256": "751d7bf663318962a2e73cf9d75369e0f8f8c2bda27964c56e44021b9f86c992", + "file_sha256": "ef87247b7c670f8d21b9ee546226b5baf936eee42c16b70f59ea0d20ddd5dbdb", "allowed_imports": [ "json", "importlib.resources", @@ -338,10 +338,10 @@ "source": "REPO_TYPES = (\"vllm\", \"vllm_omni\", \"afd_plugin\", \"vllm_rlt\", \"strata\", \"sglang\", \"sglang_omni\")\n\n\ndef repository_pack(repo_type: str) -> dict[str, Any]:\n if repo_type not in REPO_TYPES:\n raise ValueError(f\"Unknown repository type: {repo_type}\")\n path = files(\"inferrsi\").joinpath(\"data\", \"repo_packs\", repo_type, \"pack.json\")\n return json.loads(path.read_text(encoding=\"utf-8\"))" }, "current_fragment": { - "description": "REPO_TYPES and repository_pack as they stand after the K02 resource-path revision", + "description": "REPO_TYPES and repository_pack after the descriptor relocation to Resources", "hash_convention": "fragment_sha256 is the SHA-256 of source plus one trailing newline", - "fragment_sha256": "b6e49fdd67f7029e080e5e224cf3bf417c7dbc1e337644c3e1cb2b783cae2e4c", - "source": "REPO_TYPES = (\"vllm\", \"vllm_omni\", \"afd_plugin\", \"vllm_rlt\", \"strata\", \"sglang\", \"sglang_omni\")\n\n\ndef repository_pack(repo_type: str) -> dict[str, Any]:\n if repo_type not in REPO_TYPES:\n raise ValueError(f\"Unknown repository type: {repo_type}\")\n path = files(\"inferrsi\").joinpath(\"harness\", \"data\", \"repo_packs\", repo_type, \"pack.json\")\n return json.loads(path.read_text(encoding=\"utf-8\"))" + "fragment_sha256": "4bbed98045f4ba1fbe63715a1ef445ff83859b2ce03ef49f8bd1850db5930a38", + "source": "REPO_TYPES = (\"vllm\", \"vllm_omni\", \"afd_plugin\", \"vllm_rlt\", \"strata\", \"sglang\", \"sglang_omni\")\n\n\ndef repository_pack(repo_type: str) -> dict[str, Any]:\n if repo_type not in REPO_TYPES:\n raise ValueError(f\"Unknown repository type: {repo_type}\")\n path = files(\"inferrsi\").joinpath(\"resources\", \"repo_packs\", f\"{repo_type}.json\")\n return json.loads(path.read_text(encoding=\"utf-8\"))" }, "resource_path_revision": { "stage": "K02", @@ -392,6 +392,13 @@ "to": "inferrsi.apps.host.inspection", "review": "The move changes which module the rule names, so it requires the same formal architecture review as the rule itself. Passing tests are not that review." } + }, + "descriptor_relocation": { + "issue": "#712", + "old_line": "path = files(\"inferrsi\").joinpath(\"harness\", \"data\", \"repo_packs\", repo_type, \"pack.json\")", + "new_line": "path = files(\"inferrsi\").joinpath(\"resources\", \"repo_packs\", f\"{repo_type}.json\")", + "old_file_sha256": "751d7bf663318962a2e73cf9d75369e0f8f8c2bda27964c56e44021b9f86c992", + "new_file_sha256": "ef87247b7c670f8d21b9ee546226b5baf936eee42c16b70f59ea0d20ddd5dbdb" } }, "infra_inspection_rewrite": { diff --git a/pyproject.toml b/pyproject.toml index 32e5c9a52..4855e9a79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ inferrsi = [ "data/**/THIRD_PARTY_NOTICES", "data/**/upstream-NOTICE", ] -"inferrsi.harness" = ["data/**/*.json"] +"inferrsi.resources" = ["repo_packs/*.json"] "inferrsi.benchmark" = ["tasks/**/*.py", "tasks/**/*.json", "tasks/**/*.md", "tasks/**/*.jsonl", "tasks/**/LICENSE"] [tool.setuptools_scm] diff --git a/src/inferrsi/apps/cli/arguments.py b/src/inferrsi/apps/cli/arguments.py index c241e6305..ec88af237 100644 --- a/src/inferrsi/apps/cli/arguments.py +++ b/src/inferrsi/apps/cli/arguments.py @@ -465,9 +465,11 @@ def parser(*, parser_class=argparse.ArgumentParser) -> argparse.ArgumentParser: stages = session.add_subparsers(dest="session_action", required=True) _optimization_actions(stages) doctor = commands.add_parser( - "doctor", help="Inspect a prepared local target without installing dependencies" + "doctor", help="Inspect a prepared local target without installing dependencies", + description="Check the environment. Add --repo-type to include its target descriptor." ) _common(doctor) + doctor.set_defaults(repo_type=None) for name in ("plan", "run"): child = commands.add_parser( diff --git a/src/inferrsi/apps/host/inspection.py b/src/inferrsi/apps/host/inspection.py index 1726a355d..ee6eb1de1 100644 --- a/src/inferrsi/apps/host/inspection.py +++ b/src/inferrsi/apps/host/inspection.py @@ -15,7 +15,7 @@ def inspect_environment( repo: str, - repo_type: str, + repo_type: str | None, backend: str, *, device_ids: tuple[str, ...] = (), @@ -50,10 +50,9 @@ def inspect_environment( backend, device_ids=device_ids, device_model=device_model, command=command ) - return { + report = { "host": {"platform": platform.platform()}, "repository": repository, - "repository_pack": repository_pack(repo_type), "backend": backend, "requested_device_ids": list(device_ids), "requested_device_model": device_model, @@ -70,3 +69,6 @@ def inspect_environment( "device": device, "compatibility": "unverified", } + if repo_type is not None: + report["repository_pack"] = repository_pack(repo_type) + return report diff --git a/src/inferrsi/apps/host/prepared_environment.py b/src/inferrsi/apps/host/prepared_environment.py index d3525b4b9..40bee3950 100644 --- a/src/inferrsi/apps/host/prepared_environment.py +++ b/src/inferrsi/apps/host/prepared_environment.py @@ -12,7 +12,7 @@ def inspect_environment( repo: str, - repo_type: str, + repo_type: str | None, backend: str, *, device_ids: tuple[str, ...] = (), diff --git a/src/inferrsi/harness/data/repo_packs/afd_plugin/pack.json b/src/inferrsi/resources/repo_packs/afd_plugin.json similarity index 100% rename from src/inferrsi/harness/data/repo_packs/afd_plugin/pack.json rename to src/inferrsi/resources/repo_packs/afd_plugin.json diff --git a/src/inferrsi/harness/data/repo_packs/sglang/pack.json b/src/inferrsi/resources/repo_packs/sglang.json similarity index 100% rename from src/inferrsi/harness/data/repo_packs/sglang/pack.json rename to src/inferrsi/resources/repo_packs/sglang.json diff --git a/src/inferrsi/harness/data/repo_packs/sglang_omni/pack.json b/src/inferrsi/resources/repo_packs/sglang_omni.json similarity index 100% rename from src/inferrsi/harness/data/repo_packs/sglang_omni/pack.json rename to src/inferrsi/resources/repo_packs/sglang_omni.json diff --git a/src/inferrsi/harness/data/repo_packs/strata/pack.json b/src/inferrsi/resources/repo_packs/strata.json similarity index 100% rename from src/inferrsi/harness/data/repo_packs/strata/pack.json rename to src/inferrsi/resources/repo_packs/strata.json diff --git a/src/inferrsi/harness/data/repo_packs/vllm/pack.json b/src/inferrsi/resources/repo_packs/vllm.json similarity index 100% rename from src/inferrsi/harness/data/repo_packs/vllm/pack.json rename to src/inferrsi/resources/repo_packs/vllm.json diff --git a/src/inferrsi/harness/data/repo_packs/vllm_omni/pack.json b/src/inferrsi/resources/repo_packs/vllm_omni.json similarity index 100% rename from src/inferrsi/harness/data/repo_packs/vllm_omni/pack.json rename to src/inferrsi/resources/repo_packs/vllm_omni.json diff --git a/src/inferrsi/harness/data/repo_packs/vllm_rlt/pack.json b/src/inferrsi/resources/repo_packs/vllm_rlt.json similarity index 100% rename from src/inferrsi/harness/data/repo_packs/vllm_rlt/pack.json rename to src/inferrsi/resources/repo_packs/vllm_rlt.json diff --git a/src/inferrsi/resources/repository_packs.py b/src/inferrsi/resources/repository_packs.py index e75f89269..44ba7022b 100644 --- a/src/inferrsi/resources/repository_packs.py +++ b/src/inferrsi/resources/repository_packs.py @@ -1,8 +1,5 @@ -# Neutral raw repository-pack data leaf (D020). It holds only the original -# REPO_TYPES tuple and pack.json reader, and imports no inferrsi module. -# K02 moved pack.json to the Harness resource root (D007). The anchor stays the -# root package and joins the physical path, so reading a Harness-owned resource -# never imports inferrsi.harness and never gives infra an edge into Harness. +# Neutral target-repository descriptors (D007, D020). Anchor the read at the +# root package so resolving a descriptor never imports a business module. from __future__ import annotations import json @@ -15,5 +12,5 @@ def repository_pack(repo_type: str) -> dict[str, Any]: if repo_type not in REPO_TYPES: raise ValueError(f"Unknown repository type: {repo_type}") - path = files("inferrsi").joinpath("harness", "data", "repo_packs", repo_type, "pack.json") + path = files("inferrsi").joinpath("resources", "repo_packs", f"{repo_type}.json") return json.loads(path.read_text(encoding="utf-8")) diff --git a/tests/apps/test_codex_plugin.py b/tests/apps/test_codex_plugin.py index bccdabf33..ec28f1026 100644 --- a/tests/apps/test_codex_plugin.py +++ b/tests/apps/test_codex_plugin.py @@ -91,7 +91,8 @@ def test_bundle_contains_all_declared_package_data(distribution): name.removeprefix("inferrsi/") for name in runtime_bytes(distribution) if name.startswith(( - "inferrsi/knowledge/data/", "inferrsi/harness/data/", "inferrsi/benchmark/tasks/", + "inferrsi/knowledge/data/", "inferrsi/resources/repo_packs/", + "inferrsi/benchmark/tasks/", )) or ( name.startswith("inferrsi/apps/views/") and name.endswith(".html") ) or name.startswith("inferrsi/apps/cli/task-input/") diff --git a/tests/apps/test_inspection.py b/tests/apps/test_inspection.py index 68091763c..217c884b3 100644 --- a/tests/apps/test_inspection.py +++ b/tests/apps/test_inspection.py @@ -251,7 +251,7 @@ def test_canonical_binding_is_the_real_host_probe_and_git_identity(): assert host_inspection._inspect_environment is facts.inspect_environment assert inspect_environment.__module__ == "inferrsi.apps.host.prepared_environment" assert str(inspect.signature(inspect_environment)) == ( - "(repo: str, repo_type: str, backend: str, *, device_ids: tuple[str, ...] = (), " + "(repo: str, repo_type: str | None, backend: str, *, device_ids: tuple[str, ...] = (), " "device_model: str | None = None, python: str | None = None) -> dict" ) # The facts API keeps its own injectable ports and their real defaults. @@ -286,6 +286,18 @@ def command(argv): assert inspect_environment(".", "vllm_omni", "cpu")["repository"] == {"available": False} +def test_basic_inspection_does_not_read_a_pack(monkeypatch): + def unexpected_pack(repo_type): + pytest.fail(f"basic inspection requested a descriptor for {repo_type}") + + monkeypatch.setattr(facts, "repository_pack", unexpected_pack) + monkeypatch.setattr(host_inspection, "repository_identity", lambda _: {"available": True}) + monkeypatch.setattr(host_inspection, "_command", _fake_command) + report = inspect_environment(".", None, "cpu") + assert report["repository"]["available"] and report["device"]["status"] == "available" + assert "repository_pack" not in report + + def test_port_failures_reach_the_caller_unchanged(monkeypatch): def broken(path): raise OSError("repository identity unavailable") diff --git a/tests/knowledge/test_indexer_evaluation_summary.py b/tests/knowledge/test_indexer_evaluation_summary.py index 7427ed052..17645f0fb 100644 --- a/tests/knowledge/test_indexer_evaluation_summary.py +++ b/tests/knowledge/test_indexer_evaluation_summary.py @@ -1,5 +1,27 @@ """The evidence summary resamples paired groups and retains every observation.""" -from tools.evaluate_indexer import percentile, summarize +import hashlib + +import pytest + +from tools.evaluate_indexer import encode, identity, percentile, summarize + + +@pytest.mark.parametrize("relative", [ + "src/inferrsi/harness/data/repo_packs/vllm/pack.json", + "src/inferrsi/resources/repo_packs/vllm.json", +]) +def test_corpus_fingerprint_covers_repository_pack(tmp_path, monkeypatch, relative): + monkeypatch.setattr( + "tools.evaluate_indexer.subprocess.check_output", lambda *args, **kwargs: "fixture\n", + ) + descriptor = tmp_path / relative + descriptor.parent.mkdir(parents=True) + for data in (b"first", b"other"): + descriptor.write_bytes(data) + members = {relative: hashlib.sha256(data).hexdigest()} + assert identity(tmp_path)["corpus"] == { + "sha256": hashlib.sha256(encode(members)).hexdigest(), "files": 1, + } def test_constant_paired_groups_have_exact_gain_and_interval(): diff --git a/tests/knowledge/test_knowledge_compatibility_shells.py b/tests/knowledge/test_knowledge_compatibility_shells.py index a854b7336..c7144b774 100644 --- a/tests/knowledge/test_knowledge_compatibility_shells.py +++ b/tests/knowledge/test_knowledge_compatibility_shells.py @@ -103,13 +103,15 @@ def test_data_leaf_holds_the_recorded_fragment_and_locked_hash(): ) revision = LEAF["resource_path_revision"] original = LEAF["original_fragment"]["source"] - assert original.replace(revision["old_line"], revision["new_line"]) == current["source"] - assert revision["new_file_sha256"] == LEAF["file_sha256"] + k02 = original.replace(revision["old_line"], revision["new_line"]) + relocation = LEAF["descriptor_relocation"] + assert k02.replace(relocation["old_line"], relocation["new_line"]) == current["source"] + assert revision["new_file_sha256"] == relocation["old_file_sha256"] + assert relocation["new_file_sha256"] == LEAF["file_sha256"] def test_c2_relock_moves_the_leaf_without_changing_a_byte(): - # #451 C2: the K02 hash, the recorded old-source hash and the relocated file agree, - # so the move changed the path and nothing in the file. + # C2 moved the loader byte-for-byte before the descriptor paths changed. moved = LEAF["module_path_revision"] assert (moved["old_module"], moved["new_module"]) == ( "inferrsi._repo_pack_data", LEAF["module"], @@ -118,11 +120,9 @@ def test_c2_relock_moves_the_leaf_without_changing_a_byte(): "src/inferrsi/_repo_pack_data.py", LEAF["file"], ) assert moved["old_file_sha256"] == LEAF["resource_path_revision"]["new_file_sha256"] - assert moved["old_file_sha256"] == moved["new_file_sha256"] == LEAF["file_sha256"] + assert moved["old_file_sha256"] == moved["new_file_sha256"] + assert moved["new_file_sha256"] == LEAF["descriptor_relocation"]["old_file_sha256"] assert not (REPO / moved["old_file"]).exists() - assert hashlib.sha256((REPO / moved["new_file"]).read_bytes()).hexdigest() == ( - moved["new_file_sha256"] - ) # The review requirement is recorded, never an approval. assert "requires formal architecture review" in moved["review"] assert "does not self-approve" in moved["review"] @@ -164,8 +164,8 @@ def test_relocated_leaf_shape_matches_the_relocked_manifest_exactly(): assert tree.body[5].name == "repository_pack" assert LEAF["two_symbols"] == ["REPO_TYPES", "repository_pack"] assert "three listed stdlib imports" in LEAF["top_level_shape"] - # The anchor is the root package joined with the physical Harness path. - anchor = 'files("inferrsi").joinpath("harness", "data", "repo_packs", repo_type, "pack.json")' + # Resolve the neutral physical path from the root package. + anchor = 'files("inferrsi").joinpath("resources", "repo_packs", f"{repo_type}.json")' assert anchor in LEAF["current_fragment"]["source"] # The parent initializer is a docstring and nothing else. initializer = REPO / LEAF["module_path_revision"]["parent_initializer"] @@ -289,7 +289,7 @@ def test_package_init_and_host_inspection_load_no_knowledge_body(): "assert not [m for m in sys.modules if m.startswith('inferrsi.knowledge.')]\n" "assert 'inferrsi.resources.repository_packs' in sys.modules\n" "assert 'inferrsi._repo_pack_data' not in sys.modules\n" - # Reading a Harness-owned pack never loads Harness. + # Reading a target descriptor never loads Harness. "from inferrsi.apps.host.inspection import repository_pack\n" "assert repository_pack('vllm')['id'] == 'vllm'\n" "assert not [m for m in sys.modules if m.startswith('inferrsi.harness')]\n" diff --git a/tests/knowledge/test_knowledge_fresh_install.py b/tests/knowledge/test_knowledge_fresh_install.py index 77b4ca01c..642a7d2b0 100644 --- a/tests/knowledge/test_knowledge_fresh_install.py +++ b/tests/knowledge/test_knowledge_fresh_install.py @@ -206,7 +206,7 @@ def walk(parts): return found -inventory = {**walk(("knowledge", "data")), **walk(("harness", "data"))} +inventory = {**walk(("knowledge", "data")), **walk(("resources", "repo_packs"))} json.dump({"package": inferrsi.__file__, "inventory": inventory}, sys.stdout) """ @@ -228,11 +228,59 @@ def _short_source_copy(workspace: Path) -> Path: return source +def _check_installed_doctor(python, package, workspace): + # Keep the disposable target separate from both the checkout and the installed wheel. + target = workspace / "target" + subprocess.run(["git", "init", "-q", str(target)], check=True) + subprocess.run( + ["git", "-C", str(target), "-c", "user.name=Fixture", "-c", "user.email=test@invalid", + "-c", "commit.gpgSign=false", "commit", "-q", "--allow-empty", "-m", "fixture"], + check=True, + ) + + def doctor(*args): + return subprocess.run( + [str(python), "-I", "-X", "utf8", "-m", "inferrsi", "doctor", *args], + cwd=target, capture_output=True, text=True, encoding="utf-8", + ) + + def basic(): + result = doctor() + assert result.returncode == 0, result.stderr + report = json.loads(result.stdout) + assert report["repository"]["available"] and report["target_python"]["environment"] + assert report["device"]["status"] == "available" and "repository_pack" not in report + + descriptors = package.parent / "resources" / "repo_packs" + assert not (package.parent / "harness" / "data" / "repo_packs").exists() + paths = sorted(descriptors.glob("*.json")) + + def selected(path): + result = doctor("--repo-type", path.stem) + assert result.returncode == 0, result.stderr + assert json.loads(result.stdout)["repository_pack"] == json.loads(path.read_bytes()) + + basic() + for path in paths: + selected(path) + + # Remove the former implicit default specifically, from this test's isolated install. + missing = descriptors / "vllm_omni.json" + missing.unlink() + basic() + for path in paths: + if path != missing: + selected(path) + failure = doctor("--repo-type", missing.stem) + assert failure.returncode == 2 and missing.name in failure.stderr + assert not failure.stdout and "Traceback" not in failure.stderr + + def test_installed_wheel_outside_the_checkout_holds_every_resource_byte_for_byte(): """K02-3: a real install resolves the same resource list and bytes as the checkout.""" source_tree = REPO / "src" / "inferrsi" expected = {} - for root in (source_tree / "knowledge" / "data", source_tree / "harness" / "data"): + for root in (source_tree / "knowledge" / "data", source_tree / "resources" / "repo_packs"): for path in root.rglob("*"): if path.is_file() and "__pycache__" not in path.parts: expected[path.relative_to(source_tree).as_posix()] = hashlib.sha256( @@ -287,5 +335,7 @@ def test_installed_wheel_outside_the_checkout_holds_every_resource_byte_for_byte assert filtered["items"][0]["id"] == "ascend-graph-mode" assert "--skill-root" in filtered["items"][0]["ref"] assert filtered["searchspace_filter"]["stage"] == "Diagnose" + + _check_installed_doctor(python, package, workspace) finally: shutil.rmtree(workspace, ignore_errors=True) diff --git a/tests/knowledge/test_knowledge_store.py b/tests/knowledge/test_knowledge_store.py index 5296bba49..7b040b884 100644 --- a/tests/knowledge/test_knowledge_store.py +++ b/tests/knowledge/test_knowledge_store.py @@ -412,7 +412,7 @@ def test_operations_leave_sources_evidence_and_matrices_unchanged(tmp_path): watched = [ ROOT, REPO / "src" / "inferrsi" / "knowledge" / "data", - REPO / "src" / "inferrsi" / "harness" / "data", + REPO / "src" / "inferrsi" / "resources" / "repo_packs", REPO / "evidence", REPO / "docs" / "reference-matrix.md", REPO / "docs" / "searchspace-matrix.md", diff --git a/tests/knowledge/test_repository_packs_facade.py b/tests/knowledge/test_repository_packs_facade.py index cc8d06e30..7435d0285 100644 --- a/tests/knowledge/test_repository_packs_facade.py +++ b/tests/knowledge/test_repository_packs_facade.py @@ -1,7 +1,7 @@ """The neutral repository-pack facade (#451 C2). ``inferrsi.resources.repository_packs`` replaces root ``_repo_pack_data.py``. It holds -the one ``REPO_TYPES`` tuple and the ``pack.json`` reader, imports no ``inferrsi`` +the one ``REPO_TYPES`` tuple and the descriptor reader, imports no ``inferrsi`` module, and sits under an import-free initializer. The retired root path has no alias. """ @@ -31,7 +31,7 @@ SRC = Path(__file__).resolve().parents[2] / "src" ROOT = SRC / "inferrsi" -PACKS = ROOT / "harness" / "data" / "repo_packs" +PACKS = ROOT / "resources" / "repo_packs" SEVEN = ("vllm", "vllm_omni", "afd_plugin", "vllm_rlt", "strata", "sglang", "sglang_omni") RETIRED = "inferrsi._repo_pack_data" FACADE_CLOSURE = {"inferrsi", "inferrsi.resources", "inferrsi.resources.repository_packs"} @@ -154,8 +154,8 @@ def test_only_the_facade_defines_the_tuple_and_the_reader() -> None: @pytest.mark.parametrize("repo_type", SEVEN) def test_each_pack_parses_to_its_packaged_bytes(repo_type: str) -> None: - data = (PACKS / repo_type / "pack.json").read_bytes() - anchored = files("inferrsi").joinpath("harness", "data", "repo_packs", repo_type, "pack.json") + data = (PACKS / f"{repo_type}.json").read_bytes() + anchored = files("inferrsi").joinpath("resources", "repo_packs", f"{repo_type}.json") assert hashlib.sha256(anchored.read_bytes()).hexdigest() == hashlib.sha256(data).hexdigest() pack = repository_packs.repository_pack(repo_type) assert pack == json.loads(data.decode("utf-8")) @@ -166,11 +166,11 @@ def test_each_pack_parses_to_its_packaged_bytes(repo_type: str) -> None: assert inspection.repository_pack(repo_type) == pack -def test_the_seven_packs_are_the_whole_harness_resource_root() -> None: +def test_registered_packs_are_the_whole_descriptor_directory() -> None: found = sorted( path.relative_to(PACKS).as_posix() for path in PACKS.rglob("*") if path.is_file() ) - assert found == sorted(f"{name}/pack.json" for name in SEVEN) + assert found == sorted(f"{name}.json" for name in SEVEN) @pytest.mark.parametrize( @@ -195,7 +195,7 @@ def test_facade_and_parent_load_under_a_hook_that_blocks_every_other_inferrsi_im assert _without_version(result["loaded"]) == FACADE_CLOSURE assert tuple(result["types"]) == SEVEN for name in SEVEN: - expected = json.loads((PACKS / name / "pack.json").read_bytes().decode("utf-8")) + expected = json.loads((PACKS / f"{name}.json").read_bytes().decode("utf-8")) assert result["packs"][name] == expected, name # Positive control: the hook is live and refuses every core, Harness included. assert result["refused"] == {name: f"blocked inferrsi import: {name}" for name in CORES} @@ -220,7 +220,7 @@ def test_module_bodies_do_no_io_on_import() -> None: def test_a_read_opens_only_the_requested_pack_and_loads_no_module(repo_type: str) -> None: result = _fresh(READ, repo_type) package = os.path.normcase(str(ROOT)) - expected = os.path.normcase(str(PACKS / repo_type / "pack.json")) + expected = os.path.normcase(str(PACKS / f"{repo_type}.json")) # Inside the package tree the read is one open of the requested file: no listing, # no second pack, no write. inside = [ diff --git a/tests/knowledge/test_resource_migration.py b/tests/knowledge/test_resource_migration.py index 9e2e2ce79..04f886f57 100644 --- a/tests/knowledge/test_resource_migration.py +++ b/tests/knowledge/test_resource_migration.py @@ -1,7 +1,7 @@ """K02 physical resource migration: the three loader classes resolve one resource set. The corpus lives under ``src/inferrsi/knowledge/data`` and the repository pack -descriptions under ``src/inferrsi/harness/data``. Logical bundle keys and pinned +descriptions under ``src/inferrsi/resources/repo_packs``. Logical bundle keys and pinned record paths keep their old spelling, so content bytes and Bundle revisions are unchanged by the move. @@ -30,8 +30,8 @@ PROJECT = Path(__file__).resolve().parents[2] CHECKOUT = PROJECT / "src" / "inferrsi" KNOWLEDGE_DATA = CHECKOUT / "knowledge" / "data" -HARNESS_DATA = CHECKOUT / "harness" / "data" -RESOURCE_ROOTS = (("knowledge", "data"), ("harness", "data")) +REPO_PACKS = CHECKOUT / "resources" / "repo_packs" +RESOURCE_ROOTS = (("knowledge", "data"), ("resources", "repo_packs")) def _digest(data: bytes) -> str: @@ -40,7 +40,7 @@ def _digest(data: bytes) -> str: def _checkout_inventory() -> dict[str, str]: found = {} - for root in (KNOWLEDGE_DATA, HARNESS_DATA): + for root in (KNOWLEDGE_DATA, REPO_PACKS): for path in root.rglob("*"): # An installer byte-compiles packaged scripts; caches are not resources. if path.is_file() and "__pycache__" not in path.parts: @@ -71,11 +71,12 @@ def checkout_inventory() -> dict[str, str]: def test_old_resource_tier_is_gone_and_the_two_roots_hold_every_resource(checkout_inventory): assert not (CHECKOUT / "data").exists(), "the old sibling data/ tier must not remain" + assert not (CHECKOUT / "harness" / "data" / "repo_packs").exists() knowledge = [name for name in checkout_inventory if name.startswith("knowledge/data/")] - harness = [name for name in checkout_inventory if name.startswith("harness/data/")] - assert len(knowledge) + len(harness) == len(checkout_inventory) - assert sorted(harness) == sorted( - f"harness/data/repo_packs/{repo}/pack.json" for repo in REPO_TYPES + packs = [name for name in checkout_inventory if name.startswith("resources/repo_packs/")] + assert len(knowledge) + len(packs) == len(checkout_inventory) + assert sorted(packs) == sorted( + f"resources/repo_packs/{repo}.json" for repo in REPO_TYPES ) assert {name.split("/")[2] for name in knowledge} == {"skill_library"} @@ -96,7 +97,7 @@ def test_plugin_physical_root_carries_the_same_resource_set(tmp_path, checkout_i for path in staged_root.rglob("*"): relative = path.relative_to(staged_root).as_posix() if (path.is_file() and "__pycache__" not in path.parts - and relative.startswith(("knowledge/data/", "harness/data/"))): + and relative.startswith(("knowledge/data/", "resources/repo_packs/"))): staged[relative] = _digest(path.read_bytes()) assert staged == checkout_inventory @@ -114,10 +115,10 @@ def test_package_data_globs_cover_every_resource_including_subdirectories(checko assert not missing, f"resources a wheel would omit: {sorted(missing)[:5]}" -def test_pack_descriptions_read_from_the_harness_root(checkout_inventory): +def test_pack_descriptions_read_from_resources(checkout_inventory): for repo in REPO_TYPES: assert repository_pack(repo)["id"] == repo - assert f"harness/data/repo_packs/{repo}/pack.json" in checkout_inventory + assert f"resources/repo_packs/{repo}.json" in checkout_inventory with pytest.raises(ValueError, match="Unknown repository type"): repository_pack("not-a-repository") diff --git a/tests/repository/check_installed.py b/tests/repository/check_installed.py index 99c3055d9..0ac6842ba 100644 --- a/tests/repository/check_installed.py +++ b/tests/repository/check_installed.py @@ -607,13 +607,13 @@ def _inventory(root, prefix): inventory = { **_inventory(files("inferrsi").joinpath("knowledge", "data"), "knowledge/data"), - **_inventory(files("inferrsi").joinpath("harness", "data"), "harness/data"), + **_inventory(files("inferrsi").joinpath("resources", "repo_packs"), "resources/repo_packs"), } assert len(inventory) == 775, f"installed resource count is {len(inventory)}, expected 775" for name in inventory: if "/skill_library/" in name and name.endswith("/SKILL.md"): assert name.removesuffix("SKILL.md") + "metadata.json" not in inventory, name -assert sum(name.startswith("harness/data/") for name in inventory) == len(REPO_TYPES) +assert sum(name.startswith("resources/repo_packs/") for name in inventory) == len(REPO_TYPES) # Every pinned record path and every registered skill body resolves inside that # same enumeration, so the inventory and the records describe one resource set. for record in skill_index: @@ -623,7 +623,7 @@ def _inventory(root, prefix): for entry in registry.values(): assert f"knowledge/data/skill_library/{entry['path']}/SKILL.md" in inventory, entry["path"] for repo_name in REPO_TYPES: - assert f"harness/data/repo_packs/{repo_name}/pack.json" in inventory, repo_name + assert f"resources/repo_packs/{repo_name}.json" in inventory, repo_name inventory_digest = hashlib.sha256( "\n".join(f"{name}\0{digest}" for name, digest in sorted(inventory.items())).encode("utf-8") ).hexdigest() @@ -633,7 +633,7 @@ def _inventory(root, prefix): # Same K02-3 contract as the opt-in fresh-venv test: every packaged resource # in this isolated install matches the checkout byte-for-byte. expected = _inventory(Path(checkout) / "knowledge" / "data", "knowledge/data") - expected.update(_inventory(Path(checkout) / "harness" / "data", "harness/data")) + expected.update(_inventory(Path(checkout) / "resources" / "repo_packs", "resources/repo_packs")) only_installed = sorted(set(inventory) - set(expected))[:8] only_checkout = sorted(set(expected) - set(inventory))[:8] changed = sorted( @@ -669,10 +669,10 @@ def _inventory(root, prefix): for consumer in ("inferrsi.knowledge.catalog", "inferrsi.apps.cli.arguments"): assert import_module(consumer).REPO_TYPES is REPO_TYPES, consumer for repo_name in REPO_TYPES: - packed = files("inferrsi").joinpath("harness", "data", "repo_packs", repo_name, "pack.json") + packed = files("inferrsi").joinpath("resources", "repo_packs", f"{repo_name}.json") data = packed.read_bytes() # The inventory digest above is the one compared with the checkout byte for byte. - assert inventory[f"harness/data/repo_packs/{repo_name}/pack.json"] == ( + assert inventory[f"resources/repo_packs/{repo_name}.json"] == ( hashlib.sha256(data).hexdigest() ), repo_name assert repository_packs.repository_pack(repo_name) == json.loads(data.decode("utf-8")) diff --git a/tests/repository/test_first_wave_isolation_policy.py b/tests/repository/test_first_wave_isolation_policy.py index 1d62d851e..9f02aa391 100644 --- a/tests/repository/test_first_wave_isolation_policy.py +++ b/tests/repository/test_first_wave_isolation_policy.py @@ -651,7 +651,7 @@ def test_data_leaf_accepts_only_listed_stdlib_imports(self) -> None: "imports inferrsi.catalog"), (LEAF_SOURCE.replace("import json\n", "import json\nfrom . import sibling\n"), "imports inferrsi.resources.sibling"), - # The leaf never imports Harness to find the Harness-owned pack.json. + # The leaf never imports Harness to find a target-repository descriptor. (LEAF_SOURCE.replace("import json\n", "import json\nfrom ..harness import api\n"), "imports inferrsi.harness.api"), (LEAF_SOURCE.replace("import json\n", "import json\nimport inferrsi.harness\n"), diff --git a/tools/evaluate_indexer.py b/tools/evaluate_indexer.py index 0b435b7eb..8d9701582 100644 --- a/tools/evaluate_indexer.py +++ b/tools/evaluate_indexer.py @@ -37,7 +37,9 @@ def identity(root): for name, paths in ( ("python", sorted((root / "src").rglob("*.py"))), ("corpus", sorted((root / "src/inferrsi/knowledge/data").rglob("*")) - + sorted((root / "src/inferrsi/harness/data").rglob("*"))), + # Frozen baseline checkouts can still have Harness-owned descriptors. + + sorted((root / "src/inferrsi/harness/data").rglob("*")) + + sorted((root / "src/inferrsi/resources/repo_packs").glob("*.json"))), ): members = { p.relative_to(root).as_posix(): digest(p.read_bytes()) diff --git a/tools/plugin_bundle.py b/tools/plugin_bundle.py index 3e2bed415..44c316d4b 100644 --- a/tools/plugin_bundle.py +++ b/tools/plugin_bundle.py @@ -53,14 +53,14 @@ def bundle_runtime(source: Path, runtime: Path, *, plugin_version: str, if not path.is_file(): continue relative = path.relative_to(source) - # K02 resource roots: the Knowledge corpus and the Harness repository - # pack descriptions. The accepted kinds match the package-data globs in - # pyproject.toml, so a wheel and a plugin carry the same resource set. - resource_root = relative.parts[:2] in (("knowledge", "data"), ("harness", "data")) - package_data = resource_root and ( + # Match the package-data declarations used by the wheel. + package_data = relative.parts[:2] == ("knowledge", "data") and ( path.suffix in (".md", ".json", ".txt") or path.name in ("LICENSE", "THIRD_PARTY_NOTICES", "upstream-NOTICE") ) + package_data = package_data or ( + relative.parent.parts == ("resources", "repo_packs") and path.suffix == ".json" + ) package_data = package_data or ( relative.parts[:2] == ("benchmark", "tasks") and (path.suffix in (".json", ".md", ".jsonl") or path.name == "LICENSE") From 6c85229ca8aae4f0ae3ba042dc6af33e7887af04 Mon Sep 17 00:00:00 2001 From: Dong1017 <55723162+Dong1017@users.noreply.github.com> Date: Thu, 26 Nov 2026 21:05:26 +0800 Subject: [PATCH 2/2] Point intake reports at the relocated repository descriptors Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com> --- docs/reviews/issue91-afd-plugin-intake.md | 2 +- docs/reviews/issue91-vllm-rlt-intake.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reviews/issue91-afd-plugin-intake.md b/docs/reviews/issue91-afd-plugin-intake.md index 2f1731bd5..76ca06766 100644 --- a/docs/reviews/issue91-afd-plugin-intake.md +++ b/docs/reviews/issue91-afd-plugin-intake.md @@ -6,7 +6,7 @@ Status: **descriptor-only / intake-plan; located-not-mined**. This report propos - Canonical repository: [vllm-project/afd-plugin](https://github.com/vllm-project/afd-plugin), GitHub repository ID `1238474765`. - Inspected source: `df8d6a0c403c3ca1b4ed9cf1687e7204908bebec`, tree `923a712f6976ce883395f55b03aeb43e50964a19`; retrieved through fixed-revision GitHub connector reads on 2026-10-23. The complete tree listing was not truncated; only the bounded files below were read. -- 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. - [LICENSE](https://github.com/vllm-project/afd-plugin/blob/df8d6a0c403c3ca1b4ed9cf1687e7204908bebec/LICENSE#L1-L12) contains Apache-2.0, and the selected Python implementation/test files carry Apache-2.0 SPDX headers. The same [license file, lines 203–229](https://github.com/vllm-project/afd-plugin/blob/df8d6a0c403c3ca1b4ed9cf1687e7204908bebec/LICENSE#L203-L229) also retains an MIT notice for imported NPU routed-only async CAM kernel sources and adapted bindings. Those sources are outside this readset; this is not a claim that every repository file has one license. - The [README compatibility statement](https://github.com/vllm-project/afd-plugin/blob/df8d6a0c403c3ca1b4ed9cf1687e7204908bebec/README.md#L11-L25) targets vLLM v0.30.0 / `ced6857a` and vllm-ascend `8d4409d6`. These short dependency references are upstream statements, not a fully frozen or locally validated dependency tuple. diff --git a/docs/reviews/issue91-vllm-rlt-intake.md b/docs/reviews/issue91-vllm-rlt-intake.md index 9390a3cf2..38519c6e5 100644 --- a/docs/reviews/issue91-vllm-rlt-intake.md +++ b/docs/reviews/issue91-vllm-rlt-intake.md @@ -6,7 +6,7 @@ Status: **descriptor-only / intake-plan; located-not-mined**. This report propos - The requested legacy name `ThinkFlowLab/vllm-rlt` resolves through GitHub repository metadata to [InferMatrixLab/vllm-rlt](https://github.com/InferMatrixLab/vllm-rlt), repository ID `1363830789`. The stable InferRSI repo ID remains `vllm_rlt`. - Inspected source: `4a350344027960a48384626aa646f1765fda6d4f`, tree `4c2cab1f497513ea0590060eb53ee0b179a5bf70`; fixed-revision connector retrieval on 2026-10-23. The recursive tree listing was not truncated; only the bounded files/ranges below were read. -- 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. - [LICENSE:1–12](https://github.com/InferMatrixLab/vllm-rlt/blob/4a350344027960a48384626aa646f1765fda6d4f/LICENSE#L1-L12) contains Apache-2.0, also declared by [README:313–315](https://github.com/InferMatrixLab/vllm-rlt/blob/4a350344027960a48384626aa646f1765fda6d4f/README.md#L313-L315). [NOTICE:1–14](https://github.com/InferMatrixLab/vllm-rlt/blob/4a350344027960a48384626aa646f1765fda6d4f/NOTICE#L1-L14) retains ByteDance/Ouro and upstream Qwen/HuggingFace model/configuration attribution and distinguishes this standalone runtime from an upstream CDB implementation. This records the inspected license/notice facts, not a whole-tree or model-weight license audit. - [README:34–52](https://github.com/InferMatrixLab/vllm-rlt/blob/4a350344027960a48384626aa646f1765fda6d4f/README.md#L34-L52) describes an independent recurrent-model engine with vLLM-style organization that does not require vLLM to be installed. The repository name does not establish compatibility with a particular vLLM runtime.