fix(monitor): keep failing publications visible outside the queue page
- The attention lane was derived from page 1 of the queue (limit 50, newest by updated_at), so failures ranked past 50 silently disappeared from "needs attention" as the completed backlog grew. - Fetch attention items with a dedicated request: the API now accepts a comma-separated processing_state list (failed,stalled) and the view prefers that result set over the paged queue. - Batch retry/cancel targets are computed from the same failure set instead of the visible page, so actions reach every failing item. - 全部任务 shows 已显示 N / 共 M plus 加载更多 so rows past 50 are reachable. - Fix pre-existing ui_settings integration test: strict JSON decoding rejects the legacy updated_by field (actor comes from the session). - Tests: view regression (attention item outside the page, load-more affordance) + handler multi-state filter + isolated-DB set filter.
This commit is contained in:
@@ -37,7 +37,7 @@ func TestUISettingsWriteReadBackIntegration(t *testing.T) {
|
||||
}
|
||||
|
||||
create := httptest.NewRecorder()
|
||||
createRequest := httptest.NewRequest(http.MethodPost, "/api/v1/ui-settings/candidates", bytes.NewBufferString(`{"document_refresh_seconds":30,"resource_refresh_seconds":60,"stalled_after_seconds":3600,"finalizing_after_seconds":14400,"updated_by":"engineer-e2e"}`))
|
||||
createRequest := httptest.NewRequest(http.MethodPost, "/api/v1/ui-settings/candidates", bytes.NewBufferString(`{"document_refresh_seconds":30,"resource_refresh_seconds":60,"stalled_after_seconds":3600,"finalizing_after_seconds":14400}`))
|
||||
createRequest.Header.Set("X-Governance-Action", "ui-settings")
|
||||
createRequest.Header.Set("Idempotency-Key", "op-e2e-uis-create")
|
||||
handler.ServeHTTP(create, createRequest)
|
||||
|
||||
Reference in New Issue
Block a user