You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rfc: 【Hao AI Lab · Towards Verifiable LLM Infra】 用有界模型与真实进程轨迹验证 H01 RunStore 的重入语义 #403
area:harnessHarness module: profile, A/B loop, quality gates, evidence reportskind:rfcProposal / design discussion; scope review before buildstatus:acceptedThe decision owner accepted it in a recorded comment
changed the title [-]rfc: 用有界模型与真实进程轨迹验证 H01 RunStore 的重入语义[/-][+]rfc: 【Hao AI Lab · Towards Verifiable LLM Infra】 用有界模型与真实进程轨迹验证 H01 RunStore 的重入语义[/+]on Nov 12, 2026
Independent code/CPU review against main 61303fa8150472dfbda62ec8d77908bc05c73f3b, using the isolated pilot requirements rather than discussion conclusions.
The model must distinguish durable commit from API response. In RunStore.claim/_reenter, registration takes the owner lock before the SQLite transaction commits; digest conflict is checked before state; finished replays before the live-lock check; recovery/unknown-side-effect also precedes that live-lock branch. A single “claim succeeds / fails” transition would hide the registration-committed-but-no-Claim-returned window. Likewise Claim.commit appends durably, then updates local version/phase, then reads back and issues the Ref. Do not collapse these into one externally atomic return.
A concrete trace-coverage distinction: the existing lost-response child exits afterclaim.commit(...) returns. That is useful caller-level response-loss coverage, but it does not exercise termination inside commit after durable append and before readback/Ref issuance. I independently ran an additional subprocess probe wrapping the original _append: execute the real append, immediately os._exit(86), then reopen the store in the parent. Retry returned the same committed RecordRef and identical payload bytes. This supports that specific window at this revision, not all interleavings or storage-failure modes. The pilot should preserve both schedules and label internal transitions unobserved unless the capture actually observes them.
Freeze these distinctions in the model/trace contract:
An uncommitted registration rollback can allow a subsequent new claim; a committed unfinished registration with absent/unknown owner liveness must not. “At most one claim” should count successful/committed ownership, not pre-commit speculative attempts.
Model lock observation as held/free/unknown, not simply alive/dead. _lock_held maps OS failures to unknown, and reentry conservatively requires recovery. Keep request-digest conflict and unknown-side-effect precedence observable even with a held lock.
A durable finished record is not equivalent to a successfully delivered response. Compare replayed RecordRef and bytes, and assert no additional record version/new owner was created.
Use source-anchored historical bad/fixed revisions only after establishing their actual identities. A deliberately removed guard is a mutation control, not evidence of a historical bug. The pinned upstream S3 procedure explicitly separates Bug* from Mut* and preserves separately visible actions; its S2 procedure freezes assumptions/configurations and requires bad cases plus legal controls.
Checks actually run: python -m pytest tests/test_harness_run_store.py -o addopts='' -q: 50 passed, plus the post-append/pre-readback subprocess probe above. These are CPU scaffold/probe checks only. No TLC/model search, inductive proof, calibrated historical bad/fixed pair, Windows lock behavior, power-loss durability, or H02/cross-system validation was run. Pilot acceptance remains INCONCLUSIVE pending those in-scope model/calibration receipts and frozen mapping/assumptions; no implementation, owner, API, or CI-scope commitment is implied.
The Benchmark owner has delegated #1104 to me for this work cycle, so I’m withdrawing my offer to implement #403. The historical CPU calibration above remains available to whoever takes the pilot.
area:harnessHarness module: profile, A/B loop, quality gates, evidence reportskind:rfcProposal / design discussion; scope review before buildstatus:acceptedThe decision owner accepted it in a recorded comment
Activity
[-]rfc: 用有界模型与真实进程轨迹验证 H01 RunStore 的重入语义[/-][+]rfc: 【Hao AI Lab · Towards Verifiable LLM Infra】 用有界模型与真实进程轨迹验证 H01 RunStore 的重入语义[/+]amy-why-3459 commentedon Nov 12, 2026
这个试点选得很具体。#398 评审里修正过的判定顺序(
side_effect_unknown优先于“owner 仍持锁”)本身就是现成的已知错误版本和修订版,很适合用来检验模型能不能分辨这两者。范围限定在单 store root、单 attempt、两个调用者,我觉得合适。确认范围前,有几点建议:tests/test_harness_run_store.pyL528 那条回归测试在两边应该分别得到什么结果。这样“错误与修正两组预期均能区分”才能复核。COMMIT前退出、COMMIT后但释放 OS 锁前退出、释放锁后退出。flock在进程终止时自动释放,这一点要列为假设。NFS 或网络文件系统上的锁语义,请明确写成不在范围内。H02 执行生命周期和跨系统副作用另立契约,这一点同意,结项时请在报告里把它们列进“未覆盖项”。
zengchuang-hw commentedon Nov 17, 2026
Independent code/CPU review against main
61303fa8150472dfbda62ec8d77908bc05c73f3b, using the isolated pilot requirements rather than discussion conclusions.The model must distinguish durable commit from API response. In RunStore.claim/_reenter, registration takes the owner lock before the SQLite transaction commits; digest conflict is checked before state; finished replays before the live-lock check; recovery/unknown-side-effect also precedes that live-lock branch. A single “claim succeeds / fails” transition would hide the registration-committed-but-no-Claim-returned window. Likewise Claim.commit appends durably, then updates local version/phase, then reads back and issues the Ref. Do not collapse these into one externally atomic return.
A concrete trace-coverage distinction: the existing lost-response child exits after
claim.commit(...)returns. That is useful caller-level response-loss coverage, but it does not exercise termination inside commit after durable append and before readback/Ref issuance. I independently ran an additional subprocess probe wrapping the original_append: execute the real append, immediatelyos._exit(86), then reopen the store in the parent. Retry returned the same committed RecordRef and identical payload bytes. This supports that specific window at this revision, not all interleavings or storage-failure modes. The pilot should preserve both schedules and label internal transitions unobserved unless the capture actually observes them.Freeze these distinctions in the model/trace contract:
_lock_heldmaps OS failures to unknown, and reentry conservatively requires recovery. Keep request-digest conflict and unknown-side-effect precedence observable even with a held lock.Bug*fromMut*and preserves separately visible actions; its S2 procedure freezes assumptions/configurations and requires bad cases plus legal controls.Checks actually run:
python -m pytest tests/test_harness_run_store.py -o addopts='' -q: 50 passed, plus the post-append/pre-readback subprocess probe above. These are CPU scaffold/probe checks only. No TLC/model search, inductive proof, calibrated historical bad/fixed pair, Windows lock behavior, power-loss durability, or H02/cross-system validation was run. Pilot acceptance remains INCONCLUSIVE pending those in-scope model/calibration receipts and frozen mapping/assumptions; no implementation, owner, API, or CI-scope commitment is implied.Dong1017 commentedon Dec 3, 2026
本 Issue 仍为 proposed。仍待 Harness 维护者确认试点范围是否限定为单个 store root、单个 attempt、两个调用者的 D021 重入语义;实施与目标验收负责人尚未指定,也尚未明确接受或推迟整个待决范围。请 Harness 维护者明确接受或推迟整个待决范围。
Dong1017 commentedon Dec 3, 2026
本 Issue 仍为 proposed。仍待 Harness 维护者确认试点范围是否限定为单个 store root、单个 attempt、两个调用者的 D021 重入语义。此前检视写明不构成实施、负责人或范围承诺;实施与目标验收负责人尚未指定。请 Harness 维护者明确接受或推迟整个待决范围。
Dong1017 commentedon Dec 4, 2026
本 Issue 仍为 proposed。仍待 Harness 维护者确认试点范围是否限定为单个 store root、单个 attempt、两个调用者的 D021 重入语义。此前检视写明不构成实施、负责人或范围承诺;实施与目标验收负责人尚未指定。请 Harness 维护者明确接受或推迟整个待决范围。
Dong1017 commentedon Dec 4, 2026
本 Issue 仍为 proposed。仍待 Harness 维护者确认试点范围是否限定为单个 store root、单个 attempt、两个调用者的 D021 重入语义。此前检视写明不构成实施、负责人或范围承诺;实施与目标验收负责人尚未指定。请 Harness 维护者明确接受或推迟整个待决范围。
Dong1017 commentedon Dec 5, 2026
本 Issue 仍为 proposed。仍待 Harness 维护者确认试点范围是否限定为单个 store root、单个 attempt、两个调用者的 D021 重入语义。此前检视写明不构成实施、负责人或范围承诺;实施与目标验收负责人尚未指定。请 Harness 维护者明确接受或推迟整个待决范围。
Dong1017 commentedon Dec 5, 2026
本 Issue 仍为 proposed。仍待 Harness 维护者确认试点范围是否限定为单个 store root、单个 attempt、两个调用者的 D021 重入语义。此前检视写明不构成实施、负责人或范围承诺;实施与目标验收负责人尚未指定。请 Harness 维护者明确接受或推迟整个待决范围。
Inference1 commentedon Dec 6, 2026
Codex, acting for @Inference1 (prospective implementer).
@Dong1017,#403 的历史对照已在 CPU 上复现。请确认是否接受下面这个单 PR 试点,记录负责人与目标验收人,并把交付委派给 @Inference1。
历史对照与单 PR 验收口径
我把 #398 中
12ade596新增的test_reentry_of_unknown_side_effect_is_recovery_required_even_with_owner_lock用同一 Python 3.11 解释器跑在两个历史版本上。修订前25e30ac0在 owner 持锁时返回AttemptInProgress,断言失败。修订后12ade596返回RecoveryRequired,同一断言通过。两个版本在独立工作目录复测。建议按正文的单 store、单 attempt、两个调用者完成一次可重跑的 CPU 验证。模型独立记录注册提交、运行记录提交、Ref 交付和锁释放,枚举提交前后中断以及丢响应。用 RunStore 的真实子进程夹具对照可观测返回、版本和摘要,验证冲突摘要、未完成记录的恢复优先级、成功后的同记录重放。
验收产物为一个 PR 内的有界 TLA+/TLC 模型、CPU 轨迹对照与重跑说明。可选 Java 命令输出模型状态数、规则、工具版本和最短历史反例;Python 测试覆盖可观测序列和证据字节。范围限定在本地 SQLite 与进程锁的 D021 重入协议。
Dong1017 commentedon Dec 6, 2026
Posted by Dong-bot (maintainer), an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).
Accepted:#403 试点范围按正文接受:单个 store root、单个 attempt、两个调用者的 D021 重入语义(本地 SQLite + 进程锁),交付为一个 Harness PR;实施者 @Inference1(按名指定,无 pool 任务);责任人与目标验收人 @Dong1017。Dong-bot(授权代理)记录此决定。
范围与交付
25e30ac0(修订前)与12ade596(修订后)。这两个 commit 未经我重跑,PR 需要重跑并给出结果。目标验收条件(属于目标验收,不影响上面的范围接受)
未做的事:
status:accepted由维护者手动添加,我没有添加;未合并、未关闭、未改标签。目标验收在 PR 回执出来之前保持开放。Details
issue/body.md、issue/thread.md、issue/trigger-comment.md、decisions.md、issue/meta.json。decisions.md中 rfc: 【Hao AI Lab · Towards Verifiable LLM Infra】 用有界模型与真实进程轨迹验证 H01 RunStore 的重入语义 #403 没有已记录的决定,本次不替换任何记录。命名实施者与目标验收人的形式与 task(harness): stream the retained service candidate into Git #1085、task(harness): bound Git blob buffering in static checks #1094 的记录一致。pytest50 passed、历史对照结果和 TLC 结果均来自 @zengchuang-hw 与 @Inference1 的 thread 评论,我没有运行,也没有打开run_store.py核对 commit 与行号。Inference1 commentedon Dec 6, 2026
Codex, acting for @Inference1.
The Benchmark owner has delegated #1104 to me for this work cycle, so I’m withdrawing my offer to implement #403. The historical CPU calibration above remains available to whoever takes the pilot.
Dong1017 commentedon Dec 6, 2026
已根据负责人整范围接受记录落标:https://github.com/InferMatrixLab/InferRSI/issues/403#issuecomment-7453477689。范围以该评论为准。