From f4f2a6bea99c7d593f61de58049d15af1d40a232 Mon Sep 17 00:00:00 2001 From: vumast3r Date: Tue, 22 Sep 2026 22:24:09 -0600 Subject: [PATCH] fix: Q64 scored a point for doing nothing; Q45 failed a grade taken right after the restore Q64's "nothing was created in namespace default" check was a bare negation, so an untouched task scored 1/6. It now requires the Deployment to exist in the context's namespace first. Right after an etcd restore the API still holds the snapshot's mirror pods and the kubelet replaces them; a grade inside that window found etcd's pod missing and failed the health check, 8/10 for a correct restore. The check now retries for up to a minute. Re-verified on a throwaway cluster: both score 0 untouched and full when solved, Q45 graded immediately after the restore. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Mhxm4rsUfuE5HoytYbu2YW --- tracks/cka/bank_hard.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tracks/cka/bank_hard.py b/tracks/cka/bank_hard.py index 12a6420..0e5a50a 100644 --- a/tracks/cka/bank_hard.py +++ b/tracks/cka/bank_hard.py @@ -78,7 +78,12 @@ now=$(nx "$CP" 'awk "/hostPath:/{getline; p=\$2} /name: etcd-data/{if (p) print # the same directory name as before is fine if it was rebuilt from the snapshot after seeding m=$(nx "$CP" "stat -c %Y $now/member 2>/dev/null" /dev/null 2>&1"""), + C("nothing was created in namespace default by mistake", 1, r"""$K -n %{ns} get deploy %{dep} >/dev/null 2>&1 && ! $K -n default get deploy %{dep} >/dev/null 2>&1"""), C("ns.txt has the namespace", 1, r"""eq "$(tr -d '[:space:]' < "$WS/q64/ns.txt" 2>/dev/null)" %{ns}"""), ], },