feat(stability): unify readiness and recovery
CI - Build & Test / Backend (.NET) (push) Successful in 45s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 1m0s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 2m49s
CI - Build & Test / Security Check (push) Successful in 7s
CI - Build & Test / Deploy Nexus (push) Has been skipped

This commit is contained in:
AzuTear
2026-08-01 01:21:33 +02:00
parent 38282e4f7f
commit cd8c78d165
67 changed files with 2616 additions and 601 deletions
+29
View File
@@ -23,6 +23,11 @@ interface MockOptions {
domainResyncSequence?: number
boardRefreshDelayMs?: number
boardRefreshTitle?: string
apiFailure?: {
path: string
status: number
attempts?: number
}
}
interface CapturedRequest {
@@ -40,6 +45,7 @@ export interface NexusApiHarness {
readonly chatRequests: CapturedRequest[]
readonly resyncResponseCount: number
readonly openClawOverviewRequestCount: number
readonly browserTelemetryRequestCount: number
readonly proposal: Record<string, unknown>
}
@@ -453,6 +459,8 @@ export async function mockNexusApi(
let resyncResponseCount = 0
let boardInitialRequestCount = 0
let openClawOverviewRequestCount = 0
let browserTelemetryRequestCount = 0
let injectedFailureCount = 0
let openTaskState = 'Backlog'
await page.route('**/api/**', async route => {
@@ -469,6 +477,23 @@ export async function mockNexusApi(
return
}
if (
options.apiFailure
&& path === options.apiFailure.path
&& injectedFailureCount < (options.apiFailure.attempts ?? 1)
) {
injectedFailureCount += 1
await fulfillJson(
route,
problem(
'The requested Nexus dependency is temporarily unavailable.',
options.apiFailure.status,
),
options.apiFailure.status,
)
return
}
if (path === '/api/v1/auth/refresh' && method === 'POST') {
if (!authenticated) {
await fulfillJson(route, problem('No active E2E session.', 401), 401)
@@ -861,6 +886,7 @@ export async function mockNexusApi(
return
}
if (path === '/api/v1/telemetry/browser') {
browserTelemetryRequestCount += 1
await route.fulfill({ status: 202 })
return
}
@@ -1192,6 +1218,9 @@ export async function mockNexusApi(
get openClawOverviewRequestCount() {
return openClawOverviewRequestCount
},
get browserTelemetryRequestCount() {
return browserTelemetryRequestCount
},
get proposal() {
return proposal
},