Skip to content

fix(issues): claim a new Session on @new-then-resume comments - #1224

Open
RainMona wants to merge 3 commits into
TraderAlice:devfrom
RainMona:cursor/telegram-issue-comment-owner-b1b6
Open

fix(issues): claim a new Session on @new-then-resume comments#1224
RainMona wants to merge 3 commits into
TraderAlice:devfrom
RainMona:cursor/telegram-issue-comment-owner-b1b6

Conversation

@RainMona

Copy link
Copy Markdown
Contributor

Rebinding a Connector / Telegram phone-desk Issue to New Session · assign after first run (@new-then-resume) left inbound chat on the previous Session.

This is an external proposal from RainMona/OpenAlice, based on current TraderAlice/dev (ab06cbf2). Per CONTRIBUTING.md, treat it as a reference if you would rather reimplement on a maintainer-owned branch.

Problem

Scheduled fires already recruit a fresh Session and rewrite assignee to that @resumeId. Comment replies did not.

dispatchIssueCommentReply treated “no exact @resumeId” as unowned work and used { kind: 'issue', action: 'created' } plus reconstruct: true. That continues creator / prior-reconstruction provenance, so a Telegram / Connector DM after a rebind kept talking to the old Session.

Decision

Current assignee is the only comment-dispatch contract.

Assignee Comment reply
exact @resumeId Continue that Session
@new-then-resume Recruit a fresh Session in the Issue Workspace and claim it as owner
@new-each-run / @unassigned / @human Unchanged creator / reconstruct fallback; collaborator, not owner

Alternatives considered:

  1. Keep comments on the creator until the next scheduled fire — Telegram / Connector chat stays on the old Session after a rebind.
  2. Fail comments until a fire claims an owner — worse phone-desk UX; comments are the chat.
  3. Chosen: the first human comment is a first dispatch, same as the first fire. Rebind means hire again. Creator provenance must not win.

This is a design choice from the reported bug, not a maintainer-approved product review.

Changes

  • Extract claimIssueFirstSession / issueRuntimeSelection so schedule and comments share one claim path
  • @new-then-resume comment dispatch uses { kind: 'workspace' } (no reconstruct), relation: 'owner', then claims
  • Conversation ask forwards credential / model / effort only when recruiting a fresh Session
  • Connector inbound, Issue HTTP comments, and issue_comment pass the claim deps
  • Docs, the self-scheduling skill, and Issue composer copy match the new priority

Verification

On the synced tip:

  • npx tsc --noEmit and cd ui && npx tsc -b passed
  • Targeted Vitest: 7 files / 136 tests (claim-session, comment-delivery, telegram-desk-chat, conversation-control, scanner, issue routes, issue tools)
  • Fork CI required checks passed (CI / test, build, docker smoke, cross-platform tests, platform dev-smoke)

No browser walk: this is comment-dispatch / assignee lifecycle. Composer hint copy only.

Boundary touch

Issue assignee lifecycle, comment dispatch, Connector phone-desk ingest. No trading writes, credentials, or migrations.

Non-goals

  • Changing @new-each-run / @unassigned / @human comment fallback
  • A new workflow engine or a second ownership field besides assignee

cursoragent and others added 3 commits August 29, 2026 12:12
Rebinding a Telegram desk (or any scheduled Issue) to "New Session ·
assign after first run" left inbound comments following creator or
prior-reconstruction provenance, so chat kept the old Session.

Treat current assignee as the only comment-dispatch contract:
@new-then-resume now recruits a fresh Workspace Session and claims it,
matching the first scheduled fire.

Co-authored-by: RainMona <RainMona@users.noreply.github.com>
Bring the fork feature branch onto current TraderAlice/dev (connector
phone-desk generalization, Auto Prediction harness, and related Issue
surfaces). Keep current assignee as the only comment-dispatch contract:
@new-then-resume comments still recruit and claim a first Session.

Co-authored-by: RainMona <RainMona@users.noreply.github.com>
Keep the branch current with TraderAlice/dev before opening the upstream PR.

Co-authored-by: RainMona <RainMona@users.noreply.github.com>
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

@cursoragent is attempting to deploy a commit to the luokerenx4's Team Team on Vercel.

A member of the Team first needs to authorize it.

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.

2 participants