Repository: crossplane/crossplane

Issue:
XR schema should not have `status.crossplane.connectionDetails`
### What happened?

We dropped the ability to write connection secrets from XRs for https://github.com/crossplane/crossplane/issues/6440, with https://github.com/crossplane/crossplane/pull/6473 where we dropped `spec.crossplane.writeConnectionSecretToRef` from XRs.

We would expect the CRDs created for XRs to no longer have `status.crossplane.connectionDetails`, as this no longer makes sense given what was removed from the spec, yet they still do: https://github.com/crossplane/crossplane/blob/54e0ba1350bd0f234beb1a3beee2d605885f015b/internal/xcrd/schemas.go#L328-L333

### How can we reproduce it?

Create a XRD, for example the XRD from https://docs.crossplane.io/v2.0-preview/get-started/get-started-with-composition/#define-the-schema

Check the schema of the generated CRD, e.g. with `kubectl get crd apps.example.crossplane.io -o yaml`. The schema should not have this block under `status`:
```
              crossplane:
                description: Indicates how Crossplane is reconciling this composite
                  resource
                properties:
                  connectionDetails:
                    properties:
                      lastPublishedTime:
                        format: date-time
                        type: string
                    type: object
                type: object
```


### What environment did it happen in?
Crossplane version:  `2.0.0-rc.0.312.g26c45a568`

Discussion:

Solution patch:
diff --git a/.gitignore b/.gitignore
index 951b476e4..baaf8ac01 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,6 @@ gitlab/
 # go build output (from go build ./cmd/crank etc)
 /crank
 /crossplane
+
+# ignore AI tools settings/config
+/.claude
diff --git a/internal/controller/apiextensions/managed/reconciler.go b/internal/controller/apiextensions/managed/reconciler.go
index 2beddd383..c507acb52 100644
--- a/internal/controller/apiextensions/managed/reconciler.go
+++ b/internal/controller/apiextensions/managed/reconciler.go
@@ -19,12 +19,12 @@ package managed
 
 import (
 	"context"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"time"
 
 	extv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
 	"k8s.io/apimachinery/pkg/api/equality"
 	kerrors "k8s.io/apimachinery/pkg/api/errors"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/reconcile"
diff --git a/internal/xcrd/schemas.go b/internal/xcrd/schemas.go
index 78f46aed0..62c60cafe 100644
--- a/internal/xcrd/schemas.go
+++ b/internal/xcrd/schemas.go
@@ -320,19 +320,8 @@ func CompositeResourceStatusProps(s v1.CompositeResourceScope) map[string]extv1.
 
 	switch s {
 	case v1.CompositeResourceScopeNamespaced, v1.CompositeResourceScopeCluster:
-		// Modern XRs use status.crossplane, and don't support claims.
-		props["crossplane"] = extv1.JSONSchemaProps{
-			Type:        "object",
-			Description: "Indicates how Crossplane is reconciling this composite resource",
-			Properties: map[string]extv1.JSONSchemaProps{
-				"connectionDetails": {
-					Type: "object",
-					Properties: map[string]extv1.JSONSchemaProps{
-						"lastPublishedTime": {Type: "string", Format: "date-time"},
-					},
-				},
-			},
-		}
+		// Modern XRs don't have connection details or support claims, so
+		// there's nothing else to put in the status for them
 	case v1.CompositeResourceScopeLegacyCluster:
 		// Legacy XRs don't use status.crossplane, and support claims.
 		props["connectionDetails"] = extv1.JSONSchemaProps{



Test patch:
diff --git a/internal/xcrd/crd_test.go b/internal/xcrd/crd_test.go
index 9d966e07e..ada8288bb 100644
--- a/internal/xcrd/crd_test.go
+++ b/internal/xcrd/crd_test.go
@@ -431,18 +431,6 @@ func TestForCompositeResource(t *testing.T) {
 														},
 													},
 												},
-												"crossplane": {
-													Description: "Indicates how Crossplane is reconciling this composite resource",
-													Type:        "object",
-													Properties: map[string]extv1.JSONSchemaProps{
-														"connectionDetails": {
-															Type: "object",
-															Properties: map[string]extv1.JSONSchemaProps{
-																"lastPublishedTime": {Type: "string", Format: "date-time"},
-															},
-														},
-													},
-												},
 											},
 											XValidations: extv1.ValidationRules{
 												{
diff --git a/test/e2e/apiextensions_activation_policy_test.go b/test/e2e/apiextensions_activation_policy_test.go
index 0d3b244ec..2190234a4 100644
--- a/test/e2e/apiextensions_activation_policy_test.go
+++ b/test/e2e/apiextensions_activation_policy_test.go
@@ -17,11 +17,11 @@ limitations under the License.
 package e2e
 
 import (
-	"sigs.k8s.io/e2e-framework/third_party/helm"
 	"testing"
 	"time"
 
 	"sigs.k8s.io/e2e-framework/pkg/features"
+	"sigs.k8s.io/e2e-framework/third_party/helm"
 
 	"github.com/crossplane/crossplane/apis/apiextensions/v2alpha1"
 	"github.com/crossplane/crossplane/test/e2e/config"