Repository navigation
Description
Goal
Retire src/inferrsi/infra/ and src/inferrsi/model/. After this work, the package root holds only the four cores (knowledge, harness, benchmark, apps), the two technical leaves (contracts, resources) and the two root files __init__.py and __main__.py.
Today both packages are documented as technical seams, "not a fourth core" (docs/module-layout.md, ownership table). #387 planned only one part of their exit: moving model/validators/ into benchmark/validators/. The other modules have no owner and no exit plan. This issue gives each module an owner and tracks the moves to completion.
Current state (main 76ca44a8b77553b2cb7f08b9f861399a72736fe2)
first_wave_report() reports harness_model_infra == (): no Harness module reaches either package. The users listed below come from a static import scan of src/, tests/ and tools/.
| Module | Public names | Users in src/ |
Proposed owner |
|---|---|---|---|
infra/artifacts.py |
file_lock, digest, sha256, write_json, atomic_write_json |
apps/delivery/ (3 files), benchmark/tasks/moe-forward-npu/benchmark.py, model/validators/ (2), infra/campaign.py; also 9 tools |
One copy per owner, as R2 did for Harness (harness/artifact_primitives.py, harness/atomic_json.py): an Apps copy under apps/storage/ and a Benchmark copy. Each tool imports the owner it serves. |
infra/campaign.py |
re-export facade, helper_hashes |
none (examples/qwen21_turbo_b300.py only) |
Delete; the examples import the owners directly |
infra/commands.py |
probe_command |
apps/inspection.py, infra/inspection.py |
Apps host bindings, in a new apps/host/ |
infra/inspection.py |
inspect_environment |
apps/inspection.py |
apps/host/. apps/inspection.py stays the public entry (#490). The permanent neutral-leaf importer rule (infra.inspection → resources.repository_packs) moves to the new module. This is a gate change and needs review. |
infra/platforms/ |
inspect_device, PLATFORM_PROBES, qualify_devices |
infra/inspection.py |
apps/host/: every user is host inspection or a campaign script |
infra/targets/ |
repository_identity, source_snapshot |
apps/inspection.py, apps/legacy/run.py, infra/campaign.py, infra/inspection.py |
apps/host/: every user is in Apps. Harness already takes the source snapshot as an injected value (apps/legacy/ supplies it). |
infra/environment.py |
storage_locations, dependency_versions, semantic_dependency_versions |
infra/campaign.py |
apps/host/: campaign host facts and output locations |
infra/processes.py |
launch_server, stop_server |
infra/campaign.py |
harness/serving/server.py: starting and stopping a supervised serving process is execution |
infra/http.py |
post_json |
model/protocols/image.py |
harness/serving/http.py, with its only user |
model/protocols/metrics.py |
validate_metric, read_metric |
benchmark/legacy_run_v0.py, the MoE task bundle |
Benchmark |
model/protocols/image.py |
ImageProtocol |
none (one example, one test) | harness/serving/image.py: the request client sent to a running server |
model/validators/flare.py, model/validators/image.py |
adapt, validate_pair, main; ImageQualityGate, compare_images |
none | benchmark/validators/, as planned in #387 |
model/anthropic_agent.py, model/anthropic_edit_agent.py, model/request_guard.py |
provider adapter, bounded edit protocol, request authorization broker | each other only; 4 tools | apps/integrations/anthropic/: an external provider with its own request authorization, which matches the #490 definition of integrations |
Other places that name the two packages:
.github/workflows/ci-merge.ymlassertstest -d src/inferrsi/modelandtest -d src/inferrsi/infra.tests/test_module_boundaries.pychecks per-plane import rules forinfraandmodel.docs/architecture.mddescribes Model and Infra planes.docs/flare-qualification.mdanddocs/operations.mddocumentpython -m inferrsi.model.validators.flare.docs/local-skill-evaluation.mdimportsinferrsi.infra.artifacts.examples/qwen21_turbo_b300.pyandexamples/qwen21_turbo_quality.pyimport both packages.- Files under
evidence/name the old paths. They are historical records and stay unchanged.
Compatibility
- No forwarding shells or module aliases, as in R1 (task: R01 — retire legacy root paths and close core dependencies #412). CHANGELOG announces each retired import path and its replacement.
- The flare CLI path changes from
python -m inferrsi.model.validators.flaretopython -m inferrsi.benchmark.validators.flare. The arguments, outputs and exit codes (0 validated, 2 rejected) stay the same. The old path fails withModuleNotFoundError. CHANGELOG and both docs give the new command. - New flare receipts change. The receipt's
adapterfield records the digests offlare.pyandartifacts.py. Receipts made after the move keep the same schema and key names, but the digests are those of the new files. The adapter reads packets, not earlier receipts, so no verifier recomputes the old digests. The repository stores no flare receipt: only tests generate them. Evidence elsewhere stays pinned to its original commit. - Pinned source references stay. Three files of the
inference-benchmark-designKnowledge skill citesrc/inferrsi/model/protocols/metrics.pyat commitb3ef95a. They keep that spelling, as the K02 move kept pinnedsource_files. - Pickles break. Pickled objects that name an old module path no longer load, as with the R1 retirements.
Slices
Each slice moves code without behavior changes, moves its tests with it, and updates every consumer in the same PR. A module that loses its last consumer in src/ stays until its slice deletes it, so infra/artifacts.py stays until slice 5.
Before a slice's PR opens, the slice owner confirms its placement in a comment here. Dong1017 confirms slices 1, 2 and 5. Slices 3 and 4 were to be confirmed by zengchuang-hw as the Apps owner (#371, #490); the issue owner confirmed them in issuecomment-7002457678.
Each slice runs this checklist:
- Search for every reference, not only static imports:
python -mstrings,importlibcalls,pyproject.tomlentry points and package data, wheel contents,.github/scripts, and schema or receipt fields that record a module path. - Add a gate negative control so that an import of each retired path fails even when its file is absent. Add the matching
find_spec(...) is Nonecheck totests/check_installed.pyfor the installed wheel. - Add a CHANGELOG line and update
docs/module-layout.mdanddocs/architecture.md.
-
Benchmark (confirmed, in progress).
- Moves:
model/protocols/metrics.py→benchmark/metrics.py.model/validators/{flare,image}.py→benchmark/validators/.- New
benchmark/artifacts.pyholds the Benchmark copy ofsha256,write_jsonandatomic_write_json. The bytes matchinfra/artifacts.py.
- Consumers updated:
benchmark/legacy_run_v0.pyand the MoE bundle'sbenchmark.pyswitch to these modules. Each MoEevaluatecall prepares its own copy of the task files and launches that copy (runpyon the copiedbenchmark.py) in the same call. A new run therefore binds the new bytes, and no directory prepared before the move is launched again. No tool's literal controller-file inventory names a slice-1 file. - Drift guard: a parity test requires every copy of each helper to have the same function source and to write the same bytes. The copies are in
infra/artifacts.py,harness/artifact_primitives.py,harness/atomic_json.py,benchmark/artifacts.py, and later the Apps copy. R2 did this for Harness intest_harness_artifact_primitives_match_infra_bytes_and_semantics. The test compares whatever copies exist, so it keeps working after slice 5 deletesinfra/. - Flare tests: the new CLI keeps arguments, outputs and exit codes. The old path fails in the checkout and in the installed wheel. A new receipt binds the new files.
- Unchanged: the three Knowledge files pinned at
b3ef95a. They are protected byknowledge-model-policy. - Session identity:
_runtime_identity()names no slice-1 file, so optimization sessions are not affected.
- Moves:
-
Harness serving (placement confirmed).
- Decision: the three modules stay library code (owner decision, 2026-11-19). Their only users in
src/are thecampaign.pyfacade or nothing, but an example campaign and their own tests use them, and starting a server and sending it requests is a capability this project needs. - Moves: they go to a new
harness/serving/package, whose initializer imports nothing:infra/processes.py→harness/serving/server.py;infra/http.py→harness/serving/http.py;model/protocols/image.py→harness/serving/image.py.
- Why not
harness/scenarios/: that package now holds onlyexternal.py, the trial execution for an external command, so its name does not describe these modules. - Before the PR opens: confirm that network I/O inside Harness is consistent with the Harness boundary, and that
first_wave_report()still holds. - Runtime identity:
harness/optimization_session.py::_runtime_identity()hashesinfra/processes.pyby file path. The PR replaces that entry with the canonical file in the same change. - Old sessions:
session_commandcompares the whole runtime map beforestatusorrecover, so a session planned before the move fails closed on the new wheel, by design. The PR keeps that behavior and the old plan bytes, and documents how to recover such a session with the pinned pre-move runtime. - Tests (also raised for
apps/campaign.pyon task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490):- The inventory binds the implementation the session actually runs, not a shim or an identically named file.
- A genuine pre-move plan fixture keeps its original map and bytes. Under the new installed wheel, it is rejected before
statusorrecoverdispatches, and the plan is not modified. - Under the pinned pre-move runtime, the same plan recovers from its receipts with its retained inputs. Compatibility is not shown by rewriting the old map, copying a new digest into it, or bypassing the identity guard.
- A newly started plan records the canonical file keys and hashes from the installed package. A negative case shows that changed canonical bytes are detected. An import-only smoke test or a changed path string is not enough.
- Decision: the three modules stay library code (owner decision, 2026-11-19). Their only users in
-
Apps host, in two PRs (owner decision issuecomment-7002457678): 3c and 3a ship together, because 3a cannot stand alone while
infra/campaign.pyre-exportsenvironmentandtargets, and Infra may not import Apps; 3b follows.- 3a:
infra/commands.py,infra/inspection.py,infra/platforms/,infra/targets/andinfra/environment.pygo toapps/host/. The same PR replaces the one neutral-leaf importerinferrsi.infra.inspectionwith theapps/host/module in the source,LEAF_IMPORTERS,docs/legacy-knowledge-manifest.jsonand the negative controls. There is noapps.*wildcard and no window with two admitted importers. Historical revision records and leaf hashes stay. The policy change needs architecture review on its own. - 3b: add the Apps copy of the artifact helpers and move the
apps/delivery/files and the tools onto it. List each tool with the owner it imports, and cover its literal controller-file inventories as well as its imports. Add an installed-wheel regression for the shared.session.lockon Windows and POSIX: a Harness process holds the lock, an Apps progress export in another process cannot read a snapshot while it is held, and it succeeds after release. The bug(apps): Windows busy delivery lock escapes as PermissionError #494 exception mapping stays a separate assertion. - 3c: delete
infra/campaign.py, choose wherehelper_hashesgoes or record that it is dropped, and migrate the examples.helper_hashesinventories every package Python file, so its disposition changes the path set that new records bind. The PR states that change explicitly.
- 3a:
-
Providers: the three
model/provider modules go toapps/integrations/anthropic/, and the tools follow. It does not wait for task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490 (owner decision issuecomment-7002457678); task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490's target tree addsapps/host/andapps/integrations/anthropic/when it next changes.request_guard.pyis an authorization broker, so its logic must not change. The PR may change only two things:- its import lines;
- the live source locators: the path-valued
SOURCEinrequest_guard.pyand inanthropic_agent.py, and the controller inventories intools/skill_eval_compare.pythat hash them.
New controller identities bind the new files. Historical frozen records are not rewritten. The Messages worker loads the adjacent
request_guard.pywithrunpy.run_pathunderpython -I. The new placement keeps that adjacent-file loading and the frozen guard digest, in the checkout and in the wheel. An offline test covers this path with no provider call. An import-only smoke test would miss it. -
Retire: delete both directories and update CI (
ci-merge.yml) andtests/test_module_boundaries.py._runtime_identity()also hashesinfra/artifacts.py. That entry is replaced by the copies that the session code actually runs, with the same fail-closed recovery note and fixture as in slice 2. Add a package-directory guard that allows exactlyapps,benchmark,contracts,harness,knowledgeandresources. Its negative cases are a reintroducedinfra/ormodel/, a new sibling package, and an old import whose target is absent. It keeps the distinction between tracked source and generated wheel metadata such as_version.py.
Slices 1, 2, 3 and 4 are independent of each other. Slice 5 comes last.
Acceptance
- Each slice's placement is confirmed in a comment here before its PR opens (slices 3 and 4: issuecomment-7002457678).
apps/host/andapps/integrations/anthropic/are recorded in task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490's Apps target tree when it next changes. -
src/inferrsi/contains exactly the directoriesapps,benchmark,contracts,harness,knowledgeandresources, plus the tracked root files__init__.pyand__main__.py. A package-directory guard enforces this. - No module named
inferrsi.infra*orinferrsi.model*exists or is imported, in the checkout or the installed wheel. The gate fails if one returns. -
first_wave_report()still givesviolations == (),blockers == ()andisolation_complete is True. The neutral-leaf importer rule names exactly one new importer, with a negative test. - Installed-wheel, host-compatibility and
full-checkjobs pass. CLI arguments, outputs and exit codes, record formats and original evidence bytes are unchanged, apart from the declared exceptions above: the flare CLI path, and the adapter digests in new flare receipts. - CHANGELOG lists every retired path and its replacement.
Out of scope
- Behavior changes, new features, or splitting functions beyond the moves above.
- Rewriting
evidence/or other frozen records. - Renaming directories whose names no longer match their contents, for example
harness/scenarios/, which holds only trial execution.harness/scenarios/external.pyis in_runtime_identity(), so such a rename rejects sessions planned before it. A separate follow-up issue covers directory names once this issue and task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490 have settled the tree.
Related: #387 (closed by its final-scheme comment, which links here), #412, #490, #371.
Activity
Dong1017 commentedon Nov 18, 2026
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Assessment: The plan is sound and well scoped. Every module gets an owner, there are no forwarding shells, the slices are mostly independent, and each slice has a behavior-neutral acceptance bar. I checked it only for internal consistency. I did not re-run the import scan or check the table against
76ca44a8. Several gaps should be closed before slices 2–4 start.Gaps and risks
Slice 2 may move dead code.
infra/processes.py(launch_server,stop_server) andinfra/environment.pyhaveinfra/campaign.pyas their only user insrc/.campaign.py. After that, the only callers are the examples, and perhaps tools.apps/host/, or whether the scripts and examples should own them.src/with no in-tree user. The same question applies toImageProtocol, which has no users insrc/, only one example and one test.helper_hashes, the only non-facade name incampaign.py, has a destination. The table says "Delete" but doesn't name one.The artifact-helper split is under-specified.
file_lock,digest,sha256and the JSON writers. The 9 tools and theapps/delivery/files are not mapped to an owner individually.tools/is allowed to import Apps or Benchmark under the current gate.infra/artifacts.pystill exists. The issue should say thatinfra/artifacts.pystays until slice 5, or until its last consumer moves, so slices 1 and 3 really are independent.Slice 4 is not independent. It is described as independent but "coordinated with task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490's integrations step". Either mark it as blocked on task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490 recording
apps/integrations/anthropic/, or give it a fallback.request_guard.pyis an authorization broker, so the review for that move should explicitly confirm that there is no behavior diff, for example a byte-identical move apart from imports.Slice 3 is too large for one PR. It covers five modules, a gate change,
apps/delivery/, the tools, the campaign deletion and the example migration. I suggest splitting it as follows:apps/host/together with the neutral-leaf rule change and its negative test.campaign.pyand migrate the examples.That keeps the gate change reviewable on its own.
Neutral-leaf rule. Acceptance says the rule "names exactly one new importer, with a negative test". Spell out the old and new entries,
infra.inspection → resources.repository_packsbecoming theapps/host/module. Also say whether the old entry is removed in the same PR, so there is never a window with two allowed importers.The static import scan can miss references. Add a string and config grep to the pre-slice checklist. It should cover:
python -mstrings.importliband dynamic imports.pyproject.tomlentry points and package data..github/, not justci-merge.yml.Flare receipt change.
flare.pyandartifacts.pydigests. Confirm that no verifier recomputes or pins digests of old file paths when it reads existing receipts. If one does, the compatibility claim of "existing receipts stay pinned" needs a test.python -m inferrsi.benchmark.validators.flare, so the CHANGELOG and docs have one agreed string.Slice 2 and Harness isolation.
infra/http.py(post_json, network I/O) moves into Harness. Confirm that the Harness boundary andfirst_wave_report()rules permit this.harness_model_infra == ()is true today, and adding network code to Harness could change the isolation story.The first acceptance item has no named confirmer. "Placements confirmed or revised in this issue" needs an owner per slice. Suggest listing the Benchmark, Harness, Apps and task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490 owners and recording each confirmation as a comment before its slice starts.
Suggested next steps
There is no explicit ask to Dong1017 in the body, so this is triage only. (Dong-bot, authorized delegate.)
zengchuang-hw commentedon Nov 18, 2026
Independent scope/acceptance review
Acting under zengchuang-hw's standing authorization to review other-author Issues. Inspected the original Goal/Compatibility/Proposed slices/Acceptance sections and actual main
76ca44a8b77553b2cb7f08b9f861399a72736fe2; did not use discussion reviews as requirements. This is proposal feedback, not authorization to start slices or confirmation that retirement has happened.The owner-based direction is coherent, but three concrete acceptance details should be made explicit before implementation:
The existing root-file guard does not enforce the proposed exact directory set.
test_package_root_inventory.pychecks root files (path.is_file()/ Git root-file listing), not the six permitted subdirectories. It can remain green while an extra package directory exists. Add a separate package-directory inventory/retired-prefix guard with negative cases for reintroducedinfra/,model/, a new sibling package, and an old import even when its target is absent. Retain the documented distinction between tracked source and generated wheel metadata such as_version.py; “exactly eight entries” should not accidentally reject supported build output.The Apps-host leaf move is a coordinated policy migration, not merely an import edit.
infra/inspection.pydirectly importsrepository_pack; bothLEAF_IMPORTERSand the manifest currently pin the exact old importer, symbol and import-line shape. Slice 3 should replace that one current importer with the agreed Apps-host owner in the source, gate, manifest and negative controls together, preserving historical revision records and leaf hashes. Do not temporarily authorize anapps.*wildcard or leave both live importers admitted. The required architecture review of that policy change remains separate from passing tests.“CLI behavior / original bytes unchanged” needs the already-declared exceptions spelled out in the acceptance check.
flare.pyhashes its own file and the imported artifact-helper file into new receipts. The new import path and changed implementation bytes can change those hashes while the receipt schema remains stable. Test separately: old frozen receipts remain byte-identical; newly generated receipts bind the new implementation; the replacement CLI preserves arguments, exit codes and semantics while the oldpython -mpath intentionally fails. Do not regenerate historical goldens merely to make a byte comparison pass. The same no-forwarder intent should be checked in an installed wheel, not only the checkout.Source checks also confirm that
ImageProtocol.requestcallsinfra.http.post_json, so moving the image protocol and transport together as proposed avoids manufacturing a cross-core request path. This observation is not a validation of the complete consumer closure. Slice-level evidence should include the affected callers/tests, wheel entry points and path-sensitive receipts, rather than infer completion from directory names alone.No code/tests, import gate, wheel build or host jobs were executed in this review. Both source packages still exist at the inspected main revision. I have not accepted placements on behalf of the owner, implemented moves, or closed this Issue.
david6666666 commentedon Nov 18, 2026
Could slice 3 keep an installed-wheel regression for the shared
.session.lock? Apps delivery is switching lock helpers, but Harness remains the writer for the same lock file. On Windows and POSIX, have a Harness process hold the lock, confirm an Apps progress export in a separate process cannot read a snapshot while it is held, then release and retry successfully. Per-copy parity tests can both pass without checking cross-process exclusion on the actual writer/reader pair. Keep #494’s exception mapping as a separate assertion.Dong1017 commentedon Nov 18, 2026
Posted by an agent on behalf of @Dong1017, the issue owner.
The body is updated after the discussion above. What changed and why:
python -m inferrsi.benchmark.validators.flare, with the same arguments, outputs and exit codes. The old path fails, in the checkout and in the installed wheel.infra/artifacts.pystays until slice 5.infra/is gone.tests/check_installed.pycheck for each retired path.processes,imageandhttpstay library code, since they have no live user insrc/, and confirm that network I/O fits the Harness boundary.LEAF_IMPORTERS, the manifest and the negative controls together, with no wildcard and no window with two importers..session.lockregression on Windows and POSIX, plus the per-tool owner list.campaign.py,helper_hashesand the examples.apps/integrations/anthropic/(Dong-bot point 3). Therequest_guard.pymove must be byte-identical apart from imports.infra/ormodel/, a new sibling and an absent old target, and keeps generated_version.pyseparate.zengchuang-hw commentedon Nov 18, 2026
Independent incremental scope review
Follow-up to my previous review, against the revised Goal/Compatibility/Slices/Acceptance sections and actual main
cf671a880ac8037e01922e1be0b701771fb9922f. This assesses the specification, not implementation completion or an Apps-owner commitment.The revised specification addresses the three earlier specification gaps: a separate exact-directory guard; atomic replacement of the sole neutral-leaf importer; and explicit flare CLI/new-receipt exceptions. Those are now written acceptance requirements, not verified passing tests. The old packages, old importer policy and root-file-only inventory remain in the inspected source.
One concrete slice-4 conflict still needs resolution before implementation: request_guard.py contains
SOURCE = "src/inferrsi/model/request_guard.py", which is not an import line. skill_eval_compare.py imports it asGUARD_SOURCE, includes it inCONTROLLERS, and hashes eachROOT / namewhen making a plan. Simply moving the guard and changing imports, while keeping every other byte identical, leaves the controller pointing at a deleted file. The slice needs an explicit decision about this live source locator: narrowly permit its relocation, or relocate the locator's ownership/caller without treating the old value as a live path. Keep authorization-broker logic unchanged; do not silently broaden “import-only” into functional edits. New controller identities must bind existing new files; historical frozen records must not be rewritten.anthropic_agent.pyalso has a path-valuedSOURCEconsumed by the planner.For the requested slice-3/4 source check:
infra/inspection.pystill directly importsrepository_pack;tests/_gate_policy_support.pyand the manifest still admit preciselyinferrsi.infra.inspection. The proposed atomic source/policy/manifest/negative-control change matches this actual dependency. Read-only subprocess probing incommands.pyand host/cache/dependency inspection inenvironment.pysupport the proposed host grouping, but this is not owner acceptance.sha256/digest; tools also have explicit Infra helper imports and literal controller-file inventories. The per-tool map must cover those inventories, not just imports. The source of the Infra/Harness file locks has distinct Windowsmsvcrtand POSIXflockbranches, so the specified installed-wheel, cross-process regression is materially useful and cannot be replaced by an in-process mocked test.infra/campaign.py::helper_hashesinventories all package Python files; moving/dropping it changes the binding path set for new records, so its explicit disposition remains necessary.python -Iand loads the adjacent trustedrequest_guard.pyusingrunpy.run_path, not an ordinary installed-module import. The new placement must retain that adjacent-file/wheel behavior and frozen guard digest, with offline coverage that does not make provider calls. An import-only smoke test would miss this path.I have not confirmed or accepted slices 3/4 on the owner's behalf, changed #490, taken an implementation assignment, or authorized provider calls. Their recorded placement prerequisite remains separate. No repository code, tests, gate, wheel build or host jobs were executed here; no new execution evidence was established by this static review.
Dong1017 commentedon Nov 18, 2026
Posted by an agent on behalf of @Dong1017, the issue owner.
The body is updated for the points in the review above (issuecomment-6977604801):
SOURCEinrequest_guard.pyandanthropic_agent.pyis a live source locator, and so are the controller inventories intools/skill_eval_compare.pythat hash it. The PR may change these values and the import lines only. The authorization-broker logic stays unchanged.runpy.run_pathloading underpython -Iand the frozen guard digest are kept, in the checkout and in the wheel. An offline test covers this path with no provider call.helper_hasheschanges the path set that new records bind.evaluatecall prepares its own copy and launches it withrunpyin the same call. No directory prepared before the move is launched again.Slices 3 and 4 still wait for the Apps owner's placement confirmation. Slice 1 is in progress.
zengchuang-hw commentedon Nov 18, 2026
Independent specification increment for clarification 6978662693, following my previous review. Source baseline remains
cf671a880ac8037e01922e1be0b701771fb9922f.The slice-4 specification conflict is now resolved at the requirements level. The revised slice expressly permits the two path-valued SOURCE constants and their controller inventories to relocate, in addition to imports, while keeping authorization-broker logic unchanged. I re-read the actual files: request_guard.SOURCE and anthropic_agent.SOURCE still name the old model paths, and skill_eval_compare consumes GUARD_SOURCE in its hashed controller inventory. The narrowly stated exception addresses exactly that live-locator problem; it is not blanket permission for behavior changes.
The required adjacent-file behavior also matches the real dependency: anthropic_agent loads request_guard.py via runpy.run_path(Path(file).with_name(...)) and starts its worker with python -I. An ordinary import-only check would not cover that execution path. Keep the new identity tied to the actual relocated worker/guard files and test offline checkout and installed-wheel behavior without provider calls; none of that is proven merely by the new wording.
I also traced the slice-1 clarification in actual MoE source. evaluate calls _prepare in that invocation; _prepare creates a new output directory with exist_ok=False and copies current task bytes; the generated launcher runs that output's task/benchmark.py. This supports the stated per-invocation preparation model rather than silently launching a pre-move prepared directory. I did not execute it or establish whole-tool inventory coverage in this increment.
The 3b literal-inventory requirement and 3c explicit helper_hashes disposition are now written requirements. Current helper_hashes still enumerates package Python files, so its relocation/deletion changes the new-record binding path set. Historical frozen records must remain unchanged.
Status: this closes the identified import-only-versus-live-locator ambiguity, not implementation or test acceptance. Slices 3/4 still require the recorded Apps-owner placement prerequisite; I do not confirm placement, accept an implementation assignment, modify #490 or authorize any provider call on the owner's behalf. No fixing PR/run artifact was assessed here. No repository code, wheel build, tests or models were executed; no other reviewers' opinions, source edits, Issue-state changes or merges were used/performed.
Dong1017 commentedon Nov 18, 2026
Posted by an agent on behalf of @Dong1017, the issue owner.
The two points raised on #490 for
apps/campaign.py(issuecomment-6980396082 and issuecomment-6980699040) also apply here.harness/optimization_session.py::_runtime_identity()hashesinfra/processes.pyandinfra/artifacts.pyby file path. The body now says:infra/processes.pyentry with the canonical file in the same change.infra/artifacts.pyentry with the copies that the session code actually runs.Slice 1 is not affected:
_runtime_identity()names none of its files, and no tool's controller inventory does either.The review in issuecomment-6978743994 needs no further body change.
zengchuang-hw commentedon Nov 18, 2026
Independent specification increment for 6981683780, following my previous review. I independently inspected current main
cf671a880ac8037e01922e1be0b701771fb9922f; this is requirements feedback, not implementation acceptance.The added slice-2/5 runtime-identity and release-boundary recovery requirements address a concrete remaining migration surface. In optimization_session.py,
_runtime_identity()still hashes literalinfra/processes.pyandinfra/artifacts.pypaths from the installed package. New plans retain this map. On every non-start operation, lines 207–209 compare the entire map before dispatching evenstatusorrecover. Moving or deleting a listed file without updating that inventory can therefore fail while building the identity; changing the inventory correctly should still reject a pre-move plan under the new runtime.Keep the acceptance split explicit:
scenarios.external.execute_trialtoharness.local_process.execute_command; the presence of an Infra path in the map alone does not establish it is the execution implementation.These requirements extend the previously reviewed live-locator exception and frozen-history protections; they do not authorize changing broker behavior or starting the slices. The recorded placement/owner prerequisite remains separate. No fixing revision or primary execution artifact was supplied in this increment, so recovery across the release boundary is still unverified.
Actually performed: author/type/repository/comment verification, comparison with my own prior reviews, and static reading of the runtime map, plan capture, pre-dispatch guard and execution imports at the pinned main revision. No repository code, tests, wheel build, provider calls, other reviewers' opinions, source edits, Issue-state changes or merges were used/performed.
Dong1017 commentedon Nov 18, 2026
Posted by an agent on behalf of @Dong1017, the issue owner.
The four test requirements from issuecomment-6981764650 are now in slice 2's runtime-identity tests, and slice 5 refers to the same tests:
Dong1017 commentedon Nov 19, 2026
Posted by an agent on behalf of @Dong1017, the issue owner.
Slice 2 placement is confirmed (owner decision, 2026-11-19). The body is updated.
infra/processes.py,infra/http.pyandmodel/protocols/image.pystay library code. An example campaign and their own tests use them, and starting a server and sending it requests is a capability this project needs.harness/serving/package, asserver.py,http.pyandimage.py. Its initializer imports nothing.harness/scenarios/. That package now holds onlyexternal.py, the trial execution for an external command, so its name does not describe them.Renaming directories whose names no longer match their contents, starting with
harness/scenarios/, is out of scope here.harness/scenarios/external.pyis in_runtime_identity(), so such a rename rejects sessions planned before it. A separate follow-up issue will cover directory names once this issue and #490 have settled the tree.Slice 2 starts after slice 1 (#503) merges. The runtime-identity and recovery tests in the body apply to it.
zengchuang-hw commentedon Nov 19, 2026
Independent placement follow-up to 6996972802, following my runtime-identity review. Inspected source at main
965ab5cf83399a99530949b04bb934a892ee417c; this is specification feedback, not implementation acceptance or an instruction to start Slice 2 before #503 merges.The confirmed
harness/serving/{server,http,image}.pygrouping is consistent with the inspected dependencies: ImageProtocol calls the shared HTTP transport, while the server helper owns long-lived serving-worker process groups.harness/scenarios/external.pyinstead delegates individual trials toharness.local_process.execute_command. Keeping that rename separate avoids an unrelated runtime-identity change; the current identity map explicitly includes bothinfra/processes.pyandharness/scenarios/external.py.Two concrete migration checks follow from the actual tests:
tests/test_server_processes.pychecks rejection before launch/cleanup on Windows and macOS, inaccessible procfs, and real Linux cleanup after the leader exits while preserving an unrelated process. The new package's empty initializer is important so importing HTTP/image utilities does not eagerly initialize server behavior.from inferrsi.infra.processes import launch_server, stop_server. An AST import migration over the test module would miss that string, and the real cleanup test is skipped off Linux. Retain both supervised/standalone cases using the new canonical server path. Also keep the actual HTTP image request test and the example's ImageProtocol caller on the new path; no provider or real-model request is needed for that local synthetic test.The existing runtime-identity test asserts several keys and that every listed file exists; it does not by itself prove the new server key/hash or historical-session rejection and recovery. The already specified Slice 2 identity/recovery acceptance still applies. Do not rewrite a pre-move plan to make it compatible, and do not rename
scenarios/external.pyopportunistically during this slice.Performed: original comment/object/repository verification, own-comment deduplication, current-main source and test inspection. Not performed: repository execution, tests/build/wheel installation, server launches, or recovery reproduction. No other reviewers' opinions used, no source or Issue-state change, and no merge.
Dong1017 commentedon Nov 19, 2026
Posted by an agent on behalf of @Dong1017, the issue owner.
Slice 1 is merged: #503, squash commit
25df4772e4e4a82033f5acd8d5e13e164f8467dd(2026-11-19). It was approved at head692de7dby zengchuang-hw and cursor[bot].inferrsi.model.protocols.metricsis nowinferrsi.benchmark.metrics.inferrsi.model.validatorsis nowinferrsi.benchmark.validators. Neither old path has a forwarder.benchmark/artifacts.pyholds Benchmark's helper copy.tests/test_artifact_helper_copies.pykeeps every copy equal.tests/check_installed.pyreject the retired paths.692de7d,full-check3.10/3.11 each gave 5224 passed, 37 skipped and 672 subtests.Next: slice 2 (
harness/serving/). Slices 3 and 4 still wait for the Apps owner's placement confirmation.Dong1017 commentedon Nov 19, 2026
Owner decision, posted by me personally (not by an agent). Slices 3 and 4 may start now.
infra/campaign.pyre-exportsenvironmentandtargets, and Infra may not import Apps.infra/commands.py,infra/inspection.py,infra/environment.py,infra/platforms/andinfra/targets/move toapps/host/. Theapps/host/package keeps Infra's limit: it reaches no Knowledge, Harness or Benchmark module.inferrsi.apps.host.inspectionin the same change.inferrsi.infra.inspectionis retired, and no state admits two importers. The manifest keeps the earlier state in its revision history.infra/campaign.pyis deleted.helper_hashesmoves into the example campaign, its only user.apps/delivery/and the tools.apps/integrations/anthropic/. Slice 4 does not wait for task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490. task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490's target tree addsapps/host/andapps/integrations/anthropic/when it next changes.zengchuang-hw commentedon Nov 19, 2026
PASS
Slice 3/4 增量方案检视,不代表实现验收。对照
9b81c9ba1d4d1f7d45bd039a7c02ac2f01859426的实际依赖:infra/campaign.py仍转出environment/targets,3a 与 3c 同一 PR 可以避免中间出现 Infra → Apps。检查模块迁移时,源码、gate 和 manifest 同次替换唯一的 neutral-leaf importer,保留旧名字和通配名的负向断言。Slice 4 的语义应保持不变,留意同步迁移工具记录的源码路径和 controller 文件清单。实现时补一个具体回归:
helper_hashes()目前从自身位置的parents[1]找包根,并枚举包下所有 Python 源文件。搬到examples/qwen21_turbo_b300.py后不能原样搬这行;应仍从实际加载的inferrsi包根枚举,并继续生成inferrsi/...键。建议从仓库外工作目录运行回归,验证预期包文件进入新记录、示例仍由其原有单独条目覆盖、历史记录不被重写。已静态核对现有导入、函数、manifest 和工具路径。未运行代码、未查 CI。
Merge the host move into the serving slice
Dong1017 commentedon Nov 19, 2026
Posted by an agent on behalf of @Dong1017, the issue owner.
Slices 2, 3c and 3a are merged: #510, squash commit
a3e33851981f1ecdc8b73d7b62633cc598e5d5ae(2026-11-19). zengchuang-hw approved head2e7c863.harness/serving/{server,http,image}.py. The runtime identity hashesharness/serving/server.py, and the two-runtime check passed onmain9b81c9b→6f151a7.infra/campaign.pyis deleted, andhelper_hasheslives in the example campaign.apps/host/, and the permanent neutral-leaf importer isinferrsi.apps.host.inspection.inferrsi.infraholds onlyartifacts.py, andinferrsi.modelholds only the three Anthropic provider modules.Next, one PR for slices 3b, 4 and 5 (owner decision, 2026-11-19):
.session.lockregression;apps/integrations/anthropic/;infra/andmodel/, with the package-directory guard.zengchuang-hw commentedon Nov 19, 2026
PASS
3b/4/5 合并交付方案增量检视,不代表实现验收。对照已合入的
a3e3385:Apps delivery 仍从infra.artifacts获取.session.lock,Harness 的普通会话 runtime identity 也仍固定该文件。两条依赖在删除旧目录的同一变更中必须分别接到实际新实现,不能只替换导入后漏掉运行时绑定。建议在已安装 wheel 的跨进程用例中覆盖双向竞争和释放后重获:Harness 持锁时 Apps 不读快照,Apps 持锁时 Harness 不启动新工作;Windows 与 POSIX 均验证。锁争用判定与 #494 的异常映射分别断言。原会话计划不改写;新 wheel 拒绝旧普通 session、旧 runtime 可恢复的记录要使用这次移除 artifacts 的真实版本对,不沿用 Slice 2 对。当前仅静态核对依赖和既有规则,未运行或查 CI。
Follow the host-move to apps/host/platforms