Repository navigation
refactor(apps): give Apps its artifact helpers and the provider modules, remove infra and model - #535
Conversation
…es, remove infra and model Slices 3b, 4 and 5 of the package cleanup. The last two packages outside the four cores and the two technical leaves are removed, with no forwarder or alias. Apps owns its file digests, file lock and JSON writes in apps/artifacts.py, with the same function source as the Harness and Benchmark copies; tests/test_artifact_helper_copies.py keeps the three equal. apps/delivery, the tools, the examples and the tests import it. A new test starts separate processes to show that a Harness holder and an Apps holder of the shared .session.lock exclude each other, on Windows (msvcrt) and POSIX (flock). The three Anthropic provider modules move to apps/integrations/anthropic with git mv. Only the two path-valued SOURCE constants change, so tools/ skill_eval_compare.py hashes the new files as controllers. The Messages worker still loads its adjacent request_guard.py by file location under python -I, and the installed-wheel check loads it that way from the wheel with no provider call. infra/ and model/ are deleted. The optimization session's runtime identity no longer hashes infra/artifacts.py, so a plan made before this change is refused before status or recover runs and is left unchanged. The gate retires both package names as a whole, and a package-directory guard allows exactly the six remaining directories and rejects a returning one, a new sibling and a missing one. CI no longer asserts the two directories exist, and the Windows host job compares the Harness copy with the Apps copy and runs the lock test. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
Main moved the Apps workflow modules into apps/workflows and gained the release-boundary recovery note. Conflicts were import lines in tools and tests and two CHANGELOG entries: every hunk keeps the workflows paths from main with this branch's apps.artifacts and apps.integrations.anthropic imports, and both CHANGELOG entries stay. The cold-import test blocks the new host and integrations packages in place of infra and model. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
The A/B run found 15 candidate-only failures, all in tests that still assumed the two packages. The synthetic Harness-edge tests build an Infra/Model tree and now switch the retirement rule off for that one concern, which test_target_module_import_gate.py covers; the leaf-importer tree no longer carries an empty infra package; the old Flare CLI test expects the missing parent package; the manifest test accepts the whole-package retirement; the not-retired control uses the modules that replaced the packages; and the template layout test no longer expects model and infra READMEs. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
Skill evaluationPLANNED: not executed; there are no task outcomes yet.
Author verification steps (nonpaid; not yet run)
Evidence and logs · Retention: 30 days. Plan bindings, budget, frozen exam and advisory detailsAdvisory: obtain missing evidenceRetained evidence availability: planned / unexecuted. No approval or merge authorization is issued.
Model/settings:
Automatic execution / cumulative PR budget: {"reason":"Trusted configuration or pricing missing, invalid or expired","remaining_usd":"unknown","reserved_or_unresolved_usd":"unknown","spent_or_legacy_usd":"unknown","state":"blocked"}Provider/settings: Uncovered / unsupported paths (107)
|
|
Evidence for head Two-runtime check with one untouched sessionSetup:
The old plan's runtime identity hashes steps.logChanged installed server bytes with an untouched plan. In a disposable venv of the new wheel, a session starts and drift.logA/B over 113 related test filesBaseline is
The 15 failures at ReproductionPut the two archives, their manifests and two_runtime_driver.pyimport json
import sys
from pathlib import Path
# Drive one optimization session through the installed inferrsi of this interpreter.
# The same driver runs under the pre-move and the new runtime, so only the runtime
# differs. Usage: two_runtime_driver.py <workdir> <command> [factor]
from inferrsi.apps.cli import main
from inferrsi.benchmark import registry
from inferrsi.harness import optimization_session
work, command = Path(sys.argv[1]), sys.argv[2]
library = work / "library"
session = work / "session"
registry._library_root = lambda: library
def write_task():
# The synthetic CPU task from tests/test_optimization_session.py::task.
task = library / "test-work"
task.mkdir(parents=True)
(library / "index.json").write_text(
json.dumps({"schema_version": 1, "packages": [task.name]}), encoding="utf-8")
(task / "TASK.md").write_text("Synthetic protocol control\n", encoding="utf-8")
(task / "baseline.py").write_text("FACTOR = 1\n", encoding="utf-8")
(task / "optimization.py").write_text(
"import json\n"
"def validate_arguments(args):\n assert not args\n return {}\n"
"def arguments(candidate, output, settings):\n"
" return [str(candidate), str(output)]\n"
"def assess(directory, settings, execution):\n"
" return json.loads((directory / 'measurement/result.json').read_text())\n",
encoding="utf-8")
(task / "benchmark.py").write_text(
"import json, runpy, sys\nfrom pathlib import Path\n"
"value = runpy.run_path(sys.argv[1])['FACTOR']\n"
"output = Path(sys.argv[2])\noutput.mkdir()\n"
"with Path('calls.log').open('a') as stream:\n stream.write(str(value) + '\\n')\n"
"status = 'completed' if value > 0 else 'candidate_failure'\n"
"result = {'status': status, 'verdict': 'PASS' if value > 0 else 'FAIL',\n"
" 'score': value if value > 0 else None}\n"
"(output / 'result.json').write_text(json.dumps(result))\n",
encoding="utf-8")
def run(argv):
try:
return main(argv)
except SystemExit as stopped:
return stopped.code
if command == "start":
write_task()
code = run(["benchmarks", "session", "start", "test-work", "--session", str(session),
"--rounds", "3", "--max-minutes", "5", "--evaluation-timeout-seconds", "15",
"--condition", "synthetic-current-agent", "--evaluation-args", ""])
elif command == "interrupted-round":
# As in test_recovery_collects_completed_execution_without_running_candidate_twice:
# the child finishes and leaves its receipt, then the coordinator is interrupted.
original = optimization_session._session_execute
def crash_after_execution(*args):
original(*args)
raise KeyboardInterrupt("coordinator interrupted after child completion")
optimization_session._session_execute = crash_after_execution
candidate = session / "work/candidate.py"
candidate.write_text(f"FACTOR = {sys.argv[3]}\n", encoding="utf-8")
try:
code = run(["benchmarks", "session", "round", "--session", str(session),
"--candidate", str(candidate), "--hypothesis", "two-runtime check"])
except KeyboardInterrupt as interrupted:
print(json.dumps({"interrupted": str(interrupted)}))
code = 130
elif command in ("status", "recover"):
code = run(["benchmarks", "session", command, "--session", str(session)])
else:
raise SystemExit(f"unknown command {command}")
sys.stdout.flush()
sys.exit(code)two_runtime.sh#!/usr/bin/env bash
# Two-runtime release-boundary check for #498 slice 2. One untouched session:
# the pre-move runtime starts it and leaves an interrupted round with its receipt, the
# new installed wheel must refuse it without changing any session file, and the
# pre-move runtime must then recover it from its receipts.
set -u
work=${WORK:?set WORK to a directory holding the inputs}
cd "$work"
rm -f steps.log
log() { echo "$*" >> steps.log; }
for side in old new; do
rm -rf "tree-$side" "venv-$side" "dist-$side" && mkdir "tree-$side" "dist-$side"
tar -xf "$side.tar" -C "tree-$side"
python3 -I verify.py "tree-$side" "MANIFEST-$side.json" > "verify-$side.json"; log "verify-$side=$?"
SETUPTOOLS_SCM_PRETEND_VERSION=0.1.0.dev0 python3 -m pip wheel --no-deps --no-build-isolation \
-w "dist-$side" "./tree-$side" > "build-$side.log" 2>&1; log "build-$side=$?"
python3 -m venv --without-pip "venv-$side"; log "venv-$side=$?"
python3 -m pip --python "venv-$side/bin/python" install --no-deps --no-index \
"dist-$side"/inferrsi-*.whl > "install-$side.log" 2>&1; log "install-$side=$?"
(cd dist-$side && sha256sum inferrsi-*.whl | sed "s/^/wheel-$side /") >> steps.log
"venv-$side/bin/python" -I -c "import inferrsi, pathlib; print('location-$side', pathlib.Path(inferrsi.__file__).parent)" >> steps.log
done
rm -rf run && mkdir run
step=0
run() {
local side=$1; shift; step=$((step + 1))
(cd "$work/run" && "$work/venv-$side/bin/python" -I "$work/two_runtime_driver.py" "$work/run" "$@" \
> "$work/out-$step-$side-$1.txt" 2> "$work/err-$step-$side-$1.txt")
log "step$step $side $* exit=$?"
}
manifest() { (cd "$work/run/session" && find . -type f -print0 | sort -z | xargs -0 sha256sum) > "$work/$1"; }
run old start
run old interrupted-round 2
manifest manifest-before-new.txt
run new status
run new recover
manifest manifest-after-new.txt
cmp -s manifest-before-new.txt manifest-after-new.txt; log "session-unchanged-by-new=$? files=$(wc -l < manifest-before-new.txt)"
grep -c '"infra/processes.py"' run/session/plan.json | sed 's/^/plan-names-infra-processes=/' >> steps.log
run old recover
run old status
log "calls.log=$(tr '\n' ',' < run/session/calls.log 2>/dev/null)"
log done
tar -czf results.tgz steps.log manifest-before-new.txt manifest-after-new.txt out-*.txt err-*.txtinstalled_drift.sh#!/usr/bin/env bash
# Installed-wheel drift check for #498 slice 2: the new wheel starts a session, then the
# installed harness/serving/server.py changes in a disposable venv. The untouched plan
# must be refused, and no session file may change.
set -u
work=${WORK:?set WORK to a directory holding the inputs}
cd "$work"
rm -f drift.log
log() { echo "$*" >> drift.log; }
rm -rf drift-venv && cp -a venv-new drift-venv
server=$(drift-venv/bin/python -I -c "import inferrsi.harness.serving.server as s; print(s.__file__)")
log "server=$server"
rm -rf drift && mkdir drift
step=0
run() {
step=$((step + 1))
(cd "$work/drift" && "$work/drift-venv/bin/python" -I "$work/two_runtime_driver.py" "$work/drift" "$@" \
> "$work/drift-out-$step-$1.txt" 2> "$work/drift-err-$step-$1.txt")
log "drift-step$step $* exit=$?"
}
manifest() { (cd "$work/drift/session" && find . -type f -print0 | sort -z | xargs -0 sha256sum) > "$work/$1"; }
run start
run status
manifest drift-manifest-before.txt
sha256sum "$server" | sed 's/^/server-before /' >> drift.log
printf '\n# changed canonical bytes\n' >> "$server"
sha256sum "$server" | sed 's/^/server-after /' >> drift.log
run status
manifest drift-manifest-after.txt
cmp -s drift-manifest-before.txt drift-manifest-after.txt; log "session-unchanged-by-drift=$? files=$(wc -l < drift-manifest-before.txt)"
log done
tar -czf drift-results.tgz drift.log drift-manifest-*.txt drift-out-*.txt drift-err-*.txtNot claimed:
|
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
初次独立检视 1b826b5f → ed44f7f9,按 #498 的 3b/4/5 切片核对。批准前需修三项:
tests/check_installed.py:822–823, 842, 848–854:删掉inferrsi.model/inferrsi.infra后,对子模块直接find_spec()会因父包不存在抛ModuleNotFoundError,先于下方受保护的 import 检查中止 wheel 验证。旧 Flare 命令也不再能保证报缺.validators,因为先缺父包。让负向检查接受预期的父包缺失,同时保留旧路径确实不可导入的断言。tests/test_session_lock_across_processes.py:23,135–145:目前从 checkout 导入,持锁时只测原始锁,释放后唯一实际 export 仍对不完整 fixture 预期失败。#498 3b 要求用已安装 wheel 和有效 session,让独立 Harness 进程持锁时实际 Apps progress export 被拒绝,释放后同一操作成功;#494 异常类型可以分开验收。- Slice 5 改变 session runtime identity。当前保留的恢复 fixtures 测的是更早的迁移,不含紧邻本切片的
infra/artifacts.pyidentity。请用原始固定计划覆盖升版后的 status/recover 均在分派前拒绝且不改写原计划。
组合时另留意 #528 也新增 apps/integrations/__init__.py,两份都是无导入 docstring;后落的一侧需统一该文件和共享检查,不把这项重叠当成本轮独立代码结论。已静态核对实际差异、#498 与测试定义;未运行 wheel、设备测试、合并演练或查询 CI。
There was a problem hiding this comment.
Independent third-party tip COMMENT (cursor[bot]; not Approve / not Request changes).
First cursor look at head ed44f7f901bd384aae1d6098780ab72299ea2e24 (Dong1017-authored #498 slices 3b/4/5). Merge state is DIRTY/CONFLICTING with main — rebase required before any formal vote.
I independently confirm zengchuang-hw tip NO PASS blockers are still open, including:
tests/check_installed.pyretired-path checks callfind_spec("inferrsi.model…")/find_spec("inferrsi.infra…")after parent packages are removed; missing parents raiseModuleNotFoundErrorbefore the protected import assertions / Flare CLI expectations can run.- Additional zeng items on wheel verification / Flare retired-path signaling remain author-owned.
No formal Approve while dirty + open NO PASS. Technical/third-party verify only (collaborator permission none) — not write+ eligible / dual tip / merge-ready under docs/agent-collaboration.md.
|
Independent review of
The import/move itself looks like the intended 3b/4/5 packaging change (no leftover production |
…al plan Review of the final package-cleanup slice found three gaps in the evidence. check_installed.py asserted a retired module by calling find_spec on a dotted name, which raises ModuleNotFoundError about the missing parent package instead of returning None. A helper now accepts both outcomes and requires the raised error to name the missing top part of the path, so an unrelated missing module still fails. The cross-process lock test used a bare lock file. A new probe builds a valid managed session, holds its .session.lock from a separate Harness process, and shows that the Apps export is refused and then publishes after release. The probe runs against the checkout in the test run and against the installed wheel in check_installed.py, which the ready lane, the Windows and macOS host job and the release job now start with the probe path. The runtime identity of main before this slice is pinned in a fixture. The new runtime refuses such a plan for status and recover before dispatch and leaves the plan bytes unchanged, as it does for the plan from before the serving move. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
Main added the Cannbot integration group, the P1 preparation port, the diagnosis gate and the source-build plugin version. Conflicts were the CHANGELOG, the architecture tree, one import line in the result-delivery test and the integrations initializer. Both CHANGELOG entries stay. The architecture tree keeps main's content and lists the Apps artifact file and the Anthropic integration under apps/. The initializer takes main's docstring, since the Cannbot change added the same file first. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
The A/B run on the merge with main found two candidate-only failures. The lock probe built its session without the bottleneck evidence that main now requires before any round, so it stopped at the first round. It records the evidence file next to the session root, the same input as the shared test support, which a wheel does not ship. The reverse-dependency test applied the old model/ rule, no Harness import, to every module under apps/integrations. Cannbot is Apps code and imports Harness records, so the rule now covers the Anthropic provider modules that came from model/. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
|
Independent review of The three previous blockers are addressed in this increment:
The merge unified One new blocker remains. On macOS the new wheel probe fails before it can observe lock contention.
Please materialize the session and export directories through a fully resolved, symlink-free path before calling |
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
增量检视 ed44f7f901bd384aae1d6098780ab72299ea2e24 → 4f6a277e1728a0752adfcd7fc92b184b74443f83(新 base 6bdc86ee),承接上轮。已修复旧子模块在父包缺失时的 find_spec 检查和 Flare 失败断言。轮子检查也已改用实际 Harness 独立进程和 Apps 导出,不再只测原始锁。
#498 尚有两项未覆盖:
- 3b 要的是已安装 wheel 对进行中的 session 做 progress export。
tests/session_lock_probe.py先执行final=True再取锁,验证的是终态导出。请保留一个合法但未 final 的 session,断言持锁时拒绝且不发布,释放后同一操作成功,读回export.kind == "progress"。不要求本 PR 同时修 #494 的异常映射。 - Slice 5 明确沿用 slice 2 的原始计划与 wheel 拒绝 fixture。新用例以当前 checkout 生成 plan,再替换
runtime_identity,并只用当前 checkout 验证。请保留紧邻迁移前的真实 plan 原始字节,交由新安装 wheel 验证status/recover在分派前拒绝且不改写;记录用固定旧 runtime 恢复该计划的路径。不要把合成旧 map 的单元测试当作这项兼容证据。
已静态核对 #498、安装检查、锁探针和恢复用例;未执行安装 wheel 或 Windows/POSIX 测试。
|
Pushed 1. 2. Lock test with a valid session and the installed wheel
#494 stays separate: the probe asserts that the export does not publish, not which exception Windows raises. 3. Pre-removal plan fixture #528 overlap Evidence
A/B over 223 test files, base
The 424 shared failures are environment failures on both sides (git 2.34 rejects Not yet run on |
|
Posted by an agent on behalf of @Dong1017 (incremental review only; items already raised by others or fixed by the author are not repeated). Incremental review of DO NOT PASS. Two items block on this head. The first is new: the required test job is red, and it finished after the previous review comment was posted. 1.
|
…ement switch Review of 4f6a277 found two gaps and CI found one. The lock probe ran the final round before taking the lock, so it showed a terminal export. It now leaves the session active: the Apps export is refused and publishes nothing while a Harness process holds the lock, and after release the same export publishes and reads back with export.kind progress. The runtime-identity case swapped a pinned map into a session built by the current checkout. The fixture is now a whole session that main 6bdc86e started with its own installed runtime, unedited, with its plan bytes as that runtime wrote them. The checkout test and the installed-wheel check copy it and show that status and recover both exit 2 with "Optimization runtime changed" and that no file of the session changes. The README records how it was made and how to resume such a session. test_each_trigger_alone_keeps_overall_false builds synthetic Infra and Model packages that the retirement rule now reports, so it switches that rule off like the two sibling tests. Full-check failed it on 4f6a277. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
|
Incremental review of Addressed in this increment:
Still blocking on this head:
Minor, not blocking: the knowledge declaration in the PR body still names What I checked: the commit diff, the probe and fixture contents, |
The macOS host job runs the probe in a temporary directory under /var, a symbolic link to /private/var. The Apps export refuses any path that crosses a link, so the probe's own work directory was rejected before the lock was tested. The probe resolves it first. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
|
Pushed 1. In-progress session, progress export ( 2. A pre-migration plan in its original bytes, checked by the installed wheel Checked by hand on H200 (CPU, Python 3.12): the 3. CI 4. macOS host job (advisory) on Local Windows run: ruff clean; |
|
Incremental review of
Still blocking: ruff on the new fixture. As before, please do not reformat these files, because What I checked: the commit diff and the exact-head check runs and logs. |
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
增量检视 4f6a277e1728a0752adfcd7fc92b184b74443f83 → a285e31964bce03413182c8776652c32aa9a148e,承接上轮检视。已确认 wheel 锁探针保留未结束的合法 session,持锁不发布,释放后读回 export.kind == "progress";探针也统一解析临时目录路径。合成 isolation 场景已局部关闭 retirement 规则,保留独立的退休模块负例。新旧 wheel 边界现在有真实旧计划作为新 wheel 的拒绝与字节不变测试输入。
批准前还有两项:
tests/fixtures/optimization-session/pre-infra-removal-session/frozen/benchmark.py:1的import json, runpy, sys不符合仓库启用的 Ruff E401;docs/contributing.md:14的ruff check src tests tools覆盖这里,pyproject.toml:66当前只排除 legacy fixture。请仅排除此冻结快照路径,不要重排原文件并更改计划固定的文件哈希。- #498 Slice 5 沿用同一份原始计划的旧 runtime 恢复验收。当前快照的
state.json:8–9为rounds: []、pending: null,没有执行回执;旧 wheel 能读该快照的 status,但这不验证同一份快照从回执恢复。请保留有已完成执行回执但尚未结算的旧 runtime 快照,或把可复核的 paired-wheel 验证绑定到同一份原始计划和回执;让新 wheel 拒绝且不改字节、旧 wheel 恢复且不重跑候选。
已静态核对实际差异、锁探针、冻结 fixture 和仓库 lint 配置;未运行测试、查询 CI 或执行设备验证。
The fixture is a whole session written by an older runtime, and its plan pins the SHA-256 of each file. Ruff reported three import-style errors in its frozen task files; fixing them would change the bytes and break the pinned plan, so the directory is excluded like the legacy fixtures. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
增量检视 a285e31964bce03413182c8776652c32aa9a148e → 73e19e00757aeca97c88a70f22d32578452f7e66,承接上轮检视。这次只改 pyproject.toml,精确排除了冻结会话目录;原始文件未改,lint 问题已解决。
批准前仍需补齐 #498 Slice 5 的同一会话恢复验证。当前 pre-infra-removal-session/state.json 仍是 rounds: []、pending: null 的启动快照。它能验证新 wheel 拒绝 status 和 recover 且保留原字节,但没有执行回执供固定旧 wheel 结算。请用同一份未改写的旧计划和待结算回执证明:新 wheel 拒绝且不改字节,旧 wheel 恢复且不重跑候选。也可以提供与这同一份计划和回执绑定的可复核验证。
已静态核对本轮实际 diff、冻结快照和恢复分支;未运行测试或查询 CI。
|
Incremental review of
Still open before I can approve: the Slice 5 recovery half (agreeing with zengchuang-hw's review on this head). #498 slice 5 asks for "the same fail-closed recovery note and fixture as in slice 2", and slice 2 requires that "under the pinned pre-move runtime, the same plan recovers from its receipts with its retained inputs". The committed Please either commit a pre-removal session taken after the child finished and before settlement (original bytes, What I checked: the commit diff, the fixture |
Review of a285e31 asked for the original plan of an old runtime together with its execution receipt, so the paired-wheel recovery is bound to the same files. The fixture is now a session that main 6bdc86e started and interrupted with its own installed runtime: its coordinator stopped after the candidate's child finished, so it holds a completed execution receipt for a round that is not settled, its calls.log shows one candidate run, and its plan names infra/artifacts.py. The checkout test and the installed-wheel check assert that receipt and the refusal of status and recover with no file changed. The README records the paired-wheel result on these same files: the new wheel exits 2 and changes nothing, the old wheel recovers from the receipt and calls.log stays at one run. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
增量检视 73e19e00757aeca97c88a70f22d32578452f7e66 → 19ea7abc34262206d4949810d1194b19dfa4845d,承接上轮意见。#498 Slice 5 上轮的最后一项已补齐:原始旧计划未改,冻结会话现在包含未结算的 pending round、退出码为 0 的已完成执行回执和计分结果,calls.log 只记一次候选运行。现有 checkout/新 wheel 用例继续在同一份快照上断言运行时拒绝和文件字节不变。README 的双 wheel 记录绑定该 14 文件快照,说明旧 wheel 用回执结算且没有重跑候选;静态树比对确认记录中的新 wheel 源码与当前头的 src/ 一致。
批准前必做:无。已独立静态核对差异、原始计划、回执、测试和源码树;双 wheel 运行结果是作者记录,本轮未重跑测试或查询 CI。
|
Pushed Ruff on the frozen fixture ( Same-session recovery (
Paired-wheel check on this same session (H200, CPU, Python 3.12; old wheel =
The paired-wheel run is by hand and needs both commits installed, so it is not a CI job. Local Windows run on |
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 6bdc86ee339c3007f15833434065adf893bff953 and head 19ea7abc34262206d4949810d1194b19dfa4845d. Incremental since my last comment on 73e19e00757aeca97c88a70f22d32578452f7e66 (one commit, test fixture, README and test only; src/ unchanged).
- Slice 5 recovery half resolved:
pre-infra-removal-session/state.jsonnow holds apendinground withrounds: [], the round directory has a completedexecution/execution.json(returncode0) andmeasurement/result.json, andcalls.logis2(one candidate run).plan.jsonis unchanged and still namesinfra/artifacts.py.test_a_session_planned_before_the_infra_removal_is_refused_and_left_unchangednow asserts that receipt state before checking thatstatus/recoverrefuse with every file byte-identical, and the installed-wheel check runs the same refusal on these files. - The fixture README records the paired-wheel run on this same 14-file snapshot (new wheel refuses with identical SHA-256, old
6bdc86eewheelrecoversettles from the receipt withcalls.logstill2) and how to redo it. That run is author-recorded on H200; I checked the files statically, not by rerunning both wheels. The old runtime'srecoverassesses from the round directory, so the absolute/tmp/pre/...paths kept in the original receipt don't need to be rewritten. - CI on this exact head is green:
lint-and-smoke,full-check(3.10/3.11, including pytest),installed-package(3.10/3.11), macOS/Windows host jobs,declarations,pr-references.
All blockers from my earlier comments (installed-wheel negative checks, cross-process progress export, pre-removal plan refusal, macOS symlink, ruff exclusion, receipt-backed recovery) are addressed.
Governing Issue and delivery slice
Refs #498
infra/andmodel/packages into their owning modules #498 as one PR, by the owner's decision (issuecomment-7002457678). The task: retire theinfra/andmodel/packages into their owning modules #498 body lists the checks each slice carries.apps/artifacts.pyholdssha256,digest,file_lock,write_jsonandatomic_write_json, with the same function source asharness/artifact_primitives.pyandbenchmark/artifacts.py.apps/delivery/, the tools, the examples and the tests import it.tests/test_artifact_helper_copies.pykeeps the three copies equal.apps/integrations/anthropic/:anthropic_agent.py,anthropic_edit_agent.pyandrequest_guard.pymove withgit mv. Only the two path-valuedSOURCEconstants change.tools/skill_eval_compare.pyhashes the new files as controllers.infra/andmodel/are deleted:infra/artifacts.py.apps,benchmark,contracts,harness,knowledgeandresources, and rejects a returninginfra/ormodel/, a new sibling package and a missing one.ci-merge.ymlstops asserting that the two directories exist, and the Windows job inci-ready.ymlcompares the Harness copy with the Apps copy and runs the new lock test.harness/scenarios/rename and the other directory-name cleanups (task: retire theinfra/andmodel/packages into their owning modules #498 body, "Out of scope").Knowledge authorship declaration
No path protected by
docs/knowledge-model-policy.mdchanges. The declaration below is disclosure only.Changed artifacts and evidence
apps/artifacts.py, equal to the formerinfra/artifacts.pyapart from its headertest_artifact_helper_copies.pycompares source, retry constants and written bytes across the three copies.session.lockregression (slice 3b)tests/test_session_lock_across_processes.pystarts a separate process for each holdertests/session_lock_probe.pybuilds a valid managed session that is still active (one round, no final), holds its.session.lockfrom a separate Harness process, and shows that the Appsexport_bundleis refused and publishes nothing while held; after release the same export publishes and reads back withexport.kind == "progress". The same probe runs fromtests/check_installed.pyagainst the installed wheel (ready lane, Windows and macOS host job, release job).PermissionErrorinstead of the retryable busy-writer error, on unmodifiedmaintoo. The probe asserts that the export does not publish, not that mapping.git mvof the three files; the only content change is the twoSOURCEvaluesanthropic_edit_agent.py.check_installed.pyloads the agent from the installed wheel underpython -I, finds the adjacentrequest_guard.py, and makes no provider call.infra/artifacts.pyleaves_runtime_identity()tests/fixtures/optimization-session/pre-infra-removal-session/is a whole session thatmain6bdc86eestarted and interrupted with its own installed runtime, unedited: it holds a completed execution receipt for an unsettled round,calls.logshows one candidate run, and itsplan.jsonnamesinfra/artifacts.py.test_a_session_planned_before_the_infra_removal_is_refused_and_left_unchangedcopies it, asserts the receipt, and shows thatstatusandrecoverboth exit 2 with "Optimization runtime changed" and that no file changes.tests/check_installed.pydoes the same with the installed wheel (INFERRSI_PRE_INFRA_SESSION). The fixture README records the paired-wheel result on these same files.test_package_root_inventory.pyinfra/ormodel/, a new sibling and a missing directory; a Git view that reports a new package before it is staged and ignores bytecodeRETIRED_MODULESis now the two package namestests/check_installed.pyfind_specreturnsNoneor raisesModuleNotFoundErrornaming the missing top part of the path, andimport_modulefails the same way; neither directory is in the wheel; the new modules shipinstalled-packageon this PRChecks and dependencies
main6bdc86eand the new one isc5051f8, the merge ofmaininto this branch. Later commits change only tests, so the runtime files are the same:mainnow requires, and is interrupted after a round's child completes, leaving its receipt.statusandrecoverwith exit 2, and all 15 session files stay byte-identical.calls.log.harness/serving/server.pymakesstatusrefuse its own untouched plan, and its 8 files stay unchanged.main6bdc86e, candidatec5051f8: 424 and 426 failed. The 2 candidate-only failures were in tests: the new lock probe had no bottleneck evidence before its first round, and the reverse-dependency test applied the oldmodel/rule, no Harness import, to Cannbot.4f6a277fixes both. Their H200 rerun was not run. CIfull-checkon the pushed head is the full-suite evidence for the fixes. The 424 shared failures are environment failures on both sides: H200's git 2.34 rejects--no-lazy-fetch, and some tests needplaywright,nodeor network.first_wave_report()givesviolations == ()andblockers == (), andisolation_completeis true. Ruff 0.14.10 passes on every file this PR changes. It reports 34 F811 hits in files this PR does not touch, which are identical onmain.19ea7ab: the lock tests, the pre-removal and pre-serving refusal tests andtest_first_wave_isolation_policy.pypass. The full set is too slow on this laptop and runs on H200.main6bdc86ee, new =c5051f8, the merge of that commit into this branch; later commits change only tests): the old wheel started the fixture session and was interrupted after the candidate's child completed (exit 130). On a copy, the new wheel exits 2 forstatusandrecover, and the SHA-256 of all 14 files is unchanged. On the same copy, the old wheel exits 0 forrecover, reportscompleted_rounds1, andcalls.logstays at one run, so recovery used the receipt and did not run the candidate again. The fixture's SHA-256 manifest matches the H200 files byte for byte.installed-packageon this PR runs. No provider call, NPU or GPU run: the provider modules change only their path constants.inferrsi.infraandinferrsi.modelpath fail withModuleNotFoundError, and pickles that name them no longer load.mainmoved while this PR was open.c5051f8merges6bdc86e, which includes refactor(apps): move Cannbot adapter into integrations #528: it also addsapps/integrations/__init__.py, a docstring-only file, so the merge takesmain's version and this PR adds no content to it. Conflicts were the CHANGELOG, the architecture tree and one import line in a test.Remaining work and Issue closure
infra/andmodel/packages into their owning modules #498 acceptance list still needs the independent review, and bug(contracts): scalar schema patterns accept a trailing newline #497 is closed by Anchor contract schema patterns at the end of input #514.Provenance
The code, tests and docs were written in a Claude Code session reported as
claude-opus-5-5, effortxhigh, confirmed by the owner. This is client and session attribution, not a backend attestation. Each commit has DCO sign-off and anAgent-assisted-byline.🤖 Generated with Claude Code