Skip to content

Kick Off Promoted Leads - #1237

Merged
SuuBro merged 24 commits into
mainfrom
goal/kick-off-promo-67f7ec83
Aug 23, 2026
Merged

Kick Off Promoted Leads#1237
SuuBro merged 24 commits into
mainfrom
goal/kick-off-promo-67f7ec83

Conversation

@SuuBro

@SuuBro SuuBro commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • start an in-place promoted team lead with one exact system-authored kickoff after canonical finalization
  • deduplicate promotion kickoff across concurrent retries and restart recovery while preserving transcript and worktree continuity
  • block kickoff for paused, inactive, setup-incomplete, or compensated promotions and keep exact retries idempotent while streaming
  • update promotion documentation and focused core, integration, and browser coverage

Validation

  • full implementation workflow: build, type-check, unit, browser, E2E, conformance, integrated review, and security review passed
  • post-main-merge npm run check passed
  • affected reader/classification/runner suites: 187 passed

🤖 Generated with Bobbit

SuuBro and others added 17 commits August 23, 2026 00:26
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
…7f7ec83

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds durable, exactly-once kickoff delivery for promoted team leads and protects dispatch with canonical goal lifecycle checks.

  • Persists the goal dispatch guard through prompt queues, in-flight records, restore, and retry paths.
  • Rechecks pause, archive, readiness, ownership, and active-state conditions immediately before dispatch.
  • Finalizes adopted leads during boot and restores subscriptions when finalization fails before installation.
  • Adds focused core, integration, and browser coverage for pause races, restart recovery, and kickoff idempotency.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/server/agent/session-manager.ts Carries the goal lifecycle fence through durable prompt delivery and rechecks it at the final synchronous dispatch boundary.
src/server/agent/team-manager.ts Finalizes restored adopted leads before boot nudges and distinguishes installed subscriptions from failures requiring ordinary fallback.
src/server/agent/nested-goal-routes.ts Redrains retained goal-guarded prompts after durable resume processing.
src/server/agent/session-store.ts Preserves the optional goal dispatch guard in normalized in-flight prompt records.
src/server/agent/prompt-queue.ts Validates and persists the optional goal dispatch guard on queued prompt occurrences.
src/server/server.ts Awaits asynchronous team-event resubscription during startup and integrates promotion finalization into the server lifecycle.

Sequence Diagram

sequenceDiagram
    participant Team as TeamManager
    participant Session as SessionManager
    participant Goal as GoalStore
    participant Queue as Reliable Queue
    participant Agent
    Team->>Goal: Finalize adopted lead
    Goal-->>Team: Canonical runnable goal
    Team->>Session: Enqueue guarded kickoff
    Session->>Queue: Persist stable intent
    Session->>Goal: Recheck lifecycle guard
    alt Goal runnable
        Session->>Agent: Dispatch kickoff
    else Paused or inactive
        Session-->>Queue: Retain guarded intent
        Goal->>Session: Resume and drain
        Session->>Goal: Recheck lifecycle guard
        Session->>Agent: Dispatch kickoff
    end
Loading

Reviews (3): Last reviewed commit: "Fix promotion pause test contracts" | Re-trigger Greptile

Comment thread src/server/agent/team-manager.ts
Comment thread src/server/agent/team-manager.ts
SuuBro and others added 7 commits August 23, 2026 04:12
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
…omo-67f7ec83

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
@SuuBro

SuuBro commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile-apps @greptileai you didn't approve the PR

@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

You're right — I submitted my review as COMMENTED rather than APPROVED. As a review bot, I can only approve if I have no outstanding concerns. Looking at my previous review, I left inline comments but didn't resolve them before submitting.

If those comments have been addressed (or you'd like me to re-evaluate the current state of the PR), I'm happy to do a fresh pass and submit an approval if everything looks good. Want me to review the current diff now?

@SuuBro

SuuBro commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator Author

You're right — I submitted my review as COMMENTED rather than APPROVED. As a review bot, I can only approve if I have no outstanding concerns. Looking at my previous review, I left inline comments but didn't resolve them before submitting.

If those comments have been addressed (or you'd like me to re-evaluate the current state of the PR), I'm happy to do a fresh pass and submit an approval if everything looks good. Want me to review the current diff now?

@greptileai Yes please, review the current diff now

@SuuBro
SuuBro merged commit bf3b9fb into main Aug 23, 2026
11 checks passed
@SuuBro
SuuBro deleted the goal/kick-off-promo-67f7ec83 branch August 23, 2026 07:46
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