Created
February 10, 2026 22:16
-
-
Save arubis/300f5f9d5f440ac3230a2f3ff626734d to your computer and use it in GitHub Desktop.
single-node-chaos-hardening: relax priority check from 3-tier to 2-tier (crucial > expendable)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/tasks/single-node-chaos-hardening/grader.py | |
| +++ b/tasks/single-node-chaos-hardening/grader.py | |
| @@ -69,18 +69,23 @@ def validate_setup(): | |
| all_ok = False | |
| # --- Priority Ordering Check --- | |
| - print("validating relative priority ordering") | |
| - t1 = get_effective_priority("bleater") | |
| - t2 = get_effective_priority("gitea") | |
| - t3 = get_effective_priority("loadgenerator") | |
| - if t1 > t2 > t3: | |
| + print("validating priority: crucial services above expendable") | |
| + crucial_ns = ["bleater", "argocd", "monitoring", "gitea", "harbor"] | |
| + expendable_ns = ["loadgenerator", "gitea-runner"] | |
| + | |
| + crucial_priorities = {ns: get_effective_priority(ns) for ns in crucial_ns} | |
| + expendable_priorities = {ns: get_effective_priority(ns) for ns in expendable_ns} | |
| + | |
| + min_crucial = min(crucial_priorities.values()) if crucial_priorities else 0 | |
| + max_expendable = max(expendable_priorities.values()) if expendable_priorities else 0 | |
| + | |
| + if min_crucial > max_expendable and min_crucial > 0: | |
| feedback.append( | |
| - f"Priority ordering correct: Tier 1({t1}) > Tier 2({t2}) > Tier 3({t3})" | |
| + f"Priority ordering correct: crucial min({min_crucial}) > expendable max({max_expendable})" | |
| ) | |
| else: | |
| feedback.append( | |
| - f"Priority ordering incorrect: Tier 1({t1}), Tier 2({t2}), Tier 3({t3})" | |
| + f"Priority ordering incorrect: crucial={crucial_priorities}, expendable={expendable_priorities}" | |
| ) | |
| all_ok = False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment