prizmkit 1.1.140 → 1.1.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/README.md +1 -1
  3. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +165 -125
  4. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +13 -1
  5. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -6
  6. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +5 -3
  7. package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +160 -0
  8. package/bundled/dev-pipeline/scripts/check-session-status.py +11 -1
  9. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +23 -806
  10. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +6 -8
  11. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
  12. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +6 -8
  13. package/bundled/dev-pipeline/scripts/prompt_framework.py +68 -56
  14. package/bundled/dev-pipeline/scripts/update-bug-status.py +21 -2
  15. package/bundled/dev-pipeline/scripts/update-checkpoint.py +52 -131
  16. package/bundled/dev-pipeline/scripts/update-feature-status.py +21 -2
  17. package/bundled/dev-pipeline/scripts/update-refactor-status.py +21 -2
  18. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +3 -3
  19. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +8 -19
  20. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
  21. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +5 -5
  22. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +1 -1
  23. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +1 -1
  24. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
  25. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  26. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +13 -10
  27. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +1 -1
  28. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +18 -9
  29. package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +1 -1
  30. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +1 -1
  31. package/bundled/dev-pipeline/templates/sections/phase-commit.md +1 -1
  32. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +2 -2
  33. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +1 -1
  34. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +1 -1
  35. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +1 -1
  36. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +14 -26
  37. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +2 -2
  38. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
  39. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +1 -1
  40. package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +13 -10
  41. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +1 -1
  42. package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
  43. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +494 -413
  44. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +144 -684
  45. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +20 -41
  46. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +24 -24
  47. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +176 -36
  48. package/bundled/skills/_metadata.json +6 -6
  49. package/bundled/skills/prizmkit/SKILL.md +13 -18
  50. package/bundled/skills/prizmkit/references/workflow-state-protocol.md +73 -80
  51. package/bundled/skills/prizmkit-code-review/SKILL.md +7 -7
  52. package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +73 -80
  53. package/bundled/skills/prizmkit-committer/SKILL.md +8 -7
  54. package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +73 -80
  55. package/bundled/skills/prizmkit-implement/SKILL.md +3 -2
  56. package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +73 -80
  57. package/bundled/skills/prizmkit-plan/SKILL.md +2 -1
  58. package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +73 -80
  59. package/bundled/skills/prizmkit-retrospective/SKILL.md +8 -6
  60. package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +73 -80
  61. package/bundled/skills/prizmkit-test/SKILL.md +217 -189
  62. package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +119 -0
  63. package/bundled/skills/prizmkit-test/references/independent-test-review.md +269 -0
  64. package/bundled/skills/prizmkit-test/references/test-coverage-model.md +193 -0
  65. package/bundled/skills/prizmkit-test/references/test-report-template.md +164 -79
  66. package/bundled/skills/prizmkit-workflow/SKILL.md +28 -36
  67. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +73 -80
  68. package/package.json +1 -1
  69. package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +0 -477
  70. package/bundled/skills/prizmkit-test/assets/behavior-risk-matrix.schema.json +0 -116
  71. package/bundled/skills/prizmkit-test/assets/evidence-manifest.schema.json +0 -111
  72. package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +0 -66
  73. package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +0 -104
  74. package/bundled/skills/prizmkit-test/references/contract-mock-protocol.md +0 -65
  75. package/bundled/skills/prizmkit-test/references/evidence-protocol.md +0 -208
  76. package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +0 -80
  77. package/bundled/skills/prizmkit-test/references/examples.md +0 -100
  78. package/bundled/skills/prizmkit-test/references/service-boundary-test-catalog.md +0 -228
  79. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +0 -118
  80. package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +0 -107
  81. package/bundled/skills/prizmkit-test/references/workflow-state-protocol.md +0 -181
  82. package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +0 -1930
  83. package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +0 -1847
@@ -40,15 +40,14 @@ def route_bugfix_repair(stage_result, repair_scope=None, repair_round=0):
40
40
  return route_pipeline_repair(stage_result, repair_scope, repair_round)
41
41
 
42
42
 
