Skip to content

feat(nokv): add durable-completion read-side comparison probes - #3212

Merged
huangruiteng merged 1 commit into
huangruiteng:mainfrom
NIU-123370:feat/nokv-completion-probes
Aug 15, 2026
Merged

feat(nokv): add durable-completion read-side comparison probes#3212
huangruiteng merged 1 commit into
huangruiteng:mainfrom
NIU-123370:feat/nokv-completion-probes

Conversation

@NIU-123370

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the probe gap noted in #3195: examples/nokv-shadow-provider/probes.py covered only claim/CAS. This adds the read-side comparison the RFC's later runtime qualification slice registers — durable completion continuation projection (successor | no_followup | active_goal with fail-closed contradiction/dangling rules), reproduced by the provider with identical semantics.

Two probes:

  • contract.durable_completion_projection — a bootstrapped open head is hand-evolved (the byte CAS stays the only writer) into the post-completion shape the future atomic complete_todo_with_successor will commit, read back through the provider, and projected with the LoopX durable_completion seam. All three typed continuations project correctly from the provider bytes, and re-reading + re-projecting yields identical outcomes (replay-stable).
  • contract.durable_completion_fail_closed — a contradictory record (no_followup + successors) and a dangling declared successor both fail closed when read back through the provider.

Scope guardrails, per the claim confirmation in #3195: read-side projection comparison only — no provider completion command, no write-side atomicity. The module docstring and example README both state what these probes do and do not qualify.

Verification

  • python3 examples/nokv-shadow-provider/probes.py contract from the repository root — all 8 probes pass (6 existing + 2 new), summary reports probes: 8.
  • README's must-prove list and result-tag roster updated (six → eight).

Refs #3195 (probe gap named in review), RFC shared-goal-authority-state-provider-v0 later runtime qualification slice.

probes.py covered only claim/CAS. Add the read-side comparison the RFC's
later runtime qualification slice registers: a bootstrapped open head is
hand-evolved (byte CAS stays the only writer) into the post-completion shape
the future atomic complete_todo_with_successor will commit, read back through
the provider, and projected with the LoopX durable-completion seam.

The two probes prove the three typed continuations (successor | no_followup |
active_goal) with replay-stable outcomes, and fail-closed rejection of a
contradictory record (both no_followup and successors) and a dangling declared
successor. The provider byte-CAS holding and reading back these durable
records with identical projection semantics is the qualification point; the
write-side atomic command is explicitly out of scope.

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

评审结论:通过(Approve)

符合 #3195 指出的 probe 缺口:#3212 为 NoKV shadow provider 增加 durable-completion 读侧对比 probe——通过真实 seam project_durable_completion_outcome 把 provider 字节 CAS 写成的 post-completion head 投影为 successor | no_followup | active_goal,并覆盖矛盾(no_followup + successor 并存)与 dangling successor 的 fail-closed 行为;probe 注册与 README 说明同步更新。纯 examples 增量,未触碰运行时实现。

验证(exact head 792c3a473,独立 worktree):

  • python examples/nokv-shadow-provider/probes.py contract:8/8 probes 通过(含新增 durable_completion_projection 与 durable_completion_fail_closed)
  • git diff --check:无输出;probe 模块语法检查通过
  • GitHub Actions:pytest 正在运行(评审时 pending)

无阻塞问题。CI 转绿后即可合并。

@huangruiteng
huangruiteng merged commit 45653e5 into huangruiteng:main Aug 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants