From 2b27259cb4cb7a3df488dae58d2a3e92c0f32c98 Mon Sep 17 00:00:00 2001 From: Gas City Adopt-PR Date: Mon, 28 Sep 2026 15:56:08 +0000 Subject: [PATCH] test(release-1.3.x): adapt release-only capability tests to the backported proxied backup [NOT a cherry-pick] Release-only adaptation, not a copy of any main commit. The tests it touches exist only on release/1.3.0, so there is nothing on main to pick; every other commit on this branch is a faithful cherry-pick -x. - topology_capability_matrix_test.go (#6579, release-only S0 matrix): flip backup status/sync as #6584's own description says. On proxied-local, status is HONORED and sync is ERROR "no backup destination configured"; other proxied topologies are REFUSED_TYPED with reason design. The runner already orders refusal rows before honored ones, so the honored cells no longer start the proxy ahead of the no-side-effect refusal checks (the red smoke-lane cells review found). - proxy_capability_test.go: TestProxyMaintenanceAllowsTheSharedConsentVerb (#6695, release-only) called validateProxyMaintenanceBeforeProvider, which #6582 removes; it now calls validateProxyRegistryBeforeProvider for managed-local, with unchanged assertions. Until this commit the cmd/bd test package does not compile on the picks above it. - proxied-local-smoke.yml: run the capability matrix and the backup round trip in the compiled-in check, and trigger on cmd/bd/backup*.go. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/proxied-local-smoke.yml | 6 +++++- cmd/bd/proxy_capability_test.go | 16 ++++++++-------- cmd/bd/topology_capability_matrix_test.go | 18 +++++++++++++++--- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/proxied-local-smoke.yml b/.github/workflows/proxied-local-smoke.yml index 263e182e4..eee9b7b19 100644 --- a/.github/workflows/proxied-local-smoke.yml +++ b/.github/workflows/proxied-local-smoke.yml @@ -23,6 +23,7 @@ on: - 'cmd/bd/proxied_server*.go' - 'cmd/bd/dolt*.go' - 'cmd/bd/*_proxied_server.go' + - 'cmd/bd/backup*.go' - 'cmd/bd/purge*.go' - 'cmd/bd/db_proxy_child.go' - 'cmd/bd/init*.go' @@ -43,6 +44,7 @@ on: - 'cmd/bd/proxied_server*.go' - 'cmd/bd/dolt*.go' - 'cmd/bd/*_proxied_server.go' + - 'cmd/bd/backup*.go' - 'cmd/bd/purge*.go' - 'cmd/bd/db_proxy_child.go' - 'cmd/bd/init*.go' @@ -113,7 +115,9 @@ jobs: TestManagedLocalProxiedDoltStartRefusesOverLiveProxy \ TestManagedLocalProxiedDoltStartRefusesWithProxyDown \ TestManagedLocalProxiedDoltLifecycleLeavesOtherTopologiesAlone \ - TestManagedLocalProxiedPurgeWispsPlaneRetention + TestManagedLocalProxiedPurgeWispsPlaneRetention \ + TestManagedLocalProxiedCapabilityMatrix \ + TestManagedLocalProxiedBackupRoundTrip do if ! grep -qx "$test_name" <<<"$listed"; then echo "managed-local lifecycle test $test_name is missing; got: '$listed'" >&2 diff --git a/cmd/bd/proxy_capability_test.go b/cmd/bd/proxy_capability_test.go index 6c70f17ff..4e104b1a5 100644 --- a/cmd/bd/proxy_capability_test.go +++ b/cmd/bd/proxy_capability_test.go @@ -17,12 +17,12 @@ import ( // #6575 proxied data-behind guidance is written against: the consent command // that guidance prescribes is NOT refused at the proxied front door. // -// The refusal table keys on the full command path. It has rows for the bare -// `migrate` verb and for `migrate hooks` / `migrate issues` / `migrate sync`, -// but none for `migrate schema` — so that path falls through -// validateProxyMaintenanceBeforeProvider's multi-word arm to `bd migrate -// schema`'s own proxied arm, which reports the migration the provider open -// already applied under this verb's consent. +// The capability registry keys on the full command path. It refuses the bare +// `migrate` verb and `migrate hooks` / `migrate issues` / `migrate sync`, but +// permits `migrate schema` — so that path passes +// validateProxyRegistryBeforeProvider to `bd migrate schema`'s own proxied +// arm, which reports the migration the provider open already applied under +// this verb's consent. // // An earlier revision of that guidance asserted the opposite on three runtime // surfaces and nothing failed, because no test called this function with this @@ -51,7 +51,7 @@ func TestProxyMaintenanceAllowsTheSharedConsentVerb(t *testing.T) { var allowErr error out := captureStdout(t, func() error { - allowErr = validateProxyMaintenanceBeforeProvider(target) + allowErr = validateProxyRegistryBeforeProvider(target, ProxyTopologyManagedLocal) return nil }) if allowErr != nil { @@ -70,7 +70,7 @@ func TestProxyMaintenanceAllowsTheSharedConsentVerb(t *testing.T) { } var bareErr error refusal := captureStdout(t, func() error { - bareErr = validateProxyMaintenanceBeforeProvider(bare) + bareErr = validateProxyRegistryBeforeProvider(bare, ProxyTopologyManagedLocal) return nil }) if bareErr == nil { diff --git a/cmd/bd/topology_capability_matrix_test.go b/cmd/bd/topology_capability_matrix_test.go index 3e00ceb20..5d79a2bd0 100644 --- a/cmd/bd/topology_capability_matrix_test.go +++ b/cmd/bd/topology_capability_matrix_test.go @@ -274,10 +274,16 @@ var capabilityProbes = []probe{ direct: expectation{ outcome: outcomeHonored, substr: `"configured"`, reason: reasonNA, }, + // Refused by design where bd does not own the server (#6584): the + // backup remote is registered on the server, global to every client. proxied: expectation{ outcome: outcomeRefusedTyped, code: "proxy.backup.unsupported", substr: "backup status is not supported in proxied-server mode", - reason: reasonUnimplemented, + reason: reasonDesign, + }, + // Honored on managed-local, where bd spawned the Dolt child (#6584). + override: map[string]expectation{ + topoProxiedLocal: {outcome: outcomeHonored, substr: `"configured"`, reason: reasonNA}, }, }, { @@ -289,7 +295,13 @@ var capabilityProbes = []probe{ proxied: expectation{ outcome: outcomeRefusedTyped, code: "proxy.backup.unsupported", substr: "backup sync is not supported in proxied-server mode", - reason: reasonUnimplemented, + reason: reasonDesign, + }, + // Honored on managed-local (#6584): it reaches the command, which + // fails on its own merits with no destination configured — the same + // answer every direct topology gives. + override: map[string]expectation{ + topoProxiedLocal: {outcome: outcomeError, substr: "no backup destination configured", reason: reasonNA}, }, }, @@ -464,7 +476,7 @@ var deliberatelyNotProbed = map[string]string{ "restore": "`bd restore` restores an ISSUE, not a backup; the backup verb is `bd backup restore`, which is already " + "covered by the backup rows. Probing it adds a row that says nothing about the backup family.", "backup restore": "would need a real backup destination to distinguish a topology refusal from a missing-backup error. " + - "Covered indirectly by `backup status` / `backup sync`; revisit in slice S3 when the family gains a proxied route.", + "Covered indirectly by `backup status` / `backup sync`, and directly by TestManagedLocalProxiedBackupRoundTrip since slice S3 (#6584).", } // ---------------------------------------------------------------------------