Skip to content

wrapper: N-step rollback handler, DriftSignal cascade delete, e2e day-2 tests#16

Merged
ontave merged 6 commits into
mainfrom
session/15-wrapper-fixes
May 2, 2026
Merged

wrapper: N-step rollback handler, DriftSignal cascade delete, e2e day-2 tests#16
ontave merged 6 commits into
mainfrom
session/15-wrapper-fixes

Conversation

@ontave
Copy link
Copy Markdown
Contributor

@ontave ontave commented May 2, 2026

Summary

  • ClusterPackReconciler: handleRollback reads target POR previous-state directly, patches ClusterPackSpec, clears annotation; removes the incorrect N-1 guard
  • handleClusterPackDeletion: cascade DriftSignal deletion when ClusterPack is deleted
  • e2e: AC-3 rollback validation, AC-4 day-2 ops, fix stale Step 4 assertions

Test plan

  • Unit tests: rollback_test.go (12 cases), packinstance_watch_test.go -- all pass
  • go build ./... -- clean compile

ontave added 6 commits May 1, 2026 10:39
Step 2.5 added to the finalizer cleanup sequence: for each targetCluster in
cp.Spec.TargetClusters, delete the DriftSignal named "drift-{cp.Name}" from
seam-tenant-{clusterName} before removing the finalizer. IsNotFound is
tolerated. Unit test added: TestClusterPackReconciler_DeletionCascadesDriftSignal.
…ds POR previous-state, patches ClusterPackSpec, clears annotation; 3 unit tests; wrapper-schema.md §6.2 updated
… no N-1 guard

handleRollback now lists all PORs (active + superseded) by ontai.dev/cluster-pack
label and finds the one at spec.revision == rollbackToRevision. The N-1 guard and
all Previous* field references are removed. If the target revision is not found in
retained history the field is cleared without patching spec. Tests extended with
TestClusterPackReconciler_Rollback_NStep (revision 3 to 1 in one operation) and
TestClusterPackReconciler_Rollback_RevisionNotFound_ClearsField.
wrapper-schema.md §6.2 updated to document the N-step retention model.
…ep 4 assertions

clusterpack_e2e_test.go: validatePORPredecessorSuperseded replaces deleted check;
validateSingleActivePOR now counts only non-superseded PORs. Both functions updated
to match N-step retention model (ontai.dev/superseded=true label pattern).

ac3_rollback_test.go: live rollback validation using synthetic superseded POR. Creates
a fake POR labeled ontai.dev/superseded=true, sets rollbackToRevision=1, polls for
wrapper N-step handleRollback to clear the field. Cleanup via DeferCleanup.

ac4_day2_ops_test.go: D2-1 through D2-5. D2-1/D2-2/D2-3 are live against ccs-dev.
D2-4 (upgrade) and D2-5 (drift injection) are stubs with explicit skip conditions.
D2-3 enforces correlationID cleared on confirmed DriftSignal (correlationID invariant).

Run: MGMT_KUBECONFIG=.../ccs-mgmt.yaml MGMT_CLUSTER_NAME=ccs-dev TENANT_CLUSTER_NAME=ccs-dev make e2e
Rewrites CODEBASE.md with exact line numbers for all 6 gates in
PackExecutionReconciler, handleClusterPackDeletion steps, findLatestPOR
location, and documents CLUSTERPACK-BL-VERSION-CLEANUP open item.
Notes that wrapper has no own CRD type definitions (api/ is .gitkeep).
@ontave ontave merged commit 1fee4d6 into main May 2, 2026
2 checks passed
@ontave ontave deleted the session/15-wrapper-fixes branch May 2, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant