Repository navigation
Conversation
Dong1017
left a comment
There was a problem hiding this comment.
Independent source review of head 56a40049148ced7bb80e60249a8f5df40d5c1587, against API base / observed main f93df0548a26714f6514337a8525c7c14108acad. Requesting changes for three current execution-contract defects, detailed inline: protected read/environment exposure, claim persistence after execution, and incomplete absolute-deadline enforcement.
I traced prepare/submit/serve, lane-budget transitions, confinement, leases, the CLI and all added tests against the existing architecture and #249 discussion. The attempt-scoped digest and permanently retained reservation charge are useful; they do not clear the inline execution-boundary findings. The Draft/partial-delivery description is appropriately explicit. Existing M0–M2 assignment/scope acceptance remains a maintainer decision, separate from this code review.
Verification was source and existing hosted-status inspection only. I did not execute this branch, tests, namespaces, models, devices or a paid workflow. Current hosted evidence contains the declaration check; no Ready full-check/installed-package result was observed for this head. Fixture results and author-reported tests do not qualify OS confinement or a campaign outcome. Next for the existing author @NumberWan: fix the three boundaries and supply the corresponding targeted evidence, preserving unknown/failed execution states and the Draft scope. No pilot, device use, incumbent advance, merge or Issue closure is authorized by this review.
Dong1017
left a comment
There was a problem hiding this comment.
Incremental review of the existing Draft head 56a40049: one previously unraised file-deletion handling gap in the offline submit path (inline). Existing confinement, execution-claim, and deadline findings remain in their original threads; this review does not repeat or resolve them. Scope: static inspection of parallel_round.py, its caller and fixture tests against #249; no tests, namespace checks, model calls, or device experiments were run. This is not approval or M0–M2 acceptance.
Dong1017
left a comment
There was a problem hiding this comment.
One additional blocking file-boundary finding at 56a40049: submission can copy a coordinator-readable external file through a lane-controlled symlink. This intake path is distinct from the existing candidate-execution confinement finding and must be closed before accepting untrusted lane submissions.
Verified with a disposable synthetic external canary and the exact pinned function bodies; no real private file or candidate command was accessed/executed. Existing findings remain in their threads; no duplicate findings or broader feature requirements are added.
Verification boundary
Function-level reproduction used AST-extracted prepare/submit and necessary helpers/artifact functions, standard library only, with a sanitized environment. Allowed path knobs/a.txt was replaced by a symlink to a synthetic sibling file outside work. Result: submitted=true, outside=[], source_is_symlink=true, outbox_is_regular_copy=true, copied_external_canary=true. This is not a full CLI or OS-confinement qualification; no model/hardware/network execution or repository modification occurred.
|
Addressed the five findings on 56a4004 in 9b4b08b.
Still out of scope: OS confinement on this host (user namespaces are unavailable, so the default backend fails closed), M3, incumbent advance, and shared drivers. |
Dong1017
left a comment
There was a problem hiding this comment.
Incremental static review of head 9b4b08b9 following the author's five targeted fixes: one newly identified expected-failure reporting gap in the unshare backend (inline). Existing confinement, deadline, claim and symlink findings remain on their original threads; this does not repeat, dismiss or approve them. I inspected the new confinement.py, parallel_round.py, CLI caller and available fixture tests; no real namespace, test, model or device run was performed. This is not an M0–M2 acceptance or launch authorization.
Dong1017
left a comment
There was a problem hiding this comment.
Changes requested at 9b4b08b9: the new filesystem view still lacks the runtime files needed to start a dynamically linked Python command.
- One new P2 startup defect is detailed inline. It affects the real namespace backend on an otherwise namespace-capable Linux host.
- The existing deadline follow-up and timeout-receipt finding remain applicable; this review does not repeat them.
- The persisted pre-launch claim and explicit deletion refusal improve the earlier paths. They do not establish native confinement qualification or complete the parent task. Next action remains with @NumberWan: repair the current blockers and provide bounded software evidence.
Evidence and scope
Reviewed head: 9b4b08b9f7b4bde0f18d6e3db80d8e47cf059539; API base: f93df0548a26714f6514337a8525c7c14108acad; assessed main: 919ed42c0d01dc0aa3b613085b9041d735d2d4db.
Inspected the six-file repair delta, current prepare/submit/serve and CLI consumers, runtime-root/mount/exec paths, and relevant fixture tests against the existing execution contract. Current per-head evidence contains successful declaration checks; no Ready full-check or installed-package success was observed. Verification was source and existing hosted evidence only: no repository tests, namespaces, model/device runs or paid evaluation were executed. This review did not implement the PR and grants no launch, merge or goal-acceptance authorization.
|
Addressed the three findings on 9b4b08b in fc9d232.
Still out of scope: OS-confinement qualification on this host, M3, incumbent advance, and shared drivers. |
There was a problem hiding this comment.
Reviewed commit: fc9d232
Coverage: Snapshot: 2221 files, 35993584 bytes; skipped 0 entries; Initial model context: 22 files; other accepted files available through tools; Git workspace contains a fixed snapshot, not full upstream history
| assert "SECRET_CANARY" not in plan["env"] | ||
|
|
||
|
|
||
| @pytest.mark.skipif(not namespaces_available(), reason="user namespaces are unavailable") |
There was a problem hiding this comment.
F2 — high, must-fix, test gating — the live namespace smoke fails instead of skipping when unprivileged user namespaces are blocked
- Where:
tests/test_confinement.py:135 - Problem: the guard only reads
/proc/sys/user/max_user_namespaces. When that value is positive but namespace creation is denied, the test runs and errors:UnshareBackend().run→ConfinementUnavailable: unshare: unshare failed: Operation not permitted. Executed in this container:PYTHONPATH=src python -m pytest tests/test_round_budget.py tests/test_confinement.py tests/test_parallel_round.py→1 failed, 23 passed, the failure beingtest_unshare_starts_python_and_hides_a_private_canary. Heremax_user_namespaces= 498239 andkernel.apparmor_restrict_unprivileged_userns= 1, whileunshare --user truereturns EPERM. - Conditions: unprivileged containers (default seccomp profiles) and AppArmor-restricted unprivileged-userns hosts, which is the default on Ubuntu 24.04+ and therefore on common GitHub-hosted runners. This is unrelated to whether the host has namespaces at all.
- Impact: the repository's full
pytest(ready and nightly lanes) goes red on such hosts, and the PR's statement that the smoke "skips where user namespaces are unavailable" is wrong, so this test cannot serve as the confinement qualification evidence it claims to be. - Fix: probe the syscall rather than the sysctl, e.g.
subprocess.run(["unshare", "--user", "true"], ...)and skip on a non-zero return, or wrapUnshareBackend().run(...)intry/except ConfinementUnavailableandpytest.skip(str(exc)).
There was a problem hiding this comment.
已在 cf22cb50 处理:namespaces_available() 除了读 max_user_namespaces,还实际执行一次 unshare --user --map-root-user --mount -- true,失败、超时或找不到程序都视为不可用,现场测试改为跳过。测试:test_blocked_unshare_reports_namespaces_unavailable。
|
This PR adds the offline parallel-round coordinator (prepare/submit/serve/status), lane attempt budgets, a fail-closed confinement backend and its tests. Two blocking defects: the Reviewed commit: fc9d232 |
|
Review at head
|
|
Coverage review at head
Reviewed commit range: |
|
Dong1017 在
|
|
增量 review: 已核对、确认修好的:
还需要处理的:
小问题(不阻塞): |
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Reviewed base f93df0548a26714f6514337a8525c7c14108acad and head cf22cb50f243b17227863f8e79f601b25faf5480 (full diff; no previous head was seeded). Two execution-contract blockers remain. I will re-read after the author pushes.
Blockers
-
P1 — The unshare supervisor cannot import
enter_namespaceon the layout this PR tests.UnshareBackend.run(src/inferrsi/infra/confinement.py:330) startssys.executable -c "from inferrsi.infra.confinement import enter_namespace"withenv=minimal_environment()(:346). The allowlist (:20) is onlyPATH,LANG,LC_ALL,LC_CTYPE,TZ, andPYTHONIOENCODING.PYTHONPATHis omitted, andcwdis the candidate tree, so the childsys.pathdoes not include the checkout that holdssrc/inferrsi. When that is the only way to importinferrsi, the child exits withModuleNotFoundErrorbeforeenter_namespace. Any non-zero status is raised asConfinementUnavailable(:358), andserve_ticketrecordsunsettledwithout running build or either trial.tools/parallel_round.pyserve usesselect_backend(), so a namespace-capable host takes this path.test_serve_cli_runs_without_a_caller_supplied_clocksetsPYTHONPATH=srcand acceptsunsettled, so it stays green when the jail never starts. Expected correction: put only the directory that contains theinferrsipackage (derived from this module's__file__) on the supervisor environment. Keep the candidateexecvpeenvironment on the allowlist. Add a test that the supervisor environment can importinferrsiand still omits secrets such asSECRET_CANARY. -
P2 — Restart does not treat an existing ledger row for this ticket as the same attempt.
_claimed_entry(src/inferrsi/harness/parallel_round.py:343) matches onlyphase == "claimed". Otherwiseserve_ticketalways callsadmit_attempt, which mintsordinal = len(entries)+1(:431).- Trigger A:
_save_ledgerpersistsreserved(:434) before_materialize(:437) and beforeclaimedis saved (:444).copytree/copy2raising, or a stop in that window, leaves no receipt. The next serve allocates another attempt. When the new charge exceedscap, the ticket is recordedrejectedfor budget exhaustion and never launches. When the cap has room, the same ticket runs under a second permanent charge while the first row staysreserved. - Trigger B:
_save_ledgeroffinished(:464) happens before_recordwritesresults/<ticket>.json(:465). A stop in that window has noclaimedrow, so the next serve launches build, candidate, and incumbent again.
Expected correction: a persistedrun_idending in@ticketis that attempt. Resumereservedwithout a new charge. Forclaimedorfinished, write a terminal receipt and do not launch.
- Trigger A:
Closed on this head (source inspection)
- Submit refuses symlinks via a no-follow walk, and refuses an in-glob deletion instead of hashing a missing path.
serve_ticketdrops the caller'snowand re-readsclockordatetime.now(timezone.utc)for admission and each stage. Submit checksdeadline_utc. A stageTimeoutExpiredbecomes anunsettledreceipt.claimedis saved before_launch. A laterclaimedrow with no receipt is recordedunsettledand is not launched again. Thereservedandfinishedwindows above are what remains of that contract.- The namespace plan is built from the writable set, the readable set,
runtime_roots(), andruntime_files()(PT_INTERP,lddlibraries, and/etc/ld.so.cache). Source/is refused. The coordinator environment is reduced to the allowlist.namespaces_available()probesunshare, and the live test is skipped when that probe fails. nowis optional onserve_ticket, so the CLI serve call matches the signature. A completed trial with an unreadable latency file becomesunsettled.
Follow-ups (non-blocking)
- Each stage still uses
min(seconds_remaining(...), 30)(parallel_round.py:357), so a stage stops at 30s while the lane deadline still has time left. - A symlink present at scan time is rejected.
_scanand_read_nofollowdo notfstatthe opened fd and do not open withO_NONBLOCK, so a regular file replaced by a FIFO afterstatcan block the coordinator inos.read.
Verification
Static read of parallel_round.py, round_budget.py, confinement.py, device_lease.py, tools/parallel_round.py, and the new tests, checked against the earlier threads on #268. Not verified here: pytest, unshare, namespaces, models, devices, or a paid workflow. Loader mounts and OS confinement are not qualified by this pass. Synthetic latency in this harness is not a campaign result. M0–M2 scope acceptance stays with the maintainer.
Dong-bot will re-read after the author pushes.
|
|
|
增量 review: 这次改动,已核对
这次新发现的问题
上次的问题,还没处理 以上是静态 review(diff 加 head 上的相关代码),我没有在本地跑测试。 |
|
回复 @amy-why-3459 的增量 review,新 head
本地: |
|
增量 review: 已解决,已核对
仍未关闭 以上是静态 review(diff 加 head 上的相关代码),我没有在本地跑测试。这次是校验和文档改动,不涉及精度和性能对比。 Reviewed: |
_kill_group signals a recorded namespace PID 1 only if /proc still shows the same start time and it is not a zombie, so a recycled pid is left alone. _proc_stat returns None for a short /proc read instead of raising before the kill. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
serve no longer has its own ABBA loop. After the confined build, a ticket is measured by run_experiment with a confined execute, and evaluate gives the verdict, as issue InferMatrixLab#249 asks (reuse run_experiment, evaluate and qualify_devices; no second runner). - The trial adapter keeps the lane deadline, command timeout, device view and read-only repository; an unreaped command still quarantines the held devices. - The receipt carries verdict, improvement_pct, reasons, medians, samples and run_dir; a ticket without a complete metric set stays unsettled. - Optional plan fields: validation (run once on the candidate), metric.min_improvement_pct (default 0), and device_model, which runs qualify_devices on the held devices before an attempt is reserved and leaves the ticket queued when the check fails. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
Add close that overlays PASS-lane outboxes in lane_id order, measures the joint candidate once with run_experiment, and writes successor/ only on PASS. This is an intentional MVP, not InferMatrixLab#249 stepwise composition. Also stop host git on candidates after a writable build (_tree_identity) and map ConfinementUnavailable during validation to unsettled instead of measured FAIL, matching the review blockers on 026f686. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
After rebasing onto main, RunSpec lives in inferrsi.contracts and run_experiment requires assess/report ports. Wire the v0 gates from benchmark.legacy_run_v0 and keep report as a no-op; measurement still reads evaluation.json. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
Move parallel-round assess composition into apps so harness stays clear of benchmark imports. Reject protected and cross-lane paths on concrete submit, and mount the versioned stdlib for UnshareBackend under a venv. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
System interpreters use prefix=/usr; filter that broad root for all candidates and keep versioned stdlib plus the executable directory. Cover both the active interpreter and a /usr/bin/python3 subprocess. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
R2 left harness -> model/infra at zero hits. This slice was still importing infra and model from the harness coordinator, which the rebased gate reports as 9 hits. Move the slice's own confinement and lease modules into harness, and call device qualification from apps. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
The coordinator now uses harness digest and lease helpers. Apps supplies device qualification, so the rebased import gate stays at zero hits. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
07817ac to
6be668c
Compare
|
@Dong1017 rebase 已在
|
zengchuang-hw
left a comment
There was a problem hiding this comment.
Incremental review — DO NOT PASS (acceptance/evidence incomplete; COMMENT)
Reviewed head 6be668cdb6b2507a1f9cc5d2353b4014b56a5ac9, base 76ca44a8b77553b2cb7f08b9f861399a72736fe2, under zengchuang-hw's standing review authorization. This is an independent, non-voting COMMENT, not merge authorization.
Review-history correction: my immediately preceding comment incorrectly said I found no earlier own reviews. A larger review listing now recovered 5935413248 and 5938819778. Those record actual live namespace checks on old head 07817ac6: Python 3.12 venv selection 91 passed/1 skipped/43 subtests, and system Python 3.13 confinement 20 passed/1 skipped. The skips were GPU/torch. Preserve that existing evidence; the old fork run and current CI skips were not the entire evidence set. I did not rerun those tests in this pass.
Actual incremental source assessment: the histories diverge because of the base update, so I compared the PR files directly from 07817ac6 to this head instead of treating unrelated main commits as new PR work. Confinement moves Infra → Harness with its supervisor import updated; device_lease moves byte-identically; round_budget is unchanged. Apps now supplies qualify_devices to both serve and close. Harness replaces its Infra JSON writer/Model metric reader dependencies with local implementations; the inspected JSON serialization and finite-positive metric/error semantics match the source helpers. CLI and test imports follow the move. AGENTS and review guidance are unchanged. I found no new functional defect in this bounded static migration check; that is not an exhaustive security/concurrency audit or executed import validation.
Original acceptance gap remains: current close_round still composes the selected PASS overlays together and performs one joint remeasurement before writing a successor. It does not implement #249's original per-addition fresh-checkout stepwise composition. The previous reviews' resolved scope/protected-path and broad-root findings are not being reopened. A verified accepted delivery slice that excludes the remaining original requirements, or implementation/evidence satisfying them, is still needed before whole-PR approval; a synchronization/rebase or another participant's acceptance assertion does not supply that authorization.
Current-head checks: ready run 44275539459 is action_required, with no jobs returned. The current check-run lookup has one successful declarations check and the knowledge-model-policy status is success. This does not establish current-head pytest/lint/package/live namespace results. Prior-head execution is historical evidence; the changed package path, supervisor import, dependency injection and updated base need applicable validation before being called tested. No host security changes or hardware execution are authorized by this review.
Only original requirements, actual source, own review records and primary CI metadata were used. No repository code/tests were executed, and no other reviewers' opinions were read. No approval, merge, closure or acceptance reduction is made.
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Reviewed base 76ca44a8b77553b2cb7f08b9f861399a72736fe2 and head 6be668cdb6b2507a1f9cc5d2353b4014b56a5ac9 (the rebased tip after #478/R2). This does not alter scope, and it does not reopen the bounded-slice acceptance already recorded: joint single-rerun close is accepted as the offline slice for #268. That is not #249 M0–M2 acceptance.
I can't approve this head yet. There is no diff for the rebase and the import-gate refactor, and CI hasn't run on it. This is not a code defect I found.
What blocks the Approve
- No reviewable evidence for the rebase and the 9-import removal. The review had no diff of
main..6be668cdor of theharness/parallel_round.pyimport changes. The author says confinement and device lease stay in harness, digest/metric no longer import model, andqualify_devicesis injected from apps. I can't confirm any of that from the seeded material. A formal Approve needs a read of that change. I did not run the tests. - Ready / full-check hasn't run on this head. Run 44275539459 is
action_requiredat6be668cd. The earlier green run belongs to07817ac6and doesn't carry over. This is the same mechanical gate as before. It needs a maintainer to approve the fork workflow, which the author's token can't do. - Import-gate claims are author-reported only. The author says
harness_model_infra == ()and thattest_clean_scan_is_not_isolationandtest_knowledge_closure_is_clean_and_the_final_tree_is_isolatedpass. Please confirm via the CI run above. I did not execute them.
Review state
- No formal APPROVED review exists on
6be668cd. The only active Request changes iscursor[bot]on026f686d(review 5931222199). - Its two blockers were host
gitreading a writable.git, and validationConfinementUnavailablerecorded as measured FAIL. The thread records both as fixed in2da25057. The regressions aretest_build_planted_git_hooks_do_not_run_on_the_hostandtest_validation_confinement_failure_stays_unsettled. I have not re-read those fixes on this head. - That Request changes should be dismissed as superseded by a maintainer. A comment doesn't clear it.
Next steps
- @NumberWan: no code change is requested from this review. Please make sure the rebase diff and the import refactor are inspectable on the PR.
- A maintainer needs to approve the fork Ready run for
6be668cd. - Once that is done, or once the diff is available, ping @Dong1017 again. I'll re-read the rebase and import-gate change and post a formal verdict. Merge still needs a green Ready/full-check and a second independent current-head
LGTM.
Not verified here: the rebase diff, any test run, CI on this head, GPU isolation, and real-namespace behaviour on this head. The PR body's limits still apply: namespace evidence comes only from fork 22.04 runs, and cross-round device coordination is not covered.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
|
@cursor please re-review head The only formal review still listed is your CHANGES_REQUESTED on Those two blockers on
On Please review this head and, if those two are closed, replace the old Request changes with a current verdict. |
|
Unable to authenticate your request. Please make sure to connect your GitHub account to Cursor. Go to Cursor |
|
这张 PR 先不做 #249 的 stepwise composition。不会每加一条 PASS lane 就从干净 checkout 再测一次。 这张 PR 的 正文已加上「本 PR 明确不做」一节,写的是同一句话。请按这个范围审 |
zengchuang-hw
left a comment
There was a problem hiding this comment.
Same-head evidence recheck — COMMENT
Explicit response to the new direct review request 6974788318, under zengchuang-hw's standing review authorization. Rechecked open PR head 6be668cdb6b2507a1f9cc5d2353b4014b56a5ac9, base 76ca44a8b77553b2cb7f08b9f861399a72736fe2, own review history, actual coordinator source and CI. No other reviewers' opinions or unverified scope-reduction claims were used.
Relative to my preceding review, there is no code revision; the coordinator blob is still 33e48daf663747c3e181fdc00692744ab138ea81. The bounded static migration assessment remains: no new functional defect identified, and earlier resolved findings stay resolved. This is not whole-PR approval.
The two remaining boundaries are unchanged:
- close_round performs one joint composition/remeasurement, not the original #249 per-addition stepwise sequence. I have not independently verified authorized acceptance of a narrower delivery slice. A proposed scope clarification alone cannot establish that acceptance.
- Current-head ready run remains
action_required; the current check-run listing now has two successful declarations records, not executed ready tests. The previously recovered live namespace results on07817ac6remain valid historical evidence, but have not been rerun or established equivalent across the package-path/dependency/base changes.
No new machine execution evidence was established in this pass. No repository code/tests were executed, no GPU or host-security action was taken, and no merge/closure occurred. The new request is answered by this head-bound COMMENT; approval remains unissued pending the accepted-scope and applicable-validation boundaries above.
|
@zengchuang-hw @Dong1017 Local focused test run on head Command (non-namespace scope only):
What this does not show: the namespace-isolated On scope: this PR is the offline parallel-round functional slice (joint single-rerun |
zengchuang-hw
left a comment
There was a problem hiding this comment.
Independent same-head follow-up — COMMENT
Explicit response to direct request 6975417866, under zengchuang-hw's standing review authorization. Rechecked head 6be668cdb6b2507a1f9cc5d2353b4014b56a5ac9, base 76ca44a8b77553b2cb7f08b9f861399a72736fe2, source and current CI against my preceding review.
There is no source delta: coordinator blob remains 33e48daf663747c3e181fdc00692744ab138ea81. The original #249 stepwise-composition requirement versus the implemented joint-single-rerun slice remains unresolved at the acceptance boundary; earlier resolved code findings remain resolved.
Current-head evidence has not changed in the sources I could independently verify: two successful declarations check records, and ready run 44275539459 still action_required. A reported local test outcome without an independently inspectable execution record has not been promoted here to verified current-head results. A useful next evidence item is a retained report/log bound to this head, test commands/node selection, interpreter/host configuration and explicit skips, especially the live namespace cases. Alternatively, applicable CI execution can supply that evidence. This does not authorize additional hardware work or security-setting changes.
The prior 07817ac6 live-test record remains historical evidence, not newly executed validation of this revision. No repository code/tests were executed by me; no other reviewers' opinions were used. Approval remains unissued pending applicable validation and an independently established accepted delivery scope. No merge or closure action was taken.
|
@david6666666 @zengchuang-hw @Dong1017 Correction first. My earlier comment on this PR said "158 passed". I could not reproduce that number. On the same head Evidence bound to Contents: exact command, environment,
This is not a substitute for the Ready/full-check on this head, which is still Scope question for @david6666666 (author of #249). This PR implements the offline slice of #249: Could you confirm whether you agree that this PR can merge as the joint single-rerun offline slice of #249? Stepwise composition and M0–M2 acceptance would stay open under #249. Please reply here or on #249. Without your agreement, the scope question stays open. Still open, separately from scope:
|
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
Incremental evidence review for the new direct request, anchored to head 6be668cdb6b2507a1f9cc5d2353b4014b56a5ac9. Since my preceding review, the commit range is unchanged head → same head. This result means the applicable validation gate is not yet satisfied; it does not mean that a test failed or that a new blocking code defect was found.
Actual code / scope. I independently rechecked the migration against 07817ac6f2c424687021f676dd3a18bbec425929: round-budget logic/tests and moved device-lease implementation are unchanged; confinement's supervisor import follows the Harness move; the Apps entry points supply the device qualification callback at both serve/close calls; local JSON/metric helpers preserve the corresponding behavior. No new blocking migration defect was identified. Earlier resolved code findings remain resolved. I correct my preceding scope assessment: delivery of the whole #249 vision, including a different stepwise-composition design, is not by itself a blocking requirement for this bounded offline parallel-round coordinator slice.
New retained evidence. I inspected the Gist at revision 7a71914dbb75a2783777ad496370bbf24679854c. All seven declared file hashes match SHA256SUMS. The recorded command covers round budget, confinement, parallel round, target-module import and knowledge compatibility tests. The recorded pytest result is 109 passed, 6 skipped, not 158 passed. Independent XML counting gives 115 testcase elements with six skips; the suite-level tests attribute says 158. Please reconcile that metadata before quoting a larger test count. Hash verification establishes internal consistency of the supplied artifacts, not independent execution or provenance attestation.
Before approval. The exact-head Ready run is still action_required; the current check-run listing contains two successful declarations records, not completed Ready validation. Complete the applicable required validation for this head. The new local record also skips the five live namespace cases covering Python startup, canary isolation, detached-child cleanup, PID-1 cleanup and device-node/fresh-proc binding. These exercise the confinement behavior delivered by this slice; fixture passes are not live validation of those paths. Supply a passing current-head record for those applicable paths, or an explicit, technically supported equivalence argument to the earlier execution evidence. I have not rerun repository code or changed host settings. The sixth skip is the CUDA/torch/device case: it remains a limitation on claims about that live CUDA path, not a demand for a whole-campaign or full-hardware-matrix run.
Non-blocking test cleanup. tests/test_confinement.py:195–219 still constructs the shadow fixture at inferrsi/infra/confinement.py, while the supervisor now imports inferrsi.harness.confinement. Update that fixture to target the moved module as well; the existing top-level shadow/path assertions still provide useful coverage.
Performed: source/diff and repository guidance inspection; artifact hashes, command, output and XML counts; exact-head CI and own-review deduplication. Not performed: repository code/test execution, live namespace/GPU verification or a production campaign. No merge, branch modification, workflow approval or security-setting change.
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
Code-finding addendum to my immediately preceding evidence review, for the same unchanged head 6be668cdb6b2507a1f9cc5d2353b4014b56a5ac9. Completion of the independent static pass identified the following concrete blocker. This corrects that review's statement that no blocking code defect had been identified; the artifact/CI observations and bounded-scope correction remain unchanged.
P2 — Preserve project manifest.json files rather than colliding with coordinator metadata. In submit, lines 427–445, a permitted changed root-level manifest.json is first copied into the ticket directory, then overwritten by the coordinator's own ticket metadata at exactly the same path. materialize, lines 498–509 subsequently copies that metadata as the candidate's project file. Separately, its copytree(..., ignore=ignore_patterns("manifest.json")) drops even unchanged project files with that basename at the root or any nested directory.
Thus a normal project containing such a file can be measured and promoted with missing or incorrect contents even when no symlink, forbidden path or overlapping lane is involved. This is directly within this PR's newly added directory-overlay behavior, not a request to deliver the whole linked Issue vision. It also existed in the previous review revision; it is not a newly introduced migration regression.
Before approval: separate ticket metadata from payload storage and preserve all legitimate incumbent files. Add regressions for (1) modifying a permitted root manifest.json, and (2) modifying an unrelated file while root and nested manifest.json files remain unchanged; verify materialized/successor bytes match the intended candidate. No repository code or tests were executed in this pass: the finding follows directly from the two write/copy paths above. No merge or branch modification was performed.
A project manifest.json was overwritten by the ticket record and then dropped when the candidate was materialized. Signed-off-by: NumberWan <wantszkin2003@gmail.com>
|
P2 from the manifest review is fixed on head Ticket metadata is no longer written inside the payload directory. Regressions: Evidence bound to this head (local, not CI): https://gist.github.com/NumberWan/709273c795daac53cfd82c473445f933
This does not replace Ready/full-check on |
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
The manifest-file defect is fixed in the inspected code; approval is still blocked by applicable current-head validation, not by a newly identified code defect. The exact-head Ready run remains action_required. The sole reported check run is successful declarations, not executed Ready tests.
Incremental range: 6be668cdb6b2507a1f9cc5d2353b4014b56a5ac9 → 29c5aa66b7d58497b255b03fcbd9787e27953988 (one commit; coordinator and its tests). This follows my concrete finding and evidence review. The remaining seven PR files and repository AGENTS are unchanged.
Resolved by static inspection: ticket metadata now lives beside the payload directory at outbox/<ticket>.json; submit, serve and materialize use the shared metadata-path helper. Materialization no longer excludes legitimate project manifest.json files. Close enumerates only ticket directories, so sidecar records do not become tickets; joint/successor materialization uses the corrected path. The two new regressions cover a modified root manifest and unchanged root/nested manifests, with the latter following fixture serve/close through successor byte assertions. These changes address the prior collision/data-loss finding. I read the tests but did not execute them.
Before approval: obtain successful applicable validation for this precise head, including execution of the new regressions. The previous head's retained record is historical, not a test run of this fix. The previously identified live namespace startup/isolation/cleanup/device-binding evidence gap also remains; provide applicable current-head results or a technically supported equivalence argument. This is not a demand for the entire linked Issue vision, a production campaign or a full hardware matrix. action_required means validation has not run, not that a runtime test failed.
Non-blocking: document that experimental round/outbox state created by the earlier in-directory metadata format must be recreated (or explicitly migrated); this first-introduced format change does not by itself establish a backward-compatibility blocker.
Performed: full revision delta inspection, metadata producer/consumer tracing, regression assertion inspection, unchanged-file/guidance checks and exact-head CI/own-review deduplication. Not performed: repository code/tests, namespace/GPU work or campaign execution. No merge, branch modification or workflow/security approval.
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 76ca44a8b77553b2cb7f08b9f861399a72736fe2 and head 29c5aa66b7d58497b255b03fcbd9787e27953988. This is a full-diff read of the offline #249 slice (prepare/submit/serve/status/close). It is not an incremental range, and I did not run any tests.
Manifest P2 (latest push) is fixed
submitnow writes ticket metadata tooutbox/<ticket>.jsonthrough_ticket_metadata_path, next to the payload directory. The payload directory holds only project files.materializecallsshutil.copytree(incumbent, destination)with no ignore list. It reads the overlay manifest from_ticket_metadata_path(overlay), so a root or nestedmanifest.jsonis an ordinary project file.serve_ticketandclose_roundread the same sidecar path.close_roundlists tickets withpath.is_dir(), so the.jsonsidecars are not counted as tickets._receiptsreadsresults/*.json, a separate directory, so there is no collision.test_changed_root_manifest_is_the_project_filecovers a changed rootmanifest.json.test_unchanged_manifest_files_reach_the_successorcovers an unchanged root and nestedmanifest.jsonreaching both the materialized tree andsuccessor/.
Earlier blockers still hold in this diff
- Host git /
.git: both_measureandclose_roundpasssnapshot=_tree_identity. It is a directory hash that skips.gitand never invokes hostgit.test_build_planted_git_hooks_do_not_run_on_the_hostcovers a planteddiff.external. - Validation infrastructure failure:
ConfinementUnavailablein_confined_trialmaps tostatus="error"or"timeout", not"failed". A non-emptyfailureslist keeps the receiptunsettledwith the ledger atclaimed.test_validation_confinement_failure_stays_unsettledcovers it. - Unreaped command:
UnreapedCommandis re-raised fromexecute._measureandclose_roundcallDeviceLease.quarantinebefore thefinallyreleases the leases.acquirerefuses a device with a marker. - Submit boundary:
submitrejects symlinks, in-scope deletions, protected hits on concrete new paths, and cross-lane overlaps before it creates the outbox directory. - Import gate (static read):
harness/parallel_round.pyimports onlycontracts,harness.*, and the standard library.harness/confinement.pyimports only the standard library. Benchmark and infra are bound inapps/parallel_round.pythroughmake_assessandqualify_devices. I did not runtest_clean_scan_is_not_isolation. Theharness_model_infra == ()result rests on the author's report and my read of the imports.
Scope
- I read
closeas the accepted joint single-rerun slice: it composes the PASS lanes inlane_idorder and measures them once. It is not #249 stepwise composition or M0–M2 acceptance. The PR body states this under "本 PR 明确不做".
Non-blocking follow-ups
close_roundwrites a finalclose.json(retained=true) on an infrastructure failure during the joint rerun (ConfinementUnavailable,BudgetError, orUnreapedCommand). Callingcloseagain then returns the cached result. Retrying needs an operator to deleteclose.json. Please document this, or returnqueued/unsettledwithout writingclose.jsonfor infrastructure failures.submitcreatesoutbox/<ticket>/before it writes the sidecar. A crash in between leaves a ticket directory that has no metadata. A laterservewould hitFileNotFoundError. Writing the sidecar atomically first, or cleaning up on failure, would close that._qualifymutatesos.environ["CUDA_VISIBLE_DEVICES"]. That is fine whileserveis single-process and serial. Please note that assumption in the docstring.
Not verified here
- I did not run tests. The author's local results are 111 passed and 6 skipped, with
max_user_namespaces=0. They are not CI. - I did not read
tools/parallel_round.py. It was not in the visible diff. - Ready/full-check is still
action_requiredon this head. A maintainer has to approve the fork workflow, and the earlier green runs do not carry over. - Real user-namespace evidence comes only from fork
ubuntu-22.04runs on earlier heads. Upstreamubuntu-latest(24.04) skips those tests under AppArmor. - GPU isolation (
test_unshare_gpu_trial_sees_only_the_held_deviceand a torch round) is unverified. - Cross-round device coordination is not covered.
- The PR body should keep stating these limits.
Remaining before merge (process gates, not code blockers)
- A green Ready/full-check on
29c5aa66. - A second independent current-head LGTM.
- A maintainer clearing or marking superseded the
cursor[bot]CHANGES_REQUESTED on026f686d(review 5931222199). Its two blockers are fixed in this diff, but this account cannot dismiss another reviewer's review.
(Dong-bot, authorized delegate for @Dong1017.)
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
Current-head local regression evidence is now available; the applicable Ready gate and live namespace evidence remain incomplete. Ready run 44444294741, bound to 29c5aa66b7d58497b255b03fcbd9787e27953988, is still action_required, not a completed test run.
This is an evidence-only update for request 6997809511, following my last review. Commit range: unchanged 29c5aa66b7d58497b255b03fcbd9787e27953988 → same head. The manifest collision fix remains resolved by the prior independent source inspection; this new evidence does not introduce a code change.
I inspected the new Gist at revision 8efb2a33c2368da17cc61c5e3c2d374bebac0ab5. All seven declared file hashes match. Its head record names this exact commit, and its recorded command covers the five targeted test modules. The output records 111 passed, 6 skipped, exit 0. Independently counting the XML gives 117 testcase elements, six skips and no failure/error elements. Both test_changed_root_manifest_is_the_project_file and test_unchanged_manifest_files_reach_the_successor are recorded as successful, so the previous absence of a retained current-head execution record for those regressions is addressed. The suite-level tests="160" value is not used as a pass count; its 43-count offset remains an artifact-format discrepancy, not a demonstrated code failure. The supplied ruff record reports success; I did not rerun it.
These are inspectable author-produced local artifacts, not an independently executed run or CI attestation. The same five live namespace tests remain explicitly skipped; the sixth skip is the CUDA/torch-dependent path. Thus the actual namespace startup/isolation/cleanup/device-binding boundary is not closed by the local fixture/regression successes. Before approval, complete applicable current-head Ready validation and provide the live-path evidence or a technically supported equivalence argument already requested. No whole-campaign or full-hardware-matrix requirement is added.
Performed: original evidence retrieval, hash and XML checks, exact-head/status and own-review verification. Not performed: repository code/tests, live namespace/GPU work, workflow approval, host-setting change or merge.
david6666666
left a comment
There was a problem hiding this comment.
Static review of the offline joint-rerun slice at 29c5aa66. Two round-consistency issues below. I did not rerun the tests.
| "shared_device_paths": list(shared_paths), | ||
| "runtime_paths": list(runtime_paths), | ||
| "env": dict(env), | ||
| "incumbent_id": spec["incumbent_id"], |
There was a problem hiding this comment.
Can we bind the frozen round to the incumbent bytes, not just the supplied incumbent_id? submit, serve and close each accept a fresh incumbent path without checking it against the prepared tree. If that checkout changes after preparation, a ticket can be measured or promoted against a different baseline under the same round digest. Please verify a frozen tree digest before using the incumbent (or reuse an immutable snapshot), and test an incumbent change between stages.
| ) -> dict: | ||
| """Copy in-glob changes to the outbox. The same manifest always returns the same ticket.""" | ||
| moment = now or datetime.now(timezone.utc) | ||
| plan = json.loads((round_dir / "round-plan.json").read_text(encoding="utf-8")) |
There was a problem hiding this comment.
Can we seal submissions before taking close’s outbox snapshot? submit only checks the lane deadline, so it can accept a new ticket after the round is closed or while the joint rerun is in flight. That ticket can get a PASS receipt, but later close calls replay the cached decision and never consider it. Please coordinate ticket publication with the close snapshot and test a submission interleaved with closing.
|
Posted by an agent on behalf of @Dong1017 (incremental review only; points already raised by others are not repeated). PR review verdict — DO NOT PASS Reviewed #268, base Blocking:
|
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
Current head 29c5aa66b7d58497b255b03fcbd9787e27953988. This supersedes my prior CI-based disposition: CI is not an approval condition. The manifest fix remains verified.
The shipped close path can combine alternative candidates from the same lane. submit accepts distinct tickets for the same lane, but close takes every PASS ticket. Materialization then overlays all of them, so one candidate can overwrite another or the successor can contain a combination that no lane submitted. Define and enforce one winning candidate per lane (or reject multiple candidates if they are unsupported), and add a regression with two PASS tickets from one lane. This applies to close shipped here; it does not demand #249's broader stepwise campaign. Static review only, no CI lookup, no local execution.
Refs #249
问题
当前 campaign 每轮只推进一个候选:从 incumbent 建一个隔离目录,改动一个声明的 plane,再与 incumbent 做 AB/BA 比较。多 Agent harness 想以集群方式在同一轮并行探索几个独立方向时,缺少以下保障:多个候选争用同一设备;工作目录不保证来自同一 incumbent;各自的改动范围可能互相覆盖;失败的尝试没有记在同一份账本里。
本 PR 明确不做
本 PR 先不做 #249 的 stepwise composition。不会在每叠上一条 PASS lane 之后,从干净 checkout 再测一次。
本 PR
close的目标就是 joint single-rerun:把这一轮所有verdict==PASS的 lane 按lane_id叠到同一个候选上,对 incumbent 只再测一次。联合结果为 PASS 则写successor/,否则保留原 incumbent。逐步逐条重测留在 #249,不在这张 PR 的合入范围里。本 PR 的行为
本 PR 是 #249 的一个离线切片,做一轮里的
prepare/submit/serve/status/close,以及测量命令所在的隔离环境。测量按 #249 的要求复用现有 harness 的run_experiment循环,以及 v0 判定门禁(benchmark.legacy_run_v0.evaluate)和qualify_devices,不另写 runner;本 PR 注入隔离版execute,并用目录摘要做源指纹(_tree_identity,不在 build 后对候选跑 hostgit/repository_identity,避免候选里被写入的diff.external在宿主机执行)。report端口为空操作,产物以evaluation.json/events.jsonl为准,不依赖report.html。这里的「集群」指同一轮里多个 Agent 各占一条 lane、从同一个 incumbent 并行改动,测量统一交给serve。入口是python tools/parallel_round.py,不往主 CLIinferrsi加子命令。prepare)。 计划列出可用设备device_ids,并声明要比较的指标metric(名称、better: lower或higher、每次测量重复几次repeats、判定 PASS 所需的最小改进min_improvement_pct,默认 0);可选的validation是在候选上跑一次的质量检查命令,可选的device_model要求测量前检查设备型号。每条 lane 声明 id、对应的搜索计划条目、唯一的 plane(harness / model / infra)、允许修改的路径 glob、每次测量要几张设备(device_count,默认 1)、attempt 上限和截止时间。以下计划会被拒绝:两条 lane 的 glob 重叠(包括同时匹配 incumbent 中的同一文件)、lane 覆盖 protected 路径、两条 lane 对应同一条目、所有 lane 的device_count加起来超过device_ids的项数。通过后写入round-plan.json,digest 覆盖校验后的计划正文。submit)。 只比较该 lane 允许修改的文件,把差异复制到 outbox,并返回 ticket。相同 manifest 总是返回相同 ticket。这一步不占设备,集群里的 Agent 不必等测量完成。符号链接、FIFO 和其他非常规文件在读取内容前拒绝;范围内的删除在计算哈希前拒绝;改到 lane 范围外的文件、命中 protected、与其他 lane 的具体路径重叠(含新建文件),或已过截止时间,都拒绝提交。serve)。 每次调用测量一个 ticket:一次取得该 lane 所需数量的空闲设备,取不齐就全部放回,不会只占一部分。同一条 lane 的 ticket 由 lane 锁依次测量,避免同时改写同一份账本。lane 锁被占用或设备不够(包括被隔离的设备)时,ticket 保持queued,不扣 attempt;计划写了device_model时,取得设备后先用qualify_devices检查型号、以及卡上有没有其他计算进程,不通过也保持queued(收据带reason),不扣 attempt;排队时已过截止时间则记为rejected。取得设备后才 reserve,账本先记为claimed,再执行第一条命令。build(可选)在候选上跑一次;之后由run_experiment测量:incumbent 与候选的trial按 AB/BA 交替各跑repeats次,有validation时在候选上跑一次,再由evaluate给出PASS/FAIL/INCONCLUSIVE。run_experiment的产物(events.jsonl、evaluation.json等)写在<round-dir>/runs/<ticket>/,收据记下verdict、improvement_pct、reasons、每次的值、中位数和run_dir。所有命令都在隔离环境中执行;隔离不可用时拒绝执行,不回退为普通子进程。截止时间每次读取当前时钟。任何一次 trial 没有得到有效指标(失败、超时、结果文件没有计划声明的指标、或指标不是正的有限数值)时,记录unsettled,账本保持claimed。status)。 返回 ticket 的收据;还没有收据时为queued。close,joint single-rerun MVP)。 要求每个 outbox ticket 都有终态收据,且没有unsettled。把verdict==PASS的 lane 按lane_id顺序叠到同一个候选上,再对 incumbent 做一次run_experiment。联合结果为PASS时写入successor/(accepted=true);否则保留原 incumbent(retained=true)。这不是 task: parallel optimization rounds with orthogonal lanes for multi-agent harnesses #249 的逐步 composition,也不是 Claude/Codex driver 或 SwarmFlow。serve中途被杀掉后再调用同一个 ticket:账本停在reserved时沿用同一次 attempt 继续,不另扣;停在claimed或finished但没有收据时记为unsettled,不再执行;停在cancelled时记为rejected。improvement_pct一律以正数表示候选更好。verdict沿用 v0evaluate的规则:没有validation时为INCONCLUSIVE(原因写在reasons)。源完整性用目录摘要,不要求 incumbent 是 git 仓。单票收据不推进 campaign;可选的close只在本 round 目录写下successor/或明确 retain,不是 #249 的逐步合入,也不串多轮、不改调用方工作区里的「现任」路径。测试中的指标是 fixture 输入,不是 campaign 结果。Agent 自报的数字和外部 harness 的投票不作为判定依据。没有集群与有集群的控制流
阶段名沿用 dashboard 的 agent stage(
diagnosis/knowledge/search/execution/validation/review,见docs/dashboard.md)。两张图只说明一轮内的工作如何调度,不是本 PR 的性能结果。没有集群时,一轮只有一个候选。候选测量完、决策完,下一轮才开始。
有集群时,决策 Agent 在
search一次选出几个互不重叠的改法,prepare把它们冻结成几条 lane。各 lane 的 Agent 只负责在自己的范围内改出候选,交给submit,不自己测量。每条 lane 的 validation 由serve在这条 lane 自己的设备上做,不同 lane 同时进行:各 lane 的设备需求加起来不超过总设备数,所以 L1 在设备 0 上测量时,L2 可以同时在设备 1、2 上测量,互不等待。测法由计划统一规定(同一条trial命令、同一个指标、同样repeats次 AB/BA、同一个判定门槛),lane Agent 不能自己选,这样各 lane 的收据才能互相比较。review仍由决策 Agent 读收据来做。蓝色是本 PR 实现的部分;lane Agent 本身(例如 Claude Code、Codex 或脚本)由调用方启动,本 PR 不内置。几条 lane 在同一台主机上同时测量时,会共用 CPU、PCIe 和内存带宽,延迟类指标的噪声可能变大。每条 lane 的候选与 incumbent 在同一组设备上交替测量,可以抵消大部分漂移,但抵消不了 lane 之间的干扰;本 PR 没有量化这部分影响。
repeats用来压住这类噪声。单个 ticket 的状态流转
flowchart TB prepareNode[prepare 冻结轮次计划] --> submitNode[submit 提交候选并返回 ticket] submitNode --> free{lane 锁和设备都拿到了?} free -->|否,未过截止时间| queued[queued 不扣 attempt] free -->|否,已过截止时间| rejectedQ[rejected 不扣 attempt] queued --> free free -->|是,且 device_model 检查通过| deadline{reserve 后仍在截止时间前?} deadline -->|否| rejected[rejected 取消本次预留] deadline -->|是| claimed[账本记为 claimed] claimed --> runNode[隔离执行 build,再由 run_experiment AB/BA 交替跑 trial] runNode --> readable{每次 trial 都有有效指标?} readable -->|否| unsettled[unsettled 账本保持 claimed] readable -->|是| measured[measured 记录 evaluate 的 verdict、improvement_pct、每次的值与中位数]全部 ticket 终态后可另调
close(上图未展开):只合 PASS → 联合再量一次 →successor/或 retain。CLI 用法:启用并行 Agent
入口和前提
python tools/parallel_round.py <子命令>(pip install -e .后用仓库内该脚本)。主 CLIinferrsi不增加子命令;Apps 入口已在main演进,本离线切片仍留在tools/,避免绑死公共 CLI。pip install -e .。unshare --user --map-root-user --mount --pid --kill-child true能成功)。不能时,测量一律记为unsettled,不会退回普通子进程。并行几个 Agent 由什么决定
没有「开几个 Agent」的开关。计划里有几条 lane,就可以同时跑几个 Agent,每条 lane 一个。lane 数受设备限制:
device_ids:这一轮可用的设备。device_count:这条 lane 每次测量要几张设备,默认 1。例如 TP=2 的 benchmark 写 2。所有 lane 的
device_count加起来不能超过device_ids的项数,否则prepare拒绝,也就是设备用满就不再加 lane。例如 3 张设备:L1 要 1 张、L2 要 2 张,这一轮就是这两条 lane。这样每条 lane 提交后都有自己的设备可用,不用排队;代价是 Agent 在改代码时,它的设备会闲置。最小例子:两个 Agent 并行跑一轮
1. 准备 incumbent 目录(被优化的项目,
bench.py是 benchmark):2. 写轮次计划
plan.json:两条 lane,各自只能改一个文件。{ "round_id": "r1", "incumbent_id": "demo", "device_ids": ["cpu-0", "cpu-1"], "metric": {"name": "latency_ms", "better": "lower", "repeats": 3}, "protected": ["bench.py"], "trial": ["/usr/bin/python3", "bench.py", "{result}"], "lanes": [ {"id": "L1", "entry": "D-01", "plane": "infra", "globs": ["knobs/batch.txt"], "cap": 1, "per_attempt_worst_case": 1, "deadline_utc": "2026-11-13T00:00:00+00:00"}, {"id": "L2", "entry": "D-02", "plane": "harness", "globs": ["knobs/threads.txt"], "cap": 1, "per_attempt_worst_case": 1, "deadline_utc": "2026-11-13T00:00:00+00:00"} ] }3. 冻结计划,两个 Agent 各在一份 incumbent 副本里改:
4. 各自提交,再同时测量:
serve返回queued时(设备被占用),稍后对同一个 ticket 再调用即可。收据写在round-r1/results/<ticket>.json,包括verdict、improvement_pct、每次的值、中位数、run_dir和用到的设备。close写入round-r1/close.json;若联合 PASS,另有round-r1/successor/。子命令一览
prepare--spec --incumbent --round-dirsubmit--round-dir --lane --incumbent --workserve--round-dir --ticket --incumbentstatus--round-dir --ticketclose--round-dir --incumbent计划字段
device_ids{device}(build/trial/env里都可用),例如1,2。metricbetter为lower或higher;repeats(默认 1)是候选和 incumbent 各跑几次,取中位数;min_improvement_pct(默认 0)是evaluate判 PASS 的最小改进百分比。trial{result}写入{"metrics": {"<metric.name>": <正数>}}。第一个元素建议写解释器的绝对路径。validation{device};不写时 verdict 为INCONCLUSIVE。device_modelL20X。写了就在测量前对取得的设备跑qualify_devices。build{device}。command_timeout_secondsdevice_pathsshared_device_paths/runtime_paths/envprotectedlanes[]id、对应搜索计划条目entry、唯一的plane、可改路径globs、每次测量的设备数device_count(默认 1)、attempt 上限cap、单次 attempt 预算per_attempt_worst_case、截止时间deadline_utc。GPU benchmark 要多写的字段
{ "device_ids": ["0", "1", "2"], "command_timeout_seconds": 1800, "device_paths": {"0": ["/dev/nvidia0"], "1": ["/dev/nvidia1"], "2": ["/dev/nvidia2"]}, "shared_device_paths": ["/dev/nvidiactl", "/dev/nvidia-uvm", "/dev/null", "/dev/urandom"], "runtime_paths": ["/lib/x86_64-linux-gnu"], "env": {"HOME": "/tmp"} }runtime_paths写驱动用户态库(libcuda.so)所在目录,可用ldconfig -p | grep libcuda查。目前的限制
close只做 joint single-rerun(PASS 合成一次再量),不做 task: parallel optimization rounds with orthogonal lanes for multi-agent harnesses #249 的逐步 composition,也不串多轮 campaign;lane Agent 由调用方启动,不在隔离环境里。只有 build / trial /(close 时的)联合 trial 在隔离环境里执行。/proc)已实现,但还没有在真实 GPU 上验证,见下方「验证与限制」。隔离边界
unshare --pid --kill-child),并在独立 session 中启动。命令超时时杀掉unshare所在的 session,并直接杀掉 namespace 的 PID 1(PID 1 可能已经setsid离开 session);等到进程组清空、PID 1 已退出或成为 zombie 才返回,之后才放回设备。杀掉 PID 1 会拆掉整个 PID namespace,所以命令setsid出去的子进程也一并结束。serve在还持有设备的时候写入<round-dir>/leases/<device>.quarantined(内容是 ticket 和原因),然后才放回设备;只放开文件锁不够,因为单次运行的serve进程退出时锁本来就会释放。之后任何经过DeviceLease.acquire的申请都会拒绝这张设备。unsettled,原因是namespace command outlived its deadline,devices列出被隔离的设备;ls <round-dir>/leases/*.quarantined列出所有被隔离的设备。nvidia-smi看不到进程)后删除该文件,设备即可再次分配。本 PR 不自动解除。queued,过了 lane 截止时间变成rejected,不扣 attempt。这是有意的:宁可不测,也不在可能还被占用的设备上测量。/proc,从不挂宿主的/proc。每次都有空的/tmp和/dev/shm。python -I启动,包路径由参数显式传入;候选目录和PYTHON*环境变量不进入sys.path,候选里放一个同名的inferrsi包也不会被导入。PATH、locale、TZ、PYTHONIOENCODING,以及计划里的env。max_user_namespaces为 0,或unshare实际被拒绝时,后端拒绝执行。namespaces_available会实际尝试一次unshare;在这类主机上,实机测试跳过而不是失败。claimed的 attempt 不退回。例子:AURA 上的集群搜索
下面的数字不是本 PR 的代码跑出来的。AURA 的搜索用的是另一份脚本,控制流相近:同一个 incumbent 分出多条 lane,每条只改一个参数,测量结果回到同一份记录。这里只用来说明集群能省多少墙钟时间。
min_chars15),约 4.6 小时跑完全部 7 代。两种方式用的 GPU 数量和接受规则不同,以上不是同等条件下的加速比。
验证与限制
6be668cd已 rebase 到main(76ca44a8)。import gate 在该 head 上本地重跑为harness_model_infra == ()(其后修复含 submit 边界、venv/系统 Python 的 runtime_roots、以及 apps 组装 assess),并适配inferrsi.contracts.RunSpec与新版run_experiment的assess/report端口。pytest tests/test_round_budget.py tests/test_confinement.py tests/test_parallel_round.py:rebase 后本机 focused 套件通过(含 close、目录指纹、validation 基础设施故障 →unsettled);本机没有可用的 user namespace,相关测试 skip。ruff check(本 PR 涉及文件)026f686d上的证据仍适用 confinement/lease 行为):fork run 43377269558,ubuntu-22.0453 passed,1 skipped(GPU)。ubuntu-24.04/上游ubuntu-latest因 AppArmor 会跳过 namespace 测试,真实 namespace 证据以 fork 22.04 为准。rebase 后若需可再跑一次探针。qualify_devices在 L20X 主机 GPU 0、1 上:型号匹配通过;故意填错型号时 ticket 保持queued、无账本。完整隔离测量因该机max_user_namespaces=0记unsettled。test_unshare_gpu_trial_sees_only_the_held_device与 torchprepare/submit/serve(及可选close)仍缺;需 Linux + NVIDIA + 可用 user namespace(原生 Windows 不可用)。close是否可作为 task: parallel optimization rounds with orthogonal lanes for multi-agent harnesses #249 的暂时收口实际 OS 隔离只在 GitHub 托管的 Ubuntu 22.04 + setup-python 3.11 上验证过,其他发行版或系统 Python 的加载器路径没有验证。