BUG Configuration keeps runtime-status errors after polling recovers
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 86/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- playwright, typescript
- 领域
- frontend, testing-qa
调研方向
从 frontend/src/components/Configuration/Reinitialize.tsx 开始,重点查看第 36-50 行的刷新处理以及第 82 行的错误渲染。运行 issue 中描述的聚焦 Playwright 探针,然后验证恢复后的状态轮询只会移除过时的轮询错误,同时保留应用错误和确实需要重启的状态。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 4.5k
- 派生
- 896
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 210
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PyRIT 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/PyRIT#2888 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 91/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
相似的 Issue
-
docs pydanty:is-working
难度 2/5 1-3 小时 新手友好度 75/100
pydantic/pydantic-ai#8863 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
run-llama/llama_index#23278 ·
维护者通常 2 天内回复
-
documentation from-review-extraction github-actions priority: low severity:nit
难度 1/5 1 小时以内 新手友好度 92/100
LearningCircuit/local-deep-research#6946 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
oracle/langchain-oracle#323 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
tenstorrent/tt-metal#58057 · 1 条评论 ·
维护者通常 1 天内回复