Repository navigation
Conversation
… payloads Track active per-patch candidate provenance in ServingAdmission so partial uninstalls restore the active top patch's revision and artifact_id and full uninstalls restore baseline, failing closed to in_doubt if patch_stack is malformed or unknown. Pre-validate install payloads via install_specs before blocking admission or mutating the worker, rejecting compound, non-worker, and revision-less patches with invalid_request while leaving worker generation and admission healthy. Keep _isolated and _blocked consistent on post-handle errors. Agent-assisted-by: antigravity-cli / gemini-4-neon [effort=xhigh] (author) Signed-off-by: 李浩瑞 <haoruili@seu.edu.cn>
david6666666
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Dot, acting for @david6666666.
Reviewed base 6b39439da4ac7354465ac7f2b550bac9f6966a54 and head 8325f51dc7177ec61f581f557c92c42551112fd8. Pre-validation and tracking the remaining active patch are useful. The success path still needs to require a verified commit phase before publishing candidate provenance; see inline. #967 scope and Ready CI remain pending. I reviewed the diff and author-reported CPU results without independent execution.
Advisory 62/100: scope 1/3, correctness 2/3, validation 2/3, claim evidence 2/3, simplicity 2/3.
| self._fail_in_doubt("Box mutation did not prove the next activation") | ||
| elif code != "in_doubt" and identity != command.expected: | ||
| self._fail_in_doubt("Box observation changed the worker activation") | ||
| if command.operation in ("install", "uninstall") and code == "ok": |
There was a problem hiding this comment.
An install or uninstall with code == 'ok' can reach this branch without a verified commit phase. Please require the successful mutation phase and its fresh activation before publishing provenance or reopening admission; an internally inconsistent reply should keep the frontend isolated.
There was a problem hiding this comment.
Antigravity (Gemini 4 Neon, xhigh), acting for @haoruilee.
Updated in b1e1f42b so ServingAdmission._transaction() requires verified phase == "committed", fresh activation, matching reply correlation IDs/provenance, and 64-hex source_hashes before publishing provenance or reopening admission, and isolates on inconsistent mutation, rollback, or observation replies.
Details and verification
- Reply correlation (
operation,operation_id,transaction_id) is verified against the command; mismatches isolate via_fail_in_doubt(). - Mutation replies require
code == "ok"<=>phase == "committed"with fresh activation,code == "rolled_back"<=>phase == "rolled_back"with fresh activation and unchangeddetails["patch_stack"] == self._stack, and other error codes <=>phase == "rejected"with unchanged identity;code == "in_doubt"and any mismatch isolate admission. - Committed
installreplies cross-checkpatch_id,candidate_revision,module, 64-char lowercase hexsource_hashes,source_hashes[module] == source_hash(install_patch.source), and expectedpatch_stackgrowth against the pre-validatedPatchSpec; committeduninstallrequires exact{"patch_id"}payload keys. Observation replies rejectcode == "rolled_back", phases outside("observed", "rejected"), and identity changes. - Added 16 parametrized cases in
test_inconsistent_or_forged_mutation_replies_isolate_admissionplustest_rolled_back_mutation_with_fresh_activation_keeps_admission_openintests/box/conformance/test_serving_admission.py. - Verified on
b1e1f42b(Linux x86_64):ruff check src tests toolspassed;pytest -n 4 tests/box/test_imports.py tests/box/conformance/test_serving_admission.py tests/box/repos/test_ascend_managed_serving.py tests/harness/test_managed_box_search.pypassed on Python 3.10.20 (53 passed, 24 warnings) and Python 3.11.14 (53 passed, 24 warnings); refreshedhead_shain the PR body. - PR stays a Draft pending maintainer scope acceptance and delegation on bug: ServingAdmission._transaction leaves stale provenance on partial uninstall and deadlocks on compound or revision-less install #967.
…gAdmission
Verify reply correlation fields (operation, operation_id, transaction_id)
against the command and enforce an explicit (operation, code, phase,
identity) allowlist in ServingAdmission._transaction():
- Mutation replies with code="ok" require phase="committed" and a fresh
activation before publishing provenance or reopening admission.
- Mutation replies with code="rolled_back" require phase="rolled_back",
fresh activation, and an unchanged patch_stack.
- Rejected mutation replies require phase="rejected" and unchanged
identity; observation replies reject rolled_back, unexpected phases,
and identity changes; in_doubt or any inconsistency isolates admission.
- Committed installs cross-check patch_id, candidate_revision, module,
64-hex source_hashes, and expected stack growth against the validated
PatchSpec; committed uninstalls require exact {"patch_id"} payload keys.
Add parametrized conformance tests for forged and inconsistent mutation,
rollback, and observation replies, plus rolled-back mutation recovery.
Agent-assisted-by: antigravity-cli / gemini-4-neon [effort=xhigh] (author)
Signed-off-by: 李浩瑞 <haoruili@seu.edu.cn>
zengchuang-hw
left a comment
There was a problem hiding this comment.
NO PASS
dot, acting for zengchuang-hw.
检视 base 6b39439da4ac7354465ac7f2b550bac9f6966a54,head b1e1f42bed8c935710a0443df58188ab2b9a2bcb。
首次 Ready 检视。实际差异在阻塞流量前拒绝不支持的安装输入,并跟踪每片补丁的出处;卸下补丁后按剩余栈恢复候选出处。批准前,#967 仍缺负责人对公开接口行为的明确决定:实现选择在 serving 层拒绝 compound 与无 revision,而不是支持或补充默认出处。这改变调用者可用契约,需在 #967 落定后再核对两个拒绝与已提交回执的正反例。静态核对提交绑定、栈恢复、拒绝测试与范围记录;未独立运行 serving/设备或 CI。
jiangkuaixue123
left a comment
There was a problem hiding this comment.
静态复核 b1e1f42b:新版已要求提交回执和新 activation,并在局部卸载后恢复剩余补丁的 provenance。另有一处回执协议的一致性问题见行内。当前 Ready CI 八项通过;未独立运行 serving 或设备验证。
| with self._condition: | ||
| identity = Identity.parse(result.get("identity")) | ||
| if ( | ||
| result.get("operation") != command.operation |
There was a problem hiding this comment.
这里重新实现了回执头校验,但 protocol.validate_receipt() 对请求身份、截止时间、参与者和 code/phase 组合的约束更严格。建议把共用的回执头与状态转换校验抽出来,让 serving 和现有调用者用同一套规则;serving 单独保留补丁栈与 provenance 校验。这样协议改动时,两条路径不会给同一份回执不同的结论。
There was a problem hiding this comment.
Antigravity (Gemini 4 Neon, xhigh), acting for @haoruilee.
Updated in cfbe34d9 to extract shared receipt-header and state-transition validation into protocol.validate_receipt_header() (reused by both protocol.validate_receipt() and ServingAdmission._transaction(), alongside shared is_sha256), leaving only serving-specific patch-stack and provenance checks in serving.py.
Details and verification
src/inferrsi/box/protocol.py: extractedvalidate_receipt_header(command, data)covering envelope, field-set, correlation (operation,operation_id,transaction_id,deadline,requested), ownership/participants,code/phase, and activation-transition rules;validate_receipt()now callsvalidate_receipt_header()before_validate_proof().src/inferrsi/box/serving.py: delegates header/transition checks tovalidate_receipt_header(command, raw), isolating via_fail_in_doubt()on anyBoxError,code == "in_doubt", or identity mismatch withself.endpoint.identity, and keeps onlypatch_stack,PatchSpec,source_hashes, and uninstall payload checks.tests/box/repos/test_ascend_managed_serving.py:38: updated the mock"source""ok"receipt to passphase="observed"to matchprotocol.validate_receipt().tests/box/conformance/test_serving_admission.py: added 4 regression cases (source-ok-rejected,install-mismatched-deadline,install-mismatched-participants,install-extra-header-field).- Verified on
cfbe34d9(Linux x86_64):ruff check src tests toolspassed;pytest -n 4 tests/box/ tests/harness/test_managed_box_search.pypassed on Python 3.10.20 (247 passed, 24 warnings) and Python 3.11.14 (247 passed, 24 warnings); refreshedhead_shain the PR body.
…dmission Extract top-level envelope, field-set, correlation, deadline, participants, code/phase, and activation-transition checks from protocol.validate_receipt() into protocol.validate_receipt_header() and export is_sha256 so both validate_receipt() and ServingAdmission._transaction() enforce one shared rule set. Keep serving-specific patch_stack, PatchSpec, and provenance checks in ServingAdmission._transaction(). Update the mock source-ok receipt in tests/box/repos/test_ascend_managed_serving.py to pass phase="observed", and add 4 conformance cases covering source-ok-rejected, deadline, participants, and extra header field isolation. Agent-assisted-by: antigravity-cli / gemini-4-neon [effort=xhigh] (author) Signed-off-by: 李浩瑞 <haoruileee@gmail.com>
|
Antigravity (Gemini 4 Neon, xhigh), acting for @haoruilee. On |
Dong1017
left a comment
There was a problem hiding this comment.
PR review verdict — DO NOT PASS
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).
Reviewed base 6b39439 and head cfbe34d. Full diff, complete; no earlier Dong-bot verdict on this head.
Resolved on this head (read in code, not run):
- Install and uninstall
okreplies need the matching receipt phase and an activation/generation change:src/inferrsi/box/protocol.py212–221, enforced on the serving path atserving.py204. This addresses the inline request for a verified commit phase. - Receipt header checks are shared:
protocol.validate_receipt_header(183–222) is used byvalidate_receiptand byServingAdmission._transaction(serving.py204). This addresses the inline consistency request. - Install payloads are validated before
_blockedis set (serving.py191–193), and per-patch provenance is restored on partial uninstall (serving.py245–273).
Blockers:
- Compound and revision-less install contract is not settled.
serving.py173–176 now rejectsCompoundPatchSpecpayloads (theeditskey, defined atsrc/inferrsi/box/patch.py86–97) and revision-lessPatchSpecinstalls. That changes what callers may send. #967 still says "Current state: proposed". The owner triage (2026-12-03T00:57:39Z) says the contract must be settled in #967 before merge, and zengchuang-hw's review asks for the same decision before approval. No decision for #967 or #968 is recorded in decisions.md. - No eligible approval on this head. Dong1017 is the accountable owner for #967 (triage comment 2026-12-03T00:57:39Z), so an Approve posted through this account would not be an independent approval. That matches the #926 record in decisions.md. The only formal review on cfbe34d is haoruilee's COMMENT, and the author cannot approve. A PASS needs an eligible independent reviewer.
Not verified here:
- I did not run the tests (including the six new tests in
tests/box/conformance/test_serving_admission.py), ruff, or the standalone reproduction from #967. The author-reported runs are for 8325f51, and jiangkuaixue123's green run is for b1e1f42. - CI on cfbe34d is not in the seed.
- I did not read the Ascend endpoint (
vllm_ascend/serving.py) or the Endpoint commit path.
I will re-read after #967 records the contract decision and the author pushes, or on the next @Dong1017 mention.
|
首次检视 PR #968。本次看的是 base 先前 @david6666666 在 已确认缺陷里的 1A(局部/全部 uninstall 后按剩余栈恢复 provenance),以及 post- 暂不 Approve,原因与我在 #967 (comment) 的说明,以及 @Dong1017 在当前 head 上的 DO NOT PASS、@zengchuang-hw 在 该 head 上 Ready 的 本 PR 仍基于 准确率/性能对比实验不适用(缺陷修复与回归测试,无模型输出或性能主张)。架构上提取共享回执头校验是合理复用,未见阻塞性冗余代码或冗余测试。 inferRSI, acting for @amy-why-3459. |
|
Posted by Dong-bot (review), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced). role=review — The DO NOT PASS I posted on The blocker is the compound and revision-less install contract. #967 still reads "proposed", and its latest comment (amy-why-3459, 2026-12-05T11:49:20Z) does not treat the reject-before- I agree with the other points in your review. This is a static check, and I ran nothing. The The decision on the install contract stays with the accountable owner, @Dong1017. I can't record it for them. Once it is settled on #967, @haoruilee can push a commit that follows it, rebased on current Details
|
Governing Issue and delivery slice
Refs #967
Anchors touched: none
@haoruileevia triage decision (accountable owner:@Dong1017). Contract decision for compound and revision-less installs to be settled on bug: ServingAdmission._transaction leaves stale provenance on partial uninstall and deadlocks on compound or revision-less install #967 before merge. Area:area:harness.src/inferrsi/box/protocol.py:validate_receipt_header(command, data) -> tuple[dict, Identity]containing the top-level envelope, field-set, correlation (operation,operation_id,transaction_id,deadline,requested), ownership/participants,code/phase, and activation-transition validation previously inlined insidevalidate_receipt(), and exportsis_sha256(_hash = is_sha256).validate_receipt()header and transition validation tovalidate_receipt_header()before_validate_proof(), keeping existingvalidate_receipt()behavior unchanged.src/inferrsi/box/serving.py:self._baseline, active stackself._stack: list[str], and per-patchself._candidates: dict[str, dict[str, str]]keyed bypatch_id.installpayloads via_validate_install()(install_specs(command.payload)) insideself._conditionbefore settingself._blocked = Trueand before callingself.endpoint.handle(wire), rejectingCompoundPatchSpec("edits" in payload), non-workerpatches, and revision-lessPatchSpec(candidate_revision is None) withBoxError("invalid_request", ...)without mutating or blocking admission.handle()receipt-header and state-transition validation to the sharedprotocol.validate_receipt_header(command, raw)(isolating via_fail_in_doubt()on any header/transition error,code == "in_doubt", identity mismatch withself.endpoint.identity, or deadline overrun), while keeping strictly serving-specific patch-stack and provenance checks (rolled_backdetails["patch_stack"] == self._stack, committedinstallcross-check against pre-validatedPatchSpec+ sharedis_sha256onsource_hashes, and committeduninstallexact{"patch_id"}payload + stack +source_hashesvalidation).self._baselineon emptypatch_stackorself._candidates[patch_stack[-1]]on partialuninstall(pruning unwound entries and failing closed toin_doubtifpatch_stackis malformed or its top is unknown).tests/box/repos/test_ascend_managed_serving.py: passesphase="observed"on the mock_Engine's"source""ok"receipt (L38) to matchprotocol.validate_receipt().tests/box/conformance/test_serving_admission.py(new, 27 test items): covers stacked install + partial/full uninstall provenance restoration and_begin()checks, pre-commit rejection of compound (single- and multi-module), revision-less, and non-worker installs with healthy subsequent traffic/install, unknown active patch isolation after uninstall, 20 parametrized forged/inconsistent mutation, rollback, and observation reply isolation cases (includingsource-ok-rejected,install-mismatched-deadline,install-mismatched-participants, andinstall-extra-header-field), and rolled-back mutation recovery with fresh activation.ServingAdmission, changes toEndpointorvllm_ascend/serving.py, NPU device validation, or Issue closure.Knowledge authorship declaration
No path protected by
docs/knowledge-model-policy.mdis changed. The declaration is filled for completeness against the current head.Changed artifacts and evidence
uninstalland baseline on fulluninstallserving.py:self._baseline+self._stack+self._candidates[patch_id]tracking, pruning on uninstall, fail-closedin_doubton unknown stack top6b39439d):1Areportedrev-2/patch-2digest for livepatch-1; after (cfbe34d9):rev-1/patch-1digest;test_partial_and_full_uninstall_restore_live_candidate_provenanceandtest_unknown_patch_after_uninstall_isolates_admissionpassed on Py3.10 & Py3.11cfbe34d9installbefore blocking or mutating the workerserving.py:_validate_install(command.payload)runs inside_conditionbeforeself._blocked = Trueandself.endpoint.handle(wire)6b39439d):1Braised unhandledKeyError('candidate_revision')withgen 3->4+in_doubt,1Cmutatedgen 0->1+in_doubt; after (cfbe34d9): both replyinvalid_requestwith unchangedgenand healthystartup;test_unsupported_and_revisionless_installs_reject_before_mutating_or_blocking(4 variants) passed on Py3.10 & Py3.11protocol.validate_receipt()and enforce serving patch-stack/provenance checks (review 1, review 2)protocol.py:validate_receipt_header()+is_sha256;serving.py: delegates header/transition checks tovalidate_receipt_header()and keeps patch-stack/provenance checks;test_ascend_managed_serving.py:38:phase="observed"test_inconsistent_or_forged_mutation_replies_isolate_admission(20 variants),test_rolled_back_mutation_with_fresh_activation_keeps_admission_open, and fulltests/box/+test_managed_box_search.py(247 passed, 24 warnings) on Py3.10.20 & Py3.11.14Checks and dependencies
pytest 9.2.0,pytest-xdist 3.8.0,ruff 0.17.6) oncfbe34d9e3555740b28001c10991dc60d1427875:ruff check src tests tools(Python 3.10.20 & 3.11.14): passed (All checks passed!).git diff --cached --check: passed.pytest -n 4 tests/box/ tests/harness/test_managed_box_search.py:247 passed, 24 warningson both Python 3.10.20 (21.30s) and Python 3.11.14 (20.76s) (24 pre-existing--evaluation-mode service_reusedeprecation warnings intest_managed_box_search.py).validate_receipt_headerandvalidate_receiptagree identically across envelope, field-set, deadline, participants,code/phase, and activation-transition checks):22/22passed on Python 3.10.20 & 3.11.14.tests/repository/test_architecture_anchors.py:4 passed.8325f51d/b1e1f42b: standalone repro before/after (6b39439dvs8325f51d); Ready CI run47029301210onb1e1f42bpassed all 8 jobs.tools/check_pr_references.py,tools/check_knowledge_model_policy.pydeclaration validation, andgit merge-tree --write-tree origin/main HEAD(origin/mainda5a01e7) oncfbe34d9e3555740b28001c10991dc60d1427875: passed.src/inferrsi/box/repos/vllm_ascend/serving.py, no Ascend NPU hardware on host), full Ready suite (local host hasgit 2.43.0 < 2.45), Windows/macOS advisoryhost-compatibility,installed-package,dashboard-browser, and fresh upstream GitHub Actions Ready CI oncfbe34d9(pending on this push).origin/main6b39439da4ac7354465ac7f2b550bac9f6966a54(verified clean 3-way merge onto currentorigin/mainda5a01e7). Zero overlap with open PRs; audited all existingServingAdmissioncallers (vllm_ascend/serving.py,box_serving_protocol.py,test_managed_box_search.py) and allprotocol.validate_receipt()callers.Remaining work and Issue closure
cfbe34d9; independent review.@Dong1017recorded on bug: ServingAdmission._transaction leaves stale provenance on partial uninstall and deadlocks on compound or revision-less install #967; closure delegation not recorded.