prizmkit 1.1.192 → 1.1.193

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 (56) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/README.md +23 -34
  3. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  4. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +3 -0
  5. package/bundled/dev-pipeline/prizmkit_runtime/config.py +24 -2
  6. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +2 -0
  7. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +89 -40
  8. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +9 -1
  9. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +0 -22
  10. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +11 -7
  11. package/bundled/dev-pipeline/prizmkit_runtime/processes.py +26 -20
  12. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +37 -4
  13. package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +20 -41
  14. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +74 -36
  15. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -66
  16. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +271 -52
  17. package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +51 -13
  18. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +43 -15
  19. package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +27 -24
  20. package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +0 -1
  21. package/bundled/dev-pipeline/scripts/check-session-status.py +13 -1
  22. package/bundled/dev-pipeline/scripts/continuation.py +2 -3
  23. package/bundled/dev-pipeline/scripts/detect-stuck.py +19 -5
  24. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +6 -14
  25. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +13 -8
  26. package/bundled/dev-pipeline/scripts/init-change-artifact.py +17 -2
  27. package/bundled/dev-pipeline/scripts/prompt_framework.py +39 -21
  28. package/bundled/dev-pipeline/scripts/update-checkpoint.py +27 -0
  29. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +1 -1
  30. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
  31. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +1 -1
  32. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +1 -1
  33. package/bundled/skills/_metadata.json +1 -1
  34. package/package.json +1 -1
  35. package/bundled/dev-pipeline/tests/_helpers.py +0 -418
  36. package/bundled/dev-pipeline/tests/conftest.py +0 -73
  37. package/bundled/dev-pipeline/tests/live_ai_cli_log_smoke.py +0 -208
  38. package/bundled/dev-pipeline/tests/test_auto_skip.py +0 -1806
  39. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +0 -1439
  40. package/bundled/dev-pipeline/tests/test_daemon_and_scripts.py +0 -257
  41. package/bundled/dev-pipeline/tests/test_e2e_pipeline_run.py +0 -500
  42. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +0 -1654
  43. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +0 -629
  44. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +0 -2973
  45. package/bundled/dev-pipeline/tests/test_recovery_workflow.py +0 -321
  46. package/bundled/dev-pipeline/tests/test_repository_bootstrap.py +0 -251
  47. package/bundled/dev-pipeline/tests/test_reset_modes.py +0 -1196
  48. package/bundled/dev-pipeline/tests/test_reset_preserve.py +0 -872
  49. package/bundled/dev-pipeline/tests/test_runner_bookkeeping.py +0 -766
  50. package/bundled/dev-pipeline/tests/test_runner_lifecycle.py +0 -1257
  51. package/bundled/dev-pipeline/tests/test_runtime_commit.py +0 -1113
  52. package/bundled/dev-pipeline/tests/test_runtime_helper.py +0 -380
  53. package/bundled/dev-pipeline/tests/test_session_launch.py +0 -1101
  54. package/bundled/dev-pipeline/tests/test_stream_progress.py +0 -585
  55. package/bundled/dev-pipeline/tests/test_unified_cli.py +0 -3625
  56. package/bundled/dev-pipeline/tests/test_utils.py +0 -170
