Skip to content

quest: plan kio follow-ups (send-credit machine, sim sweep, Verus) - #9761

Merged
kixelated merged 3 commits into
mainfrom
quest-plan/kio-followups
Nov 27, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest-plan/kio-followups

Conversation

@kixelated

@kixelated kixelated commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

kio's state-machine spikes (kixel-ai/kio#26), its Miri-seeds and TSan recipes (kixel-ai/kio#25), and its Verus proof of kio::log (kixel-ai/kio#12) left moq-side follow-ups that no quest owns. This plans them from the maintainer's 2026-11-27 /quest-plan interview.

Approach

  • Edit [M→S] m4 quest/m4/miri-seeds-tsan.md: narrowed to moq-net. kio#25 shipped kio's half; its miri-seeds and tsan recipes are the pattern to copy, so the effort drops to S.
  • New [L] m4 quest/m4/send-credit-machine.md: open.rs's send credit becomes a pure StateMachine driven by the I/O code, and cargo test runs kio's BFS checker and asserts TLC's state counts on all four SendCredit* configs. kio#26 showed the spike machine matches TLC exactly, 250–2,900× faster. Waits on a crates.io kio release with the model feature (kixel-ai/kio quest/m2/model-check.md), since after the cut moq depends on kio from crates.io; requires quest/m0/kio-crates-io.md.
  • New [M] m4 quest/m4/sim-adversarial-sweep.md: moq's sim tests also run under KIO_SIM_SCHEDULE (random, PCT) with KIO_SIM_PROBE=1, copying kio's just sweep. That covers every #[kio::test] as well as the 107 files that name clock::sim. Requires quest/m0/kio-main.md for kio#10.
  • New [L] m5 quest/m5/verus-subscribe.md: Verus proves SubscribeAccounting.tla's invariants on lite/publisher.rs, lite/subscriber.rs, and tail.rs, with kio#12's cost as the reference. Speculative, and it starts after moq-dev/moq#9719 and moq-dev/moq#9743 land or close.
  • Not added: quest/m4/send-credit-reset-wake.md, planned in the interview and dropped at the merge pick (see Decisions). Also quest/m0/kio-main.md's Plan already covers doc/lib/rs/kio.md's MOQ_SIM_SEED (its "update doc/lib/rs/kio.md" line), so it is unchanged.

Decisions

  • ✅ Narrow miri-seeds-tsan to moq-net (rejected: drop the quest).
  • ✅ Port send credit to a pure machine (rejected: drop it, which would also drop kio's model-check quest).
  • ✅ Keep SendCredit.tla as the design doc and run TLC only when the spec changes (rejected: retire TLC and delete the spec once the Rust machine matches). sh/tla.sh already skips an exhaustive config whose spec, config, and TLC are unchanged, and all four SendCredit* configs are exhaustive, so Nightly's credit leg already behaves this way and needs no workflow change.
  • ✅ The checker comes from kio's model feature (rejected: a copy in moq-net).
  • ✅ Drop the reset-wake quest (rejected: keep it). Decided by the maintainer at the merge pick, replacing the interview's "its own quest" (rejected then: fold into send-credit-machine; drop it). The code already wakes the reset stream's subscription via Listed::preempt, which wakes the stream's writer, a child task of its subscription, so the spec's MakeRoom wake is faithful and removing it would only make the model less accurate.
  • ✅ Sim sweep in m4 (rejected: drop it). It runs on every PR if each pass stays within a few seconds, otherwise post-merge, with the cost measured (rejected: always post-merge).
  • ✅ Verus on subscription accounting in m5, speculative (rejected: m4; drop it).

Impact

None: quest files only. No public API or wire change.

Alternatives

Recorded with each decision above.

Follow-ups

  • Once this lands, the Waiting item in kixel-ai/kio's quest/m2/model-check.md (a moq quest ports send credit) clears; kio's next planning PR should remove it.

Validation

  • quest check: 567 documents ok.
  • just ci: passed (quest, markdown, and the other selected modules).

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, high

(Written by Claude Opus 5.5 with high)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 672a8ee

  • Base: origin/main at 86faa33

  • Risk: medium, Under RISK.md this change is low, since it only edits quest plans, and a revert undoes it fully. The schema accepts only medium or high, so I used medium as the nearest tier, and it does not mean the change is medium by the file's rules. If the plans are wrong, the worst case is an agent planning or doing the wrong verification work on moq-net (Miri/TSan, a send-credit state machine, a sim sweep, a Verus proof). No consumer or deployed peer reads quest plans, and the repository's checks and reviewers would catch the mistake before any release.

  • Classified: medium by Claude Code, claude-haiku-5-5, low effort, session ec18d3ec-954e-49c8-9fb2-12cafd0e8167

  • Risk file: bb7b1c0de60b

  • Reviewer: Codex, gpt-6.2-sol, medium effort

  • Session: 01a21cd7-cd60-78e0-8809-4e1fe34bd023, round 3

  • Score: 10/10, Removing the reset-wake quest and its companion link leaves the send-credit machine plan intact, with no new findings.

  • Rounds: 3; first round 2 (medium 2); findings 2 (medium 2): fixed 2, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 27, 2026 03:49
Narrow miri-seeds-tsan to moq-net now that kio#25 shipped kio's half, and
add send-credit-machine, send-credit-reset-wake, sim-adversarial-sweep (m4)
and verus-subscribe (m5), from the 2026-11-27 /quest-plan interview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reset wake

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 27, 2026 11:54
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes revise an Miri and ThreadSanitizer quest and add quest documents for simulated-schedule testing, send-credit model checking, reset-stream wake analysis, and a proposed Verus proof. The documents specify planned test approaches, scope, prerequisites, and recorded decisions. They do not change public APIs or wire behavior.

Merge Risk: Minimal · up to 03f57

This change only adds and revises planning documents for follow-up work. It has no runtime impact and is safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "quest: plan kio follow-ups (send-credit machine, sim sweep, Verus)" matches the main change. The PR adds and narrows quest plan files for moq-side follow-ups to kio work, and the title name…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the PR plans kio follow-ups as moq quest files: it narrows the Miri/TSan quest, adds send-credit, sim-sweep and Verus quests, and lists the decisions and validation. It is speci…
Full details: Title check

Explanation

The title "quest: plan kio follow-ups (send-credit machine, sim sweep, Verus)" matches the main change. The PR adds and narrows quest plan files for moq-side follow-ups to kio work, and the title names three of the five quests. The Miri/TSan narrowing is not named, but the title is still specific and on-topic.

Full details: Description check

Explanation

The description states the PR plans kio follow-ups as moq quest files: it narrows the Miri/TSan quest, adds send-credit, sim-sweep and Verus quests, and lists the decisions and validation. It is specific and clearly related to the changeset.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9b76462c-28ea-469f-8cac-da52fe3e2abc
Commits

Reviewing files that changed from the base of the PR and between 512e3d9 and 03f57cf.

Files selected for processing: 5

  • quest/m4/miri-seeds-tsan.md
  • quest/m4/send-credit-machine.md
  • quest/m4/send-credit-reset-wake.md
  • quest/m4/sim-adversarial-sweep.md
  • quest/m5/verus-subscribe.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

…::preempt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit f144f2e Nov 27, 2026
5 checks passed
@kixelated
kixelated deleted the quest-plan/kio-followups branch November 27, 2026 12:06
kixelated added a commit to kixel-ai/kio that referenced this pull request Nov 27, 2026
moq-dev/moq#9761 planned the send-credit port as quest/m4/send-credit-machine.md, so the wait has cleared.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant