mirror of
https://github.com/mikeyobrien/ralph-orchestrator.git
synced 2026-04-25 15:15:57 +03:00
[PR #9] [MERGED] feat(telemetry): Add per-iteration telemetry capture #85
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ralph-orchestrator#85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/9
Author: @sachafaust
Created: 12/28/2025
Status: ✅ Merged
Merged: 12/30/2025
Merged by: @mikeyobrien
Base:
main← Head:feature/per-iteration-telemetry📝 Commits (10+)
8dec3effeat(metrics): Add TriggerReason enum for per-iteration telemetry335e0b4docs: Update PROMPT.md with iteration 1 progress20005a0Extend IterationStats.record_iteration() with telemetry fields5bb2c5eUpdate scratchpad: record_iteration() extension completee589ce0test(metrics): Add unit tests for TriggerReason enum and telemetry fields5396d09Ralph checkpoint 32262a80feat(orchestrator): add IterationStats alongside Metrics77d66ecdocs: update scratchpad with Phase 2 Step 1 progress819754bAdd _determine_trigger_reason() method to orchestrator6135c16feat(orchestrator): record per-iteration telemetry in arun() loop📊 Changes
5 files changed (+569 additions, -20 deletions)
View changed files
📝
ralph.yml(+4 -0)📝
src/ralph_orchestrator/metrics.py(+37 -1)📝
src/ralph_orchestrator/orchestrator.py(+125 -19)📝
tests/test_metrics.py(+241 -0)📝
tests/test_orchestrator.py(+162 -0)📄 Description
Summary
Adds per-iteration telemetry capture to ralph-orchestrator, enabling detailed analysis of orchestration patterns.
Changes
TriggerReasonenum - Categorizes why each iteration was triggered (initial, task_incomplete, recovery, etc.)IterationStats.record_iteration()- Now captures trigger_reason, output_preview (truncated), tokens_used, cost, and tools_used_determine_trigger_reason()method - Analyzes orchestrator state to classify iteration triggers_print_summary()- Saves full iteration list with per-iteration details to metrics JSONOutput Format
Test Plan
record_iteration()calls still work)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.