Automattic / Automattic/wp-codebox
recipe-run preview hold should support failed or in-progress workflows for debugging
- Lingua principale
- TypeScript
- Stelle
- 16
- Fork
- 4
- Merge medio
- 59m
- PR unite (30g)
- 131
Descrizione
## Problem
`wp-codebox recipe-run --preview-hold --preview-hold-blocking` is useful for opening a live Playground preview. Today the preview is effectively tied to successful recipe completion: if a workflow step fails or a long proof never reaches the terminal hold phase, the runtime is torn down and callers cannot inspect the live page/editor that failed.
For generic browser/runtime workflows, callers need a way to hold the preview when a workflow fails or while a long workflow is blocked, without pretending the proof succeeded.
## Evidence
While proving a WPCOM selected-page edit/save/export workflow, WP Codebox could emit a local/public preview URL after the early browser proof, but subsequent workflow failure caused the runtime to be destroyed before a human could inspect the editor state. This is a generic lifecycle problem: preview hold should be a debugging/inspection mode, not a success-only artifact.
## Desired behavior
Add a generic preview-hold failure policy, for example:
- `--preview-hold-on-failure`
- or `--preview-hold-policy=success|failure|always`
The runtime should remain held for the configured hold period or blocking session even if a workflow step fails, while preserving the run status as failed.
## Acceptance criteria
- A failed recipe can still emit `preview.localUrl`/`preview.publicUrl` when preview hold-on-failure is requested.
- Run status remains failed; holding a preview must not mask proof failure.
- Artifacts record failure status and preview lifecycle separately.
- Existing success-only behavior remains the default unless the new option is supplied.
- No WPCOM-specific logic or fixtures.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia tracciando il punto di ingresso `wp-codebox recipe-run --preview-hold --preview-hold-blocking` attraverso la gestione del ciclo di vita dell’anteprima, lo stato dell’esecuzione e la registrazione degli artefatti. Verifica in che modo i passaggi non riusciti smantellano attualmente il runtime e come viene selezionato il mantenimento solo in caso di successo. Il lavoro è completato quando la policy di errore richiesta mantiene il runtime ed emette gli URL di anteprima, preservando lo stato di errore e artefatti separati del ciclo di vita, senza modificare i valori predefiniti esistenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- backend, cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100