{ "schema_version": 1, "instance_id": "cloudnative-controller-runtime-3509", "kind": "native_contract", "network": "bridge", "repeat_count": 3, "required_regression_worlds": [ "all_buggy", "all_fixed" ], "test_files": [ { "path": "tests/native/public-native-preparation-r1/controller-native-contract_test.go", "sha256": "85a546c6fe974632e1dd3cf366719eed59c0698e98f22ebf189d9152e74e49fe", "bytes": 7905, "kind": "native_test_material", "source_sha256": "85a546c6fe974632e1dd3cf366719eed59c0698e98f22ebf189d9152e74e49fe" }, { "path": "tests/native/public-native-preparation-r1/clientgo-native-contract_test.go", "sha256": "91b990def39e25b604079afd7adc7cbc86e19f1f1617fff23e7105c41a5caaf4", "bytes": 4978, "kind": "native_test_material", "source_sha256": "91b990def39e25b604079afd7adc7cbc86e19f1f1617fff23e7105c41a5caaf4" }, { "path": "tests/native/controller-native-contract_test.go", "sha256": "85a546c6fe974632e1dd3cf366719eed59c0698e98f22ebf189d9152e74e49fe", "bytes": 7905, "kind": "native_test_material", "source_sha256": "85a546c6fe974632e1dd3cf366719eed59c0698e98f22ebf189d9152e74e49fe" }, { "path": "tests/native/clientgo-native-contract_test.go", "sha256": "91b990def39e25b604079afd7adc7cbc86e19f1f1617fff23e7105c41a5caaf4", "bytes": 4978, "kind": "native_test_material", "source_sha256": "91b990def39e25b604079afd7adc7cbc86e19f1f1617fff23e7105c41a5caaf4" } ], "specifications": [ { "specification": {} }, { "specification": { "behavior": "The consumer test calls exported `NewProvider`, treats it through the public\n`recorder.Provider` surface, obtains its actual returned recorder, invokes\n`AnnotatedEventf`, and observes the actual client-go broadcaster's EventSink.\nThe test checks a two-key annotation map including Unicode, nil/empty maps,\nrelated object identity, namespace, reason/action/type, formatted note,\nreporter, and event timestamp. Each annotated recorder subsequently emits\nordinary Eventf, which must retain ordinary fields and omit annotations.\nAn anonymous interface obtains the method at runtime so the test itself\ndoes not import a new interface unavailable in the buggy source.\n\nThe provider test directly invokes client-go NewBroadcaster/NewRecorder,\nincluding the public WithLogger path, and observes the same payload contract.\nThe only substitutes are the external event sink and HTTP transport; no\nrecorder, broadcaster, lazy forwarding implementation, or candidate method\nis substituted. The old HTTP transport accepts only the expected Events\nPOST and observes serialized legacy Eventf content. No API server, envtest,\nnetwork, source-text matching oracle, or copied gold implementation is used.\n\nTests are injected as new packages at controller-runtime\n`pkg/crossrepo_annotation_gate` and client-go\n`tools/events/crossrepo_native_gate`. The former may legally import\n`pkg/internal/recorder` because it is under the same parent package prefix.\nIt avoids compiling existing recorder envtest test files. All imports and\nused constructor/sink/logger APIs are present in the publicly inspected base.\n\nController-runtime's main module binds client-go, api, apimachinery, and\nstreaming to the same world's Kubernetes staging directories. Client-go's\nown published base already declares its sibling api/apimachinery/streaming\nreplacements. Each admitted run records go list -m metadata and go.mod files\nbefore testing. GOWORK=off, GOPROXY=off, GOSUMDB=off, and GOTOOLCHAIN=local\nprevent a released provider, external workspace, network fetch, or toolchain\ndownload from silently supplying the feature. Image existence and visible\ncaches alone do not prove offline compilation closure.\n\nThe root execution driver requires an admission-receipt path, verifies the\npreparation seal, runs a single container at a time on the exact image, limits\neach container to 4 CPUs/10 GiB/1024 PIDs, and enforces the supplied absolute\ndeadline plus a default 240-second world ceiling. Native execution, a heavy\nresource reservation if required by root policy, and subsequent model entry\nremain root decisions. No central scheduling/progress file is modified here.\n\nThe review must distinguish executed assertion failures from source API\ncompile failures, environment/build failures, skipped tests, and zero tests.\nThe source-only inventory leaves offline compile closure explicitly open.\n" } } ], "source_record_commands": [ { "repository": "controller-runtime", "container_path": "/testbed/kubernetes-sigs/controller-runtime", "setup_command": "KUBE_ROOT=/testbed/kubernetes/kubernetes; if [ -d /repos/kubernetes/kubernetes ]; then KUBE_ROOT=/repos/kubernetes/kubernetes; fi; go mod edit -replace=k8s.io/client-go=$KUBE_ROOT/staging/src/k8s.io/client-go -replace=k8s.io/api=$KUBE_ROOT/staging/src/k8s.io/api -replace=k8s.io/apimachinery=$KUBE_ROOT/staging/src/k8s.io/apimachinery; go mod download", "environment": { "GOTOOLCHAIN": "local" }, "fail_to_pass": "go test ./pkg/recorder/crossrepo_contract -run '^TestCrossRepoAnnotatedRecorderContract$' -count=1", "pass_to_pass": "go test ./pkg/recorder -count=1" }, { "repository": "kubernetes", "container_path": "/testbed/kubernetes/kubernetes", "setup_command": "cd staging/src/k8s.io/client-go && go mod download", "environment": { "GOTOOLCHAIN": "local" }, "fail_to_pass": "cd staging/src/k8s.io/client-go && go test ./tools/events/crossrepo_contract -run '^TestCrossRepoAnnotatedEventContract$' -count=1", "pass_to_pass": "cd staging/src/k8s.io/client-go && go test ./tools/events -count=1" } ], "execution_policy": { "test_patches": "Apply in listed order after candidate patches, in an isolated evaluator workspace.", "commands": "Complete source setup in setup_order, then evaluator setup in evaluation_setup_order, ready checks, pass_to_pass and fail_to_pass commands; teardown in reverse evaluator setup order.", "world_placeholder": "A world labels the prepared source state for both regression and behavior commands: all_buggy for base, all_fixed for gold, candidate for submitted patches.", "success": "All required behavioral and regression tests pass; infrastructure failures are not behavioral outcomes.", "isolation": "The agent receives base sources and statement only; evaluation and reference materials remain outside its workspace." }, "availability": { "test_materials": "included", "portable_environment": "pending", "dependencies": "Some commands require external toolchains or dependency assets; complete portable recipes are a follow-up release." } }