43
- def bugfix_checkpoint_metadata(artifact_dir, evidence=None, stage="plan",
44
- status="PLAN_READY", stage_result=None,
43
+ def bugfix_checkpoint_metadata(artifact_dir, stage="plan",
44
+ status="pending", stage_result=None,
45
45
  repair_scope=None, repair_round=0,
46
46
  next_stage="prizmkit-implement",
47
47
  resume_from="prizmkit-implement"):
48
- """Build Bugfix L4 handoff metadata while preserving Bugfix L1 state."""
48
+ """Build Bugfix pipeline handoff metadata while preserving skill state."""
49
49
  return pipeline_checkpoint_metadata(
50
50
  artifact_dir,
51
- evidence=evidence,
52
51
  stage=stage,
53
52
  status=status,
54
53
  stage_result=stage_result,
@@ -71,9 +70,8 @@ BUGFIX_SECTION_TO_SKILL = {
71
70
  "bugfix-phase-test": checkpoint_step(
72
71
  "prizmkit-test", "Post-Review Test Gate",
73
72
  [
74
- ".prizmkit/test/evidence/*/manifest.json",
75
- ".prizmkit/test/evidence/*/verdict.json",
76
- ".prizmkit/test/evidence/*/validation.json",
73
+ ".prizmkit/bugfix/{slug}/test-report.md",
74
+ ".prizmkit/bugfix/{slug}/test-result.json",
77
75
  ],
78
76
  ),
79
77
  "phase-browser": checkpoint_step("browser-verification", "Browser Verification", []),
@@ -538,7 +536,7 @@ def main():
538
536
  checkpoint["bugfix_state"] = bugfix_checkpoint_metadata(
539
537
  replacements["{{ARTIFACT_DIR}}"],
540
538
  stage="plan",
541
- status="PLAN_READY",
539
+ status="pending",
542
540
  stage_result=None,
543
541
  repair_scope=None,
544
542
  repair_round=0,
@@ -67,7 +67,7 @@ affected files, and root cause hypothesis.""",
67
67
  "Triage",
68
68
  """\
69
69
  Locate affected code and identify root cause:
70
- 1. Read `.prizmkit/prizm-docs/root.prizm` then relevant L1/L2 docs for affected modules
70
+ 1. Read `.prizmkit/prizm-docs/root.prizm` then the relevant module indexes and detail docs for affected modules
71
71
  2. Read files mentioned in the bug description or error/stack trace
72
72
  3. Check `.prizmkit/prizm-docs/` TRAPS for known patterns
73
73
  4. Classify: root cause (confirmed/suspected), blast radius, fix complexity
@@ -40,15 +40,14 @@ def route_refactor_repair(stage_result, repair_scope=None, repair_round=0):
40
40
  return route_pipeline_repair(stage_result, repair_scope, repair_round)
41
41
 
42
42
 
43
- def refactor_checkpoint_metadata(artifact_dir, evidence=None, stage="plan",
44
- status="PLAN_READY", stage_result=None,
43
+ def refactor_checkpoint_metadata(artifact_dir, stage="plan",
44
+ status="pending", stage_result=None,
45
45
  repair_scope=None, repair_round=0,
46
46
  next_stage="prizmkit-implement",
47
47
  resume_from="prizmkit-implement"):
48
- """Build Refactor L4 handoff metadata while preserving Refactor L1 state."""
48
+ """Build Refactor pipeline handoff metadata while preserving skill state."""
49
49
  return pipeline_checkpoint_metadata(
50
50
  artifact_dir,
51
- evidence=evidence,
52
51
  stage=stage,
53
52
  status=status,
54
53
  stage_result=stage_result,
@@ -76,9 +75,8 @@ REFACTOR_SECTION_TO_SKILL = {
76
75
  "refactor-phase-test": checkpoint_step(
77
76
  "prizmkit-test", "Post-Review Test Gate",
78
77
  [
79
- ".prizmkit/test/evidence/*/manifest.json",
80
- ".prizmkit/test/evidence/*/verdict.json",
81
- ".prizmkit/test/evidence/*/validation.json",
78
+ ".prizmkit/refactor/{slug}/test-report.md",
79
+ ".prizmkit/refactor/{slug}/test-result.json",
82
80
  ],
83
81
  ),
84
82
  "phase-browser": checkpoint_step("browser-verification", "Browser Verification", []),
@@ -556,7 +554,7 @@ def main():
556
554
  checkpoint["refactor_state"] = refactor_checkpoint_metadata(
557
555
  replacements["{{ARTIFACT_DIR}}"],
558
556
  stage="plan",
559
- status="PLAN_READY",
557
+ status="pending",
560
558
  stage_result=None,
561
559
  repair_scope=None,
562
560
  repair_round=0,
@@ -8,20 +8,24 @@ so feature, bugfix, and refactor prompts do not drift.
8
8
  import glob
9
9
  import os
10
10
  import re
11
+ import sys
12
+
13
+ _PIPELINE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
14
+ if _PIPELINE_ROOT not in sys.path:
15
+ sys.path.insert(0, _PIPELINE_ROOT)
16
+
17
+ from prizmkit_runtime.checkpoint_state import ( # noqa: E402
18
+ VALID_CHECKPOINT_STATUSES,
19
+ expected_status_for_stage_result,
20
+ )
21
+ from prizmkit_runtime.test_result import valid_test_artifact_pair # noqa: E402
11
22
 
12
23
 
13
24
  MAX_OUTER_REPAIR_ROUNDS = 3
14
- REPAIR_SCOPES_REQUIRING_REVIEW = {
15
- "production",
16
- "runtime",
17
- "schema",
18
- "dependency",
19
- "public-interface",
20
- }
21
25
 
22
26
 
23
27
  def route_pipeline_repair(stage_result, repair_scope=None, repair_round=0):
24
- """Map review/test outcomes to bounded, safe L4 continuation routes."""
28
+ """Map review/test outcomes to bounded, safe pipeline continuation routes."""
25
29
  try:
26
30
  current_round = int(repair_round)
27
31
  except (TypeError, ValueError):
@@ -46,19 +50,28 @@ def route_pipeline_repair(stage_result, repair_scope=None, repair_round=0):
46
50
  result.update(
47
51
  next_stage="prizmkit-retrospective",
48
52
  resume_from="prizmkit-retrospective",
49
- reason="authoritative test evidence passed",
53
+ reason="project-native tests passed",
50
54
  )
51
55
  return result
52
56
  if stage_result == "TEST_BLOCKED":
53
57
  result.update(
54
58
  blocked=True,
55
59
  resumable=False,
56
- reason="bounded automatic recovery cannot safely edit production",
60
+ reason="testing could not establish a safe verdict",
57
61
  blocked_reason="test_blocked",
58
62
  terminal_status="WORKFLOW_BLOCKED",
59
63
  )
60
64
  return result
61
- if stage_result not in {"REVIEW_NEEDS_FIXES", "TEST_FAIL"}:
65
+ if stage_result == "TEST_NEEDS_FIXES":
66
+ result.update(
67
+ blocked=True,
68
+ resumable=False,
69
+ reason="prizmkit-test stopped with a known remaining correction",
70
+ blocked_reason="test_needs_fixes",
71
+ terminal_status="WORKFLOW_BLOCKED",
72
+ )
73
+ return result
74
+ if stage_result != "REVIEW_NEEDS_FIXES":
62
75
  result.update(
63
76
  blocked=True,
64
77
  reason="unknown stage result is unsafe",
@@ -76,55 +89,29 @@ def route_pipeline_repair(stage_result, repair_scope=None, repair_round=0):
76
89
  return result
77
90
 
78
91
  result["repair_round"] = current_round + 1
79
- if stage_result == "REVIEW_NEEDS_FIXES":
80
- result.update(
81
- next_stage="prizmkit-implement",
82
- resume_from="prizmkit-implement",
83
- route=["prizmkit-implement", "prizmkit-code-review", "prizmkit-test"],
84
- reason="review findings require implementation and fresh review",
85
- )
86
- return result
87
- if repair_scope == "test-infrastructure":
88
- result.update(
89
- next_stage="prizmkit-implement",
90
- resume_from="prizmkit-implement",
91
- route=["prizmkit-implement", "prizmkit-test"],
92
- reason="test infrastructure failure must not edit production speculatively",
93
- )
94
- return result
95
- if repair_scope in REPAIR_SCOPES_REQUIRING_REVIEW:
96
- result.update(
97
- next_stage="prizmkit-implement",
98
- resume_from="prizmkit-implement",
99
- route=["prizmkit-implement", "prizmkit-code-review", "prizmkit-test"],
100
- reason="production-facing failure requires review before retesting",
101
- )
102
- return result
103
92
  result.update(
104
- blocked=True,
105
- reason="unknown repair scope has no safe automatic route",
106
- blocked_reason="unsafe_repair_scope",
107
- terminal_status="WORKFLOW_BLOCKED",
93
+ next_stage="prizmkit-implement",
94
+ resume_from="prizmkit-implement",
95
+ route=["prizmkit-implement", "prizmkit-code-review", "prizmkit-test"],
96
+ reason="review findings require implementation and fresh review",
108
97
  )
109
98
  return result
110
99
 
111
100
 
112
- def pipeline_checkpoint_metadata(artifact_dir, evidence=None, stage="plan",
113
- status="PLAN_READY", stage_result=None,
101
+ def pipeline_checkpoint_metadata(artifact_dir, stage="plan",
102
+ status="pending", stage_result=None,
114
103
  repair_scope=None, repair_round=0,
115
104
  next_stage="prizmkit-implement",
116
105
  resume_from="prizmkit-implement",
117
106
  blocked_reason=None, terminal_status=None):
118
- """Build family-neutral semantic L4 metadata without replacing L1 state."""
119
- evidence = evidence or {}
120
- if evidence:
121
- evidence_paths = {
122
- "manifest": evidence.get("manifest_path"),
123
- "verdict": evidence.get("verdict_path"),
124
- "validation": evidence.get("validation_path"),
125
- }
126
- else:
127
- evidence_paths = {"manifest": None, "verdict": None, "validation": None}
107
+ """Build family-neutral pipeline metadata without replacing skill state."""
108
+ if status not in VALID_CHECKPOINT_STATUSES:
109
+ raise ValueError("Invalid checkpoint lifecycle status: {}".format(status))
110
+ expected_status = expected_status_for_stage_result(stage_result)
111
+ if expected_status is None and stage_result is not None:
112
+ raise ValueError("Invalid checkpoint stage result: {}".format(stage_result))
113
+ if expected_status is not None and status != expected_status:
114
+ raise ValueError("{} requires status={}".format(stage_result, expected_status))
128
115
  current_stage = None if terminal_status else stage
129
116
  semantic_next_stage = None if terminal_status else next_stage
130
117
  return {
@@ -137,7 +124,6 @@ def pipeline_checkpoint_metadata(artifact_dir, evidence=None, stage="plan",
137
124
  "stage_result": stage_result,
138
125
  "repair_scope": repair_scope,
139
126
  "repair_round": repair_round,
140
- "authoritative_evidence_paths": evidence_paths,
141
127
  "next_stage": semantic_next_stage,
142
128
  "resume_from": resume_from,
143
129
  "blocked_reason": blocked_reason,
@@ -248,6 +234,29 @@ def completed_step_artifacts_valid(project_root, artifacts):
248
234
  return all(artifact_exists(project_root, artifact) for artifact in artifacts)
249
235
 
250
236
 
237
+ def completed_test_artifacts_valid(project_root, artifacts):
238
+ """Validate a sibling test-report.md and TEST_PASS test-result.json pair."""
239
+ reports = [item for item in artifacts if item.endswith("/test-report.md")]
240
+ results = [item for item in artifacts if item.endswith("/test-result.json")]
241
+ if len(reports) != 1 or len(results) != 1:
242
+ return False
243
+ report_path = os.path.realpath(os.path.join(project_root, reports[0]))
244
+ result_path = os.path.realpath(os.path.join(project_root, results[0]))
245
+ root_path = os.path.realpath(project_root)
246
+ try:
247
+ if os.path.commonpath([root_path, report_path]) != root_path:
248
+ return False
249
+ if os.path.commonpath([root_path, result_path]) != root_path:
250
+ return False
251
+ except ValueError:
252
+ return False
253
+ return valid_test_artifact_pair(
254
+ report_path,
255
+ result_path,
256
+ required_result="TEST_PASS",
257
+ )
258
+
259
+
251
260
  def checkpoint_skip():
252
261
  """Return an explicit no-checkpoint-step contract for a prompt section."""
253
262
  return {"kind": "skip"}
@@ -360,7 +369,13 @@ def generate_checkpoint_from_sections(
360
369
 
361
370
  def merge_checkpoint_state(existing, fresh, project_root, validator=None, logger=None):
362
371
  """Merge existing checkpoint state into a freshly generated definition."""
363
- validator = validator or (lambda _skill, artifacts: completed_step_artifacts_valid(project_root, artifacts))
372
+ validator = validator or (
373
+ lambda skill, artifacts: (
374
+ completed_test_artifacts_valid(project_root, artifacts)
375
+ if skill == "prizmkit-test"
376
+ else completed_step_artifacts_valid(project_root, artifacts)
377
+ )
378
+ )
364
379
  existing_by_id = {}
365
380
  existing_by_skill = {}
366
381
  for step in existing.get("steps", []):
@@ -402,9 +417,6 @@ def merge_checkpoint_state(existing, fresh, project_root, validator=None, logger
402
417
  step["status"] = "completed"
403
418
  if stage_result:
404
419
  step["stage_result"] = stage_result
405
- evidence = previous.get("authoritative_evidence_paths")
406
- if isinstance(evidence, dict):
407
- step["authoritative_evidence_paths"] = evidence
408
420
  continue
409
421
  if logger is not None:
410
422
  logger.warning(
@@ -47,6 +47,7 @@ SESSION_STATUS_VALUES = [
47
47
  "context_overflow",
48
48
  "stalled_context_continuation",
49
49
  "workflow_blocked",
50
+ "workflow_skipped",
50
51
  "commit_missing",
51
52
  "docs_missing",
52
53
  "merge_conflict",
@@ -89,7 +90,7 @@ def parse_args():
89
90
  parser.add_argument("--continuation-summary-path", default=None, help="Optional continuation summary artifact path.")
90
91
  parser.add_argument("--no-progress-count", type=int, default=None, help="Consecutive context-overflow sessions without objective progress.")
91
92
  parser.add_argument("--progress-fingerprint", default=None, help="JSON progress fingerprint captured after the session.")
92
- parser.add_argument("--checkpoint-state", default=None, help="JSON semantic L4 checkpoint snapshot captured after the session.")
93
+ parser.add_argument("--checkpoint-state", default=None, help="JSON semantic pipeline checkpoint snapshot captured after the session.")
93
94
  return parser.parse_args()
94
95
 
95
96
 
@@ -261,7 +262,6 @@ SEMANTIC_CHECKPOINT_FIELDS = (
261
262
  "stage_result",
262
263
  "repair_scope",
263
264
  "repair_round",
264
- "authoritative_evidence_paths",
265
265
  "blocked_reason",
266
266
  "terminal_status",
267
267
  )
@@ -594,6 +594,20 @@ def action_update(args, bug_list_path, state_dir):
594
594
  if err:
595
595
  error_out("Failed to update .prizmkit/plans/bug-fix-list.json: {}".format(err))
596
596
  return
597
+ elif session_status == "workflow_skipped":
598
+ # A completed AI CLI session without authoritative workflow evidence is
599
+ # skipped, not crashed. Preserve diagnostics and spend no retry budget.
600
+ new_status = "skipped"
601
+ bs["continuation_pending"] = False
602
+ bs.pop("continuation_reason", None)
603
+ bs.pop("terminal_status", None)
604
+ bs.pop("blocked_reason", None)
605
+ bs["needs_attention"] = True
606
+ bs["skipped_reason"] = "workflow_completion_evidence_invalid"
607
+ err = update_bug_in_list(bug_list_path, bug_id, new_status)
608
+ if err:
609
+ error_out("Failed to update .prizmkit/plans/bug-fix-list.json: {}".format(err))
610
+ return
597
611
  elif session_status == "workflow_blocked":
598
612
  # Semantic terminal state: preserve partial work without consuming any retry budget.
599
613
  new_status = "needs_info"
@@ -678,6 +692,11 @@ def action_update(args, bug_list_path, state_dir):
678
692
  summary["restart_policy"] = "context_overflow_continuation"
679
693
  summary.update(continuation_metadata_summary(bs))
680
694
  summary["artifacts_preserved"] = True
695
+ elif session_status == "workflow_skipped":
696
+ summary["restart_policy"] = "terminal_skipped"
697
+ summary.update(continuation_metadata_summary(bs))
698
+ summary["checkpoint_state"] = semantic_checkpoint
699
+ summary["artifacts_preserved"] = True
681
700
  elif session_status == "workflow_blocked":
682
701
  summary["restart_policy"] = "terminal_blocked"
683
702
  summary.update(continuation_metadata_summary(bs))