BUG Configuration keeps runtime-status errors after polling recovers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- playwright, typescript
- Ambito
- frontend, testing-qa
Direzione di ricerca
Inizia da frontend/src/components/Configuration/Reinitialize.tsx, in particolare dalla gestione dell’aggiornamento alle righe 36-50 e dalla visualizzazione degli errori alla riga 82. Esegui la verifica mirata con Playwright descritta nell’issue, quindi verifica che un polling dello stato ripristinato rimuova solo l’errore di polling obsoleto, preservando gli errori di applicazione e uno stato reale che richiede un riavvio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
A single failed runtime-status request leaves a red error in Configuration even after subsequent polls succeed and report a healthy, ready runtime. Reload file does not clear it. Navigating away from Configuration and returning does.
This is a stale status-request error, not a failed reinitialization or a real restart-required state. The administrator sees a failure message after the condition that produced it has recovered.
Severity: P2 / Medium. The misleading status makes it difficult to tell whether the runtime still needs attention. Observed in the Configuration UI added by #2833; reproducing it does not require applying configuration or calling an external provider.
Steps/Code to Reproduce
- Open Configuration on a local instance and wait for a successful
GET /api/config/runtimepoll. - Make exactly one subsequent status request return HTTP 503 with a recognizable
detailmessage, then allow requests through normally. - Wait for at least three more successful status polls. Confirm their responses report
state: readyandoutcome: success. - Observe that the earlier error remains visible.
- Click Reload file. The error still remains.
- Navigate to Home and back to Configuration. The error disappears.
The failure needs to be injected after the component is mounted, rather than racing its initial request. A minimal Playwright probe, with page and expect from @playwright/test and baseURL set to the running local frontend, is:
let failNextPoll = false;
let successfulPolls = 0;
const detail = 'Runtime status temporarily unavailable.';
await page.addInitScript(() => {
localStorage.setItem('pyrit-tour-completed', 'true');
});
await page.route('**/api/config/runtime', async route => {
if (failNextPoll) {
failNextPoll = false;
await route.fulfill({ status: 503, json: { detail } });
return;
}
const response = await route.fetch();
if (response.ok()) successfulPolls += 1;
await route.fulfill({ response });
});
await page.goto('/config');
await expect.poll(() => successfulPolls, { timeout: 15000 })
.toBeGreaterThanOrEqual(1);
const beforeFailure = successfulPolls;
failNextPoll = true;
const error = page.getByText(detail, { exact: true });
await expect(error).toBeVisible();
await expect.poll(() => successfulPolls, { timeout: 15000 })
.toBeGreaterThanOrEqual(beforeFailure + 3);
// Fails on the tested commit: recovered polling leaves the old error visible.
await expect(error).not.toBeVisible();
Expected Results
Clear a status-poll error after status polling recovers. Do not clear an unrelated apply error or hide a real restart-required state. These error sources should be distinguishable in state and in regression tests.
Actual Results
The focused audit recorded eight successful polls overall, including at least three after the injected failure. The latest response was:
{
"state": "ready",
"outcome": "success",
"message": "PyRIT is ready.",
"enabled": true,
"applying": false
}
The failure message remained both after those successful polls and after Reload file. Leaving and returning to Configuration cleared it.
In Reinitialize.tsx, lines 36-50, refresh success updates status, while refresh failure sets error. A successful refresh does not clear the recovered polling error, which remains rendered at line 82.
Workaround: Navigate away and back, or fully reload the page. Reinitializing a healthy runtime should not be necessary to clear a recovered status-request failure.
Screenshots
Captured in the September 25 catch-up audit artifacts, not uploaded to this issue:
daily-2026-09-25-catchup/manual/runtime-stale-status-error.png- Poll counts, latest response, and recovery observations:
daily-2026-09-25-catchup/manual/runtime-status-recovery-ux.json
The relevant observations and reproduction code are included above so the artifact files are not required.
Versions
- OS: Windows, x86-64.
- Browser: Chromium through Playwright; focused reproduction at 1280 x 800.
- Python: CPython 3.14.4, uv-managed environment.
- PyRIT:
1.2.0.dev0, editable source checkout atc32546a1e3d069ea9794df31ded86e17487dcf2a. - Local-only backend. The probe injected one failed status read and allowed subsequent requests to reach the real backend. No live external provider was used.
- Full
pyrit.show_versions()output was not captured.
- Lingua principale
- Python
- Stelle
- 4.5k
- Fork
- 896
- Merge medio
- 2g 19h
- PR unite (30g)
- 206
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/PyRIT
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/PyRIT#2888 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/PyRIT
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-2 giorni Idoneità per principianti 70/100
-
FingerprintSplitter raises ZeroDivisionError when int(frac_train * len(dataset)) floors to zeroAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
lmstudio-ai/mlx-engine#376 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pyiron/bagofholding#166 ·