Files
cleveragents-core/parse_issues2.py
T
HAL9000 abd4e83baa fix(cli): add timing.started ISO timestamp to plan prompt JSON envelope
- Capture started_at timestamp using datetime.now(UTC) before service call
- Add timing.started field to JSON envelope with ISO 8601 format
- Update step definitions to verify timing.started is present and valid
- Remove @tdd_expected_fail tag from plan_prompt_command.feature scenario

Fixes #9353
2026-06-03 03:03:14 -04:00

41 lines
1.1 KiB
Python

import json
# Parse issues page 2
with open('/home/devuser/.local/share/opencode/tool-output/tool_d8cf8552a001pV14tVIOnteVo9') as f:
content = f.read()
data = json.loads(content)['Result']
print(f'Total open issues on page 2: {len(data)}')
# Count by milestone
ms_counts = {}
label_counts = {}
blocked_issues = []
for issue in data:
ms = issue.get('milestone')
ms_title = ms['title'] if ms else 'No milestone'
ms_counts[ms_title] = ms_counts.get(ms_title, 0) + 1
labels = [l['name'] for l in issue.get('labels', [])]
for label in labels:
label_counts[label] = label_counts.get(label, 0) + 1
if 'blocked' in label.lower():
blocked_issues.append(f'#{issue["number"]}: {issue["title"][:70]}')
print()
print('=== By Milestone ===')
for ms, count in sorted(ms_counts.items()):
print(f' {ms}: {count}')
print()
print('=== By Label (top 40) ===')
for label, count in sorted(label_counts.items(), key=lambda x: -x[1])[:40]:
print(f' {label}: {count}')
print()
print('=== Blocked Issues ===')
for b in blocked_issues:
print(f' {b}')
print(f'Total blocked: {len(blocked_issues)}')