Skip to content

[Keepalive] Add Codex log analyzer for automatic progress detection #454

Description

@stranske

Why

The keepalive automation relies on Codex updating PR body checkboxes to track progress. However, Codex frequently completes work without updating checkboxes, causing the keepalive to see no progress and either stall or repeat instructions. This creates a disconnect between actual work done and detected progress.

Scope

Implement a tool that analyzes PR file changes and/or Codex session logs to infer task completion, then automatically suggests or applies checkbox updates.

Non-Goals

  • Replacing the existing checkbox-based tracking entirely
  • Modifying how Codex itself operates
  • Changes to the PR body format

Tasks

  • Port prototype from stranske/Trend_Model_Project/tools/codex_log_analyzer.py
  • Add integration point in keepalive_loop.js after Codex round completes
  • Implement PR body checkbox auto-update based on analysis
  • Add tests for the analyzer integration
  • Document the new progress detection flow

Acceptance Criteria

  • Analyzer can identify task completion from PR file changes
  • Checkbox updates are suggested/applied when evidence found
  • No false positives (low confidence results are flagged, not auto-applied)
  • Integration does not break existing keepalive flow
  • Works without external API dependencies (LLM optional enhancement)

Implementation Notes

Prototype implementation exists at:

  • stranske/Trend_Model_Project/tools/codex_log_analyzer.py

Key functions to port:

  • analyze_pr_changes() - analyzes PR file diff for task evidence
  • find_evidence_for_task() - matches task text against file changes
  • format_analysis_report() - produces structured output

Integration point in keepalive:

// After Codex round, before next instruction
const analysis = await analyzeCodexProgress(prNumber, fileChanges, tasks);
if (analysis.checkbox_updates_needed.length > 0) {
  await updatePRCheckboxes(prNumber, analysis.checkbox_updates_needed);
}

Related: Addresses keepalive stalling issue observed in Trend_Model_Project PRs #4111, #4112, #4113, #4114.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions