[feat] Session state: expose the active run identity

Aperta
#2,290 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api, backend

Direzione di ricerca

Start from SessionStateNotice ({sessionId, branchId, running, stopping}) and the attach running snapshot, then trace where run:started and run:ended assign their run id. Decide how the owner exposes the active run id per branch, either as an optional field or a query method. Done means a client attaching mid-run gets the same id that later terminal events carry, and absent ids still work with the existing placeholder behaviour.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

core enhancement P2

Problem

session.state and the attach running snapshot report only running/stopping. A client that attaches after run:started, or that sees an owner-reported running Session before the first session.event, has no stable run identity. Desktop currently keeps a placeholder row so sends stay locked, but it cannot match a later terminal by identity and must avoid inventing an owner:<sessionId> id.

Context

  • SessionStateNotice is {sessionId, branchId, running, stopping}.
  • run:started / run:ended carry a real run id, but those frames are not guaranteed before the first state read.
  • Desktop pets/stop controls need a stable control identity per active run.

Scope

Add an optional owner run/turn identity (for example runId or turnId) to session.state and the attach running snapshot, or provide an equivalent owner method that returns the active run per branch. The identity must be stable for the lifetime of the run and match the id used by run:started / run:ended.

Acceptance

  • A client attaching during an active run receives the same run identity from state/attach that later terminal events name.
  • A state-only client can match a terminal without guessing.
  • No client has to synthesize a run id or persist a second run table.
  • Absent identity remains valid for older/unknown states; clients keep the current fail-closed placeholder behavior.

Boundaries

This is a protocol/owner change only. Desktop keeps its current placeholder when the id is absent and removes it once the identity is available.

Related

  • arcships/dim#647 (run state projection)
Lingua principale
Rust
Stelle
584
Fork
42
Merge medio
9h 41m
PR unite (30g)
929

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di arcships/dim

Tutte le issue di arcships/dim

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.