prizmkit 1.1.160 → 1.1.162
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.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/README.md +3 -1
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +9 -6
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +63 -4
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +268 -110
- package/bundled/dev-pipeline/scripts/update-bug-status.py +8 -4
- package/bundled/dev-pipeline/scripts/update-feature-status.py +10 -6
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +8 -4
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +2 -2
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +9 -15
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +8 -5
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +4 -2
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +4 -2
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +221 -6
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +308 -67
- package/bundled/dev-pipeline/tests/test_unified_cli.py +172 -4
- package/bundled/rules/prizm/prizm-commit-workflow.md +12 -5
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/prizmkit-code-review/SKILL.md +5 -5
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +4 -5
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +4 -6
- package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +1 -4
- package/bundled/skills/prizmkit-committer/SKILL.md +47 -63
- package/bundled/skills/prizmkit-test/SKILL.md +2 -2
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +1 -1
- package/bundled/skills/prizmkit-workflow/SKILL.md +4 -6
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +10 -8
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -372,6 +372,8 @@ python3 scripts/update-feature-status.py \
|
|
|
372
372
|
**Session status values (for `--session-status`):**
|
|
373
373
|
`success`, `partial_resumable`, `partial_not_resumable`, `failed`, `crashed`, `timed_out`, `infra_error`, `context_overflow`, `stalled_context_continuation`, `workflow_blocked`, `workflow_skipped`, `commit_missing`, `docs_missing`, `merge_conflict`
|
|
374
374
|
|
|
375
|
+
`workflow_skipped` remains the raw session diagnostic for a terminally successful AI process whose authoritative workflow evidence is missing, incompatible, or incomplete. After safely finalizing the complete workspace, the foreground Runner passes ordinary `success` only to the family updater so the task becomes external `completed`, spends no retry budget, and leaves dependent items runnable. The raw session record remains unchanged, and the Runner emits one non-persistent manual-review warning only after successful task finalization and merge. Failed safety checks, commit finalization, or merge remain hard outcomes and do not emit the accepted-success warning. No compatibility flag, persistent warning metadata, or new plan/session status enum is introduced.
|
|
376
|
+
|
|
375
377
|
**Output (JSON to stdout):**
|
|
376
378
|
|
|
377
379
|
```json
|
|
@@ -411,7 +413,7 @@ python3 scripts/check-session-status.py --status-file <path>
|
|
|
411
413
|
```
|
|
412
414
|
|
|
413
415
|
**Output (single line to stdout):**
|
|
414
|
-
`success` | `partial_resumable` | `partial_not_resumable` | `failed` | `crashed` | `commit_missing` | `docs_missing` | `merge_conflict`
|
|
416
|
+
`success` | `partial_resumable` | `partial_not_resumable` | `failed` | `crashed` | `timed_out` | `infra_error` | `context_overflow` | `stalled_context_continuation` | `workflow_blocked` | `workflow_skipped` | `commit_missing` | `docs_missing` | `merge_conflict`
|
|
415
417
|
|
|
416
418
|
**Detail report (JSON to stderr):**
|
|
417
419
|
|
|
@@ -59,17 +59,19 @@ def _file_size(path: Path | None) -> int:
|
|
|
59
59
|
return 0
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
def _progress_signature(path: Path | None) -> tuple[str, str]:
|
|
62
|
+
def _progress_signature(path: Path | None) -> tuple[str, str, bool]:
|
|
63
63
|
if path is None or not path.is_file():
|
|
64
|
-
return "", ""
|
|
64
|
+
return "", "", False
|
|
65
65
|
try:
|
|
66
66
|
data = json.loads(path.read_text(encoding="utf-8"))
|
|
67
67
|
except (OSError, json.JSONDecodeError):
|
|
68
|
-
return "", ""
|
|
68
|
+
return "", "", False
|
|
69
|
+
current_tool = data.get("current_tool")
|
|
70
|
+
tool_active = isinstance(current_tool, str) and bool(current_tool.strip())
|
|
69
71
|
child_signature = str(data.get("child_activity_signature") or "")
|
|
70
72
|
signature = json.dumps(
|
|
71
73
|
[
|
|
72
|
-
|
|
74
|
+
current_tool or "",
|
|
73
75
|
int(data.get("message_count") or 0),
|
|
74
76
|
int(data.get("total_tool_calls") or 0),
|
|
75
77
|
int(data.get("active_subagent_count") or 0),
|
|
@@ -81,7 +83,7 @@ def _progress_signature(path: Path | None) -> tuple[str, str]:
|
|
|
81
83
|
],
|
|
82
84
|
separators=(",", ":"),
|
|
83
85
|
)
|
|
84
|
-
return signature, child_signature
|
|
86
|
+
return signature, child_signature, tool_active
|
|
85
87
|
|
|
86
88
|
|
|
87
89
|
def observe_heartbeat_state(
|
|
@@ -91,13 +93,14 @@ def observe_heartbeat_state(
|
|
|
91
93
|
"""Observe log/progress activity and compute staleness."""
|
|
92
94
|
now = time.time()
|
|
93
95
|
log_size = _file_size(config.session_log)
|
|
94
|
-
progress_signature, child_signature = _progress_signature(config.progress_file)
|
|
96
|
+
progress_signature, child_signature, tool_active = _progress_signature(config.progress_file)
|
|
95
97
|
prev_log_size = previous.log_size if previous else 0
|
|
96
98
|
progressed = (
|
|
97
99
|
previous is None
|
|
98
100
|
or log_size > prev_log_size
|
|
99
101
|
or (progress_signature and progress_signature != previous.progress_signature)
|
|
100
102
|
or (child_signature and child_signature != previous.child_activity_signature)
|
|
103
|
+
or tool_active
|
|
101
104
|
)
|
|
102
105
|
if progressed:
|
|
103
106
|
last_seen_epoch = now
|
|
@@ -53,7 +53,12 @@ from .runner_models import (
|
|
|
53
53
|
parse_invocation,
|
|
54
54
|
)
|
|
55
55
|
from .runner_prompts import PromptGenerationResult, generate_prompt
|
|
56
|
-
from .runtime_commit import
|
|
56
|
+
from .runtime_commit import (
|
|
57
|
+
REQUEST_FILENAME,
|
|
58
|
+
RuntimeCommitResult,
|
|
59
|
+
finalize_accepted_workspace_commit,
|
|
60
|
+
finalize_runtime_commit,
|
|
61
|
+
)
|
|
57
62
|
from .runner_status import get_next, start_item, status_text, update_item
|
|
58
63
|
from .sessions import AISessionConfig, AISessionLauncher, detect_stream_json_support
|
|
59
64
|
from .task_checkout import (
|
|
@@ -766,6 +771,21 @@ def _process_item_locked(
|
|
|
766
771
|
progress_fingerprint=classification.progress_fingerprint,
|
|
767
772
|
checkpoint_state=classification.checkpoint_state,
|
|
768
773
|
)
|
|
774
|
+
elif classification.session_status == "workflow_skipped":
|
|
775
|
+
accepted_commit = _finalize_accepted_workflow_skip(
|
|
776
|
+
execution_root,
|
|
777
|
+
family,
|
|
778
|
+
item_id,
|
|
779
|
+
prompt,
|
|
780
|
+
base_head,
|
|
781
|
+
)
|
|
782
|
+
if accepted_commit.status not in {"committed", "not_needed"}:
|
|
783
|
+
classification = SessionClassification(
|
|
784
|
+
"commit_missing",
|
|
785
|
+
reason=accepted_commit.reason,
|
|
786
|
+
progress_fingerprint=classification.progress_fingerprint,
|
|
787
|
+
checkpoint_state=classification.checkpoint_state,
|
|
788
|
+
)
|
|
769
789
|
_emit_session_summary(session_result, session_paths, classification)
|
|
770
790
|
final_session_status = classification.session_status
|
|
771
791
|
summary_path = _continuation_summary_path(execution_root, family, item_id, prompt)
|
|
@@ -784,11 +804,15 @@ def _process_item_locked(
|
|
|
784
804
|
checkpoint_state=classification.checkpoint_state,
|
|
785
805
|
)
|
|
786
806
|
|
|
807
|
+
accepted_with_warning = final_session_status == "workflow_skipped"
|
|
808
|
+
updater_session_status = (
|
|
809
|
+
"success" if accepted_with_warning else final_session_status
|
|
810
|
+
)
|
|
787
811
|
update = update_item(
|
|
788
812
|
status_family,
|
|
789
813
|
status_invocation,
|
|
790
814
|
item_id,
|
|
791
|
-
|
|
815
|
+
updater_session_status,
|
|
792
816
|
session_id,
|
|
793
817
|
status_root,
|
|
794
818
|
active_dev_branch=branch_name,
|
|
@@ -819,7 +843,8 @@ def _process_item_locked(
|
|
|
819
843
|
time.sleep(5)
|
|
820
844
|
continue
|
|
821
845
|
|
|
822
|
-
|
|
846
|
+
accepted_with_warning = accepted_with_warning and new_status == "completed"
|
|
847
|
+
if final_session_status != "success" and not accepted_with_warning:
|
|
823
848
|
commit_final_bookkeeping(status_root, status_family, item_id, new_status)
|
|
824
849
|
wip = _save_failure_wip(execution_root, family, item_id, new_status, worktree_runtime)
|
|
825
850
|
if not getattr(wip, "ok", True):
|
|
@@ -831,7 +856,7 @@ def _process_item_locked(
|
|
|
831
856
|
_emit_warning(f"Could not safely return to {base_branch}; leaving {branch_name} active")
|
|
832
857
|
return new_status
|
|
833
858
|
|
|
834
|
-
|
|
859
|
+
completed_status = _complete_success_merge(
|
|
835
860
|
family,
|
|
836
861
|
item_id,
|
|
837
862
|
new_status,
|
|
@@ -848,6 +873,14 @@ def _process_item_locked(
|
|
|
848
873
|
worktree_runtime,
|
|
849
874
|
classification_fatal_error_code=classification.fatal_error_code,
|
|
850
875
|
)
|
|
876
|
+
if accepted_with_warning and completed_status == "completed":
|
|
877
|
+
reason = classification.reason or "no_semantic_completion"
|
|
878
|
+
_emit_warning(
|
|
879
|
+
f"{item_id} was accepted with incomplete workflow evidence. "
|
|
880
|
+
f"Reason: {reason}. The task was finalized and merged; "
|
|
881
|
+
"manual review is recommended."
|
|
882
|
+
)
|
|
883
|
+
return completed_status
|
|
851
884
|
except KeyboardInterrupt as interruption:
|
|
852
885
|
try:
|
|
853
886
|
_emit_task_interruption_diagnostics(
|
|
@@ -1017,6 +1050,32 @@ def _finalize_prepared_runtime_commit(
|
|
|
1017
1050
|
return result
|
|
1018
1051
|
|
|
1019
1052
|
|
|
1053
|
+
def _finalize_accepted_workflow_skip(
|
|
1054
|
+
execution_root: Path,
|
|
1055
|
+
family: RunnerFamily,
|
|
1056
|
+
item_id: str,
|
|
1057
|
+
prompt: PromptGenerationResult,
|
|
1058
|
+
base_head: str,
|
|
1059
|
+
) -> RuntimeCommitResult:
|
|
1060
|
+
"""Commit accepted task output safely while retaining incomplete evidence."""
|
|
1061
|
+
if prompt.checkpoint_path is None or prompt.artifact_path is None:
|
|
1062
|
+
return RuntimeCommitResult("failed", "accepted_commit_handoff_unavailable")
|
|
1063
|
+
result = finalize_accepted_workspace_commit(
|
|
1064
|
+
execution_root,
|
|
1065
|
+
artifact_dir=prompt.artifact_path,
|
|
1066
|
+
checkpoint_path=prompt.checkpoint_path,
|
|
1067
|
+
base_head=base_head,
|
|
1068
|
+
commit_message=f"chore({item_id}): accept {family.kind} task with workflow warning",
|
|
1069
|
+
)
|
|
1070
|
+
if result.committed:
|
|
1071
|
+
_emit_success(f"Runtime committed accepted task output: {result.commit_hash}")
|
|
1072
|
+
elif result.status == "not_needed":
|
|
1073
|
+
_emit_info(f"Accepted task output required no additional Runtime commit ({result.reason})")
|
|
1074
|
+
else:
|
|
1075
|
+
_emit_warning(f"Accepted task output failed Runtime safety checks: {result.reason}")
|
|
1076
|
+
return result
|
|
1077
|
+
|
|
1078
|
+
|
|
1020
1079
|
def _is_retryable_ai_outcome(session_status: str, new_status: str) -> bool:
|
|
1021
1080
|
"""Return whether a persisted post-launch outcome should continue in-process."""
|
|
1022
1081
|
if session_status in {
|