carlos / platform Public

grouproll: parity ledger, boundary and MinIO end to end

The ledger maps all 293 Python tests (roll, held, probe, and the floor
branch's held tests) to Go tests: 290 ported, 3 not applying under V5.
TestParityLedgerComplete checks every listed test has a row, every
named Go test exists, and the Python suites hold no unlisted test.
Three gaps ported: fixtures without live identifiers, the fake's permit
shape, and the framed permit run by /bin/sh.

TestEndToEndNoAWSEnvironment and TestEndToEndMinio run plan, roll,
replace and remove with the fake group and box, every edges file, lock
and router pointer read from a real store the fake publishes into (a
directory store, or MinIO under CARLOS_MINIO_TEST=1, which
30-minio-contract now runs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev db634db49ecbc80901add03eb0705e1af3fbd648 parent 52e4d26
7 files changed, +1,385 −0
  • .amadan/ci.d/30-minio-contract +30 −0
  • internal/grouproll/fake_test.go +6 −0
  • internal/grouproll/integration_minio_test.go +382 −0
  • internal/grouproll/parity_test.go +316 −0
  • internal/grouproll/testdata/parity-ledger.tsv +294 −0
  • internal/grouproll/testdata/python-tests.txt +293 −0
  • scripts/grouproll-golden/python_tests.py +64 −0

CI failed — run details

Intent

Attributed to this commit: 11.9 g CO₂e (1,506,211 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on group-roll-verb, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/.amadan/ci.d/30-minio-contract b/.amadan/ci.d/30-minio-contract
index b2e70769c..741acac64 100755
--- a/.amadan/ci.d/30-minio-contract
+++ b/.amadan/ci.d/30-minio-contract
@@ -430,6 +430,36 @@ if ! grep -q '^--- PASS: TestS3StoreMinioContract (' "$out3"; then
exit 1
fi
+# carlos system group end to end (group roll verb spec §10.5): plan, roll,
+# replace and remove in-process with the fake group and box, every edges
+# file, host lock and router pointer the engine reads served by this
+# server, under a run prefix the test deletes. Same rule: it skips without
+# CARLOS_MINIO_TEST, so its PASS line has to appear.
+out4=$rundir/test-grouproll.log
+set +e
+CARLOS_MINIO_TEST=1 \
+ MINIO_ENDPOINT="http://127.0.0.1:$port" \
+ MINIO_SCOPED_KEY=scopeduser \
+ MINIO_SCOPED_SECRET=scopedsecret1 \
+ MINIO_BUCKET=contract-bucket \
+ go test ./internal/grouproll/ -run TestEndToEndMinio -count=1 -v >"$out4" 2>&1
+test_status=$?
+set -e
+
+cat "$out4"
+
+if [ "$test_status" -ne 0 ]; then
+ exit "$test_status"
+fi
+
+if ! grep -q '^--- PASS: TestEndToEndMinio (' "$out4"; then
+ echo >&2
+ echo "the group verbs' MinIO test did not PASS: it was skipped, filtered out, or renamed." >&2
+ echo "It skips unless CARLOS_MINIO_TEST=1. Check the env block above and that" >&2
+ echo "TestEndToEndMinio still exists in internal/grouproll." >&2
+ exit 1
+fi
+
# The forwarded db read (db region forward plan 2: T1 and T16): one
# deployment bucket, versioned, and a data bucket per region, on the one
# server. The console user cannot read uk's data bucket; the uk box user
diff --git a/internal/grouproll/fake_test.go b/internal/grouproll/fake_test.go
index 76f97cc40..be63c1ec8 100644
--- a/internal/grouproll/fake_test.go
+++ b/internal/grouproll/fake_test.go
@@ -942,6 +942,9 @@ type harness struct {
classify func(Facts) Decision
afterEvent func(kind string, row Row)
beforeEvent func(kind string, data map[string]any)
+ // objects, when set, replaces the fake's object store (the end to end
+ // tests read MinIO or a directory store the fake publishes into).
+ objects Objects
}
func newHarness(t *testing.T, n int) *harness {
@@ -989,6 +992,9 @@ func (h *harness) engine() *Engine {
e := NewEngine(h.c, h.f, h.f, h.state, h.f.clock, h.f.sleep, &h.out, "test operator")
e.ConfigPath = "/etc/carlos-group/test.json"
e.seams, e.classify, e.afterEvent, e.beforeEvent = h.seams, h.classify, h.afterEvent, h.beforeEvent
+ if h.objects != nil {
+ e.Objects = h.objects
+ }
return e
}
diff --git a/internal/grouproll/integration_minio_test.go b/internal/grouproll/integration_minio_test.go
new file mode 100644
index 000000000..64231a956
--- /dev/null
+++ b/internal/grouproll/integration_minio_test.go
@@ -0,0 +1,382 @@
+//go:build linux || darwin
+
+package grouproll
+
+import (
+ "context"
+ "crypto/rand"
+ "encoding/hex"
+ "errors"
+ "fmt"
+ "os"
+ "reflect"
+ "strings"
+ "sync"
+ "testing"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials"
+ awss3 "github.com/aws/aws-sdk-go-v2/service/s3"
+
+ "github.com/carlosframework/platform/internal/release"
+)
+
+// Spec §5.4 and §10.5: plan, roll, replace and remove run end to end
+// in-process with the fake Group and Box, every object read (edges files,
+// the region's host locks, the signed router pointer) served by a real
+// store: MinIO under CARLOS_MINIO_TEST=1, else a directory store. No
+// AWS_* variable is set while they run; nothing here needs an AWS
+// configuration.
+
+// TestEndToEndNoAWSEnvironment runs the four verbs with every AWS_*
+// variable unset, the objects in a directory store.
+func TestEndToEndNoAWSEnvironment(t *testing.T) {
+ unsetAWSEnvironment(t)
+ root := release.NewDirStore(t.TempDir())
+ runEndToEnd(t, func(t *testing.T, name string) release.Store {
+ return release.NewPrefixStore(root, t.Name()+"/"+name+"/")
+ })
+ for _, kv := range os.Environ() {
+ if strings.HasPrefix(kv, "AWS_") {
+ t.Fatalf("%s set during the run", kv)
+ }
+ }
+}
+
+// TestEndToEndMinio runs the four verbs against a real S3-compatible
+// server: every object the engine reads is MinIO's answer. Skipped unless
+// CARLOS_MINIO_TEST=1; .amadan/ci.d/30-minio-contract stands the server
+// up and requires this test's PASS line.
+func TestEndToEndMinio(t *testing.T) {
+ if os.Getenv("CARLOS_MINIO_TEST") != "1" {
+ t.Skip("set CARLOS_MINIO_TEST=1 (with a running MinIO and the MINIO_* env vars) to run the group verbs against MinIO; see .amadan/ci.d/30-minio-contract")
+ }
+ env := map[string]string{}
+ for _, name := range []string{"MINIO_ENDPOINT", "MINIO_SCOPED_KEY", "MINIO_SCOPED_SECRET", "MINIO_BUCKET"} {
+ if env[name] = os.Getenv(name); env[name] == "" {
+ t.Fatalf("%s is not set (required when CARLOS_MINIO_TEST=1)", name)
+ }
+ }
+ unsetAWSEnvironment(t)
+ client := awss3.New(awss3.Options{
+ Region: "us-east-1",
+ Credentials: credentials.NewStaticCredentialsProvider(env["MINIO_SCOPED_KEY"], env["MINIO_SCOPED_SECRET"], ""),
+ BaseEndpoint: aws.String(env["MINIO_ENDPOINT"]),
+ UsePathStyle: true,
+ RequestChecksumCalculation: aws.RequestChecksumCalculationWhenRequired,
+ ResponseChecksumValidation: aws.ResponseChecksumValidationWhenRequired,
+ })
+ s3 := &release.S3Store{Client: client, Bucket: env["MINIO_BUCKET"]}
+ nonce := make([]byte, 8)
+ if _, err := rand.Read(nonce); err != nil {
+ t.Fatal(err)
+ }
+ run := "grouproll-e2e/" + hex.EncodeToString(nonce) + "/"
+ t.Cleanup(func() {
+ keys, err := s3.List(context.Background(), run)
+ if err != nil {
+ t.Errorf("cleanup listing: %v", err)
+ }
+ for _, k := range keys {
+ if err := s3.Delete(context.Background(), k); err != nil {
+ t.Errorf("cleanup %s: %v", k, err)
+ }
+ }
+ })
+ runEndToEnd(t, func(t *testing.T, name string) release.Store {
+ return release.NewPrefixStore(s3, run+t.Name()+"/"+name+"/")
+ })
+}
+
+// unsetAWSEnvironment unsets every AWS_* variable for the test.
+func unsetAWSEnvironment(t *testing.T) {
+ t.Helper()
+ for _, kv := range os.Environ() {
+ name, _, _ := strings.Cut(kv, "=")
+ if strings.HasPrefix(name, "AWS_") {
+ t.Setenv(name, "") // restored after the test
+ os.Unsetenv(name)
+ }
+ }
+}
+
+// publishedObjects is the engine's object store for one harness: each
+// bucket is a real store (back) that the fake publishes into. Before a
+// read, the fake's own answer for that key or prefix (fakeStore: the
+// boxes' edges files, the agents' locks, the release pointer) is written
+// to or removed from back, as the boxes and the release process publish
+// them; the engine then gets back's answer, never the fake's. The engine
+// never writes an object: Put and Delete fail the test.
+type publishedObjects struct {
+ t *testing.T
+ f *fake
+ back func(t *testing.T, bucket string) release.Store
+ mu sync.Mutex
+ store map[string]release.Store
+ reads map[string]int
+}
+
+func (p *publishedObjects) Bucket(name string) release.Store {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ if p.store[name] == nil {
+ p.store[name] = p.back(p.t, name)
+ }
+ return publishedStore{p: p, fake: p.f.Bucket(name), back: p.store[name], bucket: name}
+}
+
+func (p *publishedObjects) count(kind string) int {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ return p.reads[kind]
+}
+
+type publishedStore struct {
+ p *publishedObjects
+ fake release.Store
+ back release.Store
+ bucket string
+}
+
+// kind names a read for the counts: router pointer, edges or lock.
+func (s publishedStore) read(method, key string) {
+ kind := "lock"
+ switch {
+ case strings.HasPrefix(key, "control/system/router/"):
+ kind = "pointer"
+ case strings.HasPrefix(key, "control/edges/"):
+ kind = "edges"
+ }
+ s.p.mu.Lock()
+ s.p.reads[method+" "+kind]++
+ s.p.mu.Unlock()
+}
+
+// publish writes body at key, replacing what is there (Put is create-only
+// without the current etag).
+func (s publishedStore) publish(ctx context.Context, key string, body []byte) error {
+ _, etag, err := s.back.Get(ctx, key)
+ if err != nil && !errors.Is(err, os.ErrNotExist) {
+ return err
+ }
+ _, err = s.back.Put(ctx, key, body, etag)
+ return err
+}
+
+func (s publishedStore) withdraw(ctx context.Context, key string) error {
+ if err := s.back.Delete(ctx, key); err != nil && !errors.Is(err, os.ErrNotExist) {
+ return err
+ }
+ return nil
+}
+
+// sync makes back hold exactly keys under prefix (bodies a later Get
+// publishes; a new key starts as an empty object).
+func (s publishedStore) sync(ctx context.Context, prefix string, keys []string) error {
+ want := map[string]bool{}
+ for _, k := range keys {
+ want[k] = true
+ }
+ have, err := s.back.List(ctx, prefix)
+ if err != nil {
+ return err
+ }
+ for _, k := range have {
+ if !want[k] {
+ if err := s.withdraw(ctx, k); err != nil {
+ return err
+ }
+ }
+ delete(want, k)
+ }
+ for k := range want {
+ if err := s.publish(ctx, k, []byte("{}")); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (s publishedStore) Get(ctx context.Context, key string) ([]byte, string, error) {
+ body, _, err := s.fake.Get(ctx, key)
+ switch {
+ case errors.Is(err, os.ErrNotExist):
+ err = s.withdraw(ctx, key)
+ case err != nil:
+ return nil, "", err // an injected outage: the read fails as the provider would
+ default:
+ err = s.publish(ctx, key, body)
+ }
+ if err != nil {
+ s.p.t.Fatalf("publishing %s/%s: %v", s.bucket, key, err)
+ }
+ s.read("get", key)
+ return s.back.Get(ctx, key)
+}
+
+func (s publishedStore) List(ctx context.Context, prefix string) ([]string, error) {
+ keys, err := s.fake.List(ctx, prefix)
+ if err != nil {
+ return nil, err
+ }
+ if err := s.sync(ctx, prefix, keys); err != nil {
+ s.p.t.Fatalf("publishing %s/%s: %v", s.bucket, prefix, err)
+ }
+ s.read("list", prefix)
+ return s.back.List(ctx, prefix)
+}
+
+// ListDirs publishes each host directory the fake lists with an object
+// that is not a lock (a host's other data), and removes the others.
+func (s publishedStore) ListDirs(ctx context.Context, prefix string) ([]string, error) {
+ dirs, err := s.fake.ListDirs(ctx, prefix)
+ if err != nil {
+ return nil, err
+ }
+ if err := s.syncDirs(ctx, prefix, dirs); err != nil {
+ s.p.t.Fatalf("publishing %s/%s: %v", s.bucket, prefix, err)
+ }
+ s.read("dirs", prefix)
+ return s.back.ListDirs(ctx, prefix)
+}
+
+func (s publishedStore) syncDirs(ctx context.Context, prefix string, dirs []string) error {
+ have, err := s.back.ListDirs(ctx, prefix)
+ if err != nil {
+ return err
+ }
+ want := map[string]bool{}
+ for _, d := range dirs {
+ want[d] = true
+ if err := s.publish(ctx, d+"data.db", []byte("data")); err != nil {
+ return err
+ }
+ }
+ for _, d := range have {
+ if !want[d] {
+ if err := s.sync(ctx, d, nil); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (s publishedStore) Put(ctx context.Context, key string, body []byte, ifMatch string) (string, error) {
+ s.p.t.Errorf("the engine wrote %s/%s", s.bucket, key)
+ return "", errors.New("read only")
+}
+
+func (s publishedStore) Delete(ctx context.Context, key string) error {
+ s.p.t.Errorf("the engine deleted %s/%s", s.bucket, key)
+ return errors.New("read only")
+}
+
+// attach makes the harness's engines read objects from back.
+func attach(t *testing.T, h *harness, back func(t *testing.T, bucket string) release.Store) *publishedObjects {
+ p := &publishedObjects{t: t, f: h.f, back: back, store: map[string]release.Store{}, reads: map[string]int{}}
+ h.objects = p
+ return p
+}
+
+// mustRead fails unless the backing store answered each kind of read.
+func (p *publishedObjects) mustRead(t *testing.T, kinds ...string) {
+ t.Helper()
+ for _, k := range kinds {
+ if p.count(k) == 0 {
+ t.Errorf("no %q read reached the store: %v", k, p.reads)
+ }
+ }
+}
+
+func runEndToEnd(t *testing.T, back func(t *testing.T, bucket string) release.Store) {
+ t.Run("plan", func(t *testing.T) {
+ h := newHeldHarness(t, 2, nil)
+ p := attach(t, h, back)
+ ok, err := h.plan(fakeIID, newSHA)
+ if err != nil || !ok {
+ t.Fatalf("plan = %v, %v\n%s", ok, err, h.out.String())
+ }
+ if len(h.verbs()) != 0 {
+ t.Fatalf("plan wrote %v", h.verbs())
+ }
+ p.mustRead(t, "get edges")
+ })
+
+ t.Run("roll", func(t *testing.T) {
+ h := newHeldHarness(t, 2, func(c *Config) {
+ pub := strings.TrimSpace(string(floorFixture(t, "router-pointer-golden.pub")))
+ c.ReleasePublicKey = &pub
+ })
+ h.rollPointer(t, "v0.35.0")
+ p := attach(t, h, back)
+ if err := h.heldRoll(); err != nil {
+ t.Fatalf("%v\n%s", err, h.out.String())
+ }
+ f := h.f
+ want := []string{"prepare", "minimum", "enter", "drain", "permit", "apply", "exit", "fence-clear", "minimum", "revoke"}
+ if !reflect.DeepEqual(f.writes, want) {
+ t.Fatalf("writes %v", f.writes)
+ }
+ if f.minimum != 2 || f.desired != 2 || f.boxes[fakeIID]["binary_sha256"] != newSHA || h.activeTx() != "" {
+ t.Fatalf("shape %d %d binary %v", f.minimum, f.desired, f.boxes[fakeIID]["binary_sha256"])
+ }
+ floor, _ := h.txJournal("t6-roll").Last("floor", nil)
+ if floor["rule"] != "drain" || !sameValue(floor["releases"], map[string]any{newSHA: "v0.35.0"}) {
+ t.Fatalf("floor %v", floor)
+ }
+ h.mustH4()
+ p.mustRead(t, "get pointer", "list edges", "get edges", "dirs lock", "list lock", "get lock")
+ })
+
+ t.Run("replace", func(t *testing.T) {
+ h := newHeldHarness(t, 2, nil)
+ p := attach(t, h, back)
+ if err := h.depart("replace", heldTx); err != nil {
+ t.Fatalf("%v\n%s", err, h.out.String())
+ }
+ f := h.f
+ if want := []string{"minimum", "enter", "drain", "edge-stop", "terminate", "desired", "minimum"}; !reflect.DeepEqual(h.verbs(), want) {
+ t.Fatalf("verbs %v", h.verbs())
+ }
+ if f.minimum != 2 || f.desired != 2 || f.states[fakeIID] != "Terminated" || f.states[replacementIID] != "InService" {
+ t.Fatalf("shape %d %d states %v", f.minimum, f.desired, f.states)
+ }
+ if done, _ := h.txJournal(heldTx).Last("done", nil); done["outcome"] != "replaced" {
+ t.Fatalf("done %v", done)
+ }
+ h.mustH4()
+ p.mustRead(t, "list edges", "get edges", "dirs lock", "list lock", "get lock")
+ // The departure was read from the store: the member's edges file is
+ // gone from it and the replacement's is there.
+ keys, err := p.Bucket(h.c.Bucket).(publishedStore).back.List(bg, "control/edges/")
+ if err != nil {
+ t.Fatal(err)
+ }
+ listed := strings.Join(keys, " ")
+ if strings.Contains(listed, ref(fakeIID)) || !strings.Contains(listed, ref(replacementIID)) {
+ t.Fatalf("edges in the store: %v", keys)
+ }
+ })
+
+ t.Run("remove", func(t *testing.T) {
+ third := ref(fmt.Sprintf("i-%017x", 2))
+ h := removeHarness(t, map[string]any{ref(fakeIID): []any{"shop"}, ref(fakePeer): []any{"shop"}, third: []any{"blog"}})
+ p := attach(t, h, back)
+ if err := h.depart("remove", heldTx); err != nil {
+ t.Fatalf("%v\n%s", err, h.out.String())
+ }
+ f := h.f
+ if want := []string{"minimum", "enter", "drain", "edge-stop", "terminate"}; !reflect.DeepEqual(h.verbs(), want) {
+ t.Fatalf("verbs %v", h.verbs())
+ }
+ if f.minimum != 2 || f.desired != 2 || f.maximum != 3 || f.states[fakeIID] != "Terminated" {
+ t.Fatalf("shape %d %d %d state %s", f.minimum, f.desired, f.maximum, f.states[fakeIID])
+ }
+ if done, _ := h.txJournal(heldTx).Last("done", nil); done["outcome"] != "removed" {
+ t.Fatalf("done %v", done)
+ }
+ h.mustH4()
+ p.mustRead(t, "list edges", "get edges", "dirs lock", "list lock", "get lock")
+ })
+}
diff --git a/internal/grouproll/parity_test.go b/internal/grouproll/parity_test.go
new file mode 100644
index 000000000..b2a945c4f
--- /dev/null
+++ b/internal/grouproll/parity_test.go
@@ -0,0 +1,316 @@
+//go:build linux || darwin
+
+package grouproll
+
+import (
+ "bufio"
+ "errors"
+ "io/fs"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "regexp"
+ "strings"
+ "testing"
+)
+
+// The parity ledger (spec §10.4): every test of the Python roll, held and
+// probe suites (testdata/python-tests.txt, frozen at the port's merge, with
+// the floor branch's held tests marked held-floor) has a row in
+// testdata/parity-ledger.tsv naming the Go tests that cover it, or a reason
+// it does not apply that cites a deviation of spec §7 (V1-V11) or a
+// controller ruling. Every Go test a row names must exist.
+
+// ledgerPackages are the directories a ledger row's Go test may live in,
+// by the prefix it is named with ("" is this package).
+var ledgerPackages = map[string]string{
+ "": ".",
+ "grouprollaws": "../grouprollaws",
+ "main": "../..",
+ "release": "../release",
+}
+
+// pythonSuites are python-tests.txt's sources read from this branch.
+var pythonSuites = map[string]string{
+ "roll": "../../scripts/region_group_roll_test.py",
+ "held": "../../scripts/region_group_held_test.py",
+ "probe": "../../scripts/region_group_probe_test.py",
+}
+
+var (
+ ledgerReason = regexp.MustCompile(`^(V([1-9]|1[01]): |ruling: )`)
+ goTestFunc = regexp.MustCompile(`(?m)^func (Test[A-Za-z0-9_]*)\(\w+ \*testing\.T\) \{`)
+ pyClass = regexp.MustCompile(`^class (\w+)`)
+ pyTest = regexp.MustCompile(`^ def (test_\w+)\(`)
+ pyTableRow = regexp.MustCompile(`^\s+\("(\w+)", `)
+)
+
+type ledgerRow struct {
+ source, python, status, note string
+ goTests []string
+ line int
+}
+
+func readTSV(t *testing.T, path string, columns int) [][]string {
+ t.Helper()
+ f, err := os.Open(path)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer f.Close()
+ var rows [][]string
+ s := bufio.NewScanner(f)
+ for n := 1; s.Scan(); n++ {
+ fields := strings.Split(s.Text(), "\t")
+ if len(fields) != columns {
+ t.Fatalf("%s:%d: %d fields, want %d", path, n, len(fields), columns)
+ }
+ rows = append(rows, fields)
+ }
+ if err := s.Err(); err != nil {
+ t.Fatal(err)
+ }
+ return rows
+}
+
+// goTests lists the top-level Go tests declared in dir's test files.
+func goTests(t *testing.T, dir string) map[string]bool {
+ t.Helper()
+ paths, err := filepath.Glob(filepath.Join(dir, "*_test.go"))
+ if err != nil || len(paths) == 0 {
+ t.Fatalf("no test files in %s: %v", dir, err)
+ }
+ out := map[string]bool{}
+ for _, p := range paths {
+ b, err := os.ReadFile(p)
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, m := range goTestFunc.FindAllSubmatch(b, -1) {
+ out[string(m[1])] = true
+ }
+ }
+ return out
+}
+
+// pythonTestNames is scripts/grouproll-golden/python_tests.py's reading of
+// one suite: Class.test_name for each test method, and the roll suite's
+// classify table rows as ClassifyTests.test_table_<row>.
+func pythonTestNames(body string) []string {
+ var out []string
+ class, table := "", false
+ for _, line := range strings.Split(body, "\n") {
+ switch {
+ case strings.HasPrefix(line, "CLASSIFY_ROWS = ["):
+ table = true
+ case table && strings.HasPrefix(line, "]"):
+ table = false
+ case table:
+ if m := pyTableRow.FindStringSubmatch(line); m != nil {
+ out = append(out, "ClassifyTests.test_table_"+m[1])
+ }
+ }
+ if m := pyClass.FindStringSubmatch(line); m != nil {
+ class = m[1]
+ } else if strings.HasPrefix(line, "def ") {
+ class = ""
+ } else if m := pyTest.FindStringSubmatch(line); m != nil && class != "" {
+ out = append(out, class+"."+m[1])
+ }
+ }
+ return out
+}
+
+func TestParityLedgerComplete(t *testing.T) {
+ listed := map[[2]string]bool{}
+ for _, f := range readTSV(t, filepath.Join("testdata", "python-tests.txt"), 2) {
+ key := [2]string{f[0], f[1]}
+ if listed[key] {
+ t.Errorf("python-tests.txt lists %s %s twice", f[0], f[1])
+ }
+ listed[key] = true
+ }
+
+ // While the Python suites exist, they hold no test the list lacks.
+ for source, path := range pythonSuites {
+ body, err := os.ReadFile(path)
+ if errors.Is(err, fs.ErrNotExist) {
+ continue
+ }
+ if err != nil {
+ t.Fatal(err)
+ }
+ names := pythonTestNames(string(body))
+ if len(names) == 0 {
+ t.Fatalf("%s: no tests found", path)
+ }
+ for _, name := range names {
+ if !listed[[2]string{source, name}] {
+ t.Errorf("%s holds %s, which python-tests.txt lacks: add it and its ledger row", path, name)
+ }
+ }
+ }
+
+ tests := map[string]map[string]bool{}
+ for prefix, dir := range ledgerPackages {
+ tests[prefix] = goTests(t, dir)
+ }
+ rows := readTSV(t, filepath.Join("testdata", "parity-ledger.tsv"), 5)
+ if strings.Join(rows[0], "\t") != "source\tpython\tstatus\tgo\tnote" {
+ t.Fatalf("ledger header %v", rows[0])
+ }
+ seen := map[[2]string]bool{}
+ counts := map[string]int{}
+ for i, f := range rows[1:] {
+ r := ledgerRow{source: f[0], python: f[1], status: f[2], note: f[4], goTests: strings.Fields(f[3]), line: i + 2}
+ key := [2]string{r.source, r.python}
+ switch {
+ case !listed[key]:
+ t.Errorf("ledger:%d: %s %s is not in python-tests.txt", r.line, r.source, r.python)
+ case seen[key]:
+ t.Errorf("ledger:%d: %s %s has a second row", r.line, r.source, r.python)
+ }
+ seen[key] = true
+ counts[r.status]++
+ switch r.status {
+ case "ported":
+ if len(r.goTests) == 0 {
+ t.Errorf("ledger:%d: %s is ported but names no Go test", r.line, r.python)
+ }
+ case "does-not-apply":
+ if len(r.goTests) != 0 || !ledgerReason.MatchString(r.note) {
+ t.Errorf("ledger:%d: %s does not apply: it needs a reason citing V1-V11 or a ruling, and no Go test", r.line, r.python)
+ }
+ default:
+ t.Errorf("ledger:%d: status %q", r.line, r.status)
+ }
+ for _, name := range r.goTests {
+ prefix, test, ok := strings.Cut(name, ".")
+ if !ok {
+ prefix, test = "", name
+ }
+ test, _, _ = strings.Cut(test, "/")
+ if tests[prefix] == nil || !tests[prefix][test] {
+ t.Errorf("ledger:%d: %s names %s, which does not exist", r.line, r.python, name)
+ }
+ }
+ }
+ for key := range listed {
+ if !seen[key] {
+ t.Errorf("python-tests.txt's %s %s has no ledger row", key[0], key[1])
+ }
+ }
+ t.Logf("%d Python tests: %v", len(listed), counts)
+}
+
+// Ledger gaps: Python tests no earlier task ported.
+
+// test_fixtures_contain_no_live_identifiers: the copied live fixtures hold
+// only placeholder identifiers and documentation addresses.
+func TestFixturesContainNoLiveIdentifiers(t *testing.T) {
+ forbidden := []string{"640012953448", "carlos-dev", "oncarlos.com", "172.31.", "fe80::"}
+ instances := map[string]bool{"i-0123456789abcdef0": true, "i-0fedcba9876543210": true,
+ "i-11111111111111111": true, "i-22222222222222222": true}
+ boxes := map[string]bool{"g-00000000000000000000": true, "g-11111111111111111111": true}
+ instance := regexp.MustCompile(`\bi-[0-9a-f]{8,17}\b`)
+ box := regexp.MustCompile(`\bg-[0-9a-f]{20}\b`)
+ address := regexp.MustCompile(`\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b`)
+ files := 0
+ err := filepath.WalkDir(filepath.Join("testdata", "live"), func(path string, d fs.DirEntry, err error) error {
+ if err != nil || d.IsDir() {
+ return err
+ }
+ files++
+ b, err := os.ReadFile(path)
+ if err != nil {
+ return err
+ }
+ body := d.Name() + string(b)
+ for _, v := range forbidden {
+ if strings.Contains(body, v) {
+ t.Errorf("%s holds %q", path, v)
+ }
+ }
+ for _, v := range instance.FindAllString(body, -1) {
+ if !instances[v] {
+ t.Errorf("%s holds instance %s", path, v)
+ }
+ }
+ for _, v := range box.FindAllString(body, -1) {
+ if !boxes[v] {
+ t.Errorf("%s holds box %s", path, v)
+ }
+ }
+ for _, v := range address.FindAllString(body, -1) {
+ if !strings.HasPrefix(v, "192.0.2.") && !strings.HasPrefix(v, "198.51.100.") && !strings.HasPrefix(v, "203.0.113.") {
+ t.Errorf("%s holds address %s", path, v)
+ }
+ }
+ return nil
+ })
+ if err != nil || files == 0 {
+ t.Fatalf("walked %d fixtures: %v", files, err)
+ }
+}
+
+// test_fake_status_preserves_live_permit_shape: the fake's status keeps
+// the live permit section's fields through permit, apply and revoke.
+func TestFakeStatusPreservesLivePermitShape(t *testing.T) {
+ f := newFake(t, 2)
+ f.states[fakeIID], f.tg[fakeIID] = "Standby", "unused"
+ f.minimum, f.desired = 1, 1
+ permit := map[string]any{"v": int64(1), "transaction": "example", "action": "apply",
+ "expires": f.now.Unix() + 3600, "old_sha256": oldSHA, "new_sha256": newSHA, "phase": "mutation",
+ "allow_rollback": true}
+ want := sortedKeys(liveStatus(t)["permit"].(map[string]any))
+ for _, verb := range []string{"permit", "apply", "revoke"} {
+ a := BoxArgs{}
+ if verb == "permit" {
+ a.Permit = permit
+ }
+ if _, err := f.Run(bg, fakeIID, verb, a, nil); err != nil {
+ t.Fatalf("%s: %v", verb, err)
+ }
+ r, err := f.Run(bg, fakeIID, "status", BoxArgs{}, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ got := sortedKeys(r.Value.(map[string]any)["permit"].(map[string]any))
+ if strings.Join(got, ",") != strings.Join(want, ",") {
+ t.Errorf("after %s the permit fields are %v, want %v", verb, got, want)
+ }
+ }
+}
+
+// test_remote_shell_preserves_permit_bytes: the framed permit command,
+// run by /bin/sh against fixture executables only (an id that answers 0
+// and a carlos that echoes its stdin), hands the box the permit's exact
+// bytes. No root verb or /opt file is touched.
+func TestRemoteShellPreservesPermitBytes(t *testing.T) {
+ root := t.TempDir()
+ must(t, os.WriteFile(filepath.Join(root, "id"), []byte("#!/bin/sh\nprintf '0\\n'\n"), 0o700))
+ binary := filepath.Join(root, "carlos")
+ must(t, os.WriteFile(binary, []byte("#!/bin/sh\ncat\n"), 0o700))
+ permit := map[string]any{"transaction": "example", "old_sha256": oldSHA, "new_sha256": newSHA}
+ command, err := RemoteCommand("permit", BoxArgs{Permit: permit}, "nonce")
+ must(t, err)
+ // The command ends with the script as one shlex.quote word.
+ i := strings.Index(command, " /bin/sh -c '")
+ if i < 0 || !strings.HasSuffix(command, "'") {
+ t.Fatalf("command %q", command)
+ }
+ quoted := command[i+len(" /bin/sh -c '") : len(command)-1]
+ script := strings.ReplaceAll(quoted, `'"'"'`, `'`)
+ script = strings.ReplaceAll(script, carlosBinary, shellQuote(binary))
+ cmd := exec.Command("/bin/sh", "-c", script)
+ cmd.Env = []string{"PATH=" + root + ":/usr/bin:/bin"}
+ out, err := cmd.Output()
+ if err != nil {
+ t.Fatalf("%v: %s", err, out)
+ }
+ body, err := pythonEncoded(permit)
+ must(t, err)
+ if !strings.Contains(string(out), string(body)) || !strings.Contains(string(out), "nonce:END:0") {
+ t.Fatalf("output %q lacks the permit %s or the frame", out, body)
+ }
+}
diff --git a/internal/grouproll/testdata/parity-ledger.tsv b/internal/grouproll/testdata/parity-ledger.tsv
new file mode 100644
index 000000000..8d15c757a
--- /dev/null
+++ b/internal/grouproll/testdata/parity-ledger.tsv
@@ -0,0 +1,294 @@
+source python status go note
+roll RollArgvTests.test_plan ported TestPlanReady
+roll RollArgvTests.test_roll_generated_transaction ported TestRollDefaultTransactionIsUUIDHex main.TestCLIGroupLeaves
+roll RollArgvTests.test_roll_chosen_transaction ported TestRollChosenTransaction main.TestCLIGroupLeaves
+roll RollArgvTests.test_resume ported TestRollVerbsOnFreshJournal
+roll RollArgvTests.test_status ported TestStatusLockFreeAndReadOnly
+roll RollArgvTests.test_return ported TestRollVerbsOnFreshJournal
+roll RollArgvTests.test_rollback ported TestRollVerbsOnFreshJournal
+roll RollArgvTests.test_abandon ported TestRollAbandonBeforeGroupWriteOnly TestRollAbandonAfterInterruptedPreflight
+roll CloseLostArgvChecks.test_close_lost_terminated_preserves_flags_and_status ported TestCloseLostTerminatedPreservesFlagsAndStatus TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_not_found ported TestCloseLostNotFound TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_refuses_present_group_states ported TestCloseLostRefusesPresentGroupStates TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_refuses_nonterminal_ec2_states ported TestCloseLostRefusesNonterminalEC2States TestProbeCloseLost grouprollaws.TestInstanceNotFound
+roll CloseLostArgvChecks.test_close_lost_refuses_read_errors ported TestCloseLostRefusesReadErrors TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_refuses_wrong_group_identity ported TestCloseLostRefusesWrongGroupIdentity TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_refuses_invalid_ec2_evidence ported TestCloseLostRefusesReadErrors grouprollaws.TestInstanceNotFound grouprollaws.TestMissingCollectionsAreNeverAbsence
+roll CloseLostArgvChecks.test_close_lost_refuses_no_journal ported TestCloseLostRefusals TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_refuses_finished_journal_even_with_active_pointer ported TestCloseLostRefusals TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_refuses_wrong_kind ported TestCloseLostRefusals TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_refuses_without_active_pointer ported TestCloseLostRefusals TestProbeCloseLost
+roll CloseLostArgvChecks.test_close_lost_obeys_group_lock ported TestCloseLostRefusals TestProbeCloseLost
+roll CloseLostArgvChecks.test_later_roll_can_start ported TestCloseLostLaterRollCanStart
+roll StandbyTests.test_standby_roll_order ported TestRollStandbyOrder
+roll StandbyTests.test_standby_response_loss ported TestRollStandbyResponseLoss
+roll StandbyTests.test_standby_resume ported TestRollStandbyResume
+roll StandbyTests.test_standby_resume_before_every_write ported TestRollStandbyResume the before=true cases
+roll StandbyTests.test_standby_shared_outage ported TestRollStandbySharedOutage
+roll StandbyTests.test_standby_exit_pending_wait ported TestRollHookIsDivergenceWithoutCompletion
+roll StandbyTests.test_standby_exit_pending_wait_resume_and_loss ported TestRollExitPendingWaitResumeAndLoss
+roll StandbyTests.test_standby_exit_pending_wait_admission_loss ported TestRollDefaultAbandonAndResumeStayFailed
+roll StandbyTests.test_precheck_failures_before_minimum ported TestRollPrecheckFailuresBeforeMinimum
+roll StandbyTests.test_lock_refuses_second_writer ported TestRollLockRefusesSecondWriter TestLockRefusesSecondWriter
+roll StandbyTests.test_rollback_same_transaction ported TestRollRollbackSameTransaction
+roll StandbyTests.test_standby_rollback_crash_boundaries ported TestRollRollbackCrashBoundaries
+roll StandbyTests.test_standby_preinservice_is_not_inservice ported TestRollPreInServiceIsNotInService
+roll StandbyTests.test_standby_pending_proceed_without_completion ported TestRollPendingProceedWithoutCompletion
+roll StandbyTests.test_fake_abandon_terminates_and_replaces ported TestFakeAbandonTerminatesAndReplaces
+roll StandbyTests.test_standby_return_process_or_transaction_changes ported TestRollReturnProcessOrTransactionChanges
+roll StandbyTests.test_standby_post_exit_api_loss_is_resumable ported TestRollPostExitAPILossIsResumable
+roll StandbyTests.test_consumed_uncertain_action_never_replays ported TestRollConsumedUncertainActionNeverReplays TestRollMutationVerifiesConsumedAction
+roll StandbyTests.test_permit_readiness_requires_action_and_unconsumed ported TestRollPermitRequiresActionAndUnconsumed
+roll StandbyTests.test_stale_and_racing_readiness ported TestReadinessStaleAndRacing TestRollStaleAndRacingReadiness
+roll StandbyTests.test_journal_missing_or_corrupt_refuses_before_write ported TestRollJournalMissingOrCorruptRefusesBeforeWrite
+roll StandbyTests.test_plan_collects_refusals_without_mutation ported TestPlanCollectsRefusalsWithoutMutation
+roll CutTests.test_hook_is_divergence_without_completion ported TestRollHookIsDivergenceWithoutCompletion
+roll CutTests.test_default_abandon_and_resume_stay_failed ported TestRollDefaultAbandonAndResumeStayFailed
+roll CutTests.test_hook_observed_before_target_describe_error_blocks ported TestRollHookObservedBeforeTargetErrorBlocks
+roll CutTests.test_death_during_divergence_recording ported TestRollDeathDuringDivergenceRecording
+roll CutTests.test_provider_return_without_tool_completion_is_held ported TestRollProviderReturnIsHeld
+roll RoundOneTests.test_prepare_previous_results_refuse_before_group_write ported TestRollPreparePreviousResults
+roll RoundOneTests.test_release_floor_matches_go ported TestRollReleaseFloor TestConfigMatchesScriptValidation
+roll RoundOneTests.test_wrong_digest_or_unchanged_process_is_immediate ported TestRollWrongDigestOrUnchangedProcess
+roll RoundOneTests.test_publication_lag_and_two_second_margin ported TestReadinessPublicationMargin TestRollPublicationLag
+roll RoundOneTests.test_readiness_clock_starts_at_first_response_and_peers_get_sixty ported TestReadinessClockStartsAtFirstResponse TestRollReadinessClockStartsAtFirstResponse
+roll RoundOneTests.test_observation_age_includes_first_response_journal_flush ported TestReadinessObservedBeforeJournalFlush
+roll RoundOneTests.test_divergence_hold_crash_and_response_loss ported TestRollDivergenceHoldCrashAndResponseLoss
+roll RoundOneTests.test_cut_apply_terminates_session_then_reads_status ported TestRollCutApplyTerminatesSessionThenReadsStatus
+roll RoundOneTests.test_unexpected_exit_success_is_journaled_before_describe ported TestRollUnexpectedExitSuccessIsJournaled
+roll RoundOneTests.test_tty_operator_identity_is_recorded ported main.TestCLIAttendedByFallback V1: the script read SUDO_USER under root; the verb runs unprivileged and records --attended-by or the login
+roll RoundOneTests.test_expired_exit_observation_leaves_resumable_record ported TestRollExpiredExitObservationIsResumable
+roll RoundOneTests.test_ordinary_describe_blip_and_interrupt_do_not_block ported TestRollDescribeBlipAndInterruptDoNotBlock
+roll RoundOneTests.test_unknown_or_replaced_member_is_explicit_failed_probe ported TestRollUnknownOrReplacedMemberIsFailedProbe
+roll RoundOneTests.test_external_minimum_change_is_not_adopted ported TestRollExternalMinimumChangeIsNotAdopted
+roll RoundOneTests.test_fake_capacity_rules ported TestFakeCapacityRules
+roll RoundOneTests.test_resume_reads_status_first_after_cut_apply ported TestRollResumeReadsStatusFirstAfterCutApply
+roll RoundOneTests.test_status_is_lock_free_and_read_only ported TestStatusLockFreeAndReadOnly
+roll RollTransactionTests.test_chosen_transaction_cli_reaches_journal_active_and_permit ported TestRollChosenTransaction main.TestCLIGroupLeaves
+roll RollTransactionTests.test_finished_transaction_refuses_without_calls_or_writes ported TestRollFinishedTransactionRefuses
+roll RollTransactionTests.test_unfinished_transaction_refuses_without_calls_or_writes ported TestRollUnfinishedTransactionRefuses
+roll RollTransactionTests.test_invalid_or_probe_transaction_refuses_before_state_access ported TestRollInvalidOrProbeTransactionRefuses
+roll RollTransactionTests.test_cli_invalid_or_probe_transaction_refuses_before_config_or_state ported main.TestCLIGroupLeaves
+roll RollTransactionTests.test_default_transaction_is_uuid_hex ported TestRollDefaultTransactionIsUUIDHex
+roll RoundTwoTests.test_return_waits_for_warming_targets ported TestRollReturnWaitsForWarmingTargets
+roll RoundTwoTests.test_warming_timeout_retains_record_then_resumes ported TestRollWarmingTimeoutRetainsRecordThenResumes
+roll RoundTwoTests.test_rollback_after_failed_apply_readback ported TestRollRollbackAfterFailedApplyReadback
+roll RoundTwoTests.test_direct_return_classifies_pending_wait_before_refusal ported TestRollDirectReturnClassifiesPendingWait
+roll RoundTwoTests.test_unparseable_pointer_versions_refuse_before_group_write ported TestRollUnparseablePointerVersions
+roll RoundTwoTests.test_automatic_rollback_resume_after_recording_decision ported TestRollAutomaticRollbackResumeAfterDecision
+roll RoundTwoTests.test_failed_apply_digest_readback_can_recover_to_new ported TestRollFailedApplyReadbackRecoversByRollback
+roll RoundTwoTests.test_hold_describe_blip_after_provider_return_is_resumable ported TestRollHoldDescribeBlipIsResumable
+roll RoundTwoTests.test_abandon_cli_after_interrupted_preflight ported TestRollAbandonAfterInterruptedPreflight
+roll RoundTwoTests.test_abandon_before_group_write_only ported TestRollAbandonBeforeGroupWriteOnly
+roll LiveFixtureTests.test_live_group_and_instance_parsing ported grouprollaws.TestDescribe grouprollaws.TestMembership
+roll LiveFixtureTests.test_live_targets_both_ports_and_duplicate_registration ported grouprollaws.TestTargetsDuplicatePort
+roll LiveFixtureTests.test_live_online_and_hook_parsing ported grouprollaws.TestOnline grouprollaws.TestHook
+roll LiveFixtureTests.test_live_activities_are_launches_only ported grouprollaws.TestActivitiesKinds
+roll LiveFixtureTests.test_documented_standby_activity_descriptions ported grouprollaws.TestActivitiesKinds
+roll LiveFixtureTests.test_live_edges_and_root_frame ported TestReadinessLiveFrame
+roll LiveFixtureTests.test_fake_status_preserves_live_permit_shape ported TestFakeStatusPreservesLivePermitShape
+roll LiveFixtureTests.test_fixtures_contain_no_live_identifiers ported TestFixturesContainNoLiveIdentifiers
+roll AdapterTests.test_apply_verb_and_session_bounds ported TestRemoteCommandGolden grouprollaws.TestSessionTimeouts
+roll AdapterTests.test_timeout_session_id_and_termination_are_journaled ported TestCallTerminatesTimedOutSession
+roll AdapterTests.test_timeout_termination_failure_preserves_timeout_and_journals_both ported TestCallTerminatesTimedOutSession
+roll AdapterTests.test_unexpected_exit_success_is_uncertain_success ported grouprollaws.TestWriteShapes TestRollUnexpectedExitSuccessIsJournaled
+roll AdapterTests.test_config_strict_and_no_real_defaults ported TestConfigMatchesScriptValidation TestLoadConfig
+roll AdapterTests.test_api_shapes_match_policy_and_remote_verbs ported grouprollaws.TestWriteShapes grouprollaws.TestSessionStartArgs grouprollaws.TestBucketReadsOnly TestRemoteCommandGolden no method can send CompleteLifecycleAction (the reviewed method set)
+roll AdapterTests.test_remote_frame_and_root_failure_refuse ported TestParseFramed TestRemoteCommandGolden grouprollaws.TestSessionPluginExitNonzero grouprollaws.TestSessionStartFailure frame and root failures stay Refusal(remote); ruling: a failed StartSession API call is Uncertain(api), not Refusal(remote) (the script's CLI folded it into the plugin's nonzero exit)
+roll AdapterTests.test_remote_shell_preserves_permit_bytes ported TestRemoteShellPreservesPermitBytes
+roll AdapterTests.test_cli_flags_and_retry_environment ported grouprollaws.TestIsolatedEnvironment grouprollaws.TestAllowedEnvironment grouprollaws.TestDefaultsModeKeepsTimeouts the SDK replaces the CLI: same isolation, one attempt, 2 s connect and read bounds
+roll AdapterTests.test_api_keyboard_interrupt_propagates ported grouprollaws.TestSessionContextCancelKillsGroup TestPlanCancelled main.TestCLIGroupInterrupted
+roll AdapterTests.test_session_pty_captures_noninteractive_output ported grouprollaws.TestSessionReadsFrame
+roll AdapterTests.test_session_pty_stdin_is_terminal_without_eof ported grouprollaws.TestSessionReadsFrame
+roll AdapterTests.test_session_pty_plugin_returns_frames_without_stdin_eof ported grouprollaws.TestSessionReadsFrame
+roll AdapterTests.test_session_pty_timeout ported grouprollaws.TestSessionBoundKillsGroup grouprollaws.TestSessionLeaderExitsBeforeOutputEnds
+roll AdapterTests.test_fsync_precedes_provider_write ported TestRollFsyncPrecedesProviderWrite
+roll RoundThreeTests.test_box_action_time_does_not_consume_readiness_wait ported TestRollBoxActionTimeDoesNotConsumeReadinessWait
+roll RoundThreeTests.test_rollback_waits_for_cut_apply_lock_before_inspecting_digest ported TestRollRollbackWaitsForStatus
+roll ClassifyTests.test_table_hook_record_cut ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_targets_failed ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_wait_ready ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_wait_unready ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_wait_unknown ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_wait_wrong_capacity ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_wait_already_journaled ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_terminated ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_replaced ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_unknown ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_provider_return ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_pending ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_preinservice ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_proceed ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_standby_no_hold ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_wrong_capacity ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_timeout ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_rollback_observe ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_rollback_busy ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_rollback_observed ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_rollback_timeout ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_describe ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_ordinary_describe_error ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hook_describe_error ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_discover_hook_before_missing_intent ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hold_still_draining ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hold_entering ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hold_verified ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_hold_capacity_wrong ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_terminated_before_ack ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_absent_before_ack ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_replaced_before_ack ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_unknown_before_ack ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_unsent_unknown ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_wrong_template ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_standby_unobserved ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_standby_unready ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_standby_ready ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_standby_not_drained ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_standby_wrong_minimum ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_pending ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_proceed ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_preinservice ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_inservice_warming ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_inservice_unknown_readiness ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_inservice_drop ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_inservice_restore ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_inservice_finish ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_no_intent ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_return ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_done ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_observe_cut_action ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_prepare ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_peers ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_lower ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_unexplained_minimum ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_enter ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_mutate ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_readiness ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_verified ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll ClassifyTests.test_table_resume_entering ported TestClassifyGolden the recorder ran over this row (testdata/golden/classify.jsonl)
+roll SimulationTests.test_seeded_return_simulation ported TestSeededSimulation
+roll SimulationTests.test_simulation_mutations ported TestSimulationMutations
+roll MutationTests.test_ten_required_mutations ported TestRequiredMutations
+held ReplaceTests.test_replace_order_restores_shape_and_watches ported TestDepartReplaceOrderRestoresShapeAndWatches
+held ReplaceTests.test_replace_resumes_after_every_write ported TestDepartReplaceResumesAfterEveryWrite
+held ReplaceTests.test_failed_drain_returns_member_and_prints_cancel ported TestDepartFailedDrainReturnsMemberAndPrintsCancel
+held ReplaceTests.test_uncertain_drain_session_is_a_failed_drain ported TestDepartUncertainDrainSessionIsAFailedDrain
+held ReplaceTests.test_dropped_drain_session_rerun_joins_the_move ported TestDepartDroppedDrainSessionRerunJoinsTheMove
+held ReplaceTests.test_failed_drain_never_returns_a_member_still_moving ported TestDepartFailedDrainNeverReturnsAMemberStillMoving
+held ReplaceTests.test_remote_timeout_reruns_and_joins ported TestDepartRemoteTimeoutRerunsAndJoins
+held ReplaceTests.test_unknown_drain_status_never_returns_the_member ported TestDepartUnknownDrainStatusNeverReturnsTheMember
+held ReplaceTests.test_dropped_sessions_after_a_finished_move_return_fenced ported TestDepartDroppedSessionsAfterAFinishedMoveReturnFenced
+held ReplaceTests.test_lock_still_naming_member_refuses_action ported TestDepartLockStillNamingMemberRefusesAction
+held ReplaceTests.test_marker_and_other_owner_locks_pass ported TestDepartMarkerAndOtherOwnerLocksPass
+held ReplaceTests.test_stale_incarnation_refuses_action ported TestDepartStaleIncarnationRefusesAction
+held ReplaceTests.test_failed_drain_after_agent_restart_still_returns ported TestDepartFailedDrainAfterAgentRestartStillReturns
+held ReplaceTests.test_lock_sweep_bucket_is_the_config ported TestDepartLockSweepBucketIsTheConfig
+held ReplaceTests.test_lock_sweep_must_see_moved_hosts ported TestDepartLockSweepMustSeeMovedHosts
+held ReplaceTests.test_changed_incarnation_with_finished_drain_refuses ported TestDepartChangedIncarnationWithFinishedDrainRefuses
+held ReplaceTests.test_missing_fence_refuses_action ported TestDepartMissingFenceRefusesAction
+held ReplaceTests.test_edge_still_running_holds_standby_until_proven ported TestDepartEdgeStillRunningHoldsStandbyUntilProven
+held ReplaceTests.test_restart_after_last_check_is_fenced_and_stopped ported TestDepartRestartAfterLastCheckIsFencedAndStopped
+held ReplaceTests.test_entering_standby_is_waited_for ported TestDepartEnteringStandbyIsWaitedFor
+held ReplaceTests.test_hard_cut_after_terminate_intent_resumes ported TestDepartHardCutAfterTerminateIntentResumes
+held ReplaceTests.test_sent_terminate_is_not_repeated ported TestDepartSentTerminateIsNotRepeated
+held ReplaceTests.test_failed_or_cancelled_activity_after_unanswered_intent_is_retried ported TestDepartFailedOrCancelledActivityAfterUnansweredIntentIsRetried
+held ReplaceTests.test_quick_failure_then_accepted_retry_is_not_resent ported TestDepartQuickFailureThenAcceptedRetryIsNotResent
+held ReplaceTests.test_persistent_failure_is_an_explicit_recoverable_fail ported TestDepartPersistentFailureIsAnExplicitRecoverableFail
+held ReplaceTests.test_provider_changing_desired_on_terminate_fails ported TestDepartProviderChangingDesiredOnTerminateFails
+held CancelDrainTests.test_cancel_lifts_fence_after_failed_drain ported TestCancelDrainLiftsFenceAfterFailedDrain
+held CancelDrainTests.test_refused_cancel_keeps_fence ported TestCancelDrainRefusedKeepsFence
+held CancelDrainTests.test_cancel_proven_by_status ported TestCancelDrainProvenByStatus
+held CancelDrainTests.test_cancel_only_for_a_failed_drain_of_this_member ported TestCancelDrainOnlyForAFailedDrainOfThisMember
+held FloorTests.test_member_without_ha_take ported TestFloorMemberWithoutHATake TestDepartFloorRefused
+held FloorTests.test_member_with_other_ha_take ported TestFloorMemberWithOtherHATake TestDepartFloorRefused
+held FloorTests.test_fixed_forwarder_without_ha_take ported TestFloorFixedForwarderWithoutHATake TestDepartFloorRefused
+held FloorTests.test_stale_box_is_not_live ported TestFloorStaleEdgesFileIgnored TestDepartStaleBoxIsNotLive
+held FloorTests.test_old_pinned_template ported TestFloorOldPinnedTemplate TestDepartFloorRefused
+held FloorTests.test_uncomparable_pinned_template_is_an_error ported TestFloorUncomparablePinnedTemplateIsAnError TestDepartFloorErrorRefusesWithoutDR4
+held FloorTests.test_no_floor_config ported TestFloorNoFloorConfig TestDepartFloorRefused
+held FloorTests.test_unreadable_edges_file ported TestFloorUnreadableEdgesFile TestDepartFloorErrorRefusesWithoutDR4
+held FloorTests.test_listing_error_refuses_roll_without_dr4 ported TestFloorListingErrorRefusesWithoutDR4 TestDrainedRollListingErrorRefusesWithoutDR4
+held RemoveTests.test_remove_leaves_n_minus_one_and_names_box_count ported TestDepartRemoveLeavesNMinusOneAndNamesBoxCount
+held RemoveTests.test_remove_refuses_an_unserved_pool ported TestDepartRemoveRefusesAnUnservedPool
+held RemoveTests.test_remove_refuses_unknown_member_pools ported TestDepartRemoveRefusesUnknownMemberPools
+held RemoveMinimumTests.test_remove_needs_two_survivors ported TestDepartRemoveNeedsTwoSurvivors
+held DrainedRollTests.test_roll_drains_before_apply_and_lifts_fence_after_exit ported TestDrainedRollDrainsBeforeApplyAndLiftsFenceAfterExit
+held DrainedRollTests.test_roll_failed_drain_returns_unchanged ported TestDrainedRollFailedDrainReturnsUnchanged
+held DrainedRollTests.test_roll_lock_after_permit_returns_and_revokes ported TestDrainedRollLockAfterPermitReturnsAndRevokes
+held DrainedRollTests.test_roll_below_floor_uses_dr4_and_says_so ported TestDrainedRollBelowFloorUsesDR4AndSaysSo
+held DrainedRollTests.test_roll_to_release_below_floor_uses_dr4 ported TestDrainedRollToReleaseBelowFloorUsesDR4 TestFloorRollToReleaseBelowFloorUsesDR4
+held DrainedRollTests.test_drained_roll_resumes_after_every_write ported TestDrainedRollResumesAfterEveryWrite
+held TerminateDecisionTests.test_every_combination ported TestTerminateEveryCombination the 92,169-row grid against the ported oracle (not recorded into golden)
+held TerminateDecisionTests.test_previous_failure_never_decides_an_answered_attempt ported TestTerminateGolden TestDepartQuickFailureThenAcceptedRetryIsNotResent grouprollaws.TestActivitiesKinds
+held TerminateDecisionTests.test_activity_status_none_is_not_a_veto_of_its_own ported TestTerminateGolden grouprollaws.TestActivitiesKinds
+held TerminateDecisionTests.test_adapter_keeps_status_code ported grouprollaws.TestActivitiesKinds
+held AdapterH4Tests.test_trap_fires_on_any_other_lowering ported TestDepartMutations grouprollaws.TestWriteShapes
+held AdapterH4Tests.test_adapter_refuses_every_other_lowering ported grouprollaws.TestWriteShapes TestCallH4
+held AdapterH4Tests.test_terminate_of_standby_member_without_decrement ported grouprollaws.TestWriteShapes TestCallH4
+held AdapterH4Tests.test_desired_only_raises ported grouprollaws.TestWriteShapes TestCallH4
+held AdapterH4Tests.test_operator_enters_only_its_member ported TestCallH4
+held RemoteCommandTests.test_commands ported TestRemoteCommandGolden TestRemoteCommandMatchesDocumentPattern
+held RemoteCommandTests.test_drain_output ported TestParseFramed TestParseFramedDrainCap
+held RemoteCommandTests.test_edge_stop_output ported TestParseFramed
+held ConfigTests.test_optional_keys ported TestConfigMatchesScriptValidation
+held DepartArgvTests.test_replace_without_floor_config_refuses_read_only ported TestDepartFloorRefused main.TestCLIGroupLeaves
+held DepartArgvTests.test_remove_with_two_members_refuses ported TestDepartRemoveNeedsTwoSurvivors
+held DepartArgvTests.test_cancel_drain_without_journal_refuses ported TestCancelDrainOnlyForAFailedDrainOfThisMember
+held DepartArgvTests.test_transaction_ids ported main.TestCLIGroupLeaves TestDepartBeginRowAndArguments
+probe ProbeArgvTests.test_probe ported TestProbeArgv main.TestCLIProbeLeaves V7: the leaf is probe start
+probe ProbeArgvTests.test_resume ported TestProbeArgv
+probe ProbeArgvTests.test_status ported TestProbeArgv TestProbeCLIAndStatus
+probe ProbeArgvTests.test_abandon ported TestProbeArgv
+probe ProbeTests.test_instance_health_casing_preflight ported TestProbeInstanceHealthCasing grouprollaws.TestMembership
+probe ProbeTests.test_probe_pass_order ported TestProbePassOrder
+probe ProbeTests.test_probe_lost_exit_response ported TestProbeLostExitResponse
+probe ProbeTests.test_probe_pending_wait ported TestProbePendingWait
+probe ProbeTests.test_probe_provider_inservice_after_hook ported TestProbeProviderInServiceAfterHook
+probe ProbeTests.test_probe_default_abandon_fail ported TestProbeDefaultAbandonFail
+probe ProbeTests.test_probe_stale_observation ported TestProbeStaleObservation
+probe ProbeTests.test_probe_lock_and_active ported TestProbeLockAndActive
+probe ProbeTests.test_probe_abandon_before_group_write ported TestProbeAbandonBeforeGroupWrite
+probe ProbeTests.test_probe_abandon_refuses_group_intent ported TestProbeAbandonRefusesGroupIntent
+probe ProbeTests.test_probe_pass_refuses_journal_evidence ported TestProbePassRefusesJournalEvidence
+probe ProbeTests.test_probe_journal_isolation ported TestProbeLeavesKindIsolation TestRollVerbsRefuseProbeJournal
+probe ProbeTests.test_probe_death_at_every_write ported TestProbeDeathAtEveryWrite
+probe ProbeTests.test_probe_changed_process ported TestProbeChangedProcess
+probe ProbeTests.test_probe_waits_for_both_deregistrations ported TestProbeWaitsForBothDeregistrations
+probe ProbeTests.test_probe_instance_hook_survives_target_error ported TestProbeInstanceHookSurvivesTargetError
+probe ProbeTests.test_probe_no_revoke_when_permit_appears ported TestProbeNoRevokeWhenPermitAppears
+probe ProbeTests.test_probe_preflight_refusals ported TestProbePreflightRefusals
+probe ProbeTests.test_probe_cli_and_status ported TestProbeCLIAndStatus main.TestCLIProbeLeaves
+probe ProbeTests.test_probe_actual_member_transitions ported TestProbeActualMemberTransitions
+probe ProbeTests.test_probe_lost_hold_response ported TestProbeLostHoldResponse
+probe ProbeTests.test_probe_root_and_attendance_required ported main.TestCLIProbeLeaves main.TestCLIRefusesRootBoxWindows V1: the script required euid 0; the verb refuses root (root_refused); attendance unchanged
+probe ProbeTests.test_instance_adapter ported grouprollaws.TestMembership
+probe ProbeMutationTests.test_five_probe_mutations ported TestProbeMutations TestProbeGroupWritesAreMinimumEnterExit
+held-floor ReleaseMapTests.test_reference_signer_reproduces_go does-not-apply V5: the verb maps SHAs with release's Go pointer reader (release.ReleaseForArtifact, the code boxes use); there is no Python verifier or signer
+held-floor ReleaseMapTests.test_tool_verifier_is_cryptography does-not-apply V5: the verb maps SHAs with release's Go pointer reader (release.ReleaseForArtifact, the code boxes use); there is no Python verifier or signer
+held-floor ReleaseMapTests.test_current_release_meets_floor ported TestFloorCurrentReleaseMeetsFloor
+held-floor ReleaseMapTests.test_history_release_meets_floor ported TestFloorHistoryRelease
+held-floor ReleaseMapTests.test_history_release_below_floor_uses_dr4 ported TestFloorHistoryRelease
+held-floor ReleaseMapTests.test_configured_platform ported TestFloorConfiguredPlatform
+held-floor ReleaseMapTests.test_unknown_sha ported TestFloorUnknownSHA release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_bad_signature ported TestFloorPointerRefusals release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_wrong_component_or_channel ported TestFloorPointerRefusals release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_invalid_payloads ported TestFloorPointerRefusals release.TestReleaseForArtifactConservative
+held-floor ReleaseMapTests.test_valid_signed_payload_forms ported TestFloorValidSignedPayloadForms
+held-floor ReleaseMapTests.test_scoped_key_is_refused ported TestFloorPointerRefusals release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_extra_wrapper_field_is_refused ported TestFloorPointerRefusals release.TestReleaseForArtifactConservative
+held-floor ReleaseMapTests.test_cancelled_channel_is_refused ported TestFloorPointerRefusals release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_without_cryptography_refuses does-not-apply V5: the verb maps SHAs with release's Go pointer reader (release.ReleaseForArtifact, the code boxes use); there is no Python verifier or signer
+held-floor ReleaseMapTests.test_without_public_key_refuses ported TestFloorPointerRefusals
+held-floor ReleaseMapTests.test_unreadable_pointer ported TestFloorPointerRefusals release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_suffixed_mapped_version_is_an_error ported TestFloorPointerRefusals release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_two_channels ported TestFloorTwoChannels release.TestReleaseForArtifactGolden
+held-floor ReleaseMapTests.test_version_pin_needs_no_release_records ported TestFloorVersionPinNeedsNoReleaseRecords
+held-floor ReleaseMapTests.test_differential_fixtures_are_current ported release.TestReleaseForArtifactDifferential
+held-floor ReleaseMapTests.test_tool_refuses_what_go_refuses ported release.TestReleaseForArtifactDifferential release.TestReleaseForArtifactConservative release.TestReleaseForArtifactEscapedTimestamps V5: the verb gives the tool column of cases.json (the stricter of the two readers)
+held-floor ReleaseMapTests.test_go_invalid_or_ambiguous_record_refuses_before_any_group_write ported TestFloorPointerRefusals TestDepartFloorErrorRefusesWithoutDR4
+held-floor ReleaseMapTests.test_roll_maps_its_sha ported TestFloorRollMapsItsSHA TestRollRelease
+held-floor ReleaseMapTests.test_roll_below_floor_by_its_sha_uses_dr4 ported TestFloorRollBelowFloorBySHAUsesDR4
+held-floor ReleaseMapTests.test_roll_prepared_release_must_match_the_mapping ported TestFloorRollPreparedReleaseMustMatchTheMapping
+held-floor ReleaseMapTests.test_roll_unmapped_sha_refuses ported TestFloorRollUnmappedSHARefuses
+held-floor ReleaseMapTests.test_roll_without_public_key_keeps_the_prepared_release ported TestFloorRollToReleaseBelowFloorUsesDR4
+held-floor ReleaseConfigTests.test_release_keys ported TestConfigMatchesScriptValidation
diff --git a/internal/grouproll/testdata/python-tests.txt b/internal/grouproll/testdata/python-tests.txt
new file mode 100644
index 000000000..4766cfdff
--- /dev/null
+++ b/internal/grouproll/testdata/python-tests.txt
@@ -0,0 +1,293 @@
+roll RollArgvTests.test_plan
+roll RollArgvTests.test_roll_generated_transaction
+roll RollArgvTests.test_roll_chosen_transaction
+roll RollArgvTests.test_resume
+roll RollArgvTests.test_status
+roll RollArgvTests.test_return
+roll RollArgvTests.test_rollback
+roll RollArgvTests.test_abandon
+roll CloseLostArgvChecks.test_close_lost_terminated_preserves_flags_and_status
+roll CloseLostArgvChecks.test_close_lost_not_found
+roll CloseLostArgvChecks.test_close_lost_refuses_present_group_states
+roll CloseLostArgvChecks.test_close_lost_refuses_nonterminal_ec2_states
+roll CloseLostArgvChecks.test_close_lost_refuses_read_errors
+roll CloseLostArgvChecks.test_close_lost_refuses_wrong_group_identity
+roll CloseLostArgvChecks.test_close_lost_refuses_invalid_ec2_evidence
+roll CloseLostArgvChecks.test_close_lost_refuses_no_journal
+roll CloseLostArgvChecks.test_close_lost_refuses_finished_journal_even_with_active_pointer
+roll CloseLostArgvChecks.test_close_lost_refuses_wrong_kind
+roll CloseLostArgvChecks.test_close_lost_refuses_without_active_pointer
+roll CloseLostArgvChecks.test_close_lost_obeys_group_lock
+roll CloseLostArgvChecks.test_later_roll_can_start
+roll StandbyTests.test_standby_roll_order
+roll StandbyTests.test_standby_response_loss
+roll StandbyTests.test_standby_resume
+roll StandbyTests.test_standby_resume_before_every_write
+roll StandbyTests.test_standby_shared_outage
+roll StandbyTests.test_standby_exit_pending_wait
+roll StandbyTests.test_standby_exit_pending_wait_resume_and_loss
+roll StandbyTests.test_standby_exit_pending_wait_admission_loss
+roll StandbyTests.test_precheck_failures_before_minimum
+roll StandbyTests.test_lock_refuses_second_writer
+roll StandbyTests.test_rollback_same_transaction
+roll StandbyTests.test_standby_rollback_crash_boundaries
+roll StandbyTests.test_standby_preinservice_is_not_inservice
+roll StandbyTests.test_standby_pending_proceed_without_completion
+roll StandbyTests.test_fake_abandon_terminates_and_replaces
+roll StandbyTests.test_standby_return_process_or_transaction_changes
+roll StandbyTests.test_standby_post_exit_api_loss_is_resumable
+roll StandbyTests.test_consumed_uncertain_action_never_replays
+roll StandbyTests.test_permit_readiness_requires_action_and_unconsumed
+roll StandbyTests.test_stale_and_racing_readiness
+roll StandbyTests.test_journal_missing_or_corrupt_refuses_before_write
+roll StandbyTests.test_plan_collects_refusals_without_mutation
+roll CutTests.test_hook_is_divergence_without_completion
+roll CutTests.test_default_abandon_and_resume_stay_failed
+roll CutTests.test_hook_observed_before_target_describe_error_blocks
+roll CutTests.test_death_during_divergence_recording
+roll CutTests.test_provider_return_without_tool_completion_is_held
+roll RoundOneTests.test_prepare_previous_results_refuse_before_group_write
+roll RoundOneTests.test_release_floor_matches_go
+roll RoundOneTests.test_wrong_digest_or_unchanged_process_is_immediate
+roll RoundOneTests.test_publication_lag_and_two_second_margin
+roll RoundOneTests.test_readiness_clock_starts_at_first_response_and_peers_get_sixty
+roll RoundOneTests.test_observation_age_includes_first_response_journal_flush
+roll RoundOneTests.test_divergence_hold_crash_and_response_loss
+roll RoundOneTests.test_cut_apply_terminates_session_then_reads_status
+roll RoundOneTests.test_unexpected_exit_success_is_journaled_before_describe
+roll RoundOneTests.test_tty_operator_identity_is_recorded
+roll RoundOneTests.test_expired_exit_observation_leaves_resumable_record
+roll RoundOneTests.test_ordinary_describe_blip_and_interrupt_do_not_block
+roll RoundOneTests.test_unknown_or_replaced_member_is_explicit_failed_probe
+roll RoundOneTests.test_external_minimum_change_is_not_adopted
+roll RoundOneTests.test_fake_capacity_rules
+roll RoundOneTests.test_resume_reads_status_first_after_cut_apply
+roll RoundOneTests.test_status_is_lock_free_and_read_only
+roll RollTransactionTests.test_chosen_transaction_cli_reaches_journal_active_and_permit
+roll RollTransactionTests.test_finished_transaction_refuses_without_calls_or_writes
+roll RollTransactionTests.test_unfinished_transaction_refuses_without_calls_or_writes
+roll RollTransactionTests.test_invalid_or_probe_transaction_refuses_before_state_access
+roll RollTransactionTests.test_cli_invalid_or_probe_transaction_refuses_before_config_or_state
+roll RollTransactionTests.test_default_transaction_is_uuid_hex
+roll RoundTwoTests.test_return_waits_for_warming_targets
+roll RoundTwoTests.test_warming_timeout_retains_record_then_resumes
+roll RoundTwoTests.test_rollback_after_failed_apply_readback
+roll RoundTwoTests.test_direct_return_classifies_pending_wait_before_refusal
+roll RoundTwoTests.test_unparseable_pointer_versions_refuse_before_group_write
+roll RoundTwoTests.test_automatic_rollback_resume_after_recording_decision
+roll RoundTwoTests.test_failed_apply_digest_readback_can_recover_to_new
+roll RoundTwoTests.test_hold_describe_blip_after_provider_return_is_resumable
+roll RoundTwoTests.test_abandon_cli_after_interrupted_preflight
+roll RoundTwoTests.test_abandon_before_group_write_only
+roll LiveFixtureTests.test_live_group_and_instance_parsing
+roll LiveFixtureTests.test_live_targets_both_ports_and_duplicate_registration
+roll LiveFixtureTests.test_live_online_and_hook_parsing
+roll LiveFixtureTests.test_live_activities_are_launches_only
+roll LiveFixtureTests.test_documented_standby_activity_descriptions
+roll LiveFixtureTests.test_live_edges_and_root_frame
+roll LiveFixtureTests.test_fake_status_preserves_live_permit_shape
+roll LiveFixtureTests.test_fixtures_contain_no_live_identifiers
+roll AdapterTests.test_apply_verb_and_session_bounds
+roll AdapterTests.test_timeout_session_id_and_termination_are_journaled
+roll AdapterTests.test_timeout_termination_failure_preserves_timeout_and_journals_both
+roll AdapterTests.test_unexpected_exit_success_is_uncertain_success
+roll AdapterTests.test_config_strict_and_no_real_defaults
+roll AdapterTests.test_api_shapes_match_policy_and_remote_verbs
+roll AdapterTests.test_remote_frame_and_root_failure_refuse
+roll AdapterTests.test_remote_shell_preserves_permit_bytes
+roll AdapterTests.test_cli_flags_and_retry_environment
+roll AdapterTests.test_api_keyboard_interrupt_propagates
+roll AdapterTests.test_session_pty_captures_noninteractive_output
+roll AdapterTests.test_session_pty_stdin_is_terminal_without_eof
+roll AdapterTests.test_session_pty_plugin_returns_frames_without_stdin_eof
+roll AdapterTests.test_session_pty_timeout
+roll AdapterTests.test_fsync_precedes_provider_write
+roll RoundThreeTests.test_box_action_time_does_not_consume_readiness_wait
+roll RoundThreeTests.test_rollback_waits_for_cut_apply_lock_before_inspecting_digest
+roll ClassifyTests.test_table_hook_record_cut
+roll ClassifyTests.test_table_hook_targets_failed
+roll ClassifyTests.test_table_wait_ready
+roll ClassifyTests.test_table_wait_unready
+roll ClassifyTests.test_table_wait_unknown
+roll ClassifyTests.test_table_wait_wrong_capacity
+roll ClassifyTests.test_table_wait_already_journaled
+roll ClassifyTests.test_table_hook_terminated
+roll ClassifyTests.test_table_hook_replaced
+roll ClassifyTests.test_table_hook_unknown
+roll ClassifyTests.test_table_hook_provider_return
+roll ClassifyTests.test_table_hook_pending
+roll ClassifyTests.test_table_hook_preinservice
+roll ClassifyTests.test_table_hook_proceed
+roll ClassifyTests.test_table_hook_standby_no_hold
+roll ClassifyTests.test_table_hook_wrong_capacity
+roll ClassifyTests.test_table_hook_timeout
+roll ClassifyTests.test_table_rollback_observe
+roll ClassifyTests.test_table_rollback_busy
+roll ClassifyTests.test_table_rollback_observed
+roll ClassifyTests.test_table_rollback_timeout
+roll ClassifyTests.test_table_describe
+roll ClassifyTests.test_table_ordinary_describe_error
+roll ClassifyTests.test_table_hook_describe_error
+roll ClassifyTests.test_table_discover_hook_before_missing_intent
+roll ClassifyTests.test_table_hold_still_draining
+roll ClassifyTests.test_table_hold_entering
+roll ClassifyTests.test_table_hold_verified
+roll ClassifyTests.test_table_hold_capacity_wrong
+roll ClassifyTests.test_table_terminated_before_ack
+roll ClassifyTests.test_table_absent_before_ack
+roll ClassifyTests.test_table_replaced_before_ack
+roll ClassifyTests.test_table_unknown_before_ack
+roll ClassifyTests.test_table_unsent_unknown
+roll ClassifyTests.test_table_wrong_template
+roll ClassifyTests.test_table_standby_unobserved
+roll ClassifyTests.test_table_standby_unready
+roll ClassifyTests.test_table_standby_ready
+roll ClassifyTests.test_table_standby_not_drained
+roll ClassifyTests.test_table_standby_wrong_minimum
+roll ClassifyTests.test_table_pending
+roll ClassifyTests.test_table_proceed
+roll ClassifyTests.test_table_preinservice
+roll ClassifyTests.test_table_inservice_warming
+roll ClassifyTests.test_table_inservice_unknown_readiness
+roll ClassifyTests.test_table_inservice_drop
+roll ClassifyTests.test_table_inservice_restore
+roll ClassifyTests.test_table_inservice_finish
+roll ClassifyTests.test_table_no_intent
+roll ClassifyTests.test_table_resume_return
+roll ClassifyTests.test_table_resume_done
+roll ClassifyTests.test_table_resume_observe_cut_action
+roll ClassifyTests.test_table_resume_prepare
+roll ClassifyTests.test_table_resume_peers
+roll ClassifyTests.test_table_resume_lower
+roll ClassifyTests.test_table_resume_unexplained_minimum
+roll ClassifyTests.test_table_resume_enter
+roll ClassifyTests.test_table_resume_mutate
+roll ClassifyTests.test_table_resume_readiness
+roll ClassifyTests.test_table_resume_verified
+roll ClassifyTests.test_table_resume_entering
+roll SimulationTests.test_seeded_return_simulation
+roll SimulationTests.test_simulation_mutations
+roll MutationTests.test_ten_required_mutations
+held ReplaceTests.test_replace_order_restores_shape_and_watches
+held ReplaceTests.test_replace_resumes_after_every_write
+held ReplaceTests.test_failed_drain_returns_member_and_prints_cancel
+held ReplaceTests.test_uncertain_drain_session_is_a_failed_drain
+held ReplaceTests.test_dropped_drain_session_rerun_joins_the_move
+held ReplaceTests.test_failed_drain_never_returns_a_member_still_moving
+held ReplaceTests.test_remote_timeout_reruns_and_joins
+held ReplaceTests.test_unknown_drain_status_never_returns_the_member
+held ReplaceTests.test_dropped_sessions_after_a_finished_move_return_fenced
+held ReplaceTests.test_lock_still_naming_member_refuses_action
+held ReplaceTests.test_marker_and_other_owner_locks_pass
+held ReplaceTests.test_stale_incarnation_refuses_action
+held ReplaceTests.test_failed_drain_after_agent_restart_still_returns
+held ReplaceTests.test_lock_sweep_bucket_is_the_config
+held ReplaceTests.test_lock_sweep_must_see_moved_hosts
+held ReplaceTests.test_changed_incarnation_with_finished_drain_refuses
+held ReplaceTests.test_missing_fence_refuses_action
+held ReplaceTests.test_edge_still_running_holds_standby_until_proven
+held ReplaceTests.test_restart_after_last_check_is_fenced_and_stopped
+held ReplaceTests.test_entering_standby_is_waited_for
+held ReplaceTests.test_hard_cut_after_terminate_intent_resumes
+held ReplaceTests.test_sent_terminate_is_not_repeated
+held ReplaceTests.test_failed_or_cancelled_activity_after_unanswered_intent_is_retried
+held ReplaceTests.test_quick_failure_then_accepted_retry_is_not_resent
+held ReplaceTests.test_persistent_failure_is_an_explicit_recoverable_fail
+held ReplaceTests.test_provider_changing_desired_on_terminate_fails
+held CancelDrainTests.test_cancel_lifts_fence_after_failed_drain
+held CancelDrainTests.test_refused_cancel_keeps_fence
+held CancelDrainTests.test_cancel_proven_by_status
+held CancelDrainTests.test_cancel_only_for_a_failed_drain_of_this_member
+held FloorTests.test_member_without_ha_take
+held FloorTests.test_member_with_other_ha_take
+held FloorTests.test_fixed_forwarder_without_ha_take
+held FloorTests.test_stale_box_is_not_live
+held FloorTests.test_old_pinned_template
+held FloorTests.test_uncomparable_pinned_template_is_an_error
+held FloorTests.test_no_floor_config
+held FloorTests.test_unreadable_edges_file
+held FloorTests.test_listing_error_refuses_roll_without_dr4
+held RemoveTests.test_remove_leaves_n_minus_one_and_names_box_count
+held RemoveTests.test_remove_refuses_an_unserved_pool
+held RemoveTests.test_remove_refuses_unknown_member_pools
+held RemoveMinimumTests.test_remove_needs_two_survivors
+held DrainedRollTests.test_roll_drains_before_apply_and_lifts_fence_after_exit
+held DrainedRollTests.test_roll_failed_drain_returns_unchanged
+held DrainedRollTests.test_roll_lock_after_permit_returns_and_revokes
+held DrainedRollTests.test_roll_below_floor_uses_dr4_and_says_so
+held DrainedRollTests.test_roll_to_release_below_floor_uses_dr4
+held DrainedRollTests.test_drained_roll_resumes_after_every_write
+held TerminateDecisionTests.test_every_combination
+held TerminateDecisionTests.test_previous_failure_never_decides_an_answered_attempt
+held TerminateDecisionTests.test_activity_status_none_is_not_a_veto_of_its_own
+held TerminateDecisionTests.test_adapter_keeps_status_code
+held AdapterH4Tests.test_trap_fires_on_any_other_lowering
+held AdapterH4Tests.test_adapter_refuses_every_other_lowering
+held AdapterH4Tests.test_terminate_of_standby_member_without_decrement
+held AdapterH4Tests.test_desired_only_raises
+held AdapterH4Tests.test_operator_enters_only_its_member
+held RemoteCommandTests.test_commands
+held RemoteCommandTests.test_drain_output
+held RemoteCommandTests.test_edge_stop_output
+held ConfigTests.test_optional_keys
+held DepartArgvTests.test_replace_without_floor_config_refuses_read_only
+held DepartArgvTests.test_remove_with_two_members_refuses
+held DepartArgvTests.test_cancel_drain_without_journal_refuses
+held DepartArgvTests.test_transaction_ids
+probe ProbeArgvTests.test_probe
+probe ProbeArgvTests.test_resume
+probe ProbeArgvTests.test_status
+probe ProbeArgvTests.test_abandon
+probe ProbeTests.test_instance_health_casing_preflight
+probe ProbeTests.test_probe_pass_order
+probe ProbeTests.test_probe_lost_exit_response
+probe ProbeTests.test_probe_pending_wait
+probe ProbeTests.test_probe_provider_inservice_after_hook
+probe ProbeTests.test_probe_default_abandon_fail
+probe ProbeTests.test_probe_stale_observation
+probe ProbeTests.test_probe_lock_and_active
+probe ProbeTests.test_probe_abandon_before_group_write
+probe ProbeTests.test_probe_abandon_refuses_group_intent
+probe ProbeTests.test_probe_pass_refuses_journal_evidence
+probe ProbeTests.test_probe_journal_isolation
+probe ProbeTests.test_probe_death_at_every_write
+probe ProbeTests.test_probe_changed_process
+probe ProbeTests.test_probe_waits_for_both_deregistrations
+probe ProbeTests.test_probe_instance_hook_survives_target_error
+probe ProbeTests.test_probe_no_revoke_when_permit_appears
+probe ProbeTests.test_probe_preflight_refusals
+probe ProbeTests.test_probe_cli_and_status
+probe ProbeTests.test_probe_actual_member_transitions
+probe ProbeTests.test_probe_lost_hold_response
+probe ProbeTests.test_probe_root_and_attendance_required
+probe ProbeTests.test_instance_adapter
+probe ProbeMutationTests.test_five_probe_mutations
+held-floor ReleaseMapTests.test_reference_signer_reproduces_go
+held-floor ReleaseMapTests.test_tool_verifier_is_cryptography
+held-floor ReleaseMapTests.test_current_release_meets_floor
+held-floor ReleaseMapTests.test_history_release_meets_floor
+held-floor ReleaseMapTests.test_history_release_below_floor_uses_dr4
+held-floor ReleaseMapTests.test_configured_platform
+held-floor ReleaseMapTests.test_unknown_sha
+held-floor ReleaseMapTests.test_bad_signature
+held-floor ReleaseMapTests.test_wrong_component_or_channel
+held-floor ReleaseMapTests.test_invalid_payloads
+held-floor ReleaseMapTests.test_valid_signed_payload_forms
+held-floor ReleaseMapTests.test_scoped_key_is_refused
+held-floor ReleaseMapTests.test_extra_wrapper_field_is_refused
+held-floor ReleaseMapTests.test_cancelled_channel_is_refused
+held-floor ReleaseMapTests.test_without_cryptography_refuses
+held-floor ReleaseMapTests.test_without_public_key_refuses
+held-floor ReleaseMapTests.test_unreadable_pointer
+held-floor ReleaseMapTests.test_suffixed_mapped_version_is_an_error
+held-floor ReleaseMapTests.test_two_channels
+held-floor ReleaseMapTests.test_version_pin_needs_no_release_records
+held-floor ReleaseMapTests.test_differential_fixtures_are_current
+held-floor ReleaseMapTests.test_tool_refuses_what_go_refuses
+held-floor ReleaseMapTests.test_go_invalid_or_ambiguous_record_refuses_before_any_group_write
+held-floor ReleaseMapTests.test_roll_maps_its_sha
+held-floor ReleaseMapTests.test_roll_below_floor_by_its_sha_uses_dr4
+held-floor ReleaseMapTests.test_roll_prepared_release_must_match_the_mapping
+held-floor ReleaseMapTests.test_roll_unmapped_sha_refuses
+held-floor ReleaseMapTests.test_roll_without_public_key_keeps_the_prepared_release
+held-floor ReleaseConfigTests.test_release_keys
diff --git a/scripts/grouproll-golden/python_tests.py b/scripts/grouproll-golden/python_tests.py
new file mode 100644
index 000000000..099711320
--- /dev/null
+++ b/scripts/grouproll-golden/python_tests.py
@@ -0,0 +1,64 @@
+"""List the Python roll tests the Go parity ledger must cover (spec §10.4).
+
+Writes one line per `def test_` method, and per row of the roll suite's
+classify table (set on ClassifyTests as test_table_<row>), as
+`<source>\t<Class>.<test>`, for
+scripts/region_group_roll_test.py (roll), region_group_held_test.py (held),
+region_group_probe_test.py (probe), and the floor branch's held tests that
+are not on this branch (held-floor, read with `git show`). The list is
+generated once and frozen at the port's merge:
+
+ python3 scripts/grouproll-golden/python_tests.py \\
+ > internal/grouproll/testdata/python-tests.txt
+"""
+
+import sys
+
+sys.dont_write_bytecode = True
+
+import ast # noqa: E402
+import subprocess # noqa: E402
+from pathlib import Path # noqa: E402
+
+ROOT = Path(__file__).resolve().parents[2]
+FILES = [
+ ("roll", "scripts/region_group_roll_test.py"),
+ ("held", "scripts/region_group_held_test.py"),
+ ("probe", "scripts/region_group_probe_test.py"),
+]
+FLOOR = "origin/held-floor-sha-map:scripts/region_group_held_test.py"
+
+
+def tests(source):
+ out = []
+ for node in ast.parse(source).body:
+ if isinstance(node, ast.ClassDef):
+ for item in node.body:
+ if isinstance(item, ast.FunctionDef) and item.name.startswith("test_"):
+ out.append(f"{node.name}.{item.name}")
+ # The roll suite's classify table: each row is set on ClassifyTests
+ # as test_table_<row>.
+ if isinstance(node, ast.Assign) and any(
+ isinstance(t, ast.Name) and t.id == "CLASSIFY_ROWS" for t in node.targets):
+ for row in node.value.elts:
+ out.append(f"ClassifyTests.test_table_{row.elts[0].value}")
+ return out
+
+
+def main():
+ seen = set()
+ lines = []
+ for name, path in FILES:
+ for test in tests((ROOT / path).read_text()):
+ lines.append(f"{name}\t{test}")
+ if name == "held":
+ seen.add(test)
+ floor = subprocess.run(["git", "show", FLOOR], cwd=ROOT, check=True, capture_output=True, text=True).stdout
+ for test in tests(floor):
+ if test not in seen:
+ lines.append(f"held-floor\t{test}")
+ sys.stdout.write("\n".join(lines) + "\n")
+
+
+if __name__ == "__main__":
+ main()