Skip to content

Telegram approval-aware task lane + promotion consistency#17

Draft
srxly888-creator wants to merge 18 commits intomainfrom
codex/pr3-promotion-state-consistency
Draft

Telegram approval-aware task lane + promotion consistency#17
srxly888-creator wants to merge 18 commits intomainfrom
codex/pr3-promotion-state-consistency

Conversation

@srxly888-creator
Copy link
Copy Markdown
Owner

Summary

This PR promotes the current Telegram task lane from patch-oriented execution to an approval-aware flow with consistent promotion state across Telegram, admin, and runtime artifacts.

It also closes a key control-plane gap after worker failures and adds step-level promotion observability for easier diagnosis of intermittent promotion failures.

Included changes

  • fix terminal-state closure after worker failures
  • make Telegram /task approval-aware
  • reconcile promotion state across Telegram/admin/runtime
  • add promotion step trace summaries for promotion internals

Key behavior changes

  • /task <request> now defaults to an approval-aware path
  • /task patch <request> explicitly stays patch-only
  • ready_for_promotion transitions into awaiting_approval
  • /approve <approval_id> approve promotes the task and can create a Draft PR
  • repeated approval on the same approval id is idempotent
  • promotion success/failure is projected consistently across:
    • Telegram
    • manager dispatch state
    • admin audit trail
    • runtime artifacts

Reliability improvements

  • terminal summary.json is forced even when post-processing fails after driver_result.json is written
  • manager falls back to runtime artifacts to reconcile terminal run state
  • promotion diagnostics now include step-level trace and summary for:
    • create_branch
    • apply_patch
    • validator
    • commit
    • push
    • create_pr

Validation

Targeted regression suites

  • runner outcomes
  • manager agent
  • Telegram gateway
  • admin backend
  • git promotion gate

Live E2E

Validated end-to-end flow:

/task -> awaiting_approval -> /approve -> draft_pr_created

Observed in live run:

  • approval-aware task flow reached awaiting_approval
  • approval created a promotion run
  • promotion created a Draft PR
  • Telegram, manager, and admin reflected the same final promoted state
  • repeated approval did not create a second promotion

Commits included

  • 69a7b26 fix(manager): close terminal runs after worker failures
  • 0ab0fa6 feat(telegram): make /task approval-aware
  • 695b1a8 Add consistent promotion state reconciliation
  • 150fc0a Add promotion step trace summaries

Rollout note

Please test from branch codex/pr3-promotion-state-consistency and do not validate directly on main.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant