Repository navigation
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"}Projection check selection (not an executed result): {"reason":"No verified ancestor source pin for automatic command selection","status":"unavailable"}Provider/settings: Uncovered / unsupported paths (1886)
|
|
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.
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 holderwindows-latest.PermissionErrorinstead of the retryable busy-writer error, on unmodifiedmaintoo. This test asserts the contention, 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()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_specisNonefor both packages and every old module; neither directory is in the wheel; the new modules shipinstalled-packageon this PRChecks and dependencies
main4934165and the new one isa4af7e7:statusandrecoverwith exit 2, and all 15 session files stay byte-identical.completed_rounds1 and a single candidate run.harness/serving/server.pymakesstatusrefuse its own untouched plan.main4934165:a4af7e7had 15 candidate-only failures, all in tests that still assumed the removed packages: the synthetic Infra and Model trees in the Harness-edge tests, a leaf-importer fixture that kept an emptyinfra/, the old Flare CLI message, the manifest and not-retired controls, and the template README test.ed44f7ffixes them. The rerun is in the PR conversation.--no-lazy-fetch, and some tests needplaywright,nodeor network.first_wave_report()givesviolations == ()andblockers == (), andisolation_completeis true. Ruff 0.17.5 andgit diff --checkpass.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 written: refactor(apps): group application workflows in a workflows package #517 and fix(codex): include the missing listing icon and website in the release ZIP #512 came in, anda4af7e7merges them. The conflicts were import lines in tools and tests plus CHANGELOG, resolved by keeping theapps/workflowspaths and adding this PR's two renames.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