Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/contracts/current-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<repo-type>.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.

Expand Down Expand Up @@ -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>/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/<repo-type>.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 <type>` report. Basic `doctor` inspects the environment without reading a descriptor. Dashboard templates live in `apps/views/`.

## D008 — function ownership

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions docs/guides/module-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/<repo-type>.json`. An explicit
`doctor --repo-type <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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/knowledge-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ src/inferrsi/knowledge/skill_catalog.py Packaged or custom-root skill reader
src/inferrsi/knowledge/data/skill_library/records/<stable-id>.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/<repo>/pack.json Target descriptor, read by repository_pack
src/inferrsi/resources/repo_packs/<repo-type>.json Target descriptor, read by repository_pack
evidence/<campaign-id>/ Frozen plans, results, patches and validators
docs/reference-matrix.md Sources, inspected scope and extraction
docs/searchspace-matrix.md Resource × optimization-stage coverage
Expand Down
17 changes: 12 additions & 5 deletions docs/legacy-knowledge-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion docs/reviews/issue91-afd-plugin-intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/reviews/issue91-vllm-rlt-intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion src/inferrsi/apps/cli/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 5 additions & 3 deletions src/inferrsi/apps/host/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

def inspect_environment(
repo: str,
repo_type: str,
repo_type: str | None,
backend: str,
*,
device_ids: tuple[str, ...] = (),
Expand Down Expand Up @@ -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,
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/inferrsi/apps/host/prepared_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def inspect_environment(
repo: str,
repo_type: str,
repo_type: str | None,
backend: str,
*,
device_ids: tuple[str, ...] = (),
Expand Down
9 changes: 3 additions & 6 deletions src/inferrsi/resources/repository_packs.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"))
3 changes: 2 additions & 1 deletion tests/apps/test_codex_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
Expand Down
Loading
Loading