Workflows: follow-ups from the #38882 review

Aperta
#39,013 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend, devtools

Direzione di ricerca

Start with workflow.ts for the signal and wait follow-up, then trace the agent-step and trigger runtime paths named in the issue. The list spans signal persistence, cancellation and deadlines, linked runs, issue linking, Forge pagination, and runtime imports, so each item needs its own investigation. Done means addressing the listed follow-ups with behavior that holds across retries and restarts; the issue names no tests.

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

Descrizione

Follow-ups from CodeRabbit's full review of #38882 (durable workflows) at 9eb23b1. Each was checked against the code and holds, but needs a design change bigger than that PR's review round. The minor comments from the same review are left to be picked up with the area they touch.

Signals and waits

  • Validate a signal against the wait's own codec, not only its generated JSON Schema, before it wakes the wait (Schema.FiniteFromString passes {type: "string"}, then fails decode after the wait has closed). workflow.ts wait and early mail.
  • signalAll retries query the current waits again: give a broadcast an id and persist its recipient set.
  • Reusing a signal id with a different address or payload: deliver what the store accepted, or refuse the reuse.

Agent steps

  • A stop that fails during cancellation is not retried: keep a pending stop until it gets through, across restarts.
  • At a deadline, stop the restart continuation of the step's turn, not only the original turn.
  • A died turn on a continued thread is retried on that same thread: starting a new thread in the original thread's project needs that project at agent start, locally and over a link.
  • Linked environments: use the run a linked wait settled on (a continuation), and read it by id rather than from the 50 most recent runs.
  • Issue linking runs on the deadline path: record the turn and its deadline first, link separately and bounded.
  • Collect a step's reply from its own run, not the thread's whole history.

Triggers and runtime

  • Forge looks read at most 100 items: page back to the previous cursor instead of advancing past unread items.
  • Track the definition source the runtime evaluated, not the one read before the import.

From the cross-lab review (Claude Fable 5.2, Gemini 4 Neon, Grok 4.7)

  • A child that ends while the engine starts never tells its parent: the sweep is forked before link.current is set (WorkflowEngine.ts), so run/told journals a no-op and the parent's invoke waits for good.
  • runStatus("waiting") can overwrite paused (no status != 'paused' guard), so a run with a failed parallel branch and an open wait may sit in waiting without resuming or showing in Needs you.
  • The engine's BigInt SQLite setting leaks into cancels and onEnd retries started by the sweep, so their thread interrupts fail quietly.
  • A scheduled start that fails still stores the next due time, so that occurrence is skipped.
  • A step's automatic signal ids are positional, so a retried step that signals a different list drops signals.
  • runs() stops at 500 without saying so.
  • Forge opened triggers compare ISO timestamps as text, which breaks across formats.
  • invoke has no timeout; pullRequests.wait takes no headSha, so a wait after a push can settle on the previous commit's checks.
  • After two corrections without a result, an agent is restarted from scratch on a new thread.
  • A reload refused for cross-file problems still updates the last good version of the file.
  • Later, additive: a durable race (and cleanup of a wait a plain Effect.race loses), a concurrency cap or lock, more forge triggers, continue-as-new, retention.

Fixed on #38882 in 4703fc6 and taken out of this list: cancel stopping the whole thread, save reporting success too early, a definitions file that never finishes loading, and history with no definitions.

🤖 Generated with Claude Code

Lingua principale
TypeScript
Stelle
24.8k
Fork
6.4k
Merge medio
4h 29m
PR unite (30g)
488

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 pingdotgg/t3code

Tutte le issue di pingdotgg/t3code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.