Ver código fonte

Goals bundle: read plan revisions newest-first

The two pre-existing goals-bundle failures indexed plan_revisions oldest-first, but the ordering sweep (73dcec9) made the block walk newest-first and the goal page renders it that way. The app was correct; the checks now index the newest revision first, matching the served surface. Both checks verified PASS in a live goals-bundle run (the bundle later died at the known environmental connection-reset point, unchanged from clean base).
clanker 1 mês atrás
pai
commit
3586d8731e
1 arquivos alterados com 8 adições e 4 exclusões
  1. 8 4
      test/bundles/goals.py

+ 8 - 4
test/bundles/goals.py

@@ -176,9 +176,11 @@ def run(ctx):
           "a resume without context changes carries no context_update")
     state = goal_state(goal1)
     revisions = state["plan_revisions"]
+    # Newest-first since the ordering sweep (73dcec9): index 1 is the
+    # older rejected revision, index 0 the pending re-submission.
     check(len(revisions) == 2
-          and revisions[0]["answered"] and "Add documentation please" in revisions[0]["answer"]
-          and not revisions[1]["answered"],
+          and revisions[1]["answered"] and "Add documentation please" in revisions[1]["answer"]
+          and not revisions[0]["answered"],
           "rejected revisions stay as answered history (historical-blocks data)")
     # Plan 16 S1 pin: goals.plan is accept-gated — the pending revision
     # lives only in its block; nothing lands on the goal before accept.
@@ -459,8 +461,10 @@ def run(ctx):
           "the green progress feed renders on the goal page")
     # Plan revision history keeps its verdicts (approved + rejected).
     revisions = goal_state(goal1)["plan_revisions"]
-    check(revisions[0]["answered"] is True and revisions[0]["approved"] is False
-          and revisions[1]["approved"] is True,
+    # Newest-first since the ordering sweep (73dcec9): index 0 is the
+    # approved revision, index 1 the older rejected one.
+    check(revisions[1]["answered"] is True and revisions[1]["approved"] is False
+          and revisions[0]["approved"] is True,
           "plan revision history badges approved and rejected verdicts")
 
     print("== plan 12: pause freezes supervision; events coalesce on resume ==")