E2E-2: resume-from-checkpoint E2E covering P0-3 encryption + P0-5 retry
Summary
E2E-2 of the K8s E2E expansion. Verifies 1.6.6's two checkpoint-touching P0 fixes (P0-3 sensitive var encryption, P0-5 persist retry) end-to-end against a REAL Postgres database — not the mocked checkpoint service the unit tests use.
This was identified in the architecture audit as the most critical
8 new tests
Encryption (P0-3)
-
Encryption_SensitiveOutputVar_PersistedAsCiphertextInCheckpointJson— headline test: direct DB query confirmsOutputVariablesJsondoes NOT contain plaintext + DOES containSQUID_ENCRYPTEDprefix -
Encryption_NonSensitiveOutputVar_PersistedAsPlaintextForOperatorInspection— pin: non-sensitive stays plaintext (operator debug workflow) -
Encryption_SensitiveValueDecryptsCorrectly_OnResumePhase— full round-trip via DI-resolvedIVariableEncryptionService+ResumeCheckpointPhase
Backward Compat
-
BackwardCompat_LegacyPlaintextCheckpoint_ResumesUnchanged— 1.6.5 → 1.6.6 in-flight upgrade compat (un-prefixed plaintext passes throughIsValidEncryptedValueuntouched)
Multi-batch progression
MultiBatch_LastCompletedBatchIndex_AdvancesAfterEachBatch-
MultiBatch_OutputVariables_AccumulateAcrossBatches— covers OutputVariableMerger + 3-batch checkpoint progression with mixed sensitive/non-sensitive vars
Resume semantics
PlantedCheckpoint_WithLastCompletedBatchIndex0_SkipsFirstBatchPlantedCheckpoint_WithLastCompletedBatchIndex1_OnlyLastBatchExecutes
Pattern
DeploymentPipelineFixture (Pattern 2 in CLAUDE.md). Output variables simulated by CapturingExecutionStrategy.ResultFactory emitting ##squid[setVariable] log lines that the pipeline's ServiceMessageParser parses into real VariableDtos — same code path as a real agent. The encryption + checkpoint persist + restore phases all run with the REAL DI-resolved services against the REAL Postgres database.
What this fills
After this PR, the audit's 跨切面 (cross-cutting) E2E score improves from 4/10 → 7/10. Combined with E2E-1 (Helm) which closed the most critical action-handler gap, the 企業 SLA-readiness moves from
Test plan
-
Project builds clean -
Test class compiles + 8 test methods discoverable -
Local CI run pending — fixture spins real Postgres, full pipeline executes