Skip to content

test(rung10): the python test-suite port - the parity bar - #118

Merged
cherusk merged 6 commits into
mainfrom
feat/rung10-test-port
Oct 16, 2026
Merged

cherusk merged 6 commits into
mainfrom
feat/rung10-test-port

Conversation

@godon-robot

@godon-robot godon-robot Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Motion 1 of the rung-10 controller lane (lane-board 10-16): the python test suite (~5.3k lines, 12 files) ported to rust beside the body it arbitrates. The python tests patched execute_query/wmill; the rust seams (DbGateway, WindmillGateway, CausalClient) are the injection point - a shared fake harness under tests/rust, one module per python test file.

IN FLIGHT - this PR grows tranche by tranche; held for review when the suite is complete.

Tranche 1 (this push):

  • tests/rust harness (FakeDb / FakeWindmill / FakeCausal, call recording + programmed answers)
  • test_wish_assignment_upsert.py - the assignment write upserts on re-plan
  • test_instruments_read.py - the verdict read carries the instruments stamp
  • test_seek_return_mirror.py - the seek RETURN mirrors into the event trail once
  • test_watermark_slots.py - collision-free slot assignment

Parity gaps the port caught in the first rust body, cured here against the python reference (python stays the reference until cutover):

  1. read_state_verdict missed the rung-9 instruments column entirely - the 4-column read, the message-matched rollout-order fallback, and torn-payload tolerance are ported from controller/database.py.
  2. read_seek_return and get_wish's seek-return mirror block were absent - ported (robots #241 receipt chain).
  3. get_systemtender dropped instruments from the GET envelope (rung-9 door) and swallowed verdict-read errors where python fails the envelope - both now python-shaped. relaunches/last_relaunch (rung 8) stay OUT by the banked lane ruling: rung-8 verbs port last.

Standing rulings honored: SQL byte-stable (two query strings grew the instruments column exactly as python's), envelope key order preserved (instruments sits between liveness and createdAt), CI-only builds.

godon-robot Bot and others added 6 commits October 16, 2026 08:03
… files

The fakes python's tests built by patching execute_query/wmill become
gateway-trait injection (FakeDb/FakeWindmill/FakeCausal, tests/rust).
Ported so far: wish assignment upsert, instruments read, seek return
mirror, watermark slots.

The parity bar already earned its keep - three gaps in the first rust
body, cured against the python reference:
- read_state_verdict missed the rung-9 instruments column (rollout-
  order guard, message-matched fallback, torn-payload tolerance)
- read_seek_return and get_wish's seek-return mirror were absent
- get_systemtender dropped instruments from the GET envelope and
  swallowed verdict errors where python fails the read

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
…handle for assertions

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
…the ask call hands the array view

The door test and the grammar module existed only as untracked files
in the build worktree; CI could not see them. Committed verbatim,
plus the two-line type fix at the plan-ask call site.

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
…rray view - one fix each, not both

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
The wish fetch names both tables (its derived-state subquery reads
events); the fake served it three-column event rows. Wish-table
check first - the failing tests were the fake's fault, not the
mirror's.

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
The ported SQL keeps python's leading newline-and-indent; matching
from byte zero saw nothing. Trim first.

Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
@cherusk
cherusk merged commit 81e2c2a into main Oct 16, 2026
3 checks passed
@cherusk
cherusk deleted the feat/rung10-test-port branch October 16, 2026 12:22
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