@@ -1,170 +0,0 @@
1
- """Tests for dev-pipeline/scripts/utils.py shared utilities."""
2
-
3
- import json
4
- import os
5
- import tempfile
6
-
7
- from utils import (
8
- load_json_file,
9
- write_json_file,
10
- pad_right,
11
- _build_progress_bar,
12
- detect_project_context,
13
- stable_topological_order,
14
- )
15
-
16
-
17
- # ---------------------------------------------------------------------------
18
- # load_json_file / write_json_file round-trip
19
- # ---------------------------------------------------------------------------
20
-
21
- class TestJsonIO:
22
- def test_round_trip(self, tmp_path):
23
- path = str(tmp_path / "data.json")
24
- data = {"features": [{"id": "F-001"}]}
25
- err = write_json_file(path, data)
26
- assert err is None
27
-
28
- loaded, err = load_json_file(path)
29
- assert err is None
30
- assert loaded == data
31
-
32
- def test_load_missing_file(self):
33
- loaded, err = load_json_file("/nonexistent/path.json")
34
- assert loaded is None
35
- assert "not found" in err.lower() or "File not found" in err
36
-
37
- def test_load_invalid_json(self, tmp_path):
38
- path = str(tmp_path / "bad.json")
39
- with open(path, "w") as f:
40
- f.write("{invalid json}")
41
- loaded, err = load_json_file(path)
42
- assert loaded is None
43
- assert "invalid" in err.lower() or "Invalid" in err
44
-
45
- def test_write_creates_parent_dirs(self, tmp_path):
46
- path = str(tmp_path / "a" / "b" / "c" / "data.json")
47
- err = write_json_file(path, {"ok": True})
48
- assert err is None
49
- assert os.path.isfile(path)
50
-
51
-
52
- # ---------------------------------------------------------------------------
53
- # pad_right
54
- # ---------------------------------------------------------------------------
55
-
56
- class TestPadRight:
57
- def test_basic_padding(self):
58
- result = pad_right("abc", 10)
59
- assert len(result) == 10
60
- assert result == "abc "
61
-
62
- def test_no_padding_needed(self):
63
- result = pad_right("abcdef", 3)
64
- assert result == "abcdef"
65
-
66
- def test_ansi_escape_ignored(self):
67
- # ANSI color code should not count toward visible length
68
- text = "\033[31mred\033[0m" # "red" with ANSI color (3 visible chars)
69
- result = pad_right(text, 10)
70
- # Visible length is 3, so 7 spaces of padding
71
- assert result.endswith(" ")
72
-
73
-
74
- # ---------------------------------------------------------------------------
75
- # _build_progress_bar
76
- # ---------------------------------------------------------------------------
77
-
78
- class TestBuildProgressBar:
79
- def test_zero_percent(self):
80
- bar = _build_progress_bar(0, width=10)
81
- assert "0%" in bar
82
-
83
- def test_hundred_percent(self):
84
- bar = _build_progress_bar(100, width=10)
85
- assert "100%" in bar
86
-
87
- def test_fifty_percent(self):
88
- bar = _build_progress_bar(50, width=10)
89
- assert "50%" in bar
90
-
91
-
92
- # ---------------------------------------------------------------------------
93
- # detect_project_context
94
- # ---------------------------------------------------------------------------
95
-
96
- class TestDetectProjectContext:
97
- def test_node_detection_returns_only_canonical_context_keys(self, tmp_path):
98
- (tmp_path / "package.json").write_text(
99
- json.dumps({"dependencies": {"react": "latest", "express": "latest"}}),
100
- encoding="utf-8",
101
- )
102
-
103
- detected = detect_project_context(str(tmp_path))
104
-
105
- assert detected == {
106
- "language": "JavaScript",
107
- "runtime": "Node.js",
108
- "frontend_framework": "React",
109
- "backend_framework": "Express.js",
110
- "project_type": "fullstack",
111
- }
112
-
113
-
114
- # ---------------------------------------------------------------------------
115
- # stable_topological_order
116
- # ---------------------------------------------------------------------------
117
-
118
- class TestStableTopologicalOrder:
119
- def test_dependencies_precede_dependents_with_stable_tie_breaking(self):
120
- items = [
121
- {"id": "F-001", "dependencies": []},
122
- {"id": "F-002", "dependencies": ["F-001"]},
123
- {"id": "F-003", "dependencies": []},
124
- ]
125
-
126
- ordered, errors = stable_topological_order(items, item_label="Feature")
127
-
128
- assert errors == []
129
- assert [item["id"] for item in ordered] == ["F-001", "F-002", "F-003"]
130
-
131
- def test_unrelated_items_preserve_original_list_order(self):
132
- items = [
133
- {"id": "F-010", "dependencies": []},
134
- {"id": "F-002", "dependencies": []},
135
- {"id": "F-007", "dependencies": []},
136
- ]
137
-
138
- ordered, errors = stable_topological_order(items, item_label="Feature")
139
-
140
- assert errors == []
141
- assert [item["id"] for item in ordered] == ["F-010", "F-002", "F-007"]
142
-
143
- def test_missing_dependency_is_blocking_error(self):
144
- items = [
145
- {"id": "B-001", "dependencies": ["B-999"]},
146
- ]
147
-
148
- _ordered, errors = stable_topological_order(items, item_label="Bug")
149
-
150
- assert errors == ["Bug 'B-001' depends on missing dependency 'B-999'"]
151
-
152
- def test_self_dependency_is_blocking_error(self):
153
- items = [
154
- {"id": "F-001", "dependencies": ["F-001"]},
155
- ]
156
-
157
- _ordered, errors = stable_topological_order(items, item_label="Feature")
158
-
159
- assert errors == ["Feature 'F-001' cannot depend on itself"]
160
-
161
- def test_cycle_reports_chain(self):
162
- items = [
163
- {"id": "F-001", "dependencies": ["F-003"]},
164
- {"id": "F-002", "dependencies": ["F-001"]},
165
- {"id": "F-003", "dependencies": ["F-002"]},
166
- ]
167
-
168
- _ordered, errors = stable_topological_order(items, item_label="Feature")
169
-
170
- assert errors == ["Dependency cycle detected: F-001 -> F-003 -> F-002 -> F-001